Richemont.Booster2.PublicApi

<back to all web services

SimulateOrderV2

Requires Authentication
The following routes are available for this service:
POST/purchase/simulate/v2Simulate Order
import Foundation
import ServiceStack

public class SimulateOrderV2 : Codable
{
    /**
    * 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 var brand:String

    /**
    * 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 var posCode:String

    /**
    * Customer Reference
    */
    // @ApiMember(Description="Customer Reference")
    public var customerReference:String

    /**
    * Additional Notes regarding the Order
    */
    // @ApiMember(Description="Additional Notes regarding the Order")
    public var notes:String

    /**
    * Purchase order date, e.g. '2020-12-31'
    */
    // @ApiMember(Description="Purchase order date, e.g. '2020-12-31'")
    public var orderDate:Date?

    /**
    * List of Articles to be simulated
    */
    // @ApiMember(Description="List of Articles to be simulated", IsRequired=true)
    public var orderItems:[SimulateOrderItemRequestV2] = []

    /**
    * Booster1 ID of the end Customer
    */
    // @ApiMember(Description="Booster1 ID of the end Customer")
    public var endCustomerBooster1Id:String

    /**
    * Details of the end Customer
    */
    // @ApiMember(Description="Details of the end Customer")
    public var endCustomerDetails:EndCustomerDetails

    required public init(){}
}

public class SimulateOrderItemRequestV2 : Codable
{
    /**
    * Line Number
    */
    // @ApiMember(Description="Line Number", IsRequired=true)
    public var lineNumber:Int

    /**
    * Reference ID of the article/product, e.g. 'CRWB520003'
    */
    // @ApiMember(Description="Reference ID of the article/product, e.g. 'CRWB520003'", IsRequired=true)
    public var articleCode:String

    /**
    * Desired quantity of the article
    */
    // @ApiMember(Description="Desired quantity of the article", IsRequired=true)
    public var quantity:Int

    /**
    * 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 var requestedDeliveryDate:Date?

    /**
    * 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 var orderType:String

    /**
    * Final Ship To Pos Code
    */
    // @ApiMember(Description="Final Ship To Pos Code")
    public var finalShipToId:String

    /**
    * Strap definition
    */
    // @ApiMember(Description="Strap definition")
    public var strap:StrapItem

    required public init(){}
}

public class StrapItem : Codable
{
    /**
    * Article reference
    */
    // @ApiMember(Description="Article reference")
    public var speakingArticleCode:String

    /**
    * Buckle type Description
    */
    // @ApiMember(Description="Buckle type Description")
    public var buckleTypeDescription:String

    /**
    * Buckle type
    */
    // @ApiMember(Description="Buckle type")
    public var buckleTypeCode:String

    /**
    * watch 6 Length
    */
    // @ApiMember(Description="watch 6 Length")
    public var watch6Length:Int?

    /**
    * watch 12 Length
    */
    // @ApiMember(Description="watch 12 Length")
    public var watch12Length:Int?

    /**
    * Article Material Code
    */
    // @ApiMember(Description="Article Material Code")
    public var materialCode:String

    /**
    * Article Material Description
    */
    // @ApiMember(Description="Article Material Description")
    public var materialDescription:String

    /**
    * Article Color Code
    */
    // @ApiMember(Description="Article Color Code")
    public var colorCode:String

    /**
    * Article Color Description
    */
    // @ApiMember(Description="Article Color Description")
    public var colorDescription:String

    /**
    * Buckle Witdh
    */
    // @ApiMember(Description="Buckle Witdh")
    public var buckleWidth:String

    /**
    * Article Lining Code
    */
    // @ApiMember(Description="Article Lining Code")
    public var liningCode:String

    /**
    * Article Lining Description
    */
    // @ApiMember(Description="Article Lining Description")
    public var liningDescription:String

    /**
    * Article Stitching Code
    */
    // @ApiMember(Description="Article Stitching Code")
    public var stitchingCode:String

    /**
    * Article Stitching Description
    */
    // @ApiMember(Description="Article Stitching Description")
    public var stitchingDescription:String

    /**
    * Article Edge Code
    */
    // @ApiMember(Description="Article Edge Code")
    public var edgeCode:String

