Skip to main content
POST
Create loyalty program

Authorizations

Authorization
string
header
required

Sign in to the admin dashboard and use the resulting ID token for a store and operation you can access. The authenticated dashboard cookie is accepted when the Authorization header is absent. Missing or insufficient access returns 401.

Body

application/json

Custom renewal requires date_of_reset later than starts_at. Inactivity expiry requires positive redemption_inactivity_days; reset_date expiry is unavailable for never renewal. Fixed earning requires fixed_points on each tier; dynamic earning requires points_earning_rate. Tier thresholds must match tier_upgrade_criteria.

name
string
required

name of loyalty program

Maximum string length: 128
renewal_type
enum<string>
required

frequency at which loyalty program will be renewed.

Available options:
yearly,
never,
custom
starts_at
string<date-time>
required

Program start, required for every renewal mode. On creation it cannot be before today.

tier_upgrade_criteria
enum<string>
required

to decide tier upgradation based on no of orders or total purchase value

Available options:
total-spent,
total-orders,
custom
points_earning_type
enum<string>
required

Defines how points are earned. "dynamic" means points are calculated based on a rate (points_earning_rate), "fixed" means a fixed number of points are given.

Available options:
dynamic,
fixed
seller_id
string[] | null

Restricts the program to these sellers. Use null or omit to apply it across all sellers.

customer_group_id
string[] | null

Restricts the program to these customer groups. Use null or omit to apply it to all customers.

date_of_reset
string<date-time> | null

Required later than starts_at for custom renewal; otherwise null.

point_value
number
default:1

The monetary value of one loyalty point.

Must be a multiple of 0.01
redemption_expiry_type
enum<string>
default:never

Defines when loyalty points are expired. "never" means the points never expire, "inactivity" means the points expire after a certain number of days of inactivity, "reset_date" means the points expire when the loyalty program is reset.

Available options:
never,
inactivity,
reset_date
redemption_inactivity_days
integer | null

The number of days after the last order was placed, after which the points expire if redemption_expiry_type is "inactivity". required if redemption_expiry_type is "inactivity", otherwise should be null.

tiers
object[]

Response

OK

message
string
required
success
boolean
required
content
object
required