Richemont.Booster2.PublicApi

<back to all web services

CreateBasket

Requires Authentication
The following routes are available for this service:
POST/purchase/basketCreate Basket
"use strict";
export class BasketStrapItem {
    /** @param {{speakingArticleCode?:string,buckleTypeDescription?:string,buckleTypeCode?:string,watch6Length?:number,watch12Length?:number,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?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Article reference */
    speakingArticleCode;
    /**
     * @type {string}
     * @description Buckle type Description */
    buckleTypeDescription;
    /**
     * @type {string}
     * @description Buckle type */
    buckleTypeCode;
    /**
     * @type {?number}
     * @description watch 6 Length */
    watch6Length;
    /**
     * @type {?number}
     * @description watch 12 Length */
    watch12Length;
    /**
     * @type {string}
     * @description Article Material Code */
    materialCode;
    /**
     * @type {string}
     * @description Article Material Description */
    materialDescription;
    /**
     * @type {string}
     * @description Article Color Code */
    colorCode;
    /**
     * @type {string}
     * @description Article Color Description */
    colorDescription;
    /**
     * @type {string}
     * @description Buckle Witdh */
    buckleWidth;
    /**
     * @type {string}
     * @description Article Lining Code */
    liningCode;
    /**
     * @type {string}
     * @description Article Lining Description */
    liningDescription;
    /**
     * @type {string}
     * @description Article Stitching Code */
    stitchingCode;
    /**
     * @type {string}
     * @description Article Stitching Description */
    stitchingDescription;
    /**
     * @type {string}
     * @description Article Edge Code */
    edgeCode;
    /**
     * @type {string}
     * @description Article Edge Description */
    edgeDescription;
    /**
     * @type {string}
     * @description Article Padding Code */
    paddingCode;
    /**
     * @type {string}
     * @description Article Padding Description */
    paddingDescription;
    /**
     * @type {string}
     * @description Article Speciality Code */
    specialtyCode;
    /**
     * @type {string}
     * @description Article Speciality Description */
    specialtyDescription;
    /**
     * @type {string}
     * @description Nuancier Code */
    nuancierCode;
    /**
     * @type {?boolean}
     * @description Strap Vip Order */
    isStrapVipOrder;
}
export class BasketItemResponse {
    /** @param {{line?:number,articleCode?:string,oldArticleCode?:string,quantity?:number,deliveryDate?:string,strap?:BasketStrapItem,errors?:string[],warnings?:string[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description Line number of the article */
    line;
    /**
     * @type {string}
     * @description Reference ID of the article/product */
    articleCode;
    /**
     * @type {string}
     * @description Old reference ID of the article/product */
    oldArticleCode;
    /**
     * @type {number}
     * @description Quantity of the article */
    quantity;
    /**
     * @type {string}
     * @description Delivery date of the article */
    deliveryDate;
    /**
     * @type {BasketStrapItem}
     * @description Strap definition */
    strap;
    /**
     * @type {string[]}
     * @description Errors for the article */
    errors;
    /**
     * @type {string[]}
     * @description Warnings for the article */
    warnings;
}
export class CreateBasketResponse {
    /** @param {{purchaseOrderId?:number,validationResults?:BasketItemResponse[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description ID of the newly created Purchase Order / Basket */
    purchaseOrderId;
    /**
     * @type {BasketItemResponse[]}
     * @description Validation results of each basket item */
    validationResults;
}
export class BasketItem {
    /** @param {{articleCode?:string,quantity?:number,strap?:BasketStrapItem}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Reference ID of the article/product */
    articleCode;
    /**
     * @type {number}
     * @description Desired quantity of the article */
    quantity;
    /**
     * @type {BasketStrapItem}
     * @description Strap definition */
    strap;
}
export class CreateBasket {
    /** @param {{brand?:string,posCode?:string,customerReference?:string,notes?:string,orderItems?:BasketItem[],boosterContextId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Brand Trigram of the intended order */
    brand;
    /**
     * @type {string}
     * @description Pos Code for the intended order e.g. ES03-10415-01 */
    posCode;
    /**
     * @type {string}
     * @description Customer Reference */
    customerReference;
    /**
     * @type {string}
     * @description Additional Notes regarding the order */
    notes;
    /**
     * @type {BasketItem[]}
     * @description List of Articles to be added in the basket */
    orderItems;
    /**
     * @type {string}
     * @description Brand Context ID */
    boosterContextId;
}

JavaScript CreateBasket DTOs

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

HTTP + 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>