A valid request URL is required to generate request examples{
"id": "<string>",
"name": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"validity_hours": {
"daily": [
{
"days_of_week": [
3
],
"start_time": "<string>",
"end_time": "<string>"
}
]
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"card_definitions": [
{
"id": "<string>"
}
],
"earning_rules": [
{
"id": "<string>"
}
],
"rewards": [
{
"id": "<string>",
"stock": {
"limited": {
"quantity": 4503599627370495
}
}
}
],
"tier_structures": [
{
"id": "<string>"
}
]
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Create program
⚠️ BETA endpoint
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.
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.
A valid request URL is required to generate request examples{
"id": "<string>",
"name": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"validity_hours": {
"daily": [
{
"days_of_week": [
3
],
"start_time": "<string>",
"end_time": "<string>"
}
]
},
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"card_definitions": [
{
"id": "<string>"
}
],
"earning_rules": [
{
"id": "<string>"
}
],
"rewards": [
{
"id": "<string>",
"stock": {
"limited": {
"quantity": 4503599627370495
}
}
}
],
"tier_structures": [
{
"id": "<string>"
}
]
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}{
"code": 123,
"key": "<string>",
"message": "<string>",
"details": "<string>",
"request_id": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Payload for creating a loyalty program.
Program name.
1 - 200Program validity start date, in ISO 8601 date-time format.
Program validity end date, in ISO 8601 date-time format.
Validity hours configuration. Defaults to ANY_TIME when omitted.
Show child attributes
Show child attributes
Initial program status. Only ACTIVE and DRAFT are allowed at creation. Defaults to DRAFT.
ACTIVE, DRAFT Arbitrary key-value metadata. Validated against the vl_program metadata schema definition of the project. Defaults to {}.
Card definitions to assign at creation. Required (with active card definitions) when creating the program with status ACTIVE.
1 - 10 elementsShow child attributes
Show child attributes
Earning rules to assign at creation. Required (with active earning rules) when creating the program with status ACTIVE.
1 - 10 elementsShow child attributes
Show child attributes
Rewards to assign at creation, each with its stock configuration.
1 - 10 elementsShow child attributes
Show child attributes
Tier structures to assign at creation. A program can have at most one tier structure.
1 - 10 elementsShow child attributes
Show child attributes
Response
Program created. Response includes the ids of resources assigned during creation.
Program create response - the program extended with the ids of resources assigned at creation.
Unique program identifier.
^lprg_[a-f0-9]+$Program name.
Program status.
DRAFT, ACTIVE, INACTIVE, DELETED Program validity start date (ISO 8601), or null when not set.
Program validity end date (ISO 8601), or null when not set.
Validity hours configuration. Defaults to type ANY_TIME.
Show child attributes
Show child attributes
Arbitrary key-value metadata. Defaults to {}.
Creation timestamp (ISO 8601).
Last update timestamp (ISO 8601), or null when never updated.
Object type marker.
"program"Card definitions assigned at creation, or null when none were provided.
Show child attributes
Show child attributes
Earning rules assigned at creation, or null when none were provided.
Show child attributes
Show child attributes
Rewards assigned at creation, or null when none were provided.
Show child attributes
Show child attributes
Tier structures assigned at creation, or null when none were provided.
Show child attributes
Show child attributes
Was this page helpful?

