| 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 .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Data:
[
{
Title: String,
IsAuction: False,
AuctionEnds: 0001-01-01,
BuyNowPrice: 0,
ViewItemUrl: String,
ImageUrl: String
}
],
Total: 0,
OpCode: 0,
ErrorText: String,
RequestTime: String,
ResponseTime: String,
TotalExecutionTime: String,
CachedResponse: False,
PermitAccess: False,
AccessDeniedMessage: String
}