curl --request POST \
--url {protocol}://{host}/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/expiring-points/{bucketId}/expire \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"transaction": {
"id": "<string>",
"card_id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"card_definition_id": "<string>",
"card_type": "INDIVIDUAL",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {},
"points": {
"total": 123,
"expiration_date": "2023-12-25",
"date": "2023-12-25"
},
"bucket": {
"id": "<string>",
"points": {
"total": 123
},
"expiration_date": "2023-12-25"
},
"buckets": [
{
"id": "<string>",
"points": {
"total": 123
},
"expiration_date": "2023-12-25"
}
],
"date": "2023-12-25",
"reward": {
"id": "<string>"
},
"reward_transaction": {
"id": "<string>"
},
"card_transaction": {
"id": "<string>"
},
"purchase": {
"card_transaction": {
"id": "<string>"
},
"reward_transaction": {
"id": "<string>"
}
},
"order": {
"id": "<string>"
},
"order_transaction": {
"id": "<string>"
},
"target_card": {
"id": "<string>"
},
"purchase_transaction": {
"id": "<string>"
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"message": "<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>"
}Expire a points bucket
⚠️ 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.
Manually expires a points bucket before its scheduled expiration date, creating an
ADMIN_POINTS_EXPIRATION card transaction (status PENDING, processed
asynchronously). No request body.
The program and member must be in ACTIVE status, the card definition must have
points expiration enabled, the bucket must be in ACTIVE status, and the bucket’s
expiration date must not be in the past (423 otherwise). Returns 404 when the
program, member, card or bucket does not exist.
curl --request POST \
--url {protocol}://{host}/v2/loyalties/programs/{programId}/members/{memberId}/cards/{cardId}/expiring-points/{bucketId}/expire \
--header 'Authorization: Bearer <token>' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>'{
"transaction": {
"id": "<string>",
"card_id": "<string>",
"program_id": "<string>",
"member_id": "<string>",
"card_definition_id": "<string>",
"card_type": "INDIVIDUAL",
"details": {
"reason": "<string>",
"rejection": {
"reason": "<string>",
"details": "<string>"
},
"metadata": {},
"points": {
"total": 123,
"expiration_date": "2023-12-25",
"date": "2023-12-25"
},
"bucket": {
"id": "<string>",
"points": {
"total": 123
},
"expiration_date": "2023-12-25"
},
"buckets": [
{
"id": "<string>",
"points": {
"total": 123
},
"expiration_date": "2023-12-25"
}
],
"date": "2023-12-25",
"reward": {
"id": "<string>"
},
"reward_transaction": {
"id": "<string>"
},
"card_transaction": {
"id": "<string>"
},
"purchase": {
"card_transaction": {
"id": "<string>"
},
"reward_transaction": {
"id": "<string>"
}
},
"order": {
"id": "<string>"
},
"order_transaction": {
"id": "<string>"
},
"target_card": {
"id": "<string>"
},
"purchase_transaction": {
"id": "<string>"
}
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"object": "<string>"
},
"message": "<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]+$Program member ID (format lmbr_[a-f0-9]+).
^lmbr_[a-f0-9]+$Loyalty card ID (format lcrd_[a-f0-9]+).
^lcrd_[a-f0-9]+$Points expiration bucket ID (format lcpeb_[a-f0-9]+).
^lcpeb_[a-f0-9]+$Response
Result of the points expiration.
Result of a manual points bucket expiration. This endpoint always returns status
TRANSACTION_CREATED on success.
The created ADMIN_POINTS_EXPIRATION card transaction, or null.
Show child attributes
Show child attributes
Result status. The API endpoint returns TRANSACTION_CREATED.
TRANSACTION_CREATED, NO_EXPIRATION Human-readable result message - "Points expiration transaction created".
Was this page helpful?

