POST api/Sale
Handles a direct sale and the payment of it
Request Information
URI Parameters
None.
Body Parameters
SaleRequestModel| Name | Description | Type | Additional information |
|---|---|---|---|
| PriceGroup |
The Price Group |
byte |
None. |
| Items |
The purchased items |
Collection of SaleItem |
None. |
| CashierCardNumber |
The number of the cashier card |
string |
None. |
| PaymentMethod |
The payment method |
PaymentMethod |
None. |
| CardNumber |
The card number of the customer card If not available you can use the License Plate instead. |
string |
None. |
| CardUID |
The UID of the customercard, if RFID card This is optional. The prefered identification should be done via the Card Number |
integer |
None. |
| LicensePlate |
The license plate of the customer This is optional. The prefered identification should be done via the Card Number |
string |
None. |
| ClientNumber |
The current Client Number (Unique POS ID number) |
byte |
None. |
Request Formats
application/json, text/json
{
"PriceGroup": 64,
"Items": [
{
"ArticleNumber": "sample string 1",
"Quantity": 2,
"Price": 1.0
},
{
"ArticleNumber": "sample string 1",
"Quantity": 2,
"Price": 1.0
}
],
"CashierCardNumber": "sample string 2",
"PaymentMethod": 0,
"CardNumber": "sample string 3",
"CardUID": 1,
"LicensePlate": "sample string 4",
"ClientNumber": 64
}
application/xml, text/xml
<SaleRequestModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CardNumber>sample string 3</CardNumber>
<CardUID>1</CardUID>
<LicensePlate>sample string 4</LicensePlate>
<ClientNumber>64</ClientNumber>
<PriceGroup>64</PriceGroup>
<Items>
<SaleItem>
<ArticleNumber>sample string 1</ArticleNumber>
<Quantity>2</Quantity>
<Price>1</Price>
</SaleItem>
<SaleItem>
<ArticleNumber>sample string 1</ArticleNumber>
<Quantity>2</Quantity>
<Price>1</Price>
</SaleItem>
</Items>
<CashierCardNumber>sample string 2</CashierCardNumber>
<PaymentMethod>CashPayment</PaymentMethod>
</SaleRequestModel>
Response Information
Resource Description
SaleResponseModel| Name | Description | Type | Additional information |
|---|---|---|---|
| FeedbackPortalUrl |
An Url to the Feedback Portal for the given booking, when feedback is enabled for given cash desk (ClientNumber) |
string |
None. |
| Token |
An EAN13 Code for the Wash Token, when the request contains a washing. Only available if wash token generation is enabled for the given cash desk (ClientNumber) |
string |
None. |
Response Formats
application/json, text/json
{
"FeedbackPortalUrl": "sample string 1",
"Token": "sample string 2"
}
application/xml, text/xml
<SaleResponseModel xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <FeedbackPortalUrl>sample string 1</FeedbackPortalUrl> <Token>sample string 2</Token> </SaleResponseModel>
Error Handling
HTTP Status Codes
An expected error is indicated through the HTTP Status Code 400. In this case you can read the details about the error in the body of the response. Make sure you always check for the HTTP Status Code 200, since many things can go wrong. Unexpected errors are sended with HTTP Status Code 500 for example.
Application Error Codes
| Code | Name | Description |
|---|---|---|
|
|
CardNotFound |
The given customer card was not found |
|
|
ClientNotFound |
The given Client was not found in the system |
|
|
CashierCardInvalid |
The given cashier card was not found or is not an cashier card |
|
|
EmptyArticleNumber |
An empty article number is not supported |
|
|
PaymentMethodNotSupported |
The given payment method is not supported |
|
|
CreditLineReached |
The credit line of the customer card was reached. |
|
|
NotEnoughCredit |
Not enough credits |
|
|
AlreadyReceivedBirthdayWash |
The customer already received his birthday wash |
|
|
NoBirthdayAvailable |
There is no birthday registered to the card |
|
|
NoWashItemBirthdayWash |
No wash item was found. This is needed for a free birthday wash. |
|
|
BirthdayWashNotInConfiguredTimePeriod |
The requested birthday wash is outside the configured time period where it apply. |
|
|
ClientNotAllowed |
The given client can not be used by the given card |
|
|
ArticleNotFound |
One or more articles can not be found. An enumeration of those article numbers can be found in the Data field of the Error Response. |
|
|
CardLocked |
The given card is locked. |
|
|
ArticleBlocked |
One or more articles were blocked. An enumeration of those article numbers can be found in the Data field of the Error Response. |
Error Formats
application/json, text/json
{
"Data": null,
"ApplicationErrorCode": 16,
"ApplicationMessage": "ArticleBlocked"
}
application/xml, text/xml
<Error xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ApplicationErrorCode>16</ApplicationErrorCode> <ApplicationMessage>ArticleBlocked</ApplicationMessage> </Error>