Richemont.Booster2.PublicApi

<back to all web services

CreateBasket

Requires Authentication
The following routes are available for this service:
POST/purchase/basketCreate Basket
import Foundation
import ServiceStack

public class CreateBasket : Codable
{
    /**
    * Brand Trigram of the intended order
    */
    // @ApiMember(Description="Brand Trigram of the intended order", IsRequired=true)
    public var brand:String

    /**
    * Pos Code for the intended order e.g. ES03-10415-01
    */
    // @ApiMember(Description="Pos Code for the intended order e.g. ES03-10415-01", IsRequired=true)
    public var posCode:String

    /**
    * Customer Reference
    */
    // @ApiMember(Description="Customer Reference", IsRequired=true)
    public var customerReference:String

    /**
    * Additional Notes regarding the order
    */
    // @ApiMember(Description="Additional Notes regarding the order", IsRequired=true)
    public var notes:String

    /**
    * List of Articles to be added in the basket
    */
    // @ApiMember(Description="List of Articles to be added in the basket")
    public var orderItems:[BasketItem] = []

    /**
    * Brand Context ID
    */
    // @ApiMember(Description="Brand Context ID")
    public var boosterContextId:String

    required public init(){}
}

public class BasketItem : Codable
{
    /**
    * Reference ID of the article/product
    */
    // @ApiMember(Description="Reference ID of the article/product", IsRequired=true)
    public var articleCode:String

    /**
    * Desired quantity of the article
    */
    // @ApiMember(Description="Desired quantity of the article")
    public var quantity:Int

    /**
    * Strap definition
    */
    // @ApiMember(Description="Strap definition")
    public var strap:BasketStrapItem

    required public init(){}
}

public class BasketStrapItem : Codable
{
    /**
    * Article reference
    */
    // @ApiMember(Description="Article reference")
    public var speakingArticleCode:String

    /**
    * Buckle type Description
    */
    // @ApiMember(Description="Buckle type Description")
    public var buckleTypeDescription:String

    /**
    * Buckle type
    */
    // @ApiMember(Description="Buckle type")
    public var buckleTypeCode:String

    /**
    * watch 6 Length
    */
    // @ApiMember(Description="watch 6 Length")
    public var watch6Length:Int?

    /**
    * watch 12 Length
    */
    // @ApiMember(Description="watch 12 Length")
    public var watch12Length:Int?

    /**
    * Article Material Code
    */
    // @ApiMember(Description="Article Material Code")
    public var materialCode:String

    /**
    * Article Material Description
    */
    // @ApiMember(Description="Article Material Description")
    public var materialDescription:String

    /**
    * Article Color Code
    */
    // @ApiMember(Description="Article Color Code")
    public var colorCode:String

    /**
    * Article Color Description
    */
    // @ApiMember(Description="Article Color Description")
    public var colorDescription:String

    /**
    * Buckle Witdh
    */
    // @ApiMember(Description="Buckle Witdh")
    public var buckleWidth:String

    /**
    * Article Lining Code
    */
    // @ApiMember(Description="Article Lining Code")
    public var liningCode:String

    /**
    * Article Lining Description
    */
    // @ApiMember(Description="Article Lining Description")
    public var liningDescription:String

    /**
    * Article Stitching Code
    */
    // @ApiMember(Description="Article Stitching Code")
    public var stitchingCode:String

    /**
    * Article Stitching Description
    */
    // @ApiMember(Description="Article Stitching Description")
    public var stitchingDescription:String

    /**
    * Article Edge Code
    */
    // @ApiMember(Description="Article Edge Code")
    public var edgeCode:String

    /**
    * Article Edge Description
    */
    // @ApiMember(Description="Article Edge Description")
    public var edgeDescription:String

    /**
    * Article Padding Code
    */
    // @ApiMember(Description="Article Padding Code")
    public var paddingCode:String

    /**
    * Article Padding Description
    */
    // @ApiMember(Description="Article Padding Description")
    public var paddingDescription:String

    /**
    * Article Speciality Code
    */
    // @ApiMember(Description="Article Speciality Code")
    public var specialtyCode:String

    /**
    * Article Speciality Description
    */
    // @ApiMember(Description="Article Speciality Description")
    public var specialtyDescription:String

    /**
    * Nuancier Code
    */
    // @ApiMember(Description="Nuancier Code")
    public var nuancierCode:String

    /**
    * Strap Vip Order
    */
    // @ApiMember(Description="Strap Vip Order")
    public var isStrapVipOrder:Bool?

    required public init(){}
}

public class CreateBasketResponse : Codable
{
    /**
    * ID of the newly created Purchase Order / Basket
    */
    // @ApiMember(Description="ID of the newly created Purchase Order / Basket", IsRequired=true)
    public var purchaseOrderId:Int

    /**
    * Validation results of each basket item
    */
    // @ApiMember(Description="Validation results of each basket item")
    public var validationResults:[BasketItemResponse] = []

    required public init(){}
}

public class BasketItemResponse : Codable
{
    /**
    * Line number of the article
    */
    // @ApiMember(Description="Line number of the article")
    public var line:Int

    /**
    * Reference ID of the article/product
    */
    // @ApiMember(Description="Reference ID of the article/product")
    public var articleCode:String

    /**
    * Old reference ID of the article/product
    */
    // @ApiMember(Description="Old reference ID of the article/product")
    public var oldArticleCode:String

    /**
    * Quantity of the article
    */
    // @ApiMember(Description="Quantity of the article")
    public var quantity:Int

    /**
    * Delivery date of the article
    */
    // @ApiMember(Description="Delivery date of the article")
    public var deliveryDate:Date

    /**
    * Strap definition
    */
    // @ApiMember(Description="Strap definition")
    public var strap:BasketStrapItem

    /**
    * Errors for the article
    */
    // @ApiMember(Description="Errors for the article")
    public var errors:[String] = []

    /**
    * Warnings for the article
    */
    // @ApiMember(Description="Warnings for the article")
    public var warnings:[String] = []

    required public init(){}
}


Swift CreateBasket DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
Content-Type: text/csv
Content-Length: length

{"brand":"String","posCode":"String","customerReference":"String","notes":"String","orderItems":[{"articleCode":"String","quantity":0,"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}}],"boosterContextId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"purchaseOrderId":0,"validationResults":[{"line":0,"articleCode":"String","oldArticleCode":"String","quantity":0,"deliveryDate":"\/Date(-62135596800000-0000)\/","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},"errors":["String"],"warnings":["String"]}]}