| POST | /warranty | Create a Sell-Out | Create a sell-out in a POS you are authorised for |
|---|
"use strict";
export class CreateSellOutResponse {
/** @param {{saleDetailId?:number,saleDetailIds?:number[],saleId?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?number}
* @description Unique Identifier of the Sell-out item created in Booster */
saleDetailId;
/**
* @type {number[]}
* @description Unique Identifiers of the Sell-out items created in Booster if more than one */
saleDetailIds;
/**
* @type {number}
* @description Unique Identifier of the Sell-out header created in Booster */
saleId;
}
export class CreateSellOut {
/** @param {{brand?:string,posCode?:string,documentNumber?:string,documentDate?:string,documentLineNumber?:number,articleCode?:string,serialNumber?:string,quantity?:number,unitPrice?:number,currencyCode?:string,boosterCustomerId?:number,saleRepresentativeEmails?:string[],promoterTypeId?:string,returnReasonId?:string,comments?:string,originalSaleDetailId?:number,consSelloutReturnInStock?: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 {string}
* @description Richemont POS code */
posCode;
/**
* @type {string}
* @description Receipt or Invoice Number */
documentNumber;
/**
* @type {string}
* @description Date of the Sell-out */
documentDate;
/**
* @type {?number}
* @description Position Number */
documentLineNumber;
/**
* @type {string}
* @description Richemont Reference Code of the item */
articleCode;
/**
* @type {string}
* @description Serial Number of the item */
serialNumber;
/**
* @type {number}
* @description Use positive for standard Sell-out and negative quantity for return */
quantity;
/**
* @type {?number}
* @description Sold Price */
unitPrice;
/**
* @type {string}
* @description Currency of the sold price */
currencyCode;
/**
* @type {?number}
* @description Booster Customer Id */
boosterCustomerId;
/**
* @type {string[]}
* @description Sale Representative Email e.g. rauf.aliyev@richemont.com */
saleRepresentativeEmails;
/**
* @type {string}
* @description Promoter Type ID, e.g. DAI, FIT, GRT */
promoterTypeId;
/**
* @type {string}
* @description Return Reason ID, e.g ADM, CLR, EXC, DEF, OTH */
returnReasonId;
/**
* @type {string}
* @description Sale related comments */
comments;
/**
* @type {?number}
* @description Original Sale Detail Id */
originalSaleDetailId;
/**
* @type {?boolean}
* @description To have the piece back in stock as consignment in case of consignment sellout return */
consSelloutReturnInStock;
}
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.
POST /warranty HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateSellOut xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Sellout.ServiceModel">
<articleCode>String</articleCode>
<boosterCustomerId>0</boosterCustomerId>
<brand>String</brand>
<comments>String</comments>
<consSelloutReturnInStock>false</consSelloutReturnInStock>
<currencyCode>String</currencyCode>
<documentDate>0001-01-01T00:00:00</documentDate>
<documentLineNumber>0</documentLineNumber>
<documentNumber>String</documentNumber>
<originalSaleDetailId>0</originalSaleDetailId>
<posCode>String</posCode>
<promoterTypeId>String</promoterTypeId>
<quantity>0</quantity>
<returnReasonId>String</returnReasonId>
<saleRepresentativeEmails xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</saleRepresentativeEmails>
<serialNumber>String</serialNumber>
<unitPrice>0</unitPrice>
</CreateSellOut>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CreateSellOutResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Sellout.ServiceModel">
<saleDetailId>0</saleDetailId>
<saleDetailIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</saleDetailIds>
<saleId>0</saleId>
</CreateSellOutResponse>