Errors & the envelope
Every error — across every endpoint — comes back as the same JSON shape:
{ "error": { "code": "insufficient_balance", "message": "The member does not have enough spendable points for this redemption.", "details": { "shortfall": 120 }, "request_id": "req_9f8e7d6c5b4a3210" }}request_id is also echoed as an X-Request-Id response header on every request (success or
error) — include it when you contact support about a specific call.
The stable codes
Section titled “The stable codes”code | HTTP status | When |
|---|---|---|
invalid_request | 400 | The request is malformed — a missing/wrong-typed field, a bad query param, a missing Idempotency-Key header where one is required. |
unauthorized | 401 | The bearer credential is missing, unrecognized, or revoked. |
signature_invalid | 401 | An event’s X-Loyalty-Signature is missing or doesn’t verify. |
replay_detected | 401 | An event’s timestamp is outside the accepted skew window, or its nonce was already used. |
publishable_key_forbidden | 403 | A publishable key called an endpoint that requires a secret key. |
insufficient_scope | 403 | The credential (e.g. an OAuth token) lacks the required scope for this endpoint. |
forbidden | 403 | The credential is valid but not permitted to perform this action. |
tier_gated | 403 | The redemption option requires a tier the member hasn’t reached. |
not_found | 404 | The referenced resource (e.g. a redemption option) doesn’t exist in this tenant. |
program_not_published | 404 | POST /v1/earn/preview: no published programme version is in force for the programme asked about. |
customer_not_found | 404 | No member matches the given (channel, external_id) or customer_uuid in this tenant. |
not_enrolled | 404 | The customer is not a member of the programme (POST /v1/checkout-redemptions). |
redemption_not_found | 404 | No redemption hold matches the given ID in this tenant. |
customer_erased | 410 | The customer’s PII was erased (a GDPR deletion) — profile writes/reads on this identity are no longer possible. |
conflict | 409 | A generic state conflict. On POST /v1/checkout-redemptions: this Idempotency-Key’s earlier attempt is already resolved: it was rolled back (you may not have received that 503), cancelled, used at checkout, or it expired. No redemption is pending under this key; to redeem again, place with a new key. |
idempotency_key_reuse | 409 | An Idempotency-Key was reused with a materially different request. |
idempotency_key_conflict | 409 | An event’s Idempotency-Key header didn’t match its body’s idempotency_key. |
version_conflict | 409 | An optimistic-concurrency conflict updating a config record. |
cap_reached | 409 | A per-member redemption cap for this option was already hit. |
not_stackable | 409 | The option can’t be combined with another the member is already redeeming. |
hold_already_released | 409 | The redemption hold was already released — it can no longer be finalized. |
shopify_not_connected | 409 | The workspace has no connected Shopify store (POST /v1/checkout-redemptions). |
customer_merged | 409 | The target customer identity was merged into another; retry against the surviving identity. |
insufficient_balance | 422 | The member doesn’t have enough spendable points (see details.shortfall). |
option_not_eligible | 422 | The redemption option isn’t eligible for this member/cart right now. |
preview_input_required | 422 | POST /v1/earn/preview: an overwrite campaign may apply and the input sent cannot decide it (details.needs names the input), so any figure could misstate the earn. |
event_type_not_earnable | 422 | POST /v1/earn/preview: the type is not purchase; no earn rule hooks any other event type. |
invalid_payload | 422 | An event body parsed as JSON but failed the event contract’s validation. |
unsupported_event_type | 422 | The event’s type isn’t one Tessera recognizes. |
profile_validation_error | 422 | A profile field (email, birthday, …) failed semantic validation. |
payload_too_large | 413 | The request body exceeded the size limit. |
not_implemented | 501 | A referenced configuration option is valid vocabulary but not implemented yet. Reserved — no endpoint currently returns it. |
rate_limited | 429 | The per-member redemption velocity limit was hit — retry after the duration in the Retry-After header. |
redemption_unavailable | 503 | A checkout redemption could not be armed in Shopify, so it was released and nothing is held. Its Idempotency-Key is spent: retry with a new key. The SDK does not retry it. |
internal_error | 500 | An unexpected failure. Safe to retry; include request_id if you report it. |
New codes can be added over time (see Changelog & versioning) — always fall back to generic handling (log the code, surface the message, retry on 5xx/429) for a code you don’t recognize yet, rather than treating an unknown code as a hard failure.
See Error handling for retry and logging patterns in practice.