Create program
<Warning><Badge color="yellow">BETA endpoint</Badge>
This is a work-in-progress documentation of a BETA endpoint. The parameters, fields, request and response bodies, and other data may subject to change. If you want to share feedback or improvements, contact Voucherify support or your Technical Account Manager.
</Warning>Creates a new loyalty program. The program can be created with status DRAFT (default) or ACTIVE. When created as ACTIVE, the program must be connected to at least one active card definition and at least one active earning rule (provided via card_definitions and earning_rules arrays), otherwise the request is rejected with 423 Locked (keys missing_active_card_definition / missing_active_earning_rule). Optionally assigns card definitions, earning rules, rewards and tier structures in the same request.
Request body
Example request
{
"validity_hours": {
"daily": [
{
"start_time": "09:00",
"end_time": "17:00"
}
]
}
}Response
Program created. Response includes the ids of resources assigned during creation.