Responses

Status-Codes

Status code Description
422 The payload sent is not valid
403 Partner not enabled for the app
200 successful request
5xx internal error

If the validation of the request fails, it is answered with the status code 422 and corresponding error messages. If the request fails, no data is saved.

Partners may have been created for the app but not yet activated. If this is the case and a beverage store of a partner that has not yet been activated wants to communicate with the API, the request is answered with the status code “403”. No data is saved in this case either.

If the response has a status code >= 500, an internal error has occurred. Please contact us with the corresponding error message.

All successful responses have the status code 200.

Example response

An example response looks like this. All data is packed into a wrapper purchase_response.

{
  "purchase_response": {
    "card_id": "42000008568155188268",
    "valid_card": true,
    "earned_stamps": 0,
    "available_coupons": [
      {
        "coupon_id": "0ae01384-fae8-408a-9fcb-e7df6021eaa7",
        "coupon_type": "sum_item",
        "unit_position": 1,
        "value": "10.00"
      }
    ],
    "message": "Sie haben mit Ihrem Einkauf 0 Stempel gesammelt und 1 Gutschein(e) verwendet!"
  }
}
Field name Type Field description Use
card_id String Card number of the scanned customer card and thus also the connection to the customer
valid_card Boolean Flag whether the scanned customer card is valid. If the customer card is invalid, no coupons are calculated.
earned_stamps Int Number of stamps purchased with the current receipt
message String Message for display in the POS system
available_coupons Array A list of all redeemed coupons