A valid request URL is required to generate request examples{
"id": "<string>",
"customer_id": "<string>",
"program_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"cards": [
{
"created_at": "2023-11-07T05:31:56Z",
"tier_progress": {
"current": {
"id": "<string>",
"name": "<string>",
"activated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"points": {
"current": 123,
"min": 123,
"max": 123
}
},
"tier_structure": {
"id": "<string>",
"object": "<string>"
},
"risks": [
{
"date": "2023-11-07T05:31:56Z",
"tier_id": "<string>"
}
],
"opportunities": [
{
"valid_until": "2023-11-07T05:31:56Z",
"tier_id": "<string>",
"points": 123
}
],
"object": "<string>"
},
"card": {
"id": "<string>",
"card_definition_id": "<string>",
"card_type": "INDIVIDUAL",
"code": "<string>",
"lifetime_bucket": {
"points": {
"total": 0,
"earned": 0,
"added": 0,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 0,
"expired": 0,
"spent": 0,
"refunded": 0,
"returned": 0,
"locked": 0,
"unlocked": 0
},
"pending_points": {
"total": 0,
"activated": 0,
"canceled": 0
}
},
"balance": {
"points": 0,
"pending_points": 0
},
"next_expiration": {
"points": 0,
"date": "2023-12-25"
},
"next_activation": {
"points": 0,
"date": "2023-12-25",
"cancel_date": "2023-12-25"
},
"object": "<string>"
},
"object": "<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 a program member
⚠️ 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.
Enrolls a customer as a member of the loyalty program. The program must be in
ACTIVE status (423 otherwise) and the customer must exist. A customer can be a
member of a given program only once - creating a second member for the same
customer returns 409 (member_already_exists).
Loyalty cards are created automatically for all card definitions assigned to the
program and returned in the cards array. Card code generation is asynchronous -
code may be null immediately after creation.
A valid request URL is required to generate request examples{
"id": "<string>",
"customer_id": "<string>",
"program_id": "<string>",
"metadata": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>",
"cards": [
{
"created_at": "2023-11-07T05:31:56Z",
"tier_progress": {
"current": {
"id": "<string>",
"name": "<string>",
"activated_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"points": {
"current": 123,
"min": 123,
"max": 123
}
},
"tier_structure": {
"id": "<string>",
"object": "<string>"
},
"risks": [
{
"date": "2023-11-07T05:31:56Z",
"tier_id": "<string>"
}
],
"opportunities": [
{
"valid_until": "2023-11-07T05:31:56Z",
"tier_id": "<string>",
"points": 123
}
],
"object": "<string>"
},
"card": {
"id": "<string>",
"card_definition_id": "<string>",
"card_type": "INDIVIDUAL",
"code": "<string>",
"lifetime_bucket": {
"points": {
"total": 0,
"earned": 0,
"added": 0,
"purchased": 0,
"purchased_reversed": 0,
"subtracted": 0,
"expired": 0,
"spent": 0,
"refunded": 0,
"returned": 0,
"locked": 0,
"unlocked": 0
},
"pending_points": {
"total": 0,
"activated": 0,
"canceled": 0
}
},
"balance": {
"points": 0,
"pending_points": 0
},
"next_expiration": {
"points": 0,
"date": "2023-12-25"
},
"next_activation": {
"points": 0,
"date": "2023-12-25",
"cancel_date": "2023-12-25"
},
"object": "<string>"
},
"object": "<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.
Path Parameters
Loyalty program ID (format lprg_[a-f0-9]+).
^lprg_[a-f0-9]+$Body
Request body for creating a program member. No additional properties are allowed.
ID of an existing customer to enroll as a member. Required.
^cust_[a-zA-Z0-9]+Initial member status. Defaults to ACTIVE when omitted or null.
ACTIVE, INACTIVE Free-form metadata attached to the member. Validated against the metadata
schema defined for the vl_member related object (when one is configured).
Defaults to an empty object.
Response
The created member with its automatically created cards.
A loyalty program member together with its loyalty cards. Returned by member create and get endpoints.
Unique member ID.
^lmbr_[a-f0-9]+$ID of the customer enrolled as this member.
^cust_[a-zA-Z0-9]+ID of the loyalty program the member belongs to.
^lprg_[a-f0-9]+$Current member status.
ACTIVE, INACTIVE, DELETED Free-form metadata attached to the member (empty object when none).
Timestamp when the member was created (ISO 8601).
Timestamp when the member was last updated (ISO 8601), or null if never updated.
Object type marker, always member.
"member"Member's loyalty cards - one per card definition assigned to the program.
Card codes are generated asynchronously, so card.code may be null right
after member creation.
Show child attributes
Show child attributes
Was this page helpful?

