| GET | /buyin/{brand} | Get list of buyin | Get list of paginated buyin based on the search parameters submitted |
|---|
"use strict";
export class BuyIn {
/** @param {{brand?:string,buyInOrderId?:number,posCode?:string,articleCode?:string,serialNumber?:string,buyInStatusId?:string,buyInDate?:string,saleRepresentativeEmails?:string[],isInStock?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided */
brand;
/**
* @type {number}
* @description Code of BuyIn */
buyInOrderId;
/**
* @type {string}
* @description Richemont POS code */
posCode;
/**
* @type {string}
* @description Richemont Reference Code of the item */
articleCode;
/**
* @type {string}
* @description Serial Number of the item */
serialNumber;
/**
* @type {string}
* @description Buy-in order status code */
buyInStatusId;
/**
* @type {string}
* @description Buy-in creation date */
buyInDate;
/**
* @type {string[]}
* @description Emails of Sale Representatives */
saleRepresentativeEmails = [];
/**
* @type {boolean}
* @description True is the buy-in’s piece is in stock, False otherwise */
isInStock;
}
export class GetBuyInPaginatedResponse {
/** @param {{page?:number,items?:number,totalPages?:number,totalResults?:number,elements?:BuyIn[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description Index of the result set returnedr */
page;
/**
* @type {number}
* @description Size of the result set returned */
items;
/**
* @type {number}
* @description Total amount of pages / result sets */
totalPages;
/**
* @type {number}
* @description Total amount of results */
totalResults;
/**
* @type {BuyIn[]}
* @description List of Sale Details */
elements;
}
export class GetBuyInPaginated {
/** @param {{brand?:string,posCode?:string,articleCode?:string,serialNumber?:string,buyInStatusId?:string,isInStock?:boolean,page?:number,items?:number,noCount?:boolean,sortBy?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Richemont Brand ID */
brand;
/**
* @type {string}
* @description Richemont POS code */
posCode;
/**
* @type {string}
* @description Richemont Reference Code of the item */
articleCode;
/**
* @type {string}
* @description Serial Number of the item */
serialNumber;
/**
* @type {string}
* @description Buy-in order status code */
buyInStatusId;
/**
* @type {?boolean}
* @description True is the buy-in’s piece is in stock, False otherwise */
isInStock;
/**
* @type {number}
* @description Index of the result set returned */
page;
/**
* @type {number}
* @description Size of the result set returned */
items;
/**
* @type {boolean}
* @description Omit precise record count - save on performance */
noCount;
/**
* @type {string}
* @description Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'. */
sortBy;
}
JavaScript GetBuyInPaginated DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /buyin/{brand} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"page":0,"items":0,"totalPages":0,"totalResults":0}