| POST | /warranty | Create a Sell-Out | Create a sell-out in a POS you are authorised for |
|---|
namespace Richemont.Booster2.PublicApi.Sellout.ServiceModel
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type CreateSellOutResponse() =
///<summary>
///Unique Identifier of the Sell-out item created in Booster
///</summary>
[<ApiMember(Description="Unique Identifier of the Sell-out item created in Booster")>]
member val saleDetailId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Unique Identifiers of the Sell-out items created in Booster if more than one
///</summary>
[<ApiMember(Description="Unique Identifiers of the Sell-out items created in Booster if more than one")>]
member val saleDetailIds:ResizeArray<Int32> = new ResizeArray<Int32>() with get,set
///<summary>
///Unique Identifier of the Sell-out header created in Booster
///</summary>
[<ApiMember(Description="Unique Identifier of the Sell-out header created in Booster", IsRequired=true)>]
member val saleId:Int32 = new Int32() with get,set
[<AllowNullLiteral>]
type CreateSellOut() =
///<summary>
///Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided
///</summary>
[<ApiMember(Description="Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided")>]
member val brand:String = null with get,set
///<summary>
///Richemont POS code
///</summary>
[<ApiMember(Description="Richemont POS code", IsRequired=true)>]
member val posCode:String = null with get,set
///<summary>
///Receipt or Invoice Number
///</summary>
[<ApiMember(Description="Receipt or Invoice Number")>]
member val documentNumber:String = null with get,set
///<summary>
///Date of the Sell-out
///</summary>
[<ApiMember(Description="Date of the Sell-out", IsRequired=true)>]
member val documentDate:DateTime = new DateTime() with get,set
///<summary>
///Position Number
///</summary>
[<ApiMember(Description="Position Number")>]
member val documentLineNumber:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Richemont Reference Code of the item
///</summary>
[<ApiMember(Description="Richemont Reference Code of the item", IsRequired=true)>]
member val articleCode:String = null with get,set
///<summary>
///Serial Number of the item
///</summary>
[<ApiMember(Description="Serial Number of the item")>]
member val serialNumber:String = null with get,set
///<summary>
///Use positive for standard Sell-out and negative quantity for return
///</summary>
[<ApiMember(Description="Use positive for standard Sell-out and negative quantity for return", IsRequired=true)>]
member val quantity:Int32 = new Int32() with get,set
///<summary>
///Sold Price
///</summary>
[<ApiMember(Description="Sold Price")>]
member val unitPrice:Nullable<Decimal> = new Nullable<Decimal>() with get,set
///<summary>
///Currency of the sold price
///</summary>
[<ApiMember(Description="Currency of the sold price")>]
member val currencyCode:String = null with get,set
///<summary>
///Booster Customer Id
///</summary>
[<ApiMember(Description="Booster Customer Id")>]
member val boosterCustomerId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///Sale Representative Email e.g. rauf.aliyev@richemont.com
///</summary>
[<ApiMember(Description="Sale Representative Email e.g. rauf.aliyev@richemont.com")>]
member val saleRepresentativeEmails:ResizeArray<String> = new ResizeArray<String>() with get,set
///<summary>
///Promoter Type ID, e.g. DAI, FIT, GRT
///</summary>
[<ApiMember(Description="Promoter Type ID, e.g. DAI, FIT, GRT")>]
member val promoterTypeId:String = null with get,set
///<summary>
///Return Reason ID, e.g ADM, CLR, EXC, DEF, OTH
///</summary>
[<ApiMember(Description="Return Reason ID, e.g ADM, CLR, EXC, DEF, OTH")>]
member val returnReasonId:String = null with get,set
///<summary>
///Sale related comments
///</summary>
[<ApiMember(Description="Sale related comments")>]
member val comments:String = null with get,set
///<summary>
///Original Sale Detail Id
///</summary>
[<ApiMember(Description="Original Sale Detail Id")>]
member val originalSaleDetailId:Nullable<Int32> = new Nullable<Int32>() with get,set
///<summary>
///To have the piece back in stock as consignment in case of consignment sellout return
///</summary>
[<ApiMember(Description="To have the piece back in stock as consignment in case of consignment sellout return")>]
member val consSelloutReturnInStock:Nullable<Boolean> = new Nullable<Boolean>() 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 /warranty HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CreateSellOut xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Sellout.ServiceModel">
<articleCode>String</articleCode>
<boosterCustomerId>0</boosterCustomerId>
<brand>String</brand>
<comments>String</comments>
<consSelloutReturnInStock>false</consSelloutReturnInStock>
<currencyCode>String</currencyCode>
<documentDate>0001-01-01T00:00:00</documentDate>
<documentLineNumber>0</documentLineNumber>
<documentNumber>String</documentNumber>
<originalSaleDetailId>0</originalSaleDetailId>
<posCode>String</posCode>
<promoterTypeId>String</promoterTypeId>
<quantity>0</quantity>
<returnReasonId>String</returnReasonId>
<saleRepresentativeEmails xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</saleRepresentativeEmails>
<serialNumber>String</serialNumber>
<unitPrice>0</unitPrice>
</CreateSellOut>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CreateSellOutResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Sellout.ServiceModel">
<saleDetailId>0</saleDetailId>
<saleDetailIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</saleDetailIds>
<saleId>0</saleId>
</CreateSellOutResponse>