Richemont.Booster2.PublicApi

<back to all web services

SimulateOrderV2

Requires Authentication
The following routes are available for this service:
POST/purchase/simulate/v2Simulate 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 .jsv suffix or ?format=jsv

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	brand: String,
	posCode: String,
	customerReference: String,
	notes: String,
	orderDate: 0001-01-01,
	orderItems: 
	[
		{
			lineNumber: 0,
			articleCode: String,
			quantity: 0,
			requestedDeliveryDate: 0001-01-01,
			orderType: String,
			finalShipToId: String,
			strap: 
			{
				speakingArticleCode: String,
				buckleTypeDescription: String,
				buckleTypeCode: String,
				watch6Length: 0,
				watch12Length: 0,
				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: False
			}
		}
	],
	endCustomerBooster1Id: String,
	endCustomerDetails: 
	{
		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
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	results: 
	{
		String: 
		{
			orderType: String,
			productType: String,
			orderItems: 
			[
				{
					lineNumber: 0,
					parentLineNumber: 0,
					requestLineNumber: 0,
					articleCode: String,
					substitutedArticleCode: String,
					deliveryPlantId: String,
					expectedDeliveryDate: String,
					buckleSummary: String,
					materialSummary: String,
					contentSummary: String,
					strapSummary: String,
					totalValues: 
					{
						requestedQuantity: 
						{
							unit: String,
							value: 0
						},
						confirmedQuantity: 
						{
							unit: String,
							value: 0
						},
						availableQuantity: 
						{
							unit: String,
							value: 0
						},
						grossWeightMeasure: 
						{
							unit: String,
							value: 0
						},
						netWeightMeasure: 
						{
							unit: String,
							value: 0
						},
						volumeMeasure: 
						{
							unit: String,
							value: 0
						},
						netAmount: 
						{
							value: 0,
							currency: String
						},
						netPrice: 
						{
							amount: 
							{
								value: 0,
								currency: String
							},
							baseQuantity: 
							{
								unit: String,
								value: 0
							}
						},
						taxAmount: 
						{
							value: 0,
							currency: String
						},
						retailSalesPriceAmount: 
						{
							value: 0,
							currency: String
						}
					},
					warnings: 
					[
						{
							id: String,
							message: String,
							severityCode: 0
						}
					]
				}
			],
			totalValues: 
			{
				grossWeightMeasure: 
				{
					unit: String,
					value: 0
				},
				netWeightMeasure: 
				{
					unit: String,
					value: 0
				},
				grossVolumeMeasure: 
				{
					unit: String,
					value: 0
				},
				grossAmount: 
				{
					value: 0,
					currency: String
				},
				netAmount: 
				{
					value: 0,
					currency: String
				},
				taxAmount: 
				{
					value: 0,
					currency: String
				}
			},
			shipTo: 
			[
				{
					id: String,
					name: String,
					address: 
					{
						countryId: String,
						stateId: String,
						city: String,
						street: String,
						zipCode: String
					}
				}
			],
			finalShipTo: 
			[
				{
					id: String,
					name: String,
					address: 
					{
						countryId: String,
						stateId: String,
						city: String,
						street: String,
						zipCode: String
					}
				}
			],
			billTo: 
			[
				{
					id: String,
					name: String,
					address: 
					{
						countryId: String,
						stateId: String,
						city: String,
						street: String,
						zipCode: String
					}
				}
			],
			soldTo: 
			{
				id: String,
				name: String,
				address: 
				{
					countryId: String,
					stateId: String,
					city: String,
					street: String,
					zipCode: String
				}
			},
			salesRepresentative: 
			{
				id: String,
				name: String,
				address: 
				{
					countryId: String,
					stateId: String,
					city: String,
					street: String,
					zipCode: String
				}
			},
			warnings: 
			[
				{
					id: String,
					message: String,
					severityCode: 0
				}
			]
		}
	},
	shipTo: 
	[
		{
			id: String,
			name: String,
			address: 
			{
				countryId: String,
				stateId: String,
				city: String,
				street: String,
				zipCode: String
			}
		}
	],
	finalShipTo: 
	[
		{
			id: String,
			name: String,
			address: 
			{
				countryId: String,
				stateId: String,
				city: String,
				street: String,
				zipCode: String
			}
		}
	],
	billTo: 
	[
		{
			id: String,
			name: String,
			address: 
			{
				countryId: String,
				stateId: String,
				city: String,
				street: String,
				zipCode: String
			}
		}
	],
	soldTo: 
	{
		id: String,
		name: String,
		address: 
		{
			countryId: String,
			stateId: String,
			city: String,
			street: String,
			zipCode: String
		}
	},
	salesRepresentative: 
	{
		id: String,
		name: String,
		address: 
		{
			countryId: String,
			stateId: String,
			city: String,
			street: String,
			zipCode: String
		}
	}
}