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