    /**
    * Article Edge Description
    */
    // @ApiMember(Description="Article Edge Description")
    public var edgeDescription:String

    /**
    * Article Padding Code
    */
    // @ApiMember(Description="Article Padding Code")
    public var paddingCode:String

    /**
    * Article Padding Description
    */
    // @ApiMember(Description="Article Padding Description")
    public var paddingDescription:String

    /**
    * Article Speciality Code
    */
    // @ApiMember(Description="Article Speciality Code")
    public var specialtyCode:String

    /**
    * Article Speciality Description
    */
    // @ApiMember(Description="Article Speciality Description")
    public var specialtyDescription:String

    /**
    * Nuancier Code
    */
    // @ApiMember(Description="Nuancier Code")
    public var nuancierCode:String

    /**
    * Strap Vip Order
    */
    // @ApiMember(Description="Strap Vip Order")
    public var isStrapVipOrder:Bool?

    required public init(){}
}

public class EndCustomerDetails : Codable
{
    /**
    * Title of the end Customer, e.g. 'MR', 'MRS'.
    */
    // @ApiMember(Description="Title of the end Customer, e.g. 'MR', 'MRS'.")
    public var title:String

    /**
    * First Name of the end Customer
    */
    // @ApiMember(Description="First Name of the end Customer", IsRequired=true)
    public var firstName:String

    /**
    * Last Name of the end Customer
    */
    // @ApiMember(Description="Last Name of the end Customer", IsRequired=true)
    public var lastName:String

    /**
    * Email of the end Customer
    */
    // @ApiMember(Description="Email of the end Customer")
    public var email:String

    /**
    * Phone number of the end Customer, e.g. '0032477123456'. 
    */
    // @ApiMember(Description="Phone number of the end Customer, e.g. '0032477123456'. ")
    public var phone:String

    /**
    * 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 var country:String

    /**
    * City name in the shipping address
    */
    // @ApiMember(Description="City name in the shipping address", IsRequired=true)
    public var city:String

    /**
    * Street name in the shipping address
    */
    // @ApiMember(Description="Street name in the shipping address", IsRequired=true)
    public var street:String

    /**
    * House number in the shipping address
    */
    // @ApiMember(Description="House number in the shipping address")
    public var houseNumber:String

    /**
    * Building number in the shipping address
    */
    // @ApiMember(Description="Building number in the shipping address")
    public var building:String

    /**
    * Postal code in the shipping address
    */
    // @ApiMember(Description="Postal code in the shipping address")
    public var postalCode:String

    /**
    * 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 var region:String

    /**
    * District name in the shipping address
    */
    // @ApiMember(Description="District name in the shipping address")
    public var district:String

    /**
    * Additional Info number to the shipping address
    */
    // @ApiMember(Description="Additional Info number to the shipping address")
    public var additionalInfo:String

    required public init(){}
}

public class SimulateOrderResponseV2 : Codable
{
    /**
    * List of splitted order simulation results
    */
    // @ApiMember(Description="List of splitted order simulation results", IsRequired=true)
    public var results:[String:SplittedSimulateOrderResponse] = [:]

    /**
    * 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 var shipTo:[Party] = []

    /**
    * 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 var finalShipTo:[Party] = []

    /**
    * 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 var billTo:[Party] = []

    /**
    * 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 var soldTo:Party

    /**
    * Sales representatives  (common list for all splitted orders)
    */
    // @ApiMember(Description="Sales representatives  (common list for all splitted orders)")
    public var salesRepresentative:Party

    required public init(){}
}

public class SplittedSimulateOrderResponse : Codable
{
    /**
    * Order Type
    */
    // @ApiMember(Description="Order Type", IsRequired=true)
    public var orderType:String

    /**
    * Product Type
    */
    // @ApiMember(Description="Product Type", IsRequired=true)
    public var productType:String

    /**
    * List of Articles simulated
    */
    // @ApiMember(Description="List of Articles simulated", IsRequired=true)
    public var orderItems:[SimulateOrderItemResponseV2] = []

