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