Batch create program members
Changed onSchedules creation of program members from a JSON array and returns 202 with async_action_id. The program must exist, be ACTIVE, and be inside its validity window. The body isn't checked before that response. Entries are processed in batches of 100. The raw body must be at most 10 MB.
Each entry uses the same fields as Create program member. A failed entry is skipped. Its report row sets created to false and explains the failure in error. Skipped cases include an invalid customer_identification, an unknown customer, an invalid status, a duplicate customer in the batch (Duplicate customer ID), a customer who is already a member (Member already exists), metadata that doesn't match the vl_member schema, and entries past the loyalty members plan limit. Successful entries enroll the customer and create a loyalty card for each card definition on the program. Report columns are identification_type, customer_id, customer_source_id, program_id, member_id, created, and error.
An empty array or a null entry fails the async action with invalid_request_payload. A body that isn't a JSON array fails it with top_level_object_should_be_an_array. Use Get async action to read the status and the report. You can also open the result from Audit log, Background tasks.
Request
- Base URLhttps://api.voucherify.io
- URLhttps://api.voucherify.io/v2/loyalties/programs/{programId}/members/batch
- Auth
- API key in header X-App-Id and API key in header X-App-Token
- or HTTP bearer
Request body
Response
The batch is scheduled. Use async_action_id to follow processing.
Changes
- breaking
added to the request body
allOflist - breaking
the request's body type changed from
arrayto no type - breaking
removed the required property
from the response with the status - warning
deleted the
pathrequest parameterprogramId - info
added to the response body
allOflist for the response status
- breaking
- breaking
added the new path request parameter
programId - breaking
the request's body type changed from no type to
array - warning
removed from the request body
allOflist - info
removed from the response body
allOflist for the response status - info
added the required property
to the response with the status
- breaking