Errors
Every error answers with the same body: statusCode, error (one of the codes below), message, requestId and docs (a link to this page). Branch on error, never on message: messages can change, codes do not.
VALIDATION_ERRORHTTP 400
A field is missing, has the wrong type or format, or is not part of this endpoint (unknown fields are refused, not ignored).
Fix: Read message: it names the field. Send Content-Type: application/json.
INVALID_JSONHTTP 400
The body is not valid JSON.
Fix: Send a JSON object encoded in UTF-8.
INVALID_CURSORHTTP 400
cursor is not a value this API returned.
Fix: Pass meta.nextCursor from the previous page unchanged, or omit it for the first page.
INVALID_LOCATION_REFHTTP 400
The locationRef in the path is not 1–64 letters, digits or . _ : -.
Fix: Use your own short id for the location, e.g. milano-centro.
INVALID_LOCATION_NAMEHTTP 400
The location name is blank or too long.
Fix: Send a name of 1–120 characters.
INVALID_API_KEYHTTP 401
The X-Api-Key header is missing, or the key is unknown or revoked.
Fix: Send a current key from the console in X-Api-Key (not Authorization).
SUBSCRIPTION_INACTIVEHTTP 402
A live key wrote while the account has no running plan. Reads still work.
Fix: Choose or renew a plan in the console (Billing).
BROWSER_NOT_ALLOWEDHTTP 403
The request carried an Origin header: it came from a browser.
Fix: Call the API from your server. A key in a web page or app can be copied by anyone.
ACCOUNT_SUSPENDEDHTTP 403
The developer account is suspended.
Fix: Write to support.
INSUFFICIENT_SCOPEHTTP 403
A read-only key tried to write.
Fix: Use a key with read and write access for purchases, redemptions, reversals, locations and deletions.
TEST_KEY_REQUIREDHTTP 403
POST /test/reset was called with a live key.
Fix: Reset works only on test brands, with a test key.
NOT_FOUNDHTTP 404
No such endpoint.
Fix: Check the method and the path against the reference.
CUSTOMER_NOT_FOUNDHTTP 404
No customer with this customerRef in this brand.
Fix: Customers are created by their first purchase; check the customerRef and that you use the right brand's key.
LOCATION_NOT_FOUNDHTTP 404
No location with this locationRef in this brand.
Fix: Create it with PUT /locations/{locationRef}.
PURCHASE_NOT_FOUNDHTTP 404
No purchase with this id in this brand.
Fix: Pass the id (pur_…) returned by POST /purchases.
REFERENCE_REUSEDHTTP 409
This reference was already used on this endpoint with a different body.
Fix: Retry with exactly the same body, or use a new reference for a new purchase or redemption.
REWARD_NOT_READYHTTP 409
The stamp card is not full yet.
Fix: Read the customer first; redeem when rewardReady is true.
ALREADY_REDEEMEDHTTP 409
A reward was redeemed after this purchase, so its stamp is already spent.
Fix: Nothing to undo on the card; refund the order on your side.
INSUFFICIENT_BALANCEHTTP 409
Not enough points: for a redemption, the balance is lower; for a reversal, some of the purchase's points were spent.
Fix: Read the customer's balance first.
DAILY_LIMITHTTP 409
This customer reached the daily limit in this brand (10 stamps or 20 point earns in 24 hours).
Fix: Anti-fraud limit; it frees up as the 24-hour window moves.
LOCATION_REF_TAKENHTTP 409
Another location of this brand already uses this locationRef.
Fix: Pick another locationRef.
LOCATION_LIMITHTTP 409
The brand already has 1000 locations, the most a brand can have.
Fix: Reuse or deactivate locations you no longer need, or write to us if you really need more.
CUSTOMER_DELETEDHTTP 410
This customer was deleted (GDPR erase). Old references stay used, so an order is never credited twice.
Fix: A returning customer with the same customerRef starts fresh with a new reference.
PAYLOAD_TOO_LARGEHTTP 413
The body is larger than 16 kB.
Fix: Send only the documented fields.
UNSUPPORTED_MEDIA_TYPEHTTP 415
The JSON body declares a charset other than UTF-8.
Fix: Send Content-Type: application/json (UTF-8).
UNKNOWN_LOCATIONHTTP 422
The locationRef is unknown or inactive, or none was sent and the brand has no default location.
Fix: Send an active locationRef, or set a default location in the console.
UNSUPPORTED_CURRENCYHTTP 422
amount.currency is not EUR.
Fix: Only EUR is accepted in v1.
AMOUNT_TOO_LARGEHTTP 422
amount.value is over 30000 (300.00 EUR).
Fix: Split the order or check the amount is in cents.
INVALID_POINTSHTTP 422
points is under the minimum or not a multiple of the redeem step (see GET /programme).
Fix: Redeem multiples of redeemStep, at least minRedeem.
POINTS_REQUIREDHTTP 422
This brand runs points: a redemption must say how many.
Fix: Send points.
RATE_LIMITEDHTTP 429
Too many requests for this key's plan in the current minute.
Fix: Wait Retry-After seconds; watch the RateLimit-* headers.
INTERNAL_ERRORHTTP 500
Something failed on our side. Nothing was half-written: every write is one transaction.
Fix: Retry with the same reference (safe), and send us the requestId if it persists.