Saltar al contenido
tablezio

Clientes

Clientes

Perfiles persistentes de comensales. Tablezio relaciona email y teléfono de forma única por restaurante, registra el historial de visitas automáticamente y expone block/unblock para hacer cumplir políticas de no-show.

List customers

GET /v1/customers Permiso: customers:read

Search and filter your customer base.

Parámetros de consulta

limitintegerOpcional

Page size.

starting_afterstringOpcional

Cursor.

ending_beforestringOpcional

Cursor (backwards).

emailstringOpcional

Exact email match.

phonestringOpcional

Exact phone match.

is_blockedbooleanOpcional

true returns only blocked customers.

searchstringOpcional

Case-insensitive search over name, email and phone.

Solicitud

curl 'https://api.tablezio.com/v1/customers?search=lucia' -H 'X-API-Key: tbz_…'

Respuesta

application/json
{ "object": "list", "data": [ /* customer */ ], "has_more": false, "next_cursor": null, "previous_cursor": null, "url": "/v1/customers" }

Retrieve a customer

GET /v1/customers/{id} Permiso: customers:read

Fetch a single customer.

Parámetros de ruta

idstringObligatorio

Customer ID (cus_…).

Solicitud

curl https://api.tablezio.com/v1/customers/cus_… -H 'X-API-Key: tbz_…'

Respuesta

application/json
{
  "id": "cus_8b2c3d4e5f6a7b8c9d0e1f20",
  "object": "customer",
  "created": 1716730000,
  "updated": 1716730000,
  "first_name": "Lucia",
  "last_name": "Martín",
  "email": "[email protected]",
  "phone": "+34 600 000 000",
  "notes": null,
  "tags": ["vip"],
  "total_visits": 14,
  "total_spent": 124000,
  "last_visit_at": 1716557000,
  "loyalty_points": 320,
  "dietary_restrictions": ["gluten_free"],
  "birthday": "1991-04-22",
  "anniversary_date": null,
  "source": "walk_in",
  "is_active": true,
  "is_blocked": false,
  "block_reason": null,
  "blocked_at": null,
  "no_show_count": 0,
  "total_reservations": 11
}

Create a customer

POST /v1/customers Permiso: customers:write

Adds a customer profile. Use Idempotency-Key when capturing via a public form.

Parámetros del cuerpo

first_namestringObligatorio

Given name.

last_namestringOpcional

Family name.

emailstringOpcional

Email. Must be unique per restaurant.

phonestringOpcional

Phone. Must be unique per restaurant.

birthdaystring (YYYY-MM-DD)Opcional

For birthday campaigns.

anniversary_datestring (YYYY-MM-DD)Opcional

For anniversary campaigns.

dietary_restrictionsstring[]Opcional

Tags surfaced to front-of-house.

tagsstring[]Opcional

Free-form segmentation tags.

notesstringOpcional

Internal staff notes.

sourcestringOpcional

Origin channel (walk_in, online, import…).

Solicitud

curl -X POST https://api.tablezio.com/v1/customers \
  -H 'X-API-Key: tbz_…' -H 'Content-Type: application/json' \
  -d '{ "first_name": "Lucia", "email": "[email protected]" }'

Respuesta

application/json
{
  "id": "cus_8b2c3d4e5f6a7b8c9d0e1f20",
  "object": "customer",
  "created": 1716730000,
  "updated": 1716730000,
  "first_name": "Lucia",
  "last_name": "Martín",
  "email": "[email protected]",
  "phone": "+34 600 000 000",
  "notes": null,
  "tags": ["vip"],
  "total_visits": 14,
  "total_spent": 124000,
  "last_visit_at": 1716557000,
  "loyalty_points": 320,
  "dietary_restrictions": ["gluten_free"],
  "birthday": "1991-04-22",
  "anniversary_date": null,
  "source": "walk_in",
  "is_active": true,
  "is_blocked": false,
  "block_reason": null,
  "blocked_at": null,
  "no_show_count": 0,
  "total_reservations": 11
}

Update a customer

PATCH /v1/customers/{id} Permiso: customers:write

Partial update of any profile field.

Parámetros de ruta

idstringObligatorio

Customer ID.

Parámetros del cuerpo

*anyOpcional

Any field from Create.

Solicitud

curl -X PATCH https://api.tablezio.com/v1/customers/cus_… \
  -H 'X-API-Key: tbz_…' -H 'Content-Type: application/json' \
  -d '{ "tags": ["vip", "regular"] }'

Respuesta

