| GET | /GetMarketplaceAdRequest | Either Gsid or PCGS is required, not both. |
|---|
"use strict";
export class BaseResponse {
/** @param {{Total?:number,OpCode?:number,ErrorText?:string,RequestTime?:string,ResponseTime?:string,TotalExecutionTime?:string,CachedResponse?:boolean,PermitAccess?:boolean,AccessDeniedMessage?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Total;
/** @type {number} */
OpCode;
/** @type {string} */
ErrorText;
/** @type {string} */
RequestTime;
/** @type {string} */
ResponseTime;
/** @type {string} */
TotalExecutionTime;
/** @type {boolean} */
CachedResponse;
/** @type {boolean} */
PermitAccess;
/** @type {string} */
AccessDeniedMessage;
}
export class MarketplaceAdItemDto {
/** @param {{Title?:string,IsAuction?:boolean,AuctionEnds?:string,BuyNowPrice?:number,ViewItemUrl?:string,ImageUrl?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Title;
/** @type {boolean} */
IsAuction;
/** @type {?string} */
AuctionEnds;
/** @type {number} */
BuyNowPrice;
/** @type {string} */
ViewItemUrl;
/** @type {string} */
ImageUrl;
}
export class MarketplaceAdResponse extends BaseResponse {
/** @param {{Data?:MarketplaceAdItemDto[],Total?:number,OpCode?:number,ErrorText?:string,RequestTime?:string,ResponseTime?:string,TotalExecutionTime?:string,CachedResponse?:boolean,PermitAccess?:boolean,AccessDeniedMessage?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {MarketplaceAdItemDto[]} */
Data;
}
export class GetMarketplaceAdRequest {
/** @param {{Gsid?:number,Pcgs?:string,NumberOfItems?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Gsid;
/** @type {string} */
Pcgs;
/** @type {number} */
NumberOfItems;
}
JavaScript GetMarketplaceAdRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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>