Skip to main content

Loyalty (1.0)

Download OpenAPI specification:Download

Use this API to manage loyalty coupons and reward program coupon definitions for your business.

These coupons can later be used via Associate App to offer discounts to customers enrolled in the loyalty program. See the guide.

Create Loyalty Coupon

Use this method to create coupon codes on the fly to be used with a loyalty program.

Important: Loyalty coupons are only valid for 15 minutes.

The type of coupons available for this functionality are of type cart fixed and cart percentage discounts.

header Parameters
tenant
required
string
Example: test-tenant

The test tenant name.

user-id
required
string
Example: test-userid

The test user ID.

Request Body schema: application/json

A loyalty request

Array of objects (voucher)
Array
voucherId
string

The identifier of the corresponding coupon/voucher on the caller’s system.

name
string

The name of the voucher. It has to be unique.

discount
number

The value of the discount, either as fixed amount or percentage (between 0 and 100).

type
string
Enum: "Fixed" "Percentage"

The type of discount. Can be 'Fixed' or 'Percentage'.

level
string
Value: "Cart"

The level at which the voucher applied. So far just 'Cart' is supported.

Array of objects (Currency)

A list of conditions on currencies to satisfy in order for the voucher to be applied.

consumers
Array of strings <= 1000 items

Indicates by which consumers the coupon can be used. A list of IDs states that the coupon can be used by the given consumers while an empty array states that the coupon can be used by any consumers.

Responses

Request samples

Content type
application/json
{
  • "vouchers": [
    ]
}

Response samples

Content type
application/json
{
  • "codes": [
    ],
  • "warnings": [
    ]
}