Tavolo Plus DevelopersAPI referenceConsole
Docs menu
Quickstart

Your first stamp in 5 minutes

The Loyalty API gives your client's app a stamp card or a points programme with three calls: record a purchase, read the customer, redeem. Your server calls it; we keep the cards, balances, rules and anti-fraud.

Leggi in italiano

1. Get a test key

In the developer console create a test brand (stamps or points), add a location, then create a key. Test keys start with tp_test_ and work only on test brands: free, no card, data wiped every Monday. Access is by invitation during the beta: write to [email protected].

Keep the key on your server, in an environment variable:

export TAVOLO_KEY="tp_test_..."

2. Record a purchase

Send your own id for the customer and your order number as reference. The customer is created on the first purchase. Same reference and same body = a safe retry: the first answer comes back, never a second stamp.

POST /v1/purchases
curl https://api.tavoloplus.com/v1/purchases \
  -H "X-Api-Key: $TAVOLO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customerRef":"user_8841","reference":"order_1093","amount":{"value":2450,"currency":"EUR"}}'

Amounts are in cents and always required, also for stamps brands, so your code keeps working if the brand switches to points.

Response (201 Created)
{
  "data": {
    "id": "pur_7a1c9e2b4d6f8a0b1c2d3e4f",
    "customerRef": "user_8841",
    "programme": "stamps",
    "stamps": { "added": 1, "count": 1, "required": 10, "rewardReady": false },
    "createdAt": "2026-10-29T14:32:05.120Z"
  }
}

3. Show the card or the balance

GET /v1/customers/{customerRef}
curl https://api.tavoloplus.com/v1/customers/user_8841 \
  -H "X-Api-Key: $TAVOLO_KEY"

4. Redeem

Stamps brands: when the card is full (rewardReady: true), redeem it; the card restarts. Points brands: send points (a multiple of 100); the answer says what they are worth, to apply to the order.

POST /v1/redemptions
curl https://api.tavoloplus.com/v1/redemptions \
  -H "X-Api-Key: $TAVOLO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customerRef":"user_8841","reference":"redeem_5521"}'

Next