| POST | /warranty | Create a Sell-Out | Create a sell-out in a POS you are authorised for |
|---|
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Richemont.Booster2.PublicApi.Sellout.ServiceModel;
namespace Richemont.Booster2.PublicApi.Sellout.ServiceModel
{
public partial class 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")]
public virtual string? brand { get; set; }
///<summary>
///Richemont POS code
///</summary>
[ApiMember(Description="Richemont POS code", IsRequired=true)]
public virtual string posCode { get; set; }
///<summary>
///Receipt or Invoice Number
///</summary>
[ApiMember(Description="Receipt or Invoice Number")]
public virtual string? documentNumber { get; set; }
///<summary>
///Date of the Sell-out
///</summary>
[ApiMember(Description="Date of the Sell-out", IsRequired=true)]
public virtual DateTime documentDate { get; set; }
///<summary>
///Position Number
///</summary>
[ApiMember(Description="Position Number")]
public virtual int? documentLineNumber { get; set; }
///<summary>
///Richemont Reference Code of the item
///</summary>
[ApiMember(Description="Richemont Reference Code of the item", IsRequired=true)]
public virtual string articleCode { get; set; }
///<summary>
///Serial Number of the item
///</summary>
[ApiMember(Description="Serial Number of the item")]
public virtual string? serialNumber { 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)]
public virtual int quantity { get; set; }
///<summary>
///Sold Price
///</summary>
[ApiMember(Description="Sold Price")]
public virtual decimal? unitPrice { get; set; }
///<summary>
///Currency of the sold price
///</summary>
[ApiMember(Description="Currency of the sold price")]
public virtual string? currencyCode { get; set; }
///<summary>
///Booster Customer Id
///</summary>
[ApiMember(Description="Booster Customer Id")]
public virtual int? boosterCustomerId { get; set; }
///<summary>
///Sale Representative Email e.g. rauf.aliyev@richemont.com
///</summary>
[ApiMember(Description="Sale Representative Email e.g. rauf.aliyev@richemont.com")]
public virtual List<string>? saleRepresentativeEmails { get; set; }
///<summary>
///Promoter Type ID, e.g. DAI, FIT, GRT
///</summary>
[ApiMember(Description="Promoter Type ID, e.g. DAI, FIT, GRT")]
public virtual string? promoterTypeId { 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")]
public virtual string? returnReasonId { get; set; }
///<summary>
///Sale related comments
///</summary>
[ApiMember(Description="Sale related comments")]
public virtual string? comments { get; set; }
///<summary>
///Original Sale Detail Id
///</summary>
[ApiMember(Description="Original Sale Detail Id")]
public virtual int? originalSaleDetailId { 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")]
public virtual bool? consSelloutReturnInStock { get; set; }
///<summary>
///Reason for the sell-out, e.g., 'CPO' (Certified Pre-Owned)
///</summary>
[ApiMember(Description="Reason for the sell-out, e.g., 'CPO' (Certified Pre-Owned)")]
public virtual string? saleReasonId { get; set; }
}
public partial class 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")]
public virtual int? saleDetailId { 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")]
public virtual List<int>? saleDetailIds { 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)]
public virtual int saleId { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
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: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"brand":"String","posCode":"String","documentNumber":"String","documentDate":"\/Date(-62135596800000-0000)\/","documentLineNumber":0,"articleCode":"String","serialNumber":"String","quantity":0,"unitPrice":0,"currencyCode":"String","boosterCustomerId":0,"saleRepresentativeEmails":["String"],"promoterTypeId":"String","returnReasonId":"String","comments":"String","originalSaleDetailId":0,"consSelloutReturnInStock":false,"saleReasonId":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"saleDetailId":0,"saleDetailIds":[0],"saleId":0}