Skip to main content
POST
/
api
/
v2
/
customers
/
{id}
/
points
/
add
Add points to customer
curl --request POST \
  --url https://api.zupy.com/api/v2/customers/{id}/points/add/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "amount": 2,
  "reason": ""
}
'
{
  "data": {
    "customer_id": "<string>",
    "operation": "<string>",
    "amount": 123,
    "balance_before": 123,
    "balance_after": 123,
    "activity_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z"
  },
  "meta": {
    "cursor": "<string>",
    "has_next": true,
    "count": 123
  }
}

Authorizations

X-API-Key
string
header
required

API key for partner access via APISIX key-auth plugin

Path Parameters

id
string
required

Unique identifier for this customer.

Body

Request parameters for adding points to a customer's loyalty balance.

amount
integer
required
Required range: x >= 1
reason
string
default:""
Maximum string length: 255

Response

data
object
required

Result of a points operation (add or reduce) with updated balance.

meta
object
required

Cursor-based pagination metadata matching envelope middleware output.