Vincent is here! Just say the word, and Vincent will build the campaigns for you! Get early access.
curl --request POST \
--url https://api.voucherify.io/v2/loyalties/programs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"name": "<string>",
"status": "DRAFT",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"metadata": {},
"card_definitions": [
{
"id": "<string>"
}
],
"earning_rules": [
{
"id": "<string>"
}
],
"rewards": [
{
"id": "<string>",
"costs": [
{
"spending": [
{
"points": 1073741824,
"card_definition_id": "<string>"
}
]
}
],
"stock": 1073741823
}
],
"tier_structures": [
{
"id": "<string>"
}
]
}
'{
"id": "<string>",
"name": "<string>",
"status": "DRAFT",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"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>",
"costs": [
{
"rules": "<unknown>",
"spending": [
{
"points": 123,
"card_definition_id": "<string>"
}
]
}
],
"stock": 123
}
],
"tier_structures": [
{
"id": "<string>"
}
]
}⚠️ 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. Optionally attaches card definitions,
earning rules, rewards, and tier structures in the same request.
The response uses toCreateDTO(params) which includes the attached
resource ids alongside the program fields.
curl --request POST \
--url https://api.voucherify.io/v2/loyalties/programs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
{
"name": "<string>",
"status": "DRAFT",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"metadata": {},
"card_definitions": [
{
"id": "<string>"
}
],
"earning_rules": [
{
"id": "<string>"
}
],
"rewards": [
{
"id": "<string>",
"costs": [
{
"spending": [
{
"points": 1073741824,
"card_definition_id": "<string>"
}
]
}
],
"stock": 1073741823
}
],
"tier_structures": [
{
"id": "<string>"
}
]
}
'{
"id": "<string>",
"name": "<string>",
"status": "DRAFT",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"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>",
"costs": [
{
"rules": "<unknown>",
"spending": [
{
"points": 123,
"card_definition_id": "<string>"
}
]
}
],
"stock": 123
}
],
"tier_structures": [
{
"id": "<string>"
}
]
}Documentation Index
Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Program name
1 - 200Initial status (defaults to DRAFT if not provided)
DRAFT, ACTIVE Program start date (ISO 8601)
Program end date (ISO 8601)
Custom metadata key-value pairs
Card definitions to assign on creation
1 - 10 elementsShow child attributes
Earning rules to assign on creation
1 - 10 elementsShow child attributes
Rewards to assign on creation
1 - 10 elementsShow child attributes
Tier structures to assign on creation
1 - 10 elementsShow child attributes
Program created successfully
Extended program DTO returned by toCreateDTO(params). Includes the program fields plus arrays of attached resource references.
Unique program identifier
^lprg_[a-f0-9]+$Program name
DRAFT, ACTIVE, INACTIVE, DELETED Program start date
Program end date
Custom key-value metadata.
Creation timestamp (ISO 8601)
Last update timestamp (ISO 8601)
"program"Card definitions attached during creation
Show child attributes
Earning rules attached during creation
Show child attributes
Rewards attached during creation
Show child attributes
Tier structures attached during creation
Show child attributes
Was this page helpful?