A valid request URL is required to generate request examples{
"async_action_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>"
}Batch create program members
⚠️ 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.
Schedules asynchronous batch creation of program members. The request body is a JSON array of member entries (maximum body size 10485760 bytes / 10 MB). The request is processed asynchronously in batches of 100 entries.
The program must exist (404) and be in ACTIVE status (423). Each entry is
validated during background processing the same way as single member creation;
entries that fail validation (missing/invalid customer_id, unknown customer,
invalid status, member already exists) are reported per-entry in the async action
result and do not fail the whole batch (conflicting members are skipped).
Returns 202 with the identifier of the scheduled async action.
curl --request POST \
--url {protocol}://{host}/v2/loyalties/programs/{programId}/members/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '
[
{
"customer_id": "<string>",
"status": "ACTIVE",
"metadata": {}
}
]
'{
"async_action_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.
Path Parameters
Loyalty program ID (format lprg_[a-f0-9]+).
^lprg_[a-f0-9]+$Body
ID of an existing customer to enroll as a member. Required per entry.
^cust_[a-zA-Z0-9]+Initial member status. Defaults to ACTIVE when omitted.
ACTIVE, INACTIVE Free-form metadata attached to the member. Defaults to an empty object.
Response
Batch creation has been scheduled.
Result of scheduling the members batch creation.
ID of the scheduled async action processing the batch.
^aa_[a-f0-9]+$Was this page helpful?

