Skip to main content
POST
/
v2
/
loyalties
/
programs
/
{programId}
/
rewards
/
batch
Batch assign/unassign rewards
curl --request POST \
  --url https://api.voucherify.io/v2/loyalties/programs/{programId}/rewards/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-App-Id: <api-key>' \
  --header 'X-App-Token: <api-key>' \
  --data '
{
  "assign": [
    {
      "id": "<string>",
      "costs": [
        {
          "spending": [
            {
              "points": 1073741824,
              "card_definition_id": "<string>"
            }
          ]
        }
      ],
      "stock": 1073741823
    }
  ],
  "unassign": [
    {
      "id": "<string>"
    }
  ]
}
'
{
  "assigned": [
    {
      "reward_id": "<string>",
      "costs": [
        {
          "rules": "<unknown>",
          "spending": [
            {
              "points": 123,
              "card_definition_id": "<string>"
            }
          ]
        }
      ],
      "stock": 123,
      "redeemed": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "object": "<string>"
    }
  ],
  "unassigned": [
    {
      "reward_id": "<string>",
      "costs": [
        {
          "rules": "<unknown>",
          "spending": [
            {
              "points": 123,
              "card_definition_id": "<string>"
            }
          ]
        }
      ],
      "stock": 123,
      "redeemed": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "object": "<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.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

X-App-Id
string
header
required
X-App-Token
string
header
required

Path Parameters

programId
string
required

Unique program identifier

Pattern: ^lprg_[a-f0-9]+$

Body

application/json
assign
object[] | null

Rewards to assign

Maximum array length: 10
unassign
object[] | null

Rewards to unassign

Maximum array length: 10

Response

Batch processing result

assigned
object[] | null

Successfully assigned rewards (null if no assign operations)

unassigned
object[] | null

Successfully unassigned rewards (null if no unassign operations)

Last modified on May 11, 2026