| POST | /purchase/v2 | Create Order |
|---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class CreateOrderV2
{
/**
* 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)
var orderId: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
/**
* 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
/**
* Additional Notes regarding the Order
*/
@ApiMember(Description="Additional Notes regarding the Order")
var notes:String? = null
/**
* Customer Reference
*/
@ApiMember(Description="Customer Reference")
var customerReference:String? = null
/**
* Customer Reference for Consignment Order
*/
@ApiMember(Description="Customer Reference for Consignment Order")
var customerReferenceConsignment:String? = null
/**
* Purchase order date, e.g. '2020-12-31'
*/
@ApiMember(Description="Purchase order date, e.g. '2020-12-31'")
var orderDate:Date? = null
/**
* Details of the end Customer
*/
@ApiMember(Description="Details of the end Customer")
var splittedOrders:ArrayList<SplittedOrder> = ArrayList<SplittedOrder>()
/**
* 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 SplittedOrder
{
/**
* Ship To Pos Code
*/
@ApiMember(Description="Ship To Pos Code", IsRequired=true)
var shipToId:String? = null
/**
* Final Ship To Pos Code
*/
@ApiMember(Description="Final Ship To Pos Code")
var finalShipToId:String? = null
/**
* Bill To Pos Code
*/
@ApiMember(Description="Bill To Pos Code", IsRequired=true)
var billToId:String? = null
/**
* Sold To Pos Code
*/
@ApiMember(Description="Sold To Pos Code", IsRequired=true)
var soldToId:String? = null
/**
* Sales Representative Code
*/
@ApiMember(Description="Sales Representative Code")
var salesRepresentativeId:String? = null
/**
* List of Articles to be created
*/
@ApiMember(Description="List of Articles to be created", IsRequired=true)
var orderItems:ArrayList<CreateOrderItemRequestV2> = ArrayList<CreateOrderItemRequestV2>()
}
open class CreateOrderItemRequestV2
{
/**
* 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
/**
* Strap definition
*/
@ApiMember(Description="Strap definition")
var strap:StrapItem? = 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
/**
* DeliveryPlantId of item, e.g.: CHD6
*/
@ApiMember(Description="DeliveryPlantId of item, e.g.: CHD6")
var deliveryPlantId:String? = null
/**
* Reason Code
*/
@ApiMember(Description="Reason Code", IsRequired=true)
var reasonCode:String? = null
/**
* Order Delivery Priority, e.g.: 10, 20, 30, 40, 50
*/
@ApiMember(Description="Order Delivery Priority, e.g.: 10, 20, 30, 40, 50")
var orderDeliveryPriority:Int? = null
/**
* Buckle Summary, can be get from order simulation
*/
@ApiMember(Description="Buckle Summary, can be get from order simulation")
var buckleSummary:String? = null
/**
* Material Summary, can be get from order simulation
*/
@ApiMember(Description="Material Summary, can be get from order simulation")
var materialSummary:String? = null
/**
* Content Summary, can be get from order simulation
*/
@ApiMember(Description="Content Summary, can be get from order simulation")
var contentSummary:String? = null
/**
* Strap Summary, can be get from order simulation
*/
@ApiMember(Description="Strap Summary, can be get from order simulation")
var strapSummary:String? = 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
}
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/" />