| POST | /purchase/basket | Create Basket |
|---|
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 BasketItem
'''<Summary>
'''Reference ID of the article/product
'''</Summary>
<ApiMember(Description:="Reference ID of the article/product", IsRequired:=true)>
Public Overridable Property articleCode As String
'''<Summary>
'''Desired quantity of the article
'''</Summary>
<ApiMember(Description:="Desired quantity of the article")>
Public Overridable Property quantity As Integer
'''<Summary>
'''Strap definition
'''</Summary>
<ApiMember(Description:="Strap definition")>
Public Overridable Property strap As BasketStrapItem
End Class
Public Partial Class BasketItemResponse
Public Sub New()
errors = New List(Of String)
warnings = New List(Of String)
End Sub
'''<Summary>
'''Line number of the article
'''</Summary>
<ApiMember(Description:="Line number of the article")>
Public Overridable Property line As Integer
'''<Summary>
'''Reference ID of the article/product
'''</Summary>
<ApiMember(Description:="Reference ID of the article/product")>
Public Overridable Property articleCode As String
'''<Summary>
'''Old reference ID of the article/product
'''</Summary>
<ApiMember(Description:="Old reference ID of the article/product")>
Public Overridable Property oldArticleCode As String
'''<Summary>
'''Quantity of the article
'''</Summary>
<ApiMember(Description:="Quantity of the article")>
Public Overridable Property quantity As Integer
'''<Summary>
'''Delivery date of the article
'''</Summary>
<ApiMember(Description:="Delivery date of the article")>
Public Overridable Property deliveryDate As Date
'''<Summary>
'''Strap definition
'''</Summary>
<ApiMember(Description:="Strap definition")>
Public Overridable Property strap As BasketStrapItem
'''<Summary>
'''Errors for the article
'''</Summary>
<ApiMember(Description:="Errors for the article")>
Public Overridable Property errors As List(Of String)
'''<Summary>
'''Warnings for the article
'''</Summary>
<ApiMember(Description:="Warnings for the article")>
Public Overridable Property warnings As List(Of String)
End Class
Public Partial Class CreateBasket
Public Sub New()
orderItems = New List(Of BasketItem)
End Sub
'''<Summary>
'''Brand Trigram of the intended order
'''</Summary>
<ApiMember(Description:="Brand Trigram of the intended order", IsRequired:=true)>
Public Overridable Property brand As String
'''<Summary>
'''Pos Code for the intended order e.g. ES03-10415-01
'''</Summary>
<ApiMember(Description:="Pos Code for the intended order e.g. ES03-10415-01", IsRequired:=true)>
Public Overridable Property posCode As String
'''<Summary>
'''Customer Reference
'''</Summary>
<ApiMember(Description:="Customer Reference", IsRequired:=true)>
Public Overridable Property customerReference As String
'''<Summary>
'''Additional Notes regarding the order
'''</Summary>
<ApiMember(Description:="Additional Notes regarding the order", IsRequired:=true)>
Public Overridable Property notes As String
'''<Summary>
'''List of Articles to be added in the basket
'''</Summary>
<ApiMember(Description:="List of Articles to be added in the basket")>
Public Overridable Property orderItems As List(Of BasketItem)
'''<Summary>
'''Brand Context ID
'''</Summary>
<ApiMember(Description:="Brand Context ID")>
Public Overridable Property boosterContextId As String
End Class
Public Partial Class CreateBasketResponse
Public Sub New()
validationResults = New List(Of BasketItemResponse)
End Sub
'''<Summary>
'''ID of the newly created Purchase Order / Basket
'''</Summary>
<ApiMember(Description:="ID of the newly created Purchase Order / Basket", IsRequired:=true)>
Public Overridable Property purchaseOrderId As Integer
'''<Summary>
'''Validation results of each basket item
'''</Summary>
<ApiMember(Description:="Validation results of each basket item")>
Public Overridable Property validationResults As List(Of BasketItemResponse)
End Class
End Namespace
Namespace Richemont.Booster2.PublicApi.Purchase.ServiceModel.SharedModels
Public Partial Class BasketStrapItem
'''<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 .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/basket HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateBasket xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel">
<boosterContextId>String</boosterContextId>
<brand>String</brand>
<customerReference>String</customerReference>
<notes>String</notes>
<orderItems>
<BasketItem>
<articleCode>String</articleCode>
<quantity>0</quantity>
<strap xmlns:d4p1="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel.SharedModels">
<d4p1:buckleTypeCode>String</d4p1:buckleTypeCode>
<d4p1:buckleTypeDescription>String</d4p1:buckleTypeDescription>
<d4p1:buckleWidth>String</d4p1:buckleWidth>
<d4p1:colorCode>String</d4p1:colorCode>
<d4p1:colorDescription>String</d4p1:colorDescription>
<d4p1:edgeCode>String</d4p1:edgeCode>
<d4p1:edgeDescription>String</d4p1:edgeDescription>
<d4p1:isStrapVipOrder>false</d4p1:isStrapVipOrder>
<d4p1:liningCode>String</d4p1:liningCode>
<d4p1:liningDescription>String</d4p1:liningDescription>
<d4p1:materialCode>String</d4p1:materialCode>
<d4p1:materialDescription>String</d4p1:materialDescription>
<d4p1:nuancierCode>String</d4p1:nuancierCode>
<d4p1:paddingCode>String</d4p1:paddingCode>
<d4p1:paddingDescription>String</d4p1:paddingDescription>
<d4p1:speakingArticleCode>String</d4p1:speakingArticleCode>
<d4p1:specialtyCode>String</d4p1:specialtyCode>
<d4p1:specialtyDescription>String</d4p1:specialtyDescription>
<d4p1:stitchingCode>String</d4p1:stitchingCode>
<d4p1:stitchingDescription>String</d4p1:stitchingDescription>
<d4p1:watch12Length>0</d4p1:watch12Length>
<d4p1:watch6Length>0</d4p1:watch6Length>
</strap>
</BasketItem>
</orderItems>
<posCode>String</posCode>
</CreateBasket>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CreateBasketResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel">
<purchaseOrderId>0</purchaseOrderId>
<validationResults>
<BasketItemResponse>
<articleCode>String</articleCode>
<deliveryDate>0001-01-01T00:00:00</deliveryDate>
<errors xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</errors>
<line>0</line>
<oldArticleCode>String</oldArticleCode>
<quantity>0</quantity>
<strap xmlns:d4p1="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel.SharedModels">
<d4p1:buckleTypeCode>String</d4p1:buckleTypeCode>
<d4p1:buckleTypeDescription>String</d4p1:buckleTypeDescription>
<d4p1:buckleWidth>String</d4p1:buckleWidth>
<d4p1:colorCode>String</d4p1:colorCode>
<d4p1:colorDescription>String</d4p1:colorDescription>
<d4p1:edgeCode>String</d4p1:edgeCode>
<d4p1:edgeDescription>String</d4p1:edgeDescription>
<d4p1:isStrapVipOrder>false</d4p1:isStrapVipOrder>
<d4p1:liningCode>String</d4p1:liningCode>
<d4p1:liningDescription>String</d4p1:liningDescription>
<d4p1:materialCode>String</d4p1:materialCode>
<d4p1:materialDescription>String</d4p1:materialDescription>
<d4p1:nuancierCode>String</d4p1:nuancierCode>
<d4p1:paddingCode>String</d4p1:paddingCode>
<d4p1:paddingDescription>String</d4p1:paddingDescription>
<d4p1:speakingArticleCode>String</d4p1:speakingArticleCode>
<d4p1:specialtyCode>String</d4p1:specialtyCode>
<d4p1:specialtyDescription>String</d4p1:specialtyDescription>
<d4p1:stitchingCode>String</d4p1:stitchingCode>
<d4p1:stitchingDescription>String</d4p1:stitchingDescription>
<d4p1:watch12Length>0</d4p1:watch12Length>
<d4p1:watch6Length>0</d4p1:watch6Length>
</strap>
<warnings xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</warnings>
</BasketItemResponse>
</validationResults>
</CreateBasketResponse>