Tavolo Plus DevelopersAPI referenceConsole
Docs menu
Reference

Tavolo Plus Loyalty API

Base URL https://api.tavoloplus.com/v1. Every call sends X-Api-Key. Fields marked * are required. Version 1.0.0; the same description as openapi.json (import it into Postman or Insomnia, or generate a client).

Loyalty

Purchases, customers, redemptions.

Record a purchase

POST/v1/purchases

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.

Body
FieldTypeDescription
customerRef *stringYour id for the customer; created on the first purchase.
reference *stringYour order number. Same reference + same body = safe retry.
locationRefstringOptional when the brand has a default location.
amount *objectAlways required, also for stamps brands.
amount.value *integer, ≥ 1Cents, at most 30000.
amount.currency *string, ≤ 3 chars
Example body
{
  "customerRef": "user_8841",
  "locationRef": "milano-centro",
  "reference": "order_1093",
  "amount": {
    "value": 2450,
    "currency": "EUR"
  }
}

200 Not credited (card already full, or 0 points), or a replay of a 200. (Purchase)

200 response
{
  "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 Credited. (Purchase)

201 response
{
  "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"
  }
}

Reverse a purchase (refund, cancellation)

POST/v1/purchases/{id}/reverse

Removes that purchase's stamp or points, once. A second call returns the first result with Idempotent-Replayed: true. No body.

ParameterInTypeDescription
id *pathstring

200 Reversed (or the replay of the first reversal). (Reversal)

200 response
{
  "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"
  }
}

Redeem the reward or points

POST/v1/redemptions

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.

Body
FieldTypeDescription
customerRef *string
reference *stringAny unique string. Same reference + same body = safe retry.
locationRefstring
pointsintegerPoints brands only: how many to spend (see GET /programme). Omit for stamps.
Example body
{
  "customerRef": "user_8841",
  "reference": "redeem_5521",
  "points": 200
}

201 Redeemed. (Redemption)

201 response
{
  "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"
  }
}

Read a customer's card or balance

GET/v1/customers/{customerRef}

Stamps brands: the card (count, required, rewardReady). Points brands: the balance and what is redeemable now. 404 if the customer never bought.

ParameterInTypeDescription
customerRef *pathstringYour own id for the customer (pseudonymous: never an email or phone number).

200 The card (stamps) or the balance (points). (Customer)

200 response
{
  "data": {
    "customerRef": "user_8841",
    "programme": "stamps",
    "createdAt": "2026-10-01T08:00:00.000Z",
    "stamps": {
      "count": 6,
      "required": 9,
      "rewardReady": false,
      "rewardsRedeemed": 2
    }
  }
}

Delete a customer (GDPR erase)

DELETE/v1/customers/{customerRef}

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.

ParameterInTypeDescription
customerRef *pathstringYour own id for the customer (pseudonymous: never an email or phone number).

200 Deleted.

200 response
{
  "data": {
    "customerRef": "user_8841",
    "deleted": true
  }
}

A customer's history

GET/v1/customers/{customerRef}/activity

Purchases (with their reversal), redemptions and point expiries, newest first.

ParameterInTypeDescription
customerRef *pathstringYour own id for the customer (pseudonymous: never an email or phone number).
limitqueryinteger, ≥ 1, ≤ 1001–100, default 25.
cursorquerystring, ≤ 64 charsmeta.nextCursor of the previous page.

200 One page. (ActivityItem)

200 response
{
  "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
  }
}

Locations

Where purchases happen. Free and unlimited.

List locations

GET/v1/locations

Newest first.

ParameterInTypeDescription
limitqueryinteger, ≥ 1, ≤ 1001–100, default 25.
cursorquerystring, ≤ 64 charsmeta.nextCursor of the previous page.

200 One page. (Location)

200 response
{
  "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
  }
}

Read a location

GET/v1/locations/{locationRef}

Inactive locations are returned too (active: false); purchases there are refused.

ParameterInTypeDescription
locationRef *pathstringYour own id for the location.

200 The location. (Location)

200 response
{
  "data": {
    "id": "loc_3e4f5a6b7c8d9e0f1a2b3c4d",
    "locationRef": "milano-centro",
    "name": "Milano Centro",
    "address": "Via Torino 12, Milano",
    "active": true,
    "createdAt": "2026-10-20T09:00:00.000Z"
  }
}

Create or update a location

PUT/v1/locations/{locationRef}

Idempotent: creates the location the first time, updates it after. active: false hides it from purchases.

ParameterInTypeDescription
locationRef *pathstringYour own id for the location.
Body
FieldTypeDescription
name *string, ≤ 120 chars
addressstring | null, ≤ 300 chars
activeboolean
Example body
{
  "name": "Milano Centro",
  "address": "Via Torino 12, Milano"
}

200 The location as stored. (Location)

200 response
{
  "data": {
    "id": "loc_3e4f5a6b7c8d9e0f1a2b3c4d",
    "locationRef": "milano-centro",
    "name": "Milano Centro",
    "address": "Via Torino 12, Milano",
    "active": true,
    "createdAt": "2026-10-20T09:00:00.000Z"
  }
}

