Response envelope
Successful responses:{
"success": true,
"message": "Points issued successfully",
"data": { ... }
}
{
"success": false,
"error": {
"message": "Customer not found. Check the user_id or identifier."
}
}
Status codes
| Code | Meaning |
|---|---|
200 / 201 | Success |
400 | Validation error or business rule violated (insufficient balance, expired code, cooldown active…) — the error.message explains which |
401 | Missing, malformed, or revoked API key |
403 | Business account not approved (pending, blocked, or suspended) |
404 | Resource not found — also returned for resources that belong to another business |
409 | A request with the same Idempotency-Key is still in progress |
429 | Rate limit exceeded — see Rate limits |
500 | Unexpected server error — safe to retry with an Idempotency-Key |
Common error messages
| Message | What to do |
|---|---|
Customer not found. Check the user_id or identifier. | The email/phone/external ID doesn’t match a Rigaly user. Customers must have a Rigaly account before earning points. |
Provide exactly one of "user_id" or "identifier" | Send one customer reference, not both. |
Insufficient points. ... | The customer’s balance can’t cover the deduction/redemption. |
Redemption code has already been completed | The code was consumed before — check GET /redemptions/{code} for its status. |
Redemption code has expired | Redemption codes are time-limited; the customer should redeem the reward again in the app. |
This code has already been used | Mass codes are single-use; this one was claimed. |
Maximum of 10 active API keys reached. ... | Revoke an unused key in the dashboard before creating another. |