Coupons

In the response of the Bottle-O-API there is the property available_coupons. All redeemed coupons for absolute/percentage discounts and free items are listed there.

There are 4 different types of coupons:

  • sum_item - Absolute discount triggered by an item on the receipt
  • sum - Absolute discount triggered without item condition
  • percentage - percentage discount, triggered by an item or without item condition
  • free - free article, triggered by an article or without article condition

A redeemed coupon has the following properties:

field name type field description use
coupon_id String (UUID) Unique coupon ID Id to be able to identify a redeemed coupon beyond doubt
coupon_type String Type of coupon The type can be used to determine what kind of coupon it is
unit_position Int Position of the triggering item This property contains the item number of the item that triggered the coupon. If no item has triggered the coupon, but the pure receipt, the content of this property is null
value String Coupon value Value of the redeemed coupon. In the case of an absolute discount, the value reflects the discount; in the case of a percentage discount, this property reflects the percentage value. The actual discount must be determined by the POS system
{
        "coupon_id": "0ae01384-fae8-408a-9fcb-e7df6021eaa7",
        "coupon_type": "sum_item",
        "unit_position": 1,
        "value": "10.00"
      }

The properties of a free coupon differ from all other coupon types and are explained in the section [free items](/responses/free items).

Absolute discounts

For absolute discounts, a positive decimal number with 2 decimal places is stored in the backend. This decimal number is specified as value in the coupon. In the following example, the item with position 1 on the receipt has triggered the coupon, which gives the customer a €10 discount on the total amount.

{
        "coupon_id": "0ae01384-fae8-408a-9fcb-e7df6021eaa7",
        "coupon_type": "sum_item",
        "unit_position": 1,
        "value": "10.00"
      }

If a promotion with a €3.30 discount without a triggering item is active, the coupon in the Bottle-O-API response would look like this:

{
        "coupon_id": "0ae01384-fae8-408a-9fcb-e7df6021eaa7",
        "coupon_type": "sum",
        "unit_position": null,
        "value": "3.30"
      }

Percentage discounts

Percentage discounts are very similar to absolute discounts. The only difference is that the value property does not specify the absolute value of the discount, but the percentage value. The actual discount must be determined by the POS system. In the example below, the item with position 3 on the receipt has triggered the coupon that gives the customer a 5% discount on the total amount.

{
        "coupon_id": "0ae01384-fae8-408a-9fcb-e7df6021eaa7",
        "coupon_type": "percentage",
        "unit_position": 3,
        "value": "5"
      }