Brand

The brand's programme.

The brand's programme

GET/v1/programme

Stamps (how many for the reward, the reward text) or points (per euro, redeem rules, value). For your UI copy.

200 The programme. (Programme)

200 response
{
  "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"
      }
    }
  }
}

Sandbox

Test brands only.

Wipe this test brand's data

POST/v1/test/reset

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.

200 Wiped.

200 response
{
  "data": {
    "reset": true
  }
}

Webhook events

purchase.created

A purchase was recorded (data = the purchase, as POST /purchases returned it). Verify the Tavolo-Signature header first. Answer 2xx within 5 seconds.

purchase.reversed

A purchase was reversed (data = the reversal). Verify the Tavolo-Signature header first. Answer 2xx within 5 seconds.

redemption.created

A reward or points were redeemed (data = the redemption). Verify the Tavolo-Signature header first. Answer 2xx within 5 seconds.

ping

The console's "Send test event" button: check your endpoint and signature code. Verify the Tavolo-Signature header first. Answer 2xx within 5 seconds.

Objects

Money

FieldTypeDescription
value *integer, ≥ 0Integer cents.
currency *"EUR"

Error

Every error has this shape. See https://tavoloplus.com/developers/errors.

FieldTypeDescription
statusCode *integer
error *"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"Stable code: branch on this, never on message.
message *string
requestId *string
docs *string, uri

PageMeta

FieldTypeDescription
hasMore *boolean
nextCursor *string | null

PointsBalance

FieldTypeDescription
balance *integer, ≥ 0
redeemable *integer, ≥ 0Largest amount redeemable now (multiple of the redeem step).
redeemableValue *Money
redeemableValue.value *integer, ≥ 0Integer cents.
redeemableValue.currency *"EUR"

StampsPurchase

FieldTypeDescription
added *0 | 10 when the card was already full (see rewardReady).
count *integer, ≥ 0
required *integer, ≥ 1
rewardReady *boolean

PointsPurchase

FieldTypeDescription
added *integer, ≥ 00 when the amount is too small for a point.
balance *integer, ≥ 0
redeemable *integer, ≥ 0
redeemableValue *Money
redeemableValue.value *integer, ≥ 0Integer cents.
redeemableValue.currency *"EUR"

Purchase

When programme is "stamps"
FieldTypeDescription
id *string
customerRef *string
programme *"stamps"
stamps *StampsPurchase
stamps.added *0 | 10 when the card was already full (see rewardReady).
stamps.count *integer, ≥ 0
stamps.required *integer, ≥ 1
stamps.rewardReady *boolean
createdAt *string, date-timeRFC 3339, UTC (Z).
When programme is "points"
FieldTypeDescription
id *string
customerRef *string
programme *"points"
points *PointsPurchase
points.added *integer, ≥ 00 when the amount is too small for a point.
points.balance *integer, ≥ 0
points.redeemable *integer, ≥ 0
points.redeemableValue *Money
points.redeemableValue.value *integer, ≥ 0Integer cents.
points.redeemableValue.currency *"EUR"
createdAt *string, date-timeRFC 3339, UTC (Z).

StampsRedemption

FieldTypeDescription
redeemed *true
count *0
required *integer, ≥ 1
rewardsRedeemed *integer, ≥ 1

PointsRedemption

FieldTypeDescription
redeemed *integer, ≥ 1Points spent.
discount *MoneyWhat the redeemed points are worth: apply it to the order.
discount.value *integer, ≥ 0Integer cents.
discount.currency *"EUR"
balance *integer, ≥ 0
redeemable *integer, ≥ 0
redeemableValue *Money
redeemableValue.value *integer, ≥ 0Integer cents.
redeemableValue.currency *"EUR"

Redemption

When programme is "stamps"
FieldTypeDescription
id *string
customerRef *string
programme *"stamps"
stamps *StampsRedemption
stamps.redeemed *true
stamps.count *0
stamps.required *integer, ≥ 1
stamps.rewardsRedeemed *integer, ≥ 1
createdAt *string, date-timeRFC 3339, UTC (Z).
When programme is "points"
FieldTypeDescription
id *string
customerRef *string
programme *"points"
points *PointsRedemption
points.redeemed *integer, ≥ 1Points spent.
points.discount *MoneyWhat the redeemed points are worth: apply it to the order.
points.discount.value *integer, ≥ 0Integer cents.
points.discount.currency *"EUR"
points.balance *integer, ≥ 0
points.redeemable *integer, ≥ 0
points.redeemableValue *Money
points.redeemableValue.value *integer, ≥ 0Integer cents.
points.redeemableValue.currency *"EUR"
createdAt *string, date-timeRFC 3339, UTC (Z).

StampsReversal

FieldTypeDescription
removed *0 | 1
count *integer, ≥ 0
required *integer, ≥ 1
rewardReady *boolean

PointsReversal

FieldTypeDescription
removed *integer, ≥ 0
balance *integer, ≥ 0
redeemable *integer, ≥ 0
redeemableValue *Money
redeemableValue.value *integer, ≥ 0Integer cents.
redeemableValue.currency *"EUR"

Reversal

