| POST | /purchase/simulate/v2 | Simulate Order |
|---|
"use strict";
export class Quantity {
/** @param {{unit?:string,value?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Unit */
unit;
/**
* @type {number}
* @description Value */
value;
}
export class Amount {
/** @param {{value?:number,currency?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description Value */
value;
/**
* @type {string}
* @description Currency */
currency;
}
export class AmountAndQuantity {
/** @param {{amount?:Amount,baseQuantity?:Quantity}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {Amount}
* @description Amount */
amount;
/**
* @type {Quantity}
* @description Base Quantity */
baseQuantity;
}
export class ItemTotalValues {
/** @param {{requestedQuantity?:Quantity,confirmedQuantity?:Quantity,availableQuantity?:Quantity,grossWeightMeasure?:Quantity,netWeightMeasure?:Quantity,volumeMeasure?:Quantity,netAmount?:Amount,netPrice?:AmountAndQuantity,taxAmount?:Amount,retailSalesPriceAmount?:Amount}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {Quantity}
* @description Requested Quantity */
requestedQuantity;
/**
* @type {Quantity}
* @description Confirmed Quantity */
confirmedQuantity;
/**
* @type {Quantity}
* @description Available Quantity */
availableQuantity;
/**
* @type {Quantity}
* @description Gross Weight */
grossWeightMeasure;
/**
* @type {Quantity}
* @description Net Weight */
netWeightMeasure;
/**
* @type {Quantity}
* @description Volume */
volumeMeasure;
/**
* @type {Amount}
* @description Net Amount Line Total */
netAmount;
/**
* @type {AmountAndQuantity}
* @description Net Price Line Total */
netPrice;
/**
* @type {Amount}
* @description Tax Amount Line Total */
taxAmount;
/**
* @type {Amount}
* @description Retail Sales Price Line Total */
retailSalesPriceAmount;
}
export class Warning {
/** @param {{id?:string,message?:string,severityCode?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Id */
id;
/**
* @type {string}
* @description Message */
message;
/**
* @type {number}
* @description Severity code, possible values: 1, 2, 3, 4 */
severityCode;
}
export class SimulateOrderItemResponseV2 {
/** @param {{lineNumber?:number,parentLineNumber?:number,requestLineNumber?:number,articleCode?:string,substitutedArticleCode?:string,deliveryPlantId?:string,expectedDeliveryDate?:string,buckleSummary?:string,materialSummary?:string,contentSummary?:string,strapSummary?:string,totalValues?:ItemTotalValues,warnings?:Warning[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description Line Number, e.g 20, 40, 21, 41 */
lineNumber;
/**
* @type {number}
* @description Parent Line Number, e.g 20, 40 */
parentLineNumber;
/**
* @type {number}
* @description Original line number in the request. Line numbers are remapped after the split */
requestLineNumber;
/**
* @type {string}
* @description Reference No of item, e.g.: CRWB521234 */
articleCode;
/**
* @type {string}
* @description Substituted reference No of item, e.g.: CRWB520003 */
substitutedArticleCode;
/**
* @type {string}
* @description DeliveryPlantId of item, e.g.: CHD6 */
deliveryPlantId;
/**
* @type {string}
* @description Expected Delivery Date, e.g. '2020-12-30' */
expectedDeliveryDate;
/**
* @type {string}
* @description Buckle Summary, need to be forwarded to order creation */
buckleSummary;
/**
* @type {string}
* @description Material Summary, need to be forwarded to order creation */
materialSummary;
/**
* @type {string}
* @description Content Summary, need to be forwarded to order creation */
contentSummary;
/**
* @type {string}
* @description Strap Summary, need to be forwarded to order creation */
strapSummary;
/**
* @type {ItemTotalValues}
* @description Item Total Values */
totalValues;
/**
* @type {Warning[]}
* @description Warning list */
warnings;
}
export class TotalValues {
/** @param {{grossWeightMeasure?:Quantity,netWeightMeasure?:Quantity,grossVolumeMeasure?:Quantity,grossAmount?:Amount,netAmount?:Amount,taxAmount?:Amount}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {Quantity}
* @description Gross Weight */
grossWeightMeasure;
/**
* @type {Quantity}
* @description Net Weight */
netWeightMeasure;
/**
* @type {Quantity}
* @description Gross Volume */
grossVolumeMeasure;
/**
* @type {Amount}
* @description Gross Amount */
grossAmount;
/**
* @type {Amount}
* @description Net Amount */
netAmount;
/**
* @type {Amount}
* @description Tax Amount */
taxAmount;
}
export class Address {
/** @param {{countryId?:string,stateId?:string,city?:string,street?:string,zipCode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Country ID */
countryId;
/**
* @type {string}
* @description State ID */
stateId;
/**
* @type {string}
* @description City Name */
city;
/**
* @type {string}
* @description Street Name and Number */
street;
/**
* @type {string}
* @description Postal Code */
zipCode;
}
export class Party {
/** @param {{id?:string,name?:string,address?:Address}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Internal ID of the Element */
id;
/**
* @type {string}
* @description Formatted Name of the Element */
name;
/**
* @type {Address}
* @description Geographic Address of the Element */
address;
}
export class SplittedSimulateOrderResponse {
/** @param {{orderType?:string,productType?:string,orderItems?:SimulateOrderItemResponseV2[],totalValues?:TotalValues,shipTo?:Party[],finalShipTo?:Party[],billTo?:Party[],soldTo?:Party,salesRepresentative?:Party,warnings?:Warning[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Order Type */
orderType;
/**
* @type {string}
* @description Product Type */
productType;
/**
* @type {SimulateOrderItemResponseV2[]}
* @description List of Articles simulated */
orderItems;
/**
* @type {TotalValues}
* @description Total Values */
totalValues;
/**
* @type {Party[]}
* @description Addresses which order can be shipped to */
shipTo;
/**
* @type {Party[]}
* @description Addresses which order can be final shipped to */
finalShipTo;
/**
* @type {Party[]}
* @description Addresses which order can be billed to */
billTo;
/**
* @type {Party}
* @description Address which order is made to */
soldTo;
/**
* @type {Party}
* @description Sales Representative */
salesRepresentative;
/**
* @type {Warning[]}
* @description Warning list */
warnings;
}
export class SimulateOrderResponseV2 {
/** @param {{results?:{ [index: string]: SplittedSimulateOrderResponse; },shipTo?:Party[],finalShipTo?:Party[],billTo?:Party[],soldTo?:Party,salesRepresentative?:Party}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {{ [index: string]: SplittedSimulateOrderResponse; }}
* @description List of splitted order simulation results */
results;
/**
* @type {Party[]}
* @description Addresses which order can be shipped to (common list for all splitted orders) */
shipTo;
/**
* @type {Party[]}
* @description Addresses which order can be final shipped to (common list for all splitted orders) */
finalShipTo;
/**
* @type {Party[]}
* @description Addresses which order can be billed to (common list for all splitted orders) */
billTo;
/**
* @type {Party}
* @description Address which order is made to (common list for all splitted orders) */
soldTo;
/**
* @type {Party}
* @description Sales representatives (common list for all splitted orders) */
salesRepresentative;
}
export class StrapItem {
/** @param {{speakingArticleCode?:string,buckleTypeDescription?:string,buckleTypeCode?:string,watch6Length?:number,watch12Length?:number,materialCode?:string,materialDescription?:string,colorCode?:string,colorDescription?:string,buckleWidth?:string,liningCode?:string,liningDescription?:string,stitchingCode?:string,stitchingDescription?:string,edgeCode?:string,edgeDescription?:string,paddingCode?:string,paddingDescription?:string,specialtyCode?:string,specialtyDescription?:string,nuancierCode?:string,isStrapVipOrder?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Article reference */
speakingArticleCode;
/**
* @type {string}
* @description Buckle type Description */
buckleTypeDescription;
/**
* @type {string}
* @description Buckle type */
buckleTypeCode;
/**
* @type {?number}
* @description watch 6 Length */
watch6Length;
/**
* @type {?number}
* @description watch 12 Length */
watch12Length;
/**
* @type {string}
* @description Article Material Code */
materialCode;
/**
* @type {string}
* @description Article Material Description */
materialDescription;
/**
* @type {string}
* @description Article Color Code */
colorCode;
/**
* @type {string}
* @description Article Color Description */
colorDescription;
/**
* @type {string}
* @description Buckle Witdh */
buckleWidth;
/**
* @type {string}
* @description Article Lining Code */
liningCode;
/**
* @type {string}
* @description Article Lining Description */
liningDescription;
/**
* @type {string}
* @description Article Stitching Code */
stitchingCode;
/**
* @type {string}
* @description Article Stitching Description */
stitchingDescription;
/**
* @type {string}
* @description Article Edge Code */
edgeCode;
/**
* @type {string}
* @description Article Edge Description */
edgeDescription;
/**
* @type {string}
* @description Article Padding Code */
paddingCode;
/**
* @type {string}
* @description Article Padding Description */
paddingDescription;
/**
* @type {string}
* @description Article Speciality Code */
specialtyCode;
/**
* @type {string}
* @description Article Speciality Description */
specialtyDescription;
/**
* @type {string}
* @description Nuancier Code */
nuancierCode;
/**
* @type {?boolean}
* @description Strap Vip Order */
isStrapVipOrder;
}
export class SimulateOrderItemRequestV2 {
/** @param {{lineNumber?:number,articleCode?:string,quantity?:number,requestedDeliveryDate?:string,orderType?:string,finalShipToId?:string,strap?:StrapItem}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description Line Number */
lineNumber;
/**
* @type {string}
* @description Reference ID of the article/product, e.g. 'CRWB520003' */
articleCode;
/**
* @type {number}
* @description Desired quantity of the article */
quantity;
/**
* @type {?string}
* @description Requested Delivery Date of the Item, e.g. '2020-12-30' */
requestedDeliveryDate;
/**
* @type {string}
* @description Purchase order type, e.g. 'WCFS', null. Null for ordinary order */
orderType;
/**
* @type {string}
* @description Final Ship To Pos Code */
finalShipToId;
/**
* @type {StrapItem}
* @description Strap definition */
strap;
}
export class EndCustomerDetails {
/** @param {{title?:string,firstName?:string,lastName?:string,email?:string,phone?:string,country?:string,city?:string,street?:string,houseNumber?:string,building?:string,postalCode?:string,region?:string,district?:string,additionalInfo?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Title of the end Customer, e.g. 'MR', 'MRS'. */
title;
/**
* @type {string}
* @description First Name of the end Customer */
firstName;
/**
* @type {string}
* @description Last Name of the end Customer */
lastName;
/**
* @type {string}
* @description Email of the end Customer */
email;
/**
* @type {string}
* @description Phone number of the end Customer, e.g. '0032477123456'. */
phone;
/**
* @type {string}
* @description Countr code in the shipping address, e.g. 'BE' (ISO Code) */
country;
/**
* @type {string}
* @description City name in the shipping address */
city;
/**
* @type {string}
* @description Street name in the shipping address */
street;
/**
* @type {string}
* @description House number in the shipping address */
houseNumber;
/**
* @type {string}
* @description Building number in the shipping address */
building;
/**
* @type {string}
* @description Postal code in the shipping address */
postalCode;
/**
* @type {string}
* @description Region code in the shipping address, e.g. 'VL' (ISO Code) */
region;
/**
* @type {string}
* @description District name in the shipping address */
district;
/**
* @type {string}
* @description Additional Info number to the shipping address */
additionalInfo;
}
export class SimulateOrderV2 {
/** @param {{brand?:string,posCode?:string,customerReference?:string,notes?:string,orderDate?:string,orderItems?:SimulateOrderItemRequestV2[],endCustomerBooster1Id?:string,endCustomerDetails?:EndCustomerDetails}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Brand Trigram of the intended Order, e.g. 'IWC', 'CAR', etc. */
brand;
/**
* @type {string}
* @description Global Pos Code for the intended Order e.g. ES100:102048 */
posCode;
/**
* @type {string}
* @description Customer Reference */
customerReference;
/**
* @type {string}
* @description Additional Notes regarding the Order */
notes;
/**
* @type {?string}
* @description Purchase order date, e.g. '2020-12-31' */
orderDate;
/**
* @type {SimulateOrderItemRequestV2[]}
* @description List of Articles to be simulated */
orderItems;
/**
* @type {string}
* @description Booster1 ID of the end Customer */
endCustomerBooster1Id;
/**
* @type {EndCustomerDetails}
* @description Details of the end Customer */
endCustomerDetails;
}
JavaScript SimulateOrderV2 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.
POST /purchase/simulate/v2 HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SimulateOrderV2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel">
<brand>String</brand>
<customerReference>String</customerReference>
<endCustomerBooster1Id>String</endCustomerBooster1Id>
<endCustomerDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel.SharedModels">
<d2p1:additionalInfo>String</d2p1:additionalInfo>
<d2p1:building>String</d2p1:building>
<d2p1:city>String</d2p1:city>
<d2p1:country>String</d2p1:country>
<d2p1:district>String</d2p1:district>
<d2p1:email>String</d2p1:email>
<d2p1:firstName>String</d2p1:firstName>
<d2p1:houseNumber>String</d2p1:houseNumber>
<d2p1:lastName>String</d2p1:lastName>
<d2p1:phone>String</d2p1:phone>
<d2p1:postalCode>String</d2p1:postalCode>
<d2p1:region>String</d2p1:region>
<d2p1:street>String</d2p1:street>
<d2p1:title>String</d2p1:title>
</endCustomerDetails>
<notes>String</notes>
<orderDate>0001-01-01T00:00:00</orderDate>
<orderItems>
<SimulateOrderItemRequestV2>
<articleCode>String</articleCode>
<finalShipToId>String</finalShipToId>
<lineNumber>0</lineNumber>
<orderType>String</orderType>
<quantity>0</quantity>
<requestedDeliveryDate>0001-01-01T00:00:00</requestedDeliveryDate>
<strap xmlns:d4p1="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel.SharedModels">
<d4p1:buckleTypeCode>String</d4p1:buckleTypeCode>
<d4p1:buckleTypeDescription>String</d4p1:buckleTypeDescription>
<d4p1:buckleWidth>String</d4p1:buckleWidth>
<d4p1:colorCode>String</d4p1:colorCode>
<d4p1:colorDescription>String</d4p1:colorDescription>
<d4p1:edgeCode>String</d4p1:edgeCode>
<d4p1:edgeDescription>String</d4p1:edgeDescription>
<d4p1:isStrapVipOrder>false</d4p1:isStrapVipOrder>
<d4p1:liningCode>String</d4p1:liningCode>
<d4p1:liningDescription>String</d4p1:liningDescription>
<d4p1:materialCode>String</d4p1:materialCode>
<d4p1:materialDescription>String</d4p1:materialDescription>
<d4p1:nuancierCode>String</d4p1:nuancierCode>
<d4p1:paddingCode>String</d4p1:paddingCode>
<d4p1:paddingDescription>String</d4p1:paddingDescription>
<d4p1:speakingArticleCode>String</d4p1:speakingArticleCode>
<d4p1:specialtyCode>String</d4p1:specialtyCode>
<d4p1:specialtyDescription>String</d4p1:specialtyDescription>
<d4p1:stitchingCode>String</d4p1:stitchingCode>
<d4p1:stitchingDescription>String</d4p1:stitchingDescription>
<d4p1:watch12Length>0</d4p1:watch12Length>
<d4p1:watch6Length>0</d4p1:watch6Length>
</strap>
</SimulateOrderItemRequestV2>
</orderItems>
<posCode>String</posCode>
</SimulateOrderV2>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<SimulateOrderResponseV2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel">
<billTo>
<Party>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</Party>
</billTo>
<finalShipTo>
<Party>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</Party>
</finalShipTo>
<results xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringSplittedSimulateOrderResponsewCvGvoJB>
<d2p1:Key>String</d2p1:Key>
<d2p1:Value>
<billTo>
<Party>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</Party>
</billTo>
<finalShipTo>
<Party>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</Party>
</finalShipTo>
<orderItems>
<SimulateOrderItemResponseV2>
<articleCode>String</articleCode>
<buckleSummary>String</buckleSummary>
<contentSummary>String</contentSummary>
<deliveryPlantId>String</deliveryPlantId>
<expectedDeliveryDate>String</expectedDeliveryDate>
<lineNumber>0</lineNumber>
<materialSummary>String</materialSummary>
<parentLineNumber>0</parentLineNumber>
<requestLineNumber>0</requestLineNumber>
<strapSummary>String</strapSummary>
<substitutedArticleCode>String</substitutedArticleCode>
<totalValues>
<availableQuantity>
<unit>String</unit>
<value>0</value>
</availableQuantity>
<confirmedQuantity>
<unit>String</unit>
<value>0</value>
</confirmedQuantity>
<grossWeightMeasure>
<unit>String</unit>
<value>0</value>
</grossWeightMeasure>
<netAmount>
<currency>String</currency>
<value>0</value>
</netAmount>
<netPrice>
<amount>
<currency>String</currency>
<value>0</value>
</amount>
<baseQuantity>
<unit>String</unit>
<value>0</value>
</baseQuantity>
</netPrice>
<netWeightMeasure>
<unit>String</unit>
<value>0</value>
</netWeightMeasure>
<requestedQuantity>
<unit>String</unit>
<value>0</value>
</requestedQuantity>
<retailSalesPriceAmount>
<currency>String</currency>
<value>0</value>
</retailSalesPriceAmount>
<taxAmount>
<currency>String</currency>
<value>0</value>
</taxAmount>
<volumeMeasure>
<unit>String</unit>
<value>0</value>
</volumeMeasure>
</totalValues>
<warnings>
<Warning>
<id>String</id>
<message>String</message>
<severityCode>0</severityCode>
</Warning>
</warnings>
</SimulateOrderItemResponseV2>
</orderItems>
<orderType>String</orderType>
<productType>String</productType>
<salesRepresentative>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</salesRepresentative>
<shipTo>
<Party>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</Party>
</shipTo>
<soldTo>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</soldTo>
<totalValues>
<grossAmount>
<currency>String</currency>
<value>0</value>
</grossAmount>
<grossVolumeMeasure>
<unit>String</unit>
<value>0</value>
</grossVolumeMeasure>
<grossWeightMeasure>
<unit>String</unit>
<value>0</value>
</grossWeightMeasure>
<netAmount>
<currency>String</currency>
<value>0</value>
</netAmount>
<netWeightMeasure>
<unit>String</unit>
<value>0</value>
</netWeightMeasure>
<taxAmount>
<currency>String</currency>
<value>0</value>
</taxAmount>
</totalValues>
<warnings>
<Warning>
<id>String</id>
<message>String</message>
<severityCode>0</severityCode>
</Warning>
</warnings>
</d2p1:Value>
</d2p1:KeyValueOfstringSplittedSimulateOrderResponsewCvGvoJB>
</results>
<salesRepresentative>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</salesRepresentative>
<shipTo>
<Party>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</Party>
</shipTo>
<soldTo>
<address>
<city>String</city>
<countryId>String</countryId>
<stateId>String</stateId>
<street>String</street>
<zipCode>String</zipCode>
</address>
<id>String</id>
<name>String</name>
</soldTo>
</SimulateOrderResponseV2>