| POST | /warranty | Create a Sell-Out | Create a sell-out in a POS you are authorised for |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Richemont.Booster2.PublicApi.Sellout.ServiceModel
Namespace Global
Namespace Richemont.Booster2.PublicApi.Sellout.ServiceModel
Public Partial Class CreateSellOut
Public Sub New()
saleRepresentativeEmails = New List(Of String)
End Sub
'''<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 Overridable Property brand As String
'''<Summary>
'''Richemont POS code
'''</Summary>
<ApiMember(Description:="Richemont POS code", IsRequired:=true)>
Public Overridable Property posCode As String
'''<Summary>
'''Receipt or Invoice Number
'''</Summary>
<ApiMember(Description:="Receipt or Invoice Number")>
Public Overridable Property documentNumber As String
'''<Summary>
'''Date of the Sell-out
'''</Summary>
<ApiMember(Description:="Date of the Sell-out", IsRequired:=true)>
Public Overridable Property documentDate As Date
'''<Summary>
'''Position Number
'''</Summary>
<ApiMember(Description:="Position Number")>
Public Overridable Property documentLineNumber As Nullable(Of Integer)
'''<Summary>
'''Richemont Reference Code of the item
'''</Summary>
<ApiMember(Description:="Richemont Reference Code of the item", IsRequired:=true)>
Public Overridable Property articleCode As String
'''<Summary>
'''Serial Number of the item
'''</Summary>
<ApiMember(Description:="Serial Number of the item")>
Public Overridable Property serialNumber As String
'''<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 Overridable Property quantity As Integer
'''<Summary>
'''Sold Price
'''</Summary>
<ApiMember(Description:="Sold Price")>
Public Overridable Property unitPrice As Nullable(Of Decimal)
'''<Summary>
'''Currency of the sold price
'''</Summary>
<ApiMember(Description:="Currency of the sold price")>
Public Overridable Property currencyCode As String
'''<Summary>
'''Booster Customer Id
'''</Summary>
<ApiMember(Description:="Booster Customer Id")>
Public Overridable Property boosterCustomerId As Nullable(Of Integer)
'''<Summary>
'''Sale Representative Email e.g. rauf.aliyev@richemont.com
'''</Summary>
<ApiMember(Description:="Sale Representative Email e.g. rauf.aliyev@richemont.com")>
Public Overridable Property saleRepresentativeEmails As List(Of String)
'''<Summary>
'''Promoter Type ID, e.g. DAI, FIT, GRT
'''</Summary>
<ApiMember(Description:="Promoter Type ID, e.g. DAI, FIT, GRT")>
Public Overridable Property promoterTypeId As String
'''<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 Overridable Property returnReasonId As String
'''<Summary>
'''Sale related comments
'''</Summary>
<ApiMember(Description:="Sale related comments")>
Public Overridable Property comments As String
'''<Summary>
'''Original Sale Detail Id
'''</Summary>
<ApiMember(Description:="Original Sale Detail Id")>
Public Overridable Property originalSaleDetailId As Nullable(Of Integer)
'''<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 Overridable Property consSelloutReturnInStock As Nullable(Of Boolean)
End Class
Public Partial Class CreateSellOutResponse
Public Sub New()
saleDetailIds = New List(Of Integer)
End Sub
'''<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 Overridable Property saleDetailId As Nullable(Of Integer)
'''<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 Overridable Property saleDetailIds As List(Of Integer)
'''<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 Overridable Property saleId As Integer
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
Content-Length: length
{
brand: String,
posCode: String,
documentNumber: String,
documentDate: 0001-01-01,
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
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
saleDetailId: 0,
saleDetailIds:
[
0
],
saleId: 0
}