curl --request POST \
--url https://{cluster}.voucherify.io/v1/loyalties/members/{memberId}/balance \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '{
"points": -100
}'{
"points": 100,
"total": 13436,
"balance": 13136,
"type": "loyalty_card",
"object": "balance",
"related_object": {
"type": "voucher",
"id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF"
}
}{
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property .expiration_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-0c118c6f7c0e6751ab"
}Adjust Loyalty Card Balance
This endpoint belongs to the legacy loyalty API (/v1/loyalties).
Voucherify will not develop new features for this API. However, critical issues may still receive fixes.
For new integrations, use Loyalty v2.
If you have questions, contact Voucherify support.
This method gives adds or removes balance to an existing loyalty card that is assigned to a holder. The removal of points will consume the points that expire the soonest.
This is an async action. If you want to perform several add or remove loyalty card balance actions in a short time and their order matters, set up sufficient time-out between the calls.
This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to add or remove loyalty card balance without having to provide the campaignId as a path parameter.
curl --request POST \
--url https://{cluster}.voucherify.io/v1/loyalties/members/{memberId}/balance \
--header 'Content-Type: application/json' \
--header 'X-App-Id: <api-key>' \
--header 'X-App-Token: <api-key>' \
--data '{
"points": -100
}'{
"points": 100,
"total": 13436,
"balance": 13136,
"type": "loyalty_card",
"object": "balance",
"related_object": {
"type": "voucher",
"id": "v_0aMj6Mdp0i3zuXrd9NnBKboc7746mlgF"
}
}{
"code": 400,
"key": "invalid_payload",
"message": "Invalid payload",
"details": "Property .expiration_date cannot be recognized as a ISO-8601 compliant date",
"request_id": "v-0c118c6f7c0e6751ab"
}Authorizations
Scopes
Path Parameters
Body
Specify the point adjustment along with the expiration mechanism.
Request Body schema for POST v1/loyalties/members/{memberId}/balance and POST v1/loyalties/{campaignId}/members/{memberId}/balance.
Response
Returns a balance object.
Response schema for POST v1/loyalties/members/{memberId}/balance and for POST v1/loyalties/{campaignId}/members/{memberId}/balance.