    /**
    * Total Values
    */
    // @ApiMember(Description="Total Values", IsRequired=true)
    public var totalValues:TotalValues

    /**
    * Addresses which order can be shipped to
    */
    // @ApiMember(Description="Addresses which order can be shipped to", IsRequired=true)
    public var shipTo:[Party] = []

    /**
    * Addresses which order can be final shipped to
    */
    // @ApiMember(Description="Addresses which order can be final shipped to")
    public var finalShipTo:[Party] = []

    /**
    * Addresses which order can be billed to
    */
    // @ApiMember(Description="Addresses which order can be billed to", IsRequired=true)
    public var billTo:[Party] = []

    /**
    * Address which order is made to
    */
    // @ApiMember(Description="Address which order is made to", IsRequired=true)
    public var soldTo:Party

    /**
    * Sales Representative
    */
    // @ApiMember(Description="Sales Representative")
    public var salesRepresentative:Party

    /**
    * Warning list
    */
    // @ApiMember(Description="Warning list", IsRequired=true)
    public var warnings:[Warning] = []

    required public init(){}
}

public class SimulateOrderItemResponseV2 : Codable
{
    /**
    * Line Number, e.g 20, 40, 21, 41
    */
    // @ApiMember(Description="Line Number, e.g 20, 40, 21, 41", IsRequired=true)
    public var lineNumber:Int

    /**
    * Parent Line Number, e.g 20, 40
    */
    // @ApiMember(Description="Parent Line Number, e.g 20, 40", IsRequired=true)
    public var parentLineNumber:Int?

    /**
    * 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 var requestLineNumber:Int

    /**
    * Reference No of item, e.g.: CRWB521234
    */
    // @ApiMember(Description="Reference No of item, e.g.: CRWB521234", IsRequired=true)
    public var articleCode:String

    /**
    * Substituted reference No of item, e.g.: CRWB520003
    */
    // @ApiMember(Description="Substituted reference No of item, e.g.: CRWB520003")
    public var substitutedArticleCode:String

    /**
    * DeliveryPlantId of item, e.g.: CHD6
    */
    // @ApiMember(Description="DeliveryPlantId of item, e.g.: CHD6", IsRequired=true)
    public var deliveryPlantId:String

    /**
    * Expected Delivery Date, e.g. '2020-12-30'
    */
    // @ApiMember(Description="Expected Delivery Date, e.g. '2020-12-30'")
    public var expectedDeliveryDate:String

    /**
    * Buckle Summary, need to be forwarded to order creation
    */
    // @ApiMember(Description="Buckle Summary, need to be forwarded to order creation")
    public var buckleSummary:String

    /**
    * Material Summary, need to be forwarded to order creation
    */
    // @ApiMember(Description="Material Summary, need to be forwarded to order creation")
    public var materialSummary:String

    /**
    * Content Summary, need to be forwarded to order creation
    */
    // @ApiMember(Description="Content Summary, need to be forwarded to order creation")
    public var contentSummary:String

    /**
    * Strap Summary, need to be forwarded to order creation
    */
    // @ApiMember(Description="Strap Summary, need to be forwarded to order creation")
    public var strapSummary:String

    /**
    * Item Total Values
    */
    // @ApiMember(Description="Item Total Values", IsRequired=true)
    public var totalValues:ItemTotalValues

    /**
    * Warning list
    */
    // @ApiMember(Description="Warning list", IsRequired=true)
    public var warnings:[Warning] = []

    required public init(){}
}

public class ItemTotalValues : Codable
{
    /**
    * Requested Quantity
    */
    // @ApiMember(Description="Requested Quantity")
    public var requestedQuantity:Quantity

    /**
    * Confirmed Quantity
    */
    // @ApiMember(Description="Confirmed Quantity")
    public var confirmedQuantity:Quantity

    /**
    * Available Quantity
    */
    // @ApiMember(Description="Available Quantity")
    public var availableQuantity:Quantity

    /**
    * Gross Weight
    */
    // @ApiMember(Description="Gross Weight")
    public var grossWeightMeasure:Quantity

    /**
    * Net Weight
    */
    // @ApiMember(Description="Net Weight")
    public var netWeightMeasure:Quantity