application/json
{
  "id": "cus_8b2c3d4e5f6a7b8c9d0e1f20",
  "object": "customer",
  "created": 1716730000,
  "updated": 1716730000,
  "first_name": "Lucia",
  "last_name": "Martín",
  "email": "[email protected]",
  "phone": "+34 600 000 000",
  "notes": null,
  "tags": ["vip"],
  "total_visits": 14,
  "total_spent": 124000,
  "last_visit_at": 1716557000,
  "loyalty_points": 320,
  "dietary_restrictions": ["gluten_free"],
  "birthday": "1991-04-22",
  "anniversary_date": null,
  "source": "walk_in",
  "is_active": true,
  "is_blocked": false,
  "block_reason": null,
  "blocked_at": null,
  "no_show_count": 0,
  "total_reservations": 11
}

Block a customer

POST /v1/customers/{id}/block Permiso: customers:write

Prevents new reservations from this customer until unblocked. Useful after repeated no-shows.

Parámetros de ruta

idstringObligatorio

Customer ID.

Parámetros del cuerpo

reasonstringOpcional

Free-form reason logged on the customer record.

Solicitud

curl -X POST https://api.tablezio.com/v1/customers/cus_…/block -H 'X-API-Key: tbz_…'

Respuesta

application/json
{
  "id": "cus_8b2c3d4e5f6a7b8c9d0e1f20",
  "object": "customer",
  "created": 1716730000,
  "updated": 1716730000,
  "first_name": "Lucia",
  "last_name": "Martín",
  "email": "[email protected]",
  "phone": "+34 600 000 000",
  "notes": null,
  "tags": ["vip"],
  "total_visits": 14,
  "total_spent": 124000,
  "last_visit_at": 1716557000,
  "loyalty_points": 320,
  "dietary_restrictions": ["gluten_free"],
  "birthday": "1991-04-22",
  "anniversary_date": null,
  "source": "walk_in",
  "is_active": true,
  "is_blocked": false,
  "block_reason": null,
  "blocked_at": null,
  "no_show_count": 0,
  "total_reservations": 11
}

Unblock a customer

POST /v1/customers/{id}/unblock Permiso: customers:write

Clears the block flag.

Parámetros de ruta

idstringObligatorio

Customer ID.

Solicitud

curl -X POST https://api.tablezio.com/v1/customers/cus_…/unblock -H 'X-API-Key: tbz_…'

Respuesta

application/json
{
  "id": "cus_8b2c3d4e5f6a7b8c9d0e1f20",
  "object": "customer",
  "created": 1716730000,
  "updated": 1716730000,
  "first_name": "Lucia",
  "last_name": "Martín",
  "email": "[email protected]",
  "phone": "+34 600 000 000",
  "notes": null,
  "tags": ["vip"],
  "total_visits": 14,
  "total_spent": 124000,
  "last_visit_at": 1716557000,
  "loyalty_points": 320,
  "dietary_restrictions": ["gluten_free"],
  "birthday": "1991-04-22",
  "anniversary_date": null,
  "source": "walk_in",
  "is_active": true,
  "is_blocked": false,
  "block_reason": null,
  "blocked_at": null,
  "no_show_count": 0,
  "total_reservations": 11
}

Adjust loyalty points

POST /v1/customers/{id}/loyalty_points/adjust Permiso: loyalty:write

Adds (positive) or removes (negative) points from the customer balance.

Parámetros de ruta

idstringObligatorio

Customer ID.

Parámetros del cuerpo

pointsintegerObligatorio

Delta. Can be negative.

reasonstringOpcional

Optional reason; appears on the customer history.

Solicitud

curl -X POST https://api.tablezio.com/v1/customers/cus_…/loyalty_points/adjust \
  -H 'X-API-Key: tbz_…' -H 'Content-Type: application/json' \
  -d '{ "points": 50, "reason": "Friend referral" }'

Respuesta

application/json
{
  "id": "cus_8b2c3d4e5f6a7b8c9d0e1f20",
  "object": "customer",
  "created": 1716730000,
  "updated": 1716730000,
  "first_name": "Lucia",
  "last_name": "Martín",
  "email": "[email protected]",
  "phone": "+34 600 000 000",
  "notes": null,
  "tags": ["vip"],
  "total_visits": 14,
  "total_spent": 124000,
  "last_visit_at": 1716557000,
  "loyalty_points": 320,
  "dietary_restrictions": ["gluten_free"],
  "birthday": "1991-04-22",
  "anniversary_date": null,
  "source": "walk_in",
  "is_active": true,
  "is_blocked": false,
  "block_reason": null,
  "blocked_at": null,
  "no_show_count": 0,
  "total_reservations": 11
}

Delete a customer

DELETE /v1/customers/{id} Permiso: customers:write

Removes the guest profile. Use it for erasure requests; blocking a guest you still want on file is a different endpoint.

Parámetros de ruta

idstringObligatorio

Customer id (cus_…).

Solicitud

curl -X DELETE 'https://api.tablezio.com/v1/customers/cus_5a1b2c3d4e5f6a7b8c9d0e1f' \
  -H 'X-API-Key: tbz_…'