| POST | /purchase/basket | Create Basket |
|---|
namespace Richemont.Booster2.PublicApi.Purchase.ServiceModel
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type BasketStrapItem() =
///<summary>
///Article reference
///</summary>
[<ApiMember(Description="Article reference")>]
member val speakingArticleCode:String = null with get,set
///<summary>
///Buckle type Description
///</summary>
[<ApiMember(Description="Buckle type Description")>]
member val buckleTypeDescription:String = null with get,set
///<summary>
///Buckle type
///</summary>
[<ApiMember(Description="Buckle type")>]
member val buckleTypeCode:String = null with get,set
///<summary>
///watch 6 Length
///</summary>
[<ApiMember(Description="watch 6 Length")>]
member val watch6Length:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///watch 12 Length
///</summary>
[<ApiMember(Description="watch 12 Length")>]
member val watch12Length:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Article Material Code
///</summary>
[<ApiMember(Description="Article Material Code")>]
member val materialCode:String = null with get,set
///<summary>
///Article Material Description
///</summary>
[<ApiMember(Description="Article Material Description")>]
member val materialDescription:String = null with get,set
///<summary>
///Article Color Code
///</summary>
[<ApiMember(Description="Article Color Code")>]
member val colorCode:String = null with get,set
///<summary>
///Article Color Description
///</summary>
[<ApiMember(Description="Article Color Description")>]
member val colorDescription:String = null with get,set
///<summary>
///Buckle Witdh
///</summary>
[<ApiMember(Description="Buckle Witdh")>]
member val buckleWidth:String = null with get,set
///<summary>
///Article Lining Code
///</summary>
[<ApiMember(Description="Article Lining Code")>]
member val liningCode:String = null with get,set
///<summary>
///Article Lining Description
///</summary>
[<ApiMember(Description="Article Lining Description")>]
member val liningDescription:String = null with get,set
///<summary>
///Article Stitching Code
///</summary>
[<ApiMember(Description="Article Stitching Code")>]
member val stitchingCode:String = null with get,set
///<summary>
///Article Stitching Description
///</summary>
[<ApiMember(Description="Article Stitching Description")>]
member val stitchingDescription:String = null with get,set
///<summary>
///Article Edge Code
///</summary>
[<ApiMember(Description="Article Edge Code")>]
member val edgeCode:String = null with get,set
///<summary>
///Article Edge Description
///</summary>
[<ApiMember(Description="Article Edge Description")>]
member val edgeDescription:String = null with get,set
///<summary>
///Article Padding Code
///</summary>
[<ApiMember(Description="Article Padding Code")>]
member val paddingCode:String = null with get,set
///<summary>
///Article Padding Description
///</summary>
[<ApiMember(Description="Article Padding Description")>]
member val paddingDescription:String = null with get,set
///<summary>
///Article Speciality Code
///</summary>
[<ApiMember(Description="Article Speciality Code")>]
member val specialtyCode:String = null with get,set
///<summary>
///Article Speciality Description
///</summary>
[<ApiMember(Description="Article Speciality Description")>]
member val specialtyDescription:String = null with get,set
///<summary>
///Nuancier Code
///</summary>
[<ApiMember(Description="Nuancier Code")>]
member val nuancierCode:String = null with get,set
///<summary>
///Strap Vip Order
///</summary>
[<ApiMember(Description="Strap Vip Order")>]
member val isStrapVipOrder:Nullable<Boolean> = new Nullable<Boolean>() with get,set
[<AllowNullLiteral>]
type BasketItemResponse() =
///<summary>
///Line number of the article
///</summary>
[<ApiMember(Description="Line number of the article")>]
member val line:Int32 = new Int32() with get,set
///<summary>
///Reference ID of the article/product
///</summary>
[<ApiMember(Description="Reference ID of the article/product")>]
member val articleCode:String = null with get,set
///<summary>
///Old reference ID of the article/product
///</summary>
[<ApiMember(Description="Old reference ID of the article/product")>]
member val oldArticleCode:String = null with get,set
///<summary>
///Quantity of the article
///</summary>
[<ApiMember(Description="Quantity of the article")>]
member val quantity:Int32 = new Int32() with get,set
///<summary>
///Delivery date of the article
///</summary>
[<ApiMember(Description="Delivery date of the article")>]
member val deliveryDate:DateTime = new DateTime() with get,set
///<summary>
///Strap definition
///</summary>
[<ApiMember(Description="Strap definition")>]
member val strap:BasketStrapItem = null with get,set
///<summary>
///Errors for the article
///</summary>
[<ApiMember(Description="Errors for the article")>]
member val errors:ResizeArray<String> = new ResizeArray<String>() with get,set
///<summary>
///Warnings for the article
///</summary>
[<ApiMember(Description="Warnings for the article")>]
member val warnings:ResizeArray<String> = new ResizeArray<String>() with get,set
[<AllowNullLiteral>]
type CreateBasketResponse() =
///<summary>
///ID of the newly created Purchase Order / Basket
///</summary>
[<ApiMember(Description="ID of the newly created Purchase Order / Basket", IsRequired=true)>]
member val purchaseOrderId:Int32 = new Int32() with get,set
///<summary>
///Validation results of each basket item
///</summary>
[<ApiMember(Description="Validation results of each basket item")>]
member val validationResults:ResizeArray<BasketItemResponse> = new ResizeArray<BasketItemResponse>() with get,set
[<AllowNullLiteral>]
type BasketItem() =
///<summary>
///Reference ID of the article/product
///</summary>
[<ApiMember(Description="Reference ID of the article/product", IsRequired=true)>]
member val articleCode:String = null with get,set
///<summary>
///Desired quantity of the article
///</summary>
[<ApiMember(Description="Desired quantity of the article")>]
member val quantity:Int32 = new Int32() with get,set
///<summary>
///Strap definition
///</summary>
[<ApiMember(Description="Strap definition")>]
member val strap:BasketStrapItem = null with get,set
[<AllowNullLiteral>]
type CreateBasket() =
///<summary>
///Brand Trigram of the intended order
///</summary>
[<ApiMember(Description="Brand Trigram of the intended order", IsRequired=true)>]
member val brand:String = null with get,set
///<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)>]
member val posCode:String = null with get,set
///<summary>
///Customer Reference
///</summary>
[<ApiMember(Description="Customer Reference", IsRequired=true)>]
member val customerReference:String = null with get,set
///<summary>
///Additional Notes regarding the order
///</summary>
[<ApiMember(Description="Additional Notes regarding the order", IsRequired=true)>]
member val notes:String = null with get,set
///<summary>
///List of Articles to be added in the basket
///</summary>
[<ApiMember(Description="List of Articles to be added in the basket")>]
member val orderItems:ResizeArray<BasketItem> = new ResizeArray<BasketItem>() with get,set
///<summary>
///Brand Context ID
///</summary>
[<ApiMember(Description="Brand Context ID")>]
member val boosterContextId:String = null with get,set
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>