    /**
    * Volume
    */
    // @ApiMember(Description="Volume")
    public var volumeMeasure:Quantity

    /**
    * Net Amount Line Total
    */
    // @ApiMember(Description="Net Amount Line Total")
    public var netAmount:Amount

    /**
    * Net Price Line Total
    */
    // @ApiMember(Description="Net Price Line Total")
    public var netPrice:AmountAndQuantity

    /**
    * Tax Amount Line Total
    */
    // @ApiMember(Description="Tax Amount Line Total")
    public var taxAmount:Amount

    /**
    * Retail Sales Price Line Total
    */
    // @ApiMember(Description="Retail Sales Price Line Total")
    public var retailSalesPriceAmount:Amount

    required public init(){}
}

public class Quantity : Codable
{
    /**
    * Unit
    */
    // @ApiMember(Description="Unit", IsRequired=true)
    public var unit:String

    /**
    * Value
    */
    // @ApiMember(Description="Value", IsRequired=true)
    public var value:Double

    required public init(){}
}

public class Amount : Codable
{
    /**
    * Value
    */
    // @ApiMember(Description="Value", IsRequired=true)
    public var value:Double

    /**
    * Currency
    */
    // @ApiMember(Description="Currency", IsRequired=true)
    public var currency:String

    required public init(){}
}

public class AmountAndQuantity : Codable
{
    /**
    * Amount
    */
    // @ApiMember(Description="Amount", IsRequired=true)
    public var amount:Amount

    /**
    * Base Quantity
    */
    // @ApiMember(Description="Base Quantity", IsRequired=true)
    public var baseQuantity:Quantity

    required public init(){}
}

public class Warning : Codable
{
    /**
    * Id
    */
    // @ApiMember(Description="Id", IsRequired=true)
    public var id:String

    /**
    * Message
    */
    // @ApiMember(Description="Message", IsRequired=true)
    public var message:String

    /**
    * Severity code, possible values: 1, 2, 3, 4
    */
    // @ApiMember(Description="Severity code, possible values: 1, 2, 3, 4", IsRequired=true)
    public var severityCode:Int

    required public init(){}
}

public class TotalValues : Codable
{
    /**
    * Gross Weight
    */
    // @ApiMember(Description="Gross Weight", IsRequired=true)
    public var grossWeightMeasure:Quantity

    /**
    * Net Weight
    */
    // @ApiMember(Description="Net Weight", IsRequired=true)
    public var netWeightMeasure:Quantity

    /**
    * Gross Volume
    */
    // @ApiMember(Description="Gross Volume", IsRequired=true)
    public var grossVolumeMeasure:Quantity

    /**
    * Gross Amount
    */
    // @ApiMember(Description="Gross Amount", IsRequired=true)
    public var grossAmount:Amount

    /**
    * Net Amount
    */
    // @ApiMember(Description="Net Amount", IsRequired=true)
    public var netAmount:Amount

    /**
    * Tax Amount
    */
    // @ApiMember(Description="Tax Amount", IsRequired=true)
    public var taxAmount:Amount

    required public init(){}
}

public class Party : Codable
{
    /**
    * Internal ID of the Element
    */
    // @ApiMember(Description="Internal ID of the Element", IsRequired=true)
    public var id:String

    /**
    * Formatted Name of the Element
    */
    // @ApiMember(Description="Formatted Name of the Element", IsRequired=true)
    public var name:String

    /**
    * Geographic Address of the Element
    */
    // @ApiMember(Description="Geographic Address of the Element")
    public var address:Address

    required public init(){}
}

public class Address : Codable
{
    /**
    * Country ID
    */
    // @ApiMember(Description="Country ID")
    public var countryId:String

    /**
    * State ID
    */
    // @ApiMember(Description="State ID")
    public var stateId:String

    /**
    * City Name
    */
    // @ApiMember(Description="City Name")
    public var city:String

    /**
    * Street Name and Number
    */
    // @ApiMember(Description="Street Name and Number")
    public var street:String

    /**
    * Postal Code
    */
    // @ApiMember(Description="Postal Code")
    public var zipCode:String

    required public init(){}
}


Swift 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
		}
	}
}