Batches
Create wallet messaging batch
Create a new wallet messaging batch using segments, recipients, or a CSV file (via multipart/form-data).
The path parameter {id} is the entity sending the batch (your own entity). Recipients are defined separately in the request body via segments, recipients, or csv. Pass template and group tag segments can be combined to narrow the audience to passes that match both.
For more details, see the Wallet Messaging documentation.
post/api/v1/entities/{id}/messaging/wallet
Request body
Example request
{
"batch": {
"message": "Hey %{memberName}, thank you for your purchase!",
"segments": [
{
"passTemplateId": "426614174000"
}
]
}
}Response
Accepted
Example response
{
"data": {
"attributes": {
"name": "PassEntry Supermarket Summer Promotion",
"tag": "summerPromotion",
"content": "Welcome to PassEntry Supermarket! We're excited to have you as a member. Get 10% off your first purchase by showing your pass at the till!",
"totalRecipients": 12000,
"completedAt": "2021-01-01T00:00:00Z",
"scheduledAt": "2022-01-01T00:00:00Z",
"errorsCsvUrl": "https://example.com/errors.csv"
}
},
"links": {
"self": "https://api.passentry.com/api/v1/batches/d29455c9-afe4-4c73-b946-a5ea0b1667f7"
}
}