{"openapi":"3.1.0","info":{"title":"Tavolo Plus Loyalty API","version":"1.0.0","description":"Stamps or points for your customers with three calls: record a purchase, read the customer, redeem. Server-to-server only (browsers are refused). Guides: https://tavoloplus.com/developers/docs","contact":{"name":"Tavolo Plus","email":"info@tavoloplus.com","url":"https://tavoloplus.com/developers/docs/support"}},"servers":[{"url":"https://api.tavoloplus.com/v1"}],"security":[{"ApiKey":[]}],"tags":[{"name":"Loyalty","description":"Purchases, customers, redemptions."},{"name":"Locations","description":"Where purchases happen. Free and unlimited."},{"name":"Brand","description":"The brand's programme."},{"name":"Sandbox","description":"Test brands only."}],"paths":{"/purchases":{"post":{"operationId":"createPurchase","tags":["Loyalty"],"summary":"Record a purchase","description":"Adds a stamp (stamps brands) or points for `amount` (points brands). The customer is created on first purchase. 201 when something was credited, 200 when not (full card, or too small for a point). A retry with the same reference and body returns the first result with `Idempotent-Replayed: true`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["customerRef","reference","amount"],"properties":{"customerRef":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your id for the customer; created on the first purchase."},"reference":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your order number. Same reference + same body = safe retry."},"locationRef":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$","description":"Optional when the brand has a default location."},"amount":{"type":"object","additionalProperties":false,"required":["value","currency"],"properties":{"value":{"type":"integer","minimum":1,"description":"Cents, at most 30000."},"currency":{"type":"string","maxLength":3}},"description":"Always required, also for stamps brands."}}},"example":{"customerRef":"user_8841","locationRef":"milano-centro","reference":"order_1093","amount":{"value":2450,"currency":"EUR"}}}}},"responses":{"200":{"description":"Not credited (card already full, or 0 points), or a replay of a 200.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Purchase"}}},"example":{"data":{"id":"pur_0b9a8c7d6e5f4a3b2c1d0e9f","customerRef":"user_8841","programme":"points","points":{"added":0,"balance":240,"redeemable":200,"redeemableValue":{"value":1000,"currency":"EUR"}},"createdAt":"2026-10-28T14:32:05.120Z"}}}}},"201":{"description":"Credited.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Purchase"}}},"example":{"data":{"id":"pur_7a1c9e2b4d6f8a0b1c2d3e4f","customerRef":"user_8841","programme":"stamps","stamps":{"added":1,"count":6,"required":9,"rewardReady":false},"createdAt":"2026-10-28T14:32:05.120Z"}}}}},"400":{"description":"`INVALID_JSON`, `VALIDATION_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"402":{"description":"`SUBSCRIPTION_INACTIVE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":402,"error":"SUBSCRIPTION_INACTIVE","message":"A live key wrote while the account has no running plan. Reads still work.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#SUBSCRIPTION_INACTIVE"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`, `INSUFFICIENT_SCOPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"409":{"description":"`REFERENCE_REUSED`, `DAILY_LIMIT`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":409,"error":"REFERENCE_REUSED","message":"This reference was already used on this endpoint with a different body.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#REFERENCE_REUSED"}}}},"410":{"description":"`CUSTOMER_DELETED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":410,"error":"CUSTOMER_DELETED","message":"This customer was deleted (GDPR erase). Old references stay used, so an order is never credited twice.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#CUSTOMER_DELETED"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"422":{"description":"`UNKNOWN_LOCATION`, `UNSUPPORTED_CURRENCY`, `AMOUNT_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":422,"error":"UNKNOWN_LOCATION","message":"The locationRef is unknown or inactive, or none was sent and the brand has no default location.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNKNOWN_LOCATION"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}}},"/purchases/{id}/reverse":{"post":{"operationId":"reversePurchase","tags":["Loyalty"],"summary":"Reverse a purchase (refund, cancellation)","description":"Removes that purchase's stamp or points, once. A second call returns the first result with `Idempotent-Replayed: true`. No body.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pur_[0-9a-f]{24}$"},"example":"pur_7a1c9e2b4d6f8a0b1c2d3e4f"}],"responses":{"200":{"description":"Reversed (or the replay of the first reversal).","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Reversal"}}},"example":{"data":{"id":"pur_7a1c9e2b4d6f8a0b1c2d3e4f","reversed":true,"customerRef":"user_8841","programme":"stamps","stamps":{"removed":1,"count":5,"required":9,"rewardReady":false},"reversedAt":"2026-10-29T09:12:44.501Z"}}}}},"400":{"description":"`INVALID_JSON`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"402":{"description":"`SUBSCRIPTION_INACTIVE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":402,"error":"SUBSCRIPTION_INACTIVE","message":"A live key wrote while the account has no running plan. Reads still work.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#SUBSCRIPTION_INACTIVE"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`, `INSUFFICIENT_SCOPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"404":{"description":"`PURCHASE_NOT_FOUND`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":404,"error":"PURCHASE_NOT_FOUND","message":"No purchase with this id in this brand.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PURCHASE_NOT_FOUND"}}}},"409":{"description":"`ALREADY_REDEEMED`, `INSUFFICIENT_BALANCE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":409,"error":"ALREADY_REDEEMED","message":"A reward was redeemed after this purchase, so its stamp is already spent.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#ALREADY_REDEEMED"}}}},"410":{"description":"`CUSTOMER_DELETED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":410,"error":"CUSTOMER_DELETED","message":"This customer was deleted (GDPR erase). Old references stay used, so an order is never credited twice.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#CUSTOMER_DELETED"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}}},"/redemptions":{"post":{"operationId":"createRedemption","tags":["Loyalty"],"summary":"Redeem the reward or points","description":"Stamps brands: omit `points`; a full card is reset and the reward counted. Points brands: send `points`; the response says what they are worth (`discount`). Always 201; a retry with the same reference and body replays it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["customerRef","reference"],"properties":{"customerRef":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"reference":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Any unique string. Same reference + same body = safe retry."},"locationRef":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"points":{"type":"integer","description":"Points brands only: how many to spend (see `GET /programme`). Omit for stamps."}}},"example":{"customerRef":"user_8841","reference":"redeem_5521","points":200}}}},"responses":{"201":{"description":"Redeemed.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"Idempotent-Replayed":{"$ref":"#/components/headers/Idempotent-Replayed"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Redemption"}}},"example":{"data":{"id":"red_1f2e3d4c5b6a79880f1e2d3c","customerRef":"user_8841","programme":"points","points":{"redeemed":200,"discount":{"value":1000,"currency":"EUR"},"balance":40,"redeemable":0,"redeemableValue":{"value":0,"currency":"EUR"}},"createdAt":"2026-10-29T10:01:00.000Z"}}}}},"400":{"description":"`INVALID_JSON`, `VALIDATION_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"402":{"description":"`SUBSCRIPTION_INACTIVE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":402,"error":"SUBSCRIPTION_INACTIVE","message":"A live key wrote while the account has no running plan. Reads still work.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#SUBSCRIPTION_INACTIVE"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`, `INSUFFICIENT_SCOPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"404":{"description":"`CUSTOMER_NOT_FOUND`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":404,"error":"CUSTOMER_NOT_FOUND","message":"No customer with this customerRef in this brand.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#CUSTOMER_NOT_FOUND"}}}},"409":{"description":"`REFERENCE_REUSED`, `REWARD_NOT_READY`, `INSUFFICIENT_BALANCE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":409,"error":"REFERENCE_REUSED","message":"This reference was already used on this endpoint with a different body.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#REFERENCE_REUSED"}}}},"410":{"description":"`CUSTOMER_DELETED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":410,"error":"CUSTOMER_DELETED","message":"This customer was deleted (GDPR erase). Old references stay used, so an order is never credited twice.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#CUSTOMER_DELETED"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"422":{"description":"`UNKNOWN_LOCATION`, `INVALID_POINTS`, `POINTS_REQUIRED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":422,"error":"UNKNOWN_LOCATION","message":"The locationRef is unknown or inactive, or none was sent and the brand has no default location.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNKNOWN_LOCATION"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}}},"/customers/{customerRef}":{"get":{"operationId":"getCustomer","tags":["Loyalty"],"summary":"Read a customer's card or balance","description":"Stamps brands: the card (count, required, rewardReady). Points brands: the balance and what is redeemable now. 404 if the customer never bought.","parameters":[{"name":"customerRef","in":"path","required":true,"description":"Your own id for the customer (pseudonymous: never an email or phone number).","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"example":"user_8841"}],"responses":{"200":{"description":"The card (stamps) or the balance (points).","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Customer"}}},"example":{"data":{"customerRef":"user_8841","programme":"stamps","createdAt":"2026-10-01T08:00:00.000Z","stamps":{"count":6,"required":9,"rewardReady":false,"rewardsRedeemed":2}}}}}},"400":{"description":"`INVALID_JSON`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"404":{"description":"`CUSTOMER_NOT_FOUND`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":404,"error":"CUSTOMER_NOT_FOUND","message":"No customer with this customerRef in this brand.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#CUSTOMER_NOT_FOUND"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}},"delete":{"operationId":"deleteCustomer","tags":["Loyalty"],"summary":"Delete a customer (GDPR erase)","description":"Deletes the customer's card, balance and history in this brand. Your references stay used (an order is never credited twice): using one again answers 410 CUSTOMER_DELETED. A second call is 404.","parameters":[{"name":"customerRef","in":"path","required":true,"description":"Your own id for the customer (pseudonymous: never an email or phone number).","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"example":"user_8841"}],"responses":{"200":{"description":"Deleted.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"object","additionalProperties":false,"required":["customerRef","deleted"],"properties":{"customerRef":{"type":"string"},"deleted":{"const":true}}}}},"example":{"data":{"customerRef":"user_8841","deleted":true}}}}},"400":{"description":"`INVALID_JSON`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`, `INSUFFICIENT_SCOPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"404":{"description":"`CUSTOMER_NOT_FOUND`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":404,"error":"CUSTOMER_NOT_FOUND","message":"No customer with this customerRef in this brand.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#CUSTOMER_NOT_FOUND"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}}},"/customers/{customerRef}/activity":{"get":{"operationId":"listCustomerActivity","tags":["Loyalty"],"summary":"A customer's history","description":"Purchases (with their reversal), redemptions and point expiries, newest first.","parameters":[{"name":"customerRef","in":"path","required":true,"description":"Your own id for the customer (pseudonymous: never an email or phone number).","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"example":"user_8841"},{"name":"limit","in":"query","required":false,"description":"1–100, default 25.","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"`meta.nextCursor` of the previous page.","schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"One page.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ActivityItem"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}},"example":{"data":[{"id":"pur_7a1c9e2b4d6f8a0b1c2d3e4f","type":"purchase","reference":"order_1093","locationRef":"milano-centro","programme":"stamps","stamps":{"added":1,"count":6,"required":9,"rewardReady":false},"createdAt":"2026-10-28T14:32:05.120Z","reversal":null}],"meta":{"hasMore":false,"nextCursor":null}}}}},"400":{"description":"`INVALID_JSON`, `VALIDATION_ERROR`, `INVALID_CURSOR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"404":{"description":"`CUSTOMER_NOT_FOUND`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":404,"error":"CUSTOMER_NOT_FOUND","message":"No customer with this customerRef in this brand.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#CUSTOMER_NOT_FOUND"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}}},"/programme":{"get":{"operationId":"getProgramme","tags":["Brand"],"summary":"The brand's programme","description":"Stamps (how many for the reward, the reward text) or points (per euro, redeem rules, value). For your UI copy.","responses":{"200":{"description":"The programme.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Programme"}}},"example":{"data":{"brand":{"id":"brd_9a8b7c6d5e4f3a2b1c0d9e8f","name":"Pizzeria Da Nino","livemode":false},"programme":"points","points":{"pointsPerEuro":2,"minRedeem":100,"redeemStep":100,"pointValue":{"value":5,"currency":"EUR"}}}}}}},"400":{"description":"`INVALID_JSON`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}}},"/locations":{"get":{"operationId":"listLocations","tags":["Locations"],"summary":"List locations","description":"Newest first.","parameters":[{"name":"limit","in":"query","required":false,"description":"1–100, default 25.","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"description":"`meta.nextCursor` of the previous page.","schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"One page.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data","meta"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"meta":{"$ref":"#/components/schemas/PageMeta"}}},"example":{"data":[{"id":"loc_3e4f5a6b7c8d9e0f1a2b3c4d","locationRef":"milano-centro","name":"Milano Centro","address":"Via Torino 12, Milano","active":true,"createdAt":"2026-10-20T09:00:00.000Z"}],"meta":{"hasMore":false,"nextCursor":null}}}}},"400":{"description":"`INVALID_JSON`, `VALIDATION_ERROR`, `INVALID_CURSOR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}}},"/locations/{locationRef}":{"get":{"operationId":"getLocation","tags":["Locations"],"summary":"Read a location","description":"Inactive locations are returned too (`active: false`); purchases there are refused.","parameters":[{"name":"locationRef","in":"path","required":true,"description":"Your own id for the location.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"example":"milano-centro"}],"responses":{"200":{"description":"The location.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Location"}}},"example":{"data":{"id":"loc_3e4f5a6b7c8d9e0f1a2b3c4d","locationRef":"milano-centro","name":"Milano Centro","address":"Via Torino 12, Milano","active":true,"createdAt":"2026-10-20T09:00:00.000Z"}}}}},"400":{"description":"`INVALID_JSON`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"404":{"description":"`LOCATION_NOT_FOUND`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":404,"error":"LOCATION_NOT_FOUND","message":"No location with this locationRef in this brand.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#LOCATION_NOT_FOUND"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}},"put":{"operationId":"putLocation","tags":["Locations"],"summary":"Create or update a location","description":"Idempotent: creates the location the first time, updates it after. `active: false` hides it from purchases.","parameters":[{"name":"locationRef","in":"path","required":true,"description":"Your own id for the location.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"example":"milano-centro"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"address":{"type":["string","null"],"maxLength":300},"active":{"type":"boolean"}}},"example":{"name":"Milano Centro","address":"Via Torino 12, Milano"}}}},"responses":{"200":{"description":"The location as stored.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Location"}}},"example":{"data":{"id":"loc_3e4f5a6b7c8d9e0f1a2b3c4d","locationRef":"milano-centro","name":"Milano Centro","address":"Via Torino 12, Milano","active":true,"createdAt":"2026-10-20T09:00:00.000Z"}}}}},"400":{"description":"`INVALID_JSON`, `VALIDATION_ERROR`, `INVALID_LOCATION_REF`, `INVALID_LOCATION_NAME`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"402":{"description":"`SUBSCRIPTION_INACTIVE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":402,"error":"SUBSCRIPTION_INACTIVE","message":"A live key wrote while the account has no running plan. Reads still work.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#SUBSCRIPTION_INACTIVE"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`, `INSUFFICIENT_SCOPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"409":{"description":"`LOCATION_REF_TAKEN`, `LOCATION_LIMIT`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":409,"error":"LOCATION_REF_TAKEN","message":"Another location of this brand already uses this locationRef.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#LOCATION_REF_TAKEN"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}}},"/test/reset":{"post":{"operationId":"resetSandbox","tags":["Sandbox"],"summary":"Wipe this test brand's data","description":"Test keys only. Deletes customers, cards, balances, references (order numbers become reusable), history, request log and webhook deliveries of the key's test brand. Keeps the brand, locations, keys and webhook endpoints. Test data is also wiped every Monday at 05:00 Europe/Rome.","responses":{"200":{"description":"Wiped.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"object","additionalProperties":false,"required":["reset"],"properties":{"reset":{"const":true}}}}},"example":{"data":{"reset":true}}}}},"400":{"description":"`INVALID_JSON`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":400,"error":"INVALID_JSON","message":"The body is not valid JSON.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_JSON"}}}},"401":{"description":"`INVALID_API_KEY`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"error":"INVALID_API_KEY","message":"The `X-Api-Key` header is missing, or the key is unknown or revoked.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INVALID_API_KEY"}}}},"402":{"description":"`SUBSCRIPTION_INACTIVE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":402,"error":"SUBSCRIPTION_INACTIVE","message":"A live key wrote while the account has no running plan. Reads still work.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#SUBSCRIPTION_INACTIVE"}}}},"403":{"description":"`BROWSER_NOT_ALLOWED`, `ACCOUNT_SUSPENDED`, `INSUFFICIENT_SCOPE`, `TEST_KEY_REQUIRED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":403,"error":"BROWSER_NOT_ALLOWED","message":"The request carried an `Origin` header: it came from a browser.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#BROWSER_NOT_ALLOWED"}}}},"413":{"description":"`PAYLOAD_TOO_LARGE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":413,"error":"PAYLOAD_TOO_LARGE","message":"The body is larger than 16 kB.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#PAYLOAD_TOO_LARGE"}}}},"415":{"description":"`UNSUPPORTED_MEDIA_TYPE`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":415,"error":"UNSUPPORTED_MEDIA_TYPE","message":"The JSON body declares a charset other than UTF-8.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#UNSUPPORTED_MEDIA_TYPE"}}}},"429":{"description":"`RATE_LIMITED`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"error":"RATE_LIMITED","message":"Too many requests for this key's plan in the current minute.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#RATE_LIMITED"}}}},"500":{"description":"`INTERNAL_ERROR`","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"Cache-Control":{"$ref":"#/components/headers/Cache-Control"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":500,"error":"INTERNAL_ERROR","message":"Something failed on our side. Nothing was half-written: every write is one transaction.","requestId":"req_8c1f2a9d4e6b7c0a1d2e3f40","docs":"https://tavoloplus.com/developers/errors#INTERNAL_ERROR"}}}}}}}},"webhooks":{"purchase.created":{"post":{"summary":"purchase.created","description":"A purchase was recorded (`data` = the purchase, as `POST /purchases` returned it). Verify the `Tavolo-Signature` header first. Answer 2xx within 5 seconds.","parameters":[{"$ref":"#/components/parameters/TavoloSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"purchase.created"},"data":{"$ref":"#/components/schemas/Purchase"}}}]}}}},"responses":{"200":{"description":"Received. Any 2xx counts; anything else is retried for 24 hours."}}}},"purchase.reversed":{"post":{"summary":"purchase.reversed","description":"A purchase was reversed (`data` = the reversal). Verify the `Tavolo-Signature` header first. Answer 2xx within 5 seconds.","parameters":[{"$ref":"#/components/parameters/TavoloSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"purchase.reversed"},"data":{"$ref":"#/components/schemas/Reversal"}}}]}}}},"responses":{"200":{"description":"Received. Any 2xx counts; anything else is retried for 24 hours."}}}},"redemption.created":{"post":{"summary":"redemption.created","description":"A reward or points were redeemed (`data` = the redemption). Verify the `Tavolo-Signature` header first. Answer 2xx within 5 seconds.","parameters":[{"$ref":"#/components/parameters/TavoloSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"redemption.created"},"data":{"$ref":"#/components/schemas/Redemption"}}}]}}}},"responses":{"200":{"description":"Received. Any 2xx counts; anything else is retried for 24 hours."}}}},"ping":{"post":{"summary":"ping","description":"The console's \"Send test event\" button: check your endpoint and signature code. Verify the `Tavolo-Signature` header first. Answer 2xx within 5 seconds.","parameters":[{"$ref":"#/components/parameters/TavoloSignature"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Event"},{"type":"object","properties":{"type":{"const":"ping"},"data":{"$ref":"#/components/schemas/Ping"}}}]}}}},"responses":{"200":{"description":"Received. Any 2xx counts; anything else is retried for 24 hours."}}}}},"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"tp_test_… (test brands) or tp_live_… (live brands). Server-side only."}},"parameters":{"TavoloSignature":{"name":"Tavolo-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex HMAC-SHA256 of t + \".\" + raw body with the endpoint secret>`. During a secret rotation a second v1 is present. Accept when any v1 matches and t is within 5 minutes.","schema":{"type":"string"}}},"headers":{"X-Request-Id":{"description":"Your X-Request-Id if you sent a valid one, else a new req_… id. Quote it to support.","schema":{"type":"string"}},"Cache-Control":{"description":"Always no-store.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests allowed per minute for this key's plan.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute resets.","schema":{"type":"integer"}},"Idempotent-Replayed":{"description":"`true` when this is the stored result of an earlier identical call.","schema":{"type":"string","const":"true"}}},"schemas":{"Money":{"type":"object","additionalProperties":false,"required":["value","currency"],"properties":{"value":{"type":"integer","minimum":0,"description":"Integer cents."},"currency":{"type":"string","const":"EUR"}}},"Error":{"type":"object","additionalProperties":false,"required":["statusCode","error","message","requestId","docs"],"properties":{"statusCode":{"type":"integer"},"error":{"type":"string","enum":["VALIDATION_ERROR","INVALID_JSON","INVALID_CURSOR","INVALID_LOCATION_REF","INVALID_LOCATION_NAME","INVALID_API_KEY","SUBSCRIPTION_INACTIVE","BROWSER_NOT_ALLOWED","ACCOUNT_SUSPENDED","INSUFFICIENT_SCOPE","TEST_KEY_REQUIRED","NOT_FOUND","CUSTOMER_NOT_FOUND","LOCATION_NOT_FOUND","PURCHASE_NOT_FOUND","REFERENCE_REUSED","REWARD_NOT_READY","ALREADY_REDEEMED","INSUFFICIENT_BALANCE","DAILY_LIMIT","LOCATION_REF_TAKEN","LOCATION_LIMIT","CUSTOMER_DELETED","PAYLOAD_TOO_LARGE","UNSUPPORTED_MEDIA_TYPE","UNKNOWN_LOCATION","UNSUPPORTED_CURRENCY","AMOUNT_TOO_LARGE","INVALID_POINTS","POINTS_REQUIRED","RATE_LIMITED","INTERNAL_ERROR"],"description":"Stable code: branch on this, never on `message`."},"message":{"type":"string"},"requestId":{"type":"string"},"docs":{"type":"string","format":"uri"}},"description":"Every error has this shape. See https://tavoloplus.com/developers/errors."},"PageMeta":{"type":"object","additionalProperties":false,"required":["hasMore","nextCursor"],"properties":{"hasMore":{"type":"boolean"},"nextCursor":{"type":["string","null"]}}},"PointsBalance":{"type":"object","additionalProperties":false,"required":["balance","redeemable","redeemableValue"],"properties":{"balance":{"type":"integer","minimum":0},"redeemable":{"type":"integer","minimum":0,"description":"Largest amount redeemable now (multiple of the redeem step)."},"redeemableValue":{"$ref":"#/components/schemas/Money"}}},"StampsPurchase":{"type":"object","additionalProperties":false,"required":["added","count","required","rewardReady"],"properties":{"added":{"type":"integer","enum":[0,1],"description":"0 when the card was already full (see `rewardReady`)."},"count":{"type":"integer","minimum":0},"required":{"type":"integer","minimum":1},"rewardReady":{"type":"boolean"}}},"PointsPurchase":{"type":"object","additionalProperties":false,"required":["added","balance","redeemable","redeemableValue"],"properties":{"added":{"type":"integer","minimum":0,"description":"0 when the amount is too small for a point."},"balance":{"type":"integer","minimum":0},"redeemable":{"type":"integer","minimum":0},"redeemableValue":{"$ref":"#/components/schemas/Money"}}},"Purchase":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","customerRef","programme","stamps","createdAt"],"properties":{"id":{"type":"string","pattern":"^pur_[0-9a-f]{24}$"},"customerRef":{"type":"string"},"programme":{"const":"stamps"},"stamps":{"$ref":"#/components/schemas/StampsPurchase"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}},{"type":"object","additionalProperties":false,"required":["id","customerRef","programme","points","createdAt"],"properties":{"id":{"type":"string","pattern":"^pur_[0-9a-f]{24}$"},"customerRef":{"type":"string"},"programme":{"const":"points"},"points":{"$ref":"#/components/schemas/PointsPurchase"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}}]},"StampsRedemption":{"type":"object","additionalProperties":false,"required":["redeemed","count","required","rewardsRedeemed"],"properties":{"redeemed":{"const":true},"count":{"const":0},"required":{"type":"integer","minimum":1},"rewardsRedeemed":{"type":"integer","minimum":1}}},"PointsRedemption":{"type":"object","additionalProperties":false,"required":["redeemed","discount","balance","redeemable","redeemableValue"],"properties":{"redeemed":{"type":"integer","minimum":1,"description":"Points spent."},"discount":{"$ref":"#/components/schemas/Money","description":"What the redeemed points are worth: apply it to the order."},"balance":{"type":"integer","minimum":0},"redeemable":{"type":"integer","minimum":0},"redeemableValue":{"$ref":"#/components/schemas/Money"}}},"Redemption":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","customerRef","programme","stamps","createdAt"],"properties":{"id":{"type":"string","pattern":"^red_[0-9a-f]{24}$"},"customerRef":{"type":"string"},"programme":{"const":"stamps"},"stamps":{"$ref":"#/components/schemas/StampsRedemption"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}},{"type":"object","additionalProperties":false,"required":["id","customerRef","programme","points","createdAt"],"properties":{"id":{"type":"string","pattern":"^red_[0-9a-f]{24}$"},"customerRef":{"type":"string"},"programme":{"const":"points"},"points":{"$ref":"#/components/schemas/PointsRedemption"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}}]},"StampsReversal":{"type":"object","additionalProperties":false,"required":["removed","count","required","rewardReady"],"properties":{"removed":{"type":"integer","enum":[0,1]},"count":{"type":"integer","minimum":0},"required":{"type":"integer","minimum":1},"rewardReady":{"type":"boolean"}}},"PointsReversal":{"type":"object","additionalProperties":false,"required":["removed","balance","redeemable","redeemableValue"],"properties":{"removed":{"type":"integer","minimum":0},"balance":{"type":"integer","minimum":0},"redeemable":{"type":"integer","minimum":0},"redeemableValue":{"$ref":"#/components/schemas/Money"}}},"Reversal":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","reversed","customerRef","programme","stamps","reversedAt"],"properties":{"id":{"type":"string","pattern":"^pur_[0-9a-f]{24}$"},"reversed":{"const":true},"customerRef":{"type":"string"},"programme":{"const":"stamps"},"stamps":{"$ref":"#/components/schemas/StampsReversal"},"reversedAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}},{"type":"object","additionalProperties":false,"required":["id","reversed","customerRef","programme","points","reversedAt"],"properties":{"id":{"type":"string","pattern":"^pur_[0-9a-f]{24}$"},"reversed":{"const":true},"customerRef":{"type":"string"},"programme":{"const":"points"},"points":{"$ref":"#/components/schemas/PointsReversal"},"reversedAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}}]},"Customer":{"oneOf":[{"type":"object","additionalProperties":false,"required":["customerRef","programme","createdAt","stamps"],"properties":{"customerRef":{"type":"string"},"programme":{"const":"stamps"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."},"stamps":{"type":"object","additionalProperties":false,"required":["count","required","rewardReady","rewardsRedeemed"],"properties":{"count":{"type":"integer","minimum":0},"required":{"type":"integer","minimum":1},"rewardReady":{"type":"boolean"},"rewardsRedeemed":{"type":"integer","minimum":0}}}}},{"type":"object","additionalProperties":false,"required":["customerRef","programme","createdAt","points"],"properties":{"customerRef":{"type":"string"},"programme":{"const":"points"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."},"points":{"$ref":"#/components/schemas/PointsBalance"}}}]},"ActivityItem":{"oneOf":[{"type":"object","additionalProperties":false,"required":["id","type","reference","locationRef","programme","stamps","createdAt","reversal"],"properties":{"id":{"type":"string","pattern":"^pur_[0-9a-f]{24}$"},"type":{"const":"purchase"},"reference":{"type":"string"},"locationRef":{"type":"string"},"programme":{"const":"stamps"},"stamps":{"$ref":"#/components/schemas/StampsPurchase"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."},"reversal":{"oneOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["stamps","reversedAt"],"properties":{"stamps":{"$ref":"#/components/schemas/StampsReversal"},"reversedAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}}]}}},{"type":"object","additionalProperties":false,"required":["id","type","reference","locationRef","programme","points","createdAt","reversal"],"properties":{"id":{"type":"string","pattern":"^pur_[0-9a-f]{24}$"},"type":{"const":"purchase"},"reference":{"type":"string"},"locationRef":{"type":"string"},"programme":{"const":"points"},"points":{"$ref":"#/components/schemas/PointsPurchase"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."},"reversal":{"oneOf":[{"type":"null"},{"type":"object","additionalProperties":false,"required":["points","reversedAt"],"properties":{"points":{"$ref":"#/components/schemas/PointsReversal"},"reversedAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}}]}}},{"type":"object","additionalProperties":false,"required":["id","type","reference","locationRef","programme","stamps","createdAt"],"properties":{"id":{"type":"string","pattern":"^red_[0-9a-f]{24}$"},"type":{"const":"redemption"},"reference":{"type":"string"},"locationRef":{"type":"string"},"programme":{"const":"stamps"},"stamps":{"$ref":"#/components/schemas/StampsRedemption"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}},{"type":"object","additionalProperties":false,"required":["id","type","reference","locationRef","programme","points","createdAt"],"properties":{"id":{"type":"string","pattern":"^red_[0-9a-f]{24}$"},"type":{"const":"redemption"},"reference":{"type":"string"},"locationRef":{"type":"string"},"programme":{"const":"points"},"points":{"$ref":"#/components/schemas/PointsRedemption"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}},{"type":"object","additionalProperties":false,"required":["type","programme","points","createdAt"],"properties":{"type":{"const":"expiry"},"programme":{"const":"points"},"points":{"type":"object","additionalProperties":false,"required":["expired"],"properties":{"expired":{"type":"integer","minimum":1}}},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}}]},"Programme":{"oneOf":[{"type":"object","additionalProperties":false,"required":["brand","programme","stamps"],"properties":{"brand":{"$ref":"#/components/schemas/Brand"},"programme":{"const":"stamps"},"stamps":{"type":"object","additionalProperties":false,"required":["required","offerText"],"properties":{"required":{"type":"integer","minimum":1},"offerText":{"type":["string","null"],"description":"The reward, as shown to customers."}}}}},{"type":"object","additionalProperties":false,"required":["brand","programme","points"],"properties":{"brand":{"$ref":"#/components/schemas/Brand"},"programme":{"const":"points"},"points":{"type":"object","additionalProperties":false,"required":["pointsPerEuro","minRedeem","redeemStep","pointValue"],"properties":{"pointsPerEuro":{"type":"integer","minimum":1},"minRedeem":{"type":"integer","minimum":1},"redeemStep":{"type":"integer","minimum":1},"pointValue":{"$ref":"#/components/schemas/Money","description":"Value of one point."}}}}}]},"Ping":{"type":"object","additionalProperties":false,"required":["message"],"properties":{"message":{"type":"string"}}},"Brand":{"type":"object","additionalProperties":false,"required":["id","name","livemode"],"properties":{"id":{"type":"string","pattern":"^brd_[0-9a-f]{24}$"},"name":{"type":"string"},"livemode":{"type":"boolean"}}},"Location":{"type":"object","additionalProperties":false,"required":["id","locationRef","name","address","active","createdAt"],"properties":{"id":{"type":"string","pattern":"^loc_[0-9a-f]{24}$"},"locationRef":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,64}$"},"name":{"type":"string"},"address":{"type":["string","null"]},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."}}},"Event":{"type":"object","additionalProperties":false,"required":["id","type","created","livemode","data"],"description":"Webhook envelope. Deliveries are at-least-once and unordered: dedupe on `id`.","properties":{"id":{"type":"string","pattern":"^evt_[0-9a-f]{24}$"},"type":{"type":"string","enum":["purchase.created","purchase.reversed","redemption.created","ping"]},"created":{"type":"string","format":"date-time","description":"RFC 3339, UTC (`Z`)."},"livemode":{"type":"boolean"},"data":{"type":"object"}}}}},"x-error-codes":{"VALIDATION_ERROR":{"status":400,"meaning":"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_JSON":{"status":400,"meaning":"The body is not valid JSON.","fix":"Send a JSON object encoded in UTF-8."},"INVALID_CURSOR":{"status":400,"meaning":"`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_REF":{"status":400,"meaning":"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_NAME":{"status":400,"meaning":"The location name is blank or too long.","fix":"Send a name of 1–120 characters."},"INVALID_API_KEY":{"status":401,"meaning":"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_INACTIVE":{"status":402,"meaning":"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_ALLOWED":{"status":403,"meaning":"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_SUSPENDED":{"status":403,"meaning":"The developer account is suspended.","fix":"Write to support."},"INSUFFICIENT_SCOPE":{"status":403,"meaning":"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_REQUIRED":{"status":403,"meaning":"`POST /test/reset` was called with a live key.","fix":"Reset works only on test brands, with a test key."},"NOT_FOUND":{"status":404,"meaning":"No such endpoint.","fix":"Check the method and the path against the reference."},"CUSTOMER_NOT_FOUND":{"status":404,"meaning":"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_FOUND":{"status":404,"meaning":"No location with this locationRef in this brand.","fix":"Create it with `PUT /locations/{locationRef}`."},"PURCHASE_NOT_FOUND":{"status":404,"meaning":"No purchase with this id in this brand.","fix":"Pass the `id` (pur_…) returned by `POST /purchases`."},"REFERENCE_REUSED":{"status":409,"meaning":"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_READY":{"status":409,"meaning":"The stamp card is not full yet.","fix":"Read the customer first; redeem when `rewardReady` is true."},"ALREADY_REDEEMED":{"status":409,"meaning":"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_BALANCE":{"status":409,"meaning":"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_LIMIT":{"status":409,"meaning":"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_TAKEN":{"status":409,"meaning":"Another location of this brand already uses this locationRef.","fix":"Pick another locationRef."},"LOCATION_LIMIT":{"status":409,"meaning":"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_DELETED":{"status":410,"meaning":"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_LARGE":{"status":413,"meaning":"The body is larger than 16 kB.","fix":"Send only the documented fields."},"UNSUPPORTED_MEDIA_TYPE":{"status":415,"meaning":"The JSON body declares a charset other than UTF-8.","fix":"Send `Content-Type: application/json` (UTF-8)."},"UNKNOWN_LOCATION":{"status":422,"meaning":"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_CURRENCY":{"status":422,"meaning":"`amount.currency` is not EUR.","fix":"Only EUR is accepted in v1."},"AMOUNT_TOO_LARGE":{"status":422,"meaning":"`amount.value` is over 30000 (300.00 EUR).","fix":"Split the order or check the amount is in cents."},"INVALID_POINTS":{"status":422,"meaning":"`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_REQUIRED":{"status":422,"meaning":"This brand runs points: a redemption must say how many.","fix":"Send `points`."},"RATE_LIMITED":{"status":429,"meaning":"Too many requests for this key's plan in the current minute.","fix":"Wait `Retry-After` seconds; watch the RateLimit-* headers."},"INTERNAL_ERROR":{"status":500,"meaning":"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."}}}