Cdn Marketing API

<back to all web services

GetMarketplaceAdRequest

MarketplaceAds

Get CDN Marketplace ads

The following routes are available for this service:
GET/GetMarketplaceAdRequestEither Gsid or PCGS is required, not both.
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Cdn.MarketingApi.RequestObjects;
using Cdn.MarketingApi.ResponseObjects;
using Cdn.MarketingApi.Dto;

namespace Cdn.MarketingApi.Dto
{
    public partial class MarketplaceAdItemDto
    {
        public virtual string Title { get; set; }
        public virtual bool IsAuction { get; set; }
        public virtual DateTime? AuctionEnds { get; set; }
        public virtual decimal BuyNowPrice { get; set; }
        public virtual string ViewItemUrl { get; set; }
        public virtual string ImageUrl { get; set; }
    }

}

namespace Cdn.MarketingApi.RequestObjects
{
    ///<summary>
    ///Get CDN Marketplace ads
    ///</summary>
    [Api(Description="Get CDN Marketplace ads")]
    public partial class GetMarketplaceAdRequest
    {
        public virtual long Gsid { get; set; }
        public virtual string Pcgs { get; set; }
        public virtual int NumberOfItems { get; set; }
    }

}

namespace Cdn.MarketingApi.ResponseObjects
{
    public partial class BaseResponse
    {
        public virtual int Total { get; set; }
        public virtual int OpCode { get; set; }
        public virtual string ErrorText { get; set; }
        public virtual string RequestTime { get; set; }
        public virtual string ResponseTime { get; set; }
        public virtual string TotalExecutionTime { get; set; }
        public virtual bool CachedResponse { get; set; }
        public virtual bool PermitAccess { get; set; }
        public virtual string AccessDeniedMessage { get; set; }
    }

    public partial class MarketplaceAdResponse
        : BaseResponse
    {
        public virtual List<MarketplaceAdItemDto> Data { get; set; }
    }

}

C# GetMarketplaceAdRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /GetMarketplaceAdRequest HTTP/1.1 
Host: marketingapidev.greysheet.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<MarketplaceAdResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Cdn.MarketingApi.ResponseObjects">
  <AccessDeniedMessage>String</AccessDeniedMessage>
  <CachedResponse>false</CachedResponse>
  <ErrorText>String</ErrorText>
  <OpCode>0</OpCode>
  <PermitAccess>false</PermitAccess>
  <RequestTime>String</RequestTime>
  <ResponseTime>String</ResponseTime>
  <Total>0</Total>
  <TotalExecutionTime>String</TotalExecutionTime>
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Cdn.MarketingApi.Dto">
    <d2p1:MarketplaceAdItemDto>
      <d2p1:AuctionEnds>0001-01-01T00:00:00</d2p1:AuctionEnds>
      <d2p1:BuyNowPrice>0</d2p1:BuyNowPrice>
      <d2p1:ImageUrl>String</d2p1:ImageUrl>
      <d2p1:IsAuction>false</d2p1:IsAuction>
      <d2p1:Title>String</d2p1:Title>
      <d2p1:ViewItemUrl>String</d2p1:ViewItemUrl>
    </d2p1:MarketplaceAdItemDto>
  </Data>
</MarketplaceAdResponse>