Skip to main content
Add or remove points from a customer’s balance. Pass a positive points value to credit points, or a negative value to debit them. Debit transactions that would result in a negative points balance will be rejected. POST /public/customers/transactions

Authorizations

Authorization string header required Bearer authentication header of the form Bearer <token>, where <token> is your REST API token.

Required Scope

transactions:write This endpoint requires the transactions scope with Read/Write Access. Configure token scopes in Settings → Integrations → REST API.

Query Parameters

customer_id string required The platform customer ID (e.g. Shopify customer ID) Example: "9049402769586"

Body

application/json points integer required The number of points to add or remove. Use a positive value to credit points and a negative value to debit. Cannot be zero. Example: 100 description string required A human-readable reason for the adjustment, visible in the customer’s activity log. Example: "Bonus points for completing a survey"

Response

201 - application/json The points transaction was successfully created. data object Hide child attributes data.transaction_id string<uuid> The UUID of the newly created transaction. Example: "d4e5f6a7-b8c9-0123-defa-b01234567890" data.customer_id string<uuid> The UUID of the customer whose balance was adjusted. Example: "63a2c89a-9936-4bc0-9d5f-93db46110b76" data.points integer The points value as submitted (positive for credit, negative for debit). Example: 100 data.type enum<string> Whether the transaction was a credit or debit. Available options: credit, debit Example: "credit"
curl --request POST \
  --url "https://api.yukoapp.com/api/v1/public/customers/transactions" \
  --header "Authorization: Bearer py_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  --header "Content-Type: application/json" \
  --data '{
    "points": 100,
    "description": "Bonus points for completing a survey"
  }'
{
  "data": {
    "transaction_id": "d4e5f6a7-b8c9-0123-defa-b01234567890",
    "customer_id": "63a2c89a-9936-4bc0-9d5f-93db46110b76",
    "points": 100,
    "type": "credit"
  }
}