| POST | /purchase/v2 | Create Order |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Richemont.Booster2.PublicApi.Purchase.ServiceModel
Imports Richemont.Booster2.PublicApi.Purchase.ServiceModel.SharedModels
Namespace Global
Namespace Richemont.Booster2.PublicApi.Purchase.ServiceModel
Public Partial Class CreateOrderItemRequestV2
'''<Summary>
'''Line Number
'''</Summary>
<ApiMember(Description:="Line Number", IsRequired:=true)>
Public Overridable Property lineNumber As Integer
'''<Summary>
'''Reference ID of the article/product, e.g. 'CRWB520003'
'''</Summary>
<ApiMember(Description:="Reference ID of the article/product, e.g. 'CRWB520003'", IsRequired:=true)>
Public Overridable Property articleCode As String
'''<Summary>
'''Desired quantity of the article
'''</Summary>
<ApiMember(Description:="Desired quantity of the article", IsRequired:=true)>
Public Overridable Property quantity As Integer
'''<Summary>
'''Requested Delivery Date of the Item, e.g. '2020-12-30'
'''</Summary>
<ApiMember(Description:="Requested Delivery Date of the Item, e.g. '2020-12-30'")>
Public Overridable Property requestedDeliveryDate As Nullable(Of Date)
'''<Summary>
'''Strap definition
'''</Summary>
<ApiMember(Description:="Strap definition")>
Public Overridable Property strap As StrapItem
'''<Summary>
'''Purchase order type, e.g. 'WCFS', null. Null for ordinary order
'''</Summary>
<ApiMember(Description:="Purchase order type, e.g. 'WCFS', null. Null for ordinary order")>
Public Overridable Property orderType As String
'''<Summary>
'''DeliveryPlantId of item, e.g.: CHD6
'''</Summary>
<ApiMember(Description:="DeliveryPlantId of item, e.g.: CHD6")>
Public Overridable Property deliveryPlantId As String
'''<Summary>
'''Reason Code
'''</Summary>
<ApiMember(Description:="Reason Code", IsRequired:=true)>
Public Overridable Property reasonCode As String
'''<Summary>
'''Order Delivery Priority, e.g.: 10, 20, 30, 40, 50
'''</Summary>
<ApiMember(Description:="Order Delivery Priority, e.g.: 10, 20, 30, 40, 50")>
Public Overridable Property orderDeliveryPriority As Nullable(Of Integer)
'''<Summary>
'''Buckle Summary, can be get from order simulation
'''</Summary>
<ApiMember(Description:="Buckle Summary, can be get from order simulation")>
Public Overridable Property buckleSummary As String
'''<Summary>
'''Material Summary, can be get from order simulation
'''</Summary>
<ApiMember(Description:="Material Summary, can be get from order simulation")>
Public Overridable Property materialSummary As String
'''<Summary>
'''Content Summary, can be get from order simulation
'''</Summary>
<ApiMember(Description:="Content Summary, can be get from order simulation")>
Public Overridable Property contentSummary As String
'''<Summary>
'''Strap Summary, can be get from order simulation
'''</Summary>
<ApiMember(Description:="Strap Summary, can be get from order simulation")>
Public Overridable Property strapSummary As String
End Class
Public Partial Class CreateOrderV2
Public Sub New()
SplittedOrders = New List(Of SplittedOrder)
End Sub
'''<Summary>
'''Purchase order ID, total length-max with x-booster-App header: 99
'''</Summary>
<ApiMember(Description:="Purchase order ID, total length-max with x-booster-App header: 99", IsRequired:=true)>
Public Overridable Property orderId As String
'''<Summary>
'''Global Pos Code for the intended Order e.g. ES100:102048
'''</Summary>
<ApiMember(Description:="Global Pos Code for the intended Order e.g. ES100:102048", IsRequired:=true)>
Public Overridable Property posCode As String
'''<Summary>
'''Brand Trigram of the intended Order, e.g. 'IWC', 'CAR', etc.
'''</Summary>
<ApiMember(Description:="Brand Trigram of the intended Order, e.g. 'IWC', 'CAR', etc.", IsRequired:=true)>
Public Overridable Property brand As String
'''<Summary>
'''Additional Notes regarding the Order
'''</Summary>
<ApiMember(Description:="Additional Notes regarding the Order")>
Public Overridable Property notes As String
'''<Summary>
'''Customer Reference
'''</Summary>
<ApiMember(Description:="Customer Reference")>
Public Overridable Property customerReference As String
'''<Summary>
'''Customer Reference for Consignment Order
'''</Summary>
<ApiMember(Description:="Customer Reference for Consignment Order")>
Public Overridable Property customerReferenceConsignment As String
'''<Summary>
'''Purchase order date, e.g. '2020-12-31'
'''</Summary>
<ApiMember(Description:="Purchase order date, e.g. '2020-12-31'")>
Public Overridable Property orderDate As Nullable(Of Date)
'''<Summary>
'''Details of the end Customer
'''</Summary>
<ApiMember(Description:="Details of the end Customer")>
Public Overridable Property SplittedOrders As List(Of SplittedOrder)
'''<Summary>
'''Booster1 ID of the end Customer
'''</Summary>
<ApiMember(Description:="Booster1 ID of the end Customer")>
Public Overridable Property endCustomerBooster1Id As String
'''<Summary>
'''Details of the end Customer
'''</Summary>
<ApiMember(Description:="Details of the end Customer")>
Public Overridable Property endCustomerDetails As EndCustomerDetails
End Class
Public Partial Class SplittedOrder
Public Sub New()
orderItems = New List(Of CreateOrderItemRequestV2)
End Sub
'''<Summary>
'''Ship To Pos Code
'''</Summary>
<ApiMember(Description:="Ship To Pos Code", IsRequired:=true)>
Public Overridable Property shipToId As String
'''<Summary>
'''Final Ship To Pos Code
'''</Summary>
<ApiMember(Description:="Final Ship To Pos Code")>
Public Overridable Property finalShipToId As String
'''<Summary>
'''Bill To Pos Code
'''</Summary>
<ApiMember(Description:="Bill To Pos Code", IsRequired:=true)>
Public Overridable Property billToId As String
'''<Summary>
'''Sold To Pos Code
'''</Summary>
<ApiMember(Description:="Sold To Pos Code", IsRequired:=true)>
Public Overridable Property soldToId As String
'''<Summary>
'''Sales Representative Code
'''</Summary>
<ApiMember(Description:="Sales Representative Code")>
Public Overridable Property salesRepresentativeId As String
'''<Summary>
'''List of Articles to be created
'''</Summary>
<ApiMember(Description:="List of Articles to be created", IsRequired:=true)>
Public Overridable Property orderItems As List(Of CreateOrderItemRequestV2)
End Class
End Namespace
Namespace Richemont.Booster2.PublicApi.Purchase.ServiceModel.SharedModels
Public Partial Class EndCustomerDetails
'''<Summary>
'''Title of the end Customer, e.g. 'MR', 'MRS'.
'''</Summary>
<ApiMember(Description:="Title of the end Customer, e.g. 'MR', 'MRS'.")>
Public Overridable Property title As String
'''<Summary>
'''First Name of the end Customer
'''</Summary>
<ApiMember(Description:="First Name of the end Customer", IsRequired:=true)>
Public Overridable Property firstName As String
'''<Summary>
'''Last Name of the end Customer
'''</Summary>
<ApiMember(Description:="Last Name of the end Customer", IsRequired:=true)>
Public Overridable Property lastName As String
'''<Summary>
'''Email of the end Customer
'''</Summary>
<ApiMember(Description:="Email of the end Customer")>
Public Overridable Property email As String
'''<Summary>
'''Phone number of the end Customer, e.g. '0032477123456'.
'''</Summary>
<ApiMember(Description:="Phone number of the end Customer, e.g. '0032477123456'. ")>
Public Overridable Property phone As String
'''<Summary>
'''Countr code in the shipping address, e.g. 'BE' (ISO Code)
'''</Summary>
<ApiMember(Description:="Countr code in the shipping address, e.g. 'BE' (ISO Code)", IsRequired:=true)>
Public Overridable Property country As String
'''<Summary>
'''City name in the shipping address
'''</Summary>
<ApiMember(Description:="City name in the shipping address", IsRequired:=true)>
Public Overridable Property city As String
'''<Summary>
'''Street name in the shipping address
'''</Summary>
<ApiMember(Description:="Street name in the shipping address", IsRequired:=true)>
Public Overridable Property street As String
'''<Summary>
'''House number in the shipping address
'''</Summary>
<ApiMember(Description:="House number in the shipping address")>
Public Overridable Property houseNumber As String
'''<Summary>
'''Building number in the shipping address
'''</Summary>
<ApiMember(Description:="Building number in the shipping address")>
Public Overridable Property building As String
'''<Summary>
'''Postal code in the shipping address
'''</Summary>
<ApiMember(Description:="Postal code in the shipping address")>
Public Overridable Property postalCode As String
'''<Summary>
'''Region code in the shipping address, e.g. 'VL' (ISO Code)
'''</Summary>
<ApiMember(Description:="Region code in the shipping address, e.g. 'VL' (ISO Code)")>
Public Overridable Property region As String
'''<Summary>
'''District name in the shipping address
'''</Summary>
<ApiMember(Description:="District name in the shipping address")>
Public Overridable Property district As String
'''<Summary>
'''Additional Info number to the shipping address
'''</Summary>
<ApiMember(Description:="Additional Info number to the shipping address")>
Public Overridable Property additionalInfo As String
End Class
Public Partial Class StrapItem
'''<Summary>
'''Article reference
'''</Summary>
<ApiMember(Description:="Article reference")>
Public Overridable Property speakingArticleCode As String
'''<Summary>
'''Buckle type Description
'''</Summary>
<ApiMember(Description:="Buckle type Description")>
Public Overridable Property buckleTypeDescription As String
'''<Summary>
'''Buckle type
'''</Summary>
<ApiMember(Description:="Buckle type")>
Public Overridable Property buckleTypeCode As String
'''<Summary>
'''watch 6 Length
'''</Summary>
<ApiMember(Description:="watch 6 Length")>
Public Overridable Property watch6Length As Nullable(Of Integer)
'''<Summary>
'''watch 12 Length
'''</Summary>
<ApiMember(Description:="watch 12 Length")>
Public Overridable Property watch12Length As Nullable(Of Integer)
'''<Summary>
'''Article Material Code
'''</Summary>
<ApiMember(Description:="Article Material Code")>
Public Overridable Property materialCode As String
'''<Summary>
'''Article Material Description
'''</Summary>
<ApiMember(Description:="Article Material Description")>
Public Overridable Property materialDescription As String
'''<Summary>
'''Article Color Code
'''</Summary>
<ApiMember(Description:="Article Color Code")>
Public Overridable Property colorCode As String
'''<Summary>
'''Article Color Description
'''</Summary>
<ApiMember(Description:="Article Color Description")>
Public Overridable Property colorDescription As String
'''<Summary>
'''Buckle Witdh
'''</Summary>
<ApiMember(Description:="Buckle Witdh")>
Public Overridable Property buckleWidth As String
'''<Summary>
'''Article Lining Code
'''</Summary>
<ApiMember(Description:="Article Lining Code")>
Public Overridable Property liningCode As String
'''<Summary>
'''Article Lining Description
'''</Summary>
<ApiMember(Description:="Article Lining Description")>
Public Overridable Property liningDescription As String
'''<Summary>
'''Article Stitching Code
'''</Summary>
<ApiMember(Description:="Article Stitching Code")>
Public Overridable Property stitchingCode As String
'''<Summary>
'''Article Stitching Description
'''</Summary>
<ApiMember(Description:="Article Stitching Description")>
Public Overridable Property stitchingDescription As String
'''<Summary>
'''Article Edge Code
'''</Summary>
<ApiMember(Description:="Article Edge Code")>
Public Overridable Property edgeCode As String
'''<Summary>
'''Article Edge Description
'''</Summary>
<ApiMember(Description:="Article Edge Description")>
Public Overridable Property edgeDescription As String
'''<Summary>
'''Article Padding Code
'''</Summary>
<ApiMember(Description:="Article Padding Code")>
Public Overridable Property paddingCode As String
'''<Summary>
'''Article Padding Description
'''</Summary>
<ApiMember(Description:="Article Padding Description")>
Public Overridable Property paddingDescription As String
'''<Summary>
'''Article Speciality Code
'''</Summary>
<ApiMember(Description:="Article Speciality Code")>
Public Overridable Property specialtyCode As String
'''<Summary>
'''Article Speciality Description
'''</Summary>
<ApiMember(Description:="Article Speciality Description")>
Public Overridable Property specialtyDescription As String
'''<Summary>
'''Nuancier Code
'''</Summary>
<ApiMember(Description:="Nuancier Code")>
Public Overridable Property nuancierCode As String
'''<Summary>
'''Strap Vip Order
'''</Summary>
<ApiMember(Description:="Strap Vip Order")>
Public Overridable Property isStrapVipOrder As Nullable(Of Boolean)
End Class
End Namespace
End Namespace
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
{
}