Adjust points
POST /v1/public/customers/{customerId}/cards/{cardId}/points/adjust
Sets the absolute balance of an open-ended customer points card. This does not change the customer's lifetime-points counter. This operation requires an idempotency key.
Authorization
X-API-Key required with the customers:write scope
Parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
customerId | path | string | Yes | The customer's returned id or externalId. |
cardId | path | string | Yes | The customer loyalty-card instance's returned id or externalId, not its template ID. |
Idempotency-Key | header | string | Yes | A unique key for this logical write operation. Keys are retained for 24 hours. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
points | number | Yes | New absolute balance for the open-ended points card. |
Request example
curl -X POST "https://api.remyrewards.co.uk/v1/public/customers/66c735e253f2836fbe941235/cards/66c735e253f2836fbe941237/points/adjust" \
-H "Accept: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Idempotency-Key: order-1042-redeem-1" \
-H "Content-Type: application/json" \
--data '{
"points": 120
}'Responses
| Status | Description |
|---|---|
200 | Points adjusted. |
400 | The request is missing a required value or contains invalid data. |
401 | The API key is missing or invalid. |
403 | The API key is valid but does not have the required scope. |
404 | The requested integration resource was not found. |
409 | The idempotency key is already processing or was used for a different request. |
429 | A rate or concurrency limit was exceeded. |
Success response example
{
"success": true,
"data": {
"id": "66c735e253f2836fbe941237",
"cardId": "66c735e253f2836fbe941238",
"title": "Coffee Club",
"type": "stamp",
"stamps": 4,
"points": 0
}
}