| POST | /purchase/v2 | Create Order |
|---|
"use strict";
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 CreateOrderItemRequestV2 {
/** @param {{lineNumber?:number,articleCode?:string,quantity?:number,requestedDeliveryDate?:string,strap?:StrapItem,orderType?:string,deliveryPlantId?:string,reasonCode?:string,orderDeliveryPriority?:number,buckleSummary?:string,materialSummary?:string,contentSummary?:string,strapSummary?:string}} [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 {StrapItem}
* @description Strap definition */
strap;
/**
* @type {string}
* @description Purchase order type, e.g. 'WCFS', null. Null for ordinary order */
orderType;
/**
* @type {string}
* @description DeliveryPlantId of item, e.g.: CHD6 */
deliveryPlantId;
/**
* @type {string}
* @description Reason Code */
reasonCode;
/**
* @type {?number}
* @description Order Delivery Priority, e.g.: 10, 20, 30, 40, 50 */
orderDeliveryPriority;
/**
* @type {string}
* @description Buckle Summary, can be get from order simulation */
buckleSummary;
/**
* @type {string}
* @description Material Summary, can be get from order simulation */
materialSummary;
/**
* @type {string}
* @description Content Summary, can be get from order simulation */
contentSummary;
/**
* @type {string}
* @description Strap Summary, can be get from order simulation */
strapSummary;
}
export class SplittedOrder {
/** @param {{shipToId?:string,finalShipToId?:string,billToId?:string,soldToId?:string,salesRepresentativeId?:string,orderItems?:CreateOrderItemRequestV2[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Ship To Pos Code */
shipToId;
/**
* @type {string}
* @description Final Ship To Pos Code */
finalShipToId;
/**
* @type {string}
* @description Bill To Pos Code */
billToId;
/**
* @type {string}
* @description Sold To Pos Code */
soldToId;
/**
* @type {string}
* @description Sales Representative Code */
salesRepresentativeId;
/**
* @type {CreateOrderItemRequestV2[]}
* @description List of Articles to be created */
orderItems;
}
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 CreateOrderV2 {
/** @param {{orderId?:string,posCode?:string,brand?:string,notes?:string,customerReference?:string,customerReferenceConsignment?:string,orderDate?:string,splittedOrders?:SplittedOrder[],endCustomerBooster1Id?:string,endCustomerDetails?:EndCustomerDetails}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Purchase order ID, total length-max with x-booster-App header: 99 */
orderId;
/**
* @type {string}
* @description Global Pos Code for the intended Order e.g. ES100:102048 */
posCode;
/**
* @type {string}
* @description Brand Trigram of the intended Order, e.g. 'IWC', 'CAR', etc. */
brand;
/**
* @type {string}
* @description Additional Notes regarding the Order */
notes;
/**
* @type {string}
* @description Customer Reference */
customerReference;
/**
* @type {string}
* @description Customer Reference for Consignment Order */
customerReferenceConsignment;
/**
* @type {?string}
* @description Purchase order date, e.g. '2020-12-31' */
orderDate;
/**
* @type {SplittedOrder[]}
* @description Details of the end Customer */
splittedOrders;
/**
* @type {string}
* @description Booster1 ID of the end Customer */
endCustomerBooster1Id;
/**
* @type {EndCustomerDetails}
* @description Details of the end Customer */
endCustomerDetails;
}
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/v2 HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateOrderV2 xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel">
<SplittedOrders>
<SplittedOrder>
<billToId>String</billToId>
<finalShipToId>String</finalShipToId>
<orderItems>
<CreateOrderItemRequestV2>
<articleCode>String</articleCode>
<buckleSummary>String</buckleSummary>
<contentSummary>String</contentSummary>
<deliveryPlantId>String</deliveryPlantId>
<lineNumber>0</lineNumber>
<materialSummary>String</materialSummary>
<orderDeliveryPriority>0</orderDeliveryPriority>
<orderType>String</orderType>
<quantity>0</quantity>
<reasonCode>String</reasonCode>
<requestedDeliveryDate>0001-01-01T00:00:00</requestedDeliveryDate>
<strap xmlns:d6p1="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel.SharedModels">
<d6p1:buckleTypeCode>String</d6p1:buckleTypeCode>
<d6p1:buckleTypeDescription>String</d6p1:buckleTypeDescription>
<d6p1:buckleWidth>String</d6p1:buckleWidth>
<d6p1:colorCode>String</d6p1:colorCode>
<d6p1:colorDescription>String</d6p1:colorDescription>
<d6p1:edgeCode>String</d6p1:edgeCode>
<d6p1:edgeDescription>String</d6p1:edgeDescription>
<d6p1:isStrapVipOrder>false</d6p1:isStrapVipOrder>
<d6p1:liningCode>String</d6p1:liningCode>
<d6p1:liningDescription>String</d6p1:liningDescription>
<d6p1:materialCode>String</d6p1:materialCode>
<d6p1:materialDescription>String</d6p1:materialDescription>
<d6p1:nuancierCode>String</d6p1:nuancierCode>
<d6p1:paddingCode>String</d6p1:paddingCode>
<d6p1:paddingDescription>String</d6p1:paddingDescription>
<d6p1:speakingArticleCode>String</d6p1:speakingArticleCode>
<d6p1:specialtyCode>String</d6p1:specialtyCode>
<d6p1:specialtyDescription>String</d6p1:specialtyDescription>
<d6p1:stitchingCode>String</d6p1:stitchingCode>
<d6p1:stitchingDescription>String</d6p1:stitchingDescription>
<d6p1:watch12Length>0</d6p1:watch12Length>
<d6p1:watch6Length>0</d6p1:watch6Length>
</strap>
<strapSummary>String</strapSummary>
</CreateOrderItemRequestV2>
</orderItems>
<salesRepresentativeId>String</salesRepresentativeId>
<shipToId>String</shipToId>
<soldToId>String</soldToId>
</SplittedOrder>
</SplittedOrders>
<brand>String</brand>
<customerReference>String</customerReference>
<customerReferenceConsignment>String</customerReferenceConsignment>
<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>
<orderId>String</orderId>
<posCode>String</posCode>
</CreateOrderV2>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />