POST api/Sale

Handles a direct sale and the payment of it

Request Information

URI Parameters

None.

Body Parameters

SaleRequestModel
NameDescriptionTypeAdditional 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

Sample:
{
  "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

Sample:
<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
NameDescriptionTypeAdditional 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

Sample:
{
  "FeedbackPortalUrl": "sample string 1",
  "Token": "sample string 2"
}

application/xml, text/xml

Sample:
<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

1

CardNotFound

The given customer card was not found

2

ClientNotFound

The given Client was not found in the system

3

CashierCardInvalid

The given cashier card was not found or is not an cashier card

4

EmptyArticleNumber

An empty article number is not supported

5

PaymentMethodNotSupported

The given payment method is not supported

7

CreditLineReached

The credit line of the customer card was reached.

8

NotEnoughCredit

Not enough credits

9

AlreadyReceivedBirthdayWash

The customer already received his birthday wash

10

NoBirthdayAvailable

There is no birthday registered to the card

11

NoWashItemBirthdayWash

No wash item was found. This is needed for a free birthday wash.

12

BirthdayWashNotInConfiguredTimePeriod

The requested birthday wash is outside the configured time period where it apply.

13

ClientNotAllowed

The given client can not be used by the given card

14

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.

15

CardLocked

The given card is locked.

16

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

Sample:
{
  "Data": null,
  "ApplicationErrorCode": 16,
  "ApplicationMessage": "ArticleBlocked"
}

application/xml, text/xml

Sample:
<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>