When programme is true
FieldTypeDescription
id *string
reversed *true
customerRef *string
programme *"stamps"
stamps *StampsReversal
stamps.removed *0 | 1
stamps.count *integer, ≥ 0
stamps.required *integer, ≥ 1
stamps.rewardReady *boolean
reversedAt *string, date-timeRFC 3339, UTC (Z).
When programme is true
FieldTypeDescription
id *string
reversed *true
customerRef *string
programme *"points"
points *PointsReversal
points.removed *integer, ≥ 0
points.balance *integer, ≥ 0
points.redeemable *integer, ≥ 0
points.redeemableValue *Money
points.redeemableValue.value *integer, ≥ 0Integer cents.
points.redeemableValue.currency *"EUR"
reversedAt *string, date-timeRFC 3339, UTC (Z).

Customer

When programme is "stamps"
FieldTypeDescription
customerRef *string
programme *"stamps"
createdAt *string, date-timeRFC 3339, UTC (Z).
stamps *object
stamps.count *integer, ≥ 0
stamps.required *integer, ≥ 1
stamps.rewardReady *boolean
stamps.rewardsRedeemed *integer, ≥ 0
When programme is "points"
FieldTypeDescription
customerRef *string
programme *"points"
createdAt *string, date-timeRFC 3339, UTC (Z).
points *PointsBalance
points.balance *integer, ≥ 0
points.redeemable *integer, ≥ 0Largest amount redeemable now (multiple of the redeem step).
points.redeemableValue *Money
points.redeemableValue.value *integer, ≥ 0Integer cents.
points.redeemableValue.currency *"EUR"

ActivityItem

When programme is "purchase"
FieldTypeDescription
id *string
type *"purchase"
reference *string
locationRef *string
programme *"stamps"
stamps *StampsPurchase
stamps.added *0 | 10 when the card was already full (see rewardReady).
stamps.count *integer, ≥ 0
stamps.required *integer, ≥ 1
stamps.rewardReady *boolean
createdAt *string, date-timeRFC 3339, UTC (Z).
reversal *null | object
When programme is "purchase"
FieldTypeDescription
id *string
type *"purchase"
reference *string
locationRef *string
programme *"points"
points *PointsPurchase
points.added *integer, ≥ 00 when the amount is too small for a point.
points.balance *integer, ≥ 0
points.redeemable *integer, ≥ 0
points.redeemableValue *Money
points.redeemableValue.value *integer, ≥ 0Integer cents.
points.redeemableValue.currency *"EUR"
createdAt *string, date-timeRFC 3339, UTC (Z).
reversal *null | object
When programme is "redemption"
FieldTypeDescription
id *string
type *"redemption"
reference *string
locationRef *string
programme *"stamps"
stamps *StampsRedemption
stamps.redeemed *true
stamps.count *0
stamps.required *integer, ≥ 1
stamps.rewardsRedeemed *integer, ≥ 1
createdAt *string, date-timeRFC 3339, UTC (Z).
When programme is "redemption"
FieldTypeDescription
id *string
type *"redemption"
reference *string
locationRef *string
programme *"points"
points *PointsRedemption
points.redeemed *integer, ≥ 1Points spent.
points.discount *MoneyWhat the redeemed points are worth: apply it to the order.
points.discount.value *integer, ≥ 0Integer cents.
points.discount.currency *"EUR"
points.balance *integer, ≥ 0
points.redeemable *integer, ≥ 0
points.redeemableValue *Money
points.redeemableValue.value *integer, ≥ 0Integer cents.
points.redeemableValue.currency *"EUR"
createdAt *string, date-timeRFC 3339, UTC (Z).
When programme is "expiry"
FieldTypeDescription
type *"expiry"
programme *"points"
points *object
points.expired *integer, ≥ 1
createdAt *string, date-timeRFC 3339, UTC (Z).

Programme

When programme is "stamps"
FieldTypeDescription
brand *Brand
brand.id *string
brand.name *string
brand.livemode *boolean
programme *"stamps"
stamps *object
stamps.required *integer, ≥ 1
stamps.offerText *string | nullThe reward, as shown to customers.
When programme is "points"
FieldTypeDescription
brand *Brand
brand.id *string
brand.name *string
brand.livemode *boolean
programme *"points"
points *object
points.pointsPerEuro *integer, ≥ 1
points.minRedeem *integer, ≥ 1
points.redeemStep *integer, ≥ 1
points.pointValue *MoneyValue of one point.
points.pointValue.value *integer, ≥ 0Integer cents.
points.pointValue.currency *"EUR"

Ping

FieldTypeDescription
message *string

Brand

FieldTypeDescription
id *string
name *string
livemode *boolean

Location

FieldTypeDescription
id *string
locationRef *string
name *string
address *string | null
active *boolean
createdAt *string, date-timeRFC 3339, UTC (Z).

Event

Webhook envelope. Deliveries are at-least-once and unordered: dedupe on id.

FieldTypeDescription
id *string
type *"purchase.created" | "purchase.reversed" | "redemption.created" | "ping"
created *string, date-timeRFC 3339, UTC (Z).
livemode *boolean
data *object