| POST | /purchase/v2 | Create Order |
|---|
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 CreateOrderItemRequestV2
{
/** @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 Strap definition */
// @ApiMember(Description="Strap definition")
public strap: StrapItem;
/** @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 DeliveryPlantId of item, e.g.: CHD6 */
// @ApiMember(Description="DeliveryPlantId of item, e.g.: CHD6")
public deliveryPlantId: string;
/** @description Reason Code */
// @ApiMember(Description="Reason Code", IsRequired=true)
public reasonCode: string;
/** @description Order Delivery Priority, e.g.: 10, 20, 30, 40, 50 */
// @ApiMember(Description="Order Delivery Priority, e.g.: 10, 20, 30, 40, 50")
public orderDeliveryPriority?: number;
/** @description Buckle Summary, can be get from order simulation */
// @ApiMember(Description="Buckle Summary, can be get from order simulation")
public buckleSummary: string;
/** @description Material Summary, can be get from order simulation */
// @ApiMember(Description="Material Summary, can be get from order simulation")
public materialSummary: string;
/** @description Content Summary, can be get from order simulation */
// @ApiMember(Description="Content Summary, can be get from order simulation")
public contentSummary: string;
/** @description Strap Summary, can be get from order simulation */
// @ApiMember(Description="Strap Summary, can be get from order simulation")
public strapSummary: string;
public constructor(init?: Partial<CreateOrderItemRequestV2>) { (Object as any).assign(this, init); }
}
export class SplittedOrder
{
/** @description Ship To Pos Code */
// @ApiMember(Description="Ship To Pos Code", IsRequired=true)
public shipToId: string;
/** @description Final Ship To Pos Code */
// @ApiMember(Description="Final Ship To Pos Code")
public finalShipToId: string;
/** @description Bill To Pos Code */
// @ApiMember(Description="Bill To Pos Code", IsRequired=true)
public billToId: string;
/** @description Sold To Pos Code */
// @ApiMember(Description="Sold To Pos Code", IsRequired=true)
public soldToId: string;
/** @description Sales Representative Code */
// @ApiMember(Description="Sales Representative Code")
public salesRepresentativeId: string;
/** @description List of Articles to be created */
// @ApiMember(Description="List of Articles to be created", IsRequired=true)
public orderItems: CreateOrderItemRequestV2[];
public constructor(init?: Partial<SplittedOrder>) { (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 CreateOrderV2
{
/** @description Purchase order ID, total length-max with x-booster-App header: 99 */
// @ApiMember(Description="Purchase order ID, total length-max with x-booster-App header: 99", IsRequired=true)
public orderId: 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 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 Additional Notes regarding the Order */
// @ApiMember(Description="Additional Notes regarding the Order")
public notes: string;
/** @description Customer Reference */
// @ApiMember(Description="Customer Reference")
public customerReference: string;
/** @description Customer Reference for Consignment Order */
// @ApiMember(Description="Customer Reference for Consignment Order")
public customerReferenceConsignment: string;
/** @description Purchase order date, e.g. '2020-12-31' */
// @ApiMember(Description="Purchase order date, e.g. '2020-12-31'")
public orderDate?: string;
/** @description Details of the end Customer */
// @ApiMember(Description="Details of the end Customer")
public splittedOrders: SplittedOrder[];
/** @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<CreateOrderV2>) { (Object as any).assign(this, init); }
}
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/v2 HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
orderId: String,
posCode: String,
brand: String,
notes: String,
customerReference: String,
customerReferenceConsignment: String,
orderDate: 0001-01-01,
splittedOrders:
[
{
shipToId: String,
finalShipToId: String,
billToId: String,
soldToId: String,
salesRepresentativeId: String,
orderItems:
[
{
lineNumber: 0,
articleCode: String,
quantity: 0,
requestedDeliveryDate: 0001-01-01,
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
},
orderType: String,
deliveryPlantId: String,
reasonCode: String,
orderDeliveryPriority: 0,
buckleSummary: String,
materialSummary: String,
contentSummary: String,
strapSummary: String
}
]
}
],
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
{
}