Aller au contenu

List guests

GET
/v1/guests
curl --request GET \
--url https://api.useservice.app/v1/guests \
--header 'Authorization: Bearer <token>'

Lists the restaurant’s guest book. Requires the guests:read scope.

Order: by when the profile was created, newest first (created_at descending).

With updated_since the order becomes updated_at ascending, oldest change first, so a sync that pages forward to has_more: false sees every change. A profile that changes again while you page moves to the end, where you will meet it again.

vip
boolean

true returns only guests the restaurant marked VIP, false only the others. Omit it for both.

blacklisted
boolean

true returns only guests the restaurant flagged blacklisted, false only the others. Omit it for both.

phone
string

Normalized to E.164 before matching

email
string

Exact match on the guest’s primary e-mail address, ignoring case. An address the guest is known by only as a secondary one does not match.

query
string

Substring match on name/email

updated_since
string

An ISO 8601 timestamp; one without an offset is read as UTC. Returns only guests whose updated_at is at or after it, and changes the order to updated_at ascending — see Order: above.

limit
integer

How many objects to return: 1 to 100, default 20. A larger value is lowered to 100 rather than refused; 0, a negative number or anything that is not an integer is a 400.

starting_after
string

The id of an object in this list — normally the last one on the page you have. Returns the objects that come after it, in the order the operation description gives. has_more: false means you have reached the end. An id this list cannot find is a 400.

ending_before
string

The id of an object in this list — normally the first one on the page you have. Returns the objects that come just before it, walking the same order backwards; the page itself still reads in list order. Ignored when starting_after is also sent. An id this list cannot find is a 400.

id
string

Batch fetch by comma-separated public ids (gst_…), max 100

Service-Version
string

Pin this request to a dated version of the contract, e.g. 2026-09-01. Omit it and the version pinned on the API key applies. A version we do not publish is a 400 bad_request with param: "Service-Version". The version that was applied comes back on the Service-Version response header, always.

Guests listed

Media typeapplication/json
object
object
required
string
Allowed values: list
data
required
Array<object>

A guest profile from the restaurant’s guest book. Guest data: served by GET /v1/guests and ?expand=guest, both of which need the guests:read scope, and carried by every guest.* webhook delivery.

object
object
required

The object type: always guest.

string
Allowed values: guest
id
required

The guest’s id, gst_…. Opaque and permanent. When two profiles are merged, the one that disappears keeps resolving to the survivor in ?id= on GET /v1/guests.

string
first_name
required

First name. A profile has a first name or a last name, possibly both; null when it has only the other.

string
nullable
last_name
required

Last name. null when the profile has only a first name.

string
nullable
email

Primary e-mail address, trimmed and lower-cased. null when none is known.

string
nullable
phone

Primary phone number: E.164 (+33612345678) when it could be parsed for the restaurant’s country, otherwise as entered with separators removed — so do not assume E.164. null when none is known.

string
nullable
notes

The restaurant’s own notes on the guest profile: free text written by its staff, or carried over from its previous reservation system — the restaurant’s words about the guest, not the guest’s. A booking’s guest_notes are the guest’s own. null when there are none.

string
nullable
blacklisted
required

Whether the restaurant has flagged this guest as unwelcome. A flag only: it does not by itself refuse a booking.

boolean
blacklist_reason

Why the guest was flagged — required by the restaurant when it sets blacklisted. null when the guest is not flagged.

string
nullable
dietary_preferences
required

Dietary preferences the restaurant recorded, as free-form labels. [] when none.

Array<string>
allergies
required

Allergies the restaurant recorded, as free-form labels. [] when none.

Array<string>
birthday

Date of birth, YYYY-MM-DD. null when not recorded.

string format: date
nullable
anniversary

An anniversary date the restaurant recorded, YYYY-MM-DD. null when not recorded.

string format: date
nullable
vip
required

Whether the restaurant marked the guest as a VIP.

boolean
language

The language the restaurant writes to this guest in, as an ISO 639-1 code. Set to the restaurant’s primary language when the profile is created unless one is given, so null only on a profile that never had one.

string
nullable
Allowed values: fr en de es it nl pt da sv no fi
source
required

How the restaurant first learned of this guest. Not the same vocabulary as a reservation’s source.

  • manual: entered by the restaurant’s staff.
  • widget: first seen booking in the restaurant’s booking widget.
  • import: brought over from the restaurant’s previous reservation system.
  • host_assertion: first seen booking through the widget embedded on a partner’s page, with the partner vouching for their identity.
  • api: first seen on a booking created through this API.
  • website_newsletter: first seen signing up to the newsletter on the restaurant’s website.
string
Allowed values: manual widget import host_assertion api website_newsletter
marketing_email_consent
required

Whether the guest agreed to receive marketing e-mail from the restaurant.

boolean
marketing_email_consent_at

When marketing_email_consent last became true, ISO 8601 with the restaurant’s UTC offset. null while consent is false.

string format: date-time
nullable
marketing_sms_consent
required

Whether the guest agreed to receive marketing text messages from the restaurant.

boolean
marketing_sms_consent_at

When marketing_sms_consent last became true, ISO 8601 with the restaurant’s UTC offset. null while consent is false.

string format: date-time
nullable
visit_count
required

How many of the guest’s bookings ended with them seated (seated, partially_seated or completed). Recomputed hourly, so it can trail a visit by up to about two hours.

integer
no_show_count
required

How many of the guest’s bookings ended no_show. Recomputed like visit_count.

integer
cancellation_count
required

How many of the guest’s bookings were cancelled, counting only bookings whose time has passed — a cancelled booking for next month is not counted until then. Recomputed like visit_count.

integer
first_visit_at

When the guest’s earliest visit (a booking counted in visit_count) started: ISO 8601 with the restaurant’s UTC offset, on the calendar day it actually started — a seating after midnight carries the next day’s date. null until they have one. Recomputed like visit_count.

string format: date-time
nullable
last_visit_at

When the guest’s latest visit started, in the same format as first_visit_at. null until they have one. Recomputed like visit_count.

string format: date-time
nullable
created_at
required

When the profile was created: ISO 8601 with the restaurant’s UTC offset.

string format: date-time
updated_at
required

When the profile last changed, in the same format. The value updated_since compares against.

string format: date-time
has_more
required
boolean
Example
{
"object": "list",
"data": [
{
"object": "guest",
"language": "fr",
"source": "manual"
}
]
}
Service-Version
string

Dated API version applied to this response

The Service-Version header names a version we do not publish

Media typeapplication/json

The envelope every public-API error answers with, whatever the status.

object
error
required

Every error response carries this one object.

object
type
required

The broad class of the error, from the HTTP status.

  • invalid_request_error: a 400, 403, 404, 409 or 422 — something about the request to change.
  • authentication_error: a 401 — the key is missing, invalid, revoked or expired.
  • rate_limit_error: a 429 — slow down and retry.
  • api_error: any other status, a fault on our side.
string
Allowed values: invalid_request_error authentication_error rate_limit_error api_error
code
required

The specific error, stable and machine-readable, e.g. not_found. Branch on this, not on message.

string
message
required

A human-readable explanation for the developer. Its wording can change.

string
param

The request parameter the error is about, when there is one — e.g. expand or limit. Absent — not null — when the error names no field.

string
doc_url
required

A link to this code in the errors reference. Always present.

string
Example
{
"error": {
"type": "invalid_request_error"
}
}
X-Request-Id
string

Unique id for this request. Quote it to support: it is how a specific call is found in our logs. Generated per request, or echoed from the X-Request-Id you sent.

Missing or invalid API key

Media typeapplication/json

The envelope every public-API error answers with, whatever the status.

object
error
required

Every error response carries this one object.

object
type
required

The broad class of the error, from the HTTP status.

  • invalid_request_error: a 400, 403, 404, 409 or 422 — something about the request to change.
  • authentication_error: a 401 — the key is missing, invalid, revoked or expired.
  • rate_limit_error: a 429 — slow down and retry.
  • api_error: any other status, a fault on our side.
string
Allowed values: invalid_request_error authentication_error rate_limit_error api_error
code
required

The specific error, stable and machine-readable, e.g. not_found. Branch on this, not on message.

string
message
required

A human-readable explanation for the developer. Its wording can change.

string
param

The request parameter the error is about, when there is one — e.g. expand or limit. Absent — not null — when the error names no field.

string
doc_url
required

A link to this code in the errors reference. Always present.

string
Example
{
"error": {
"type": "invalid_request_error"
}
}

API key lacks the guests:read scope

Media typeapplication/json

The envelope every public-API error answers with, whatever the status.

object
error
required

Every error response carries this one object.

object
type
required

The broad class of the error, from the HTTP status.

  • invalid_request_error: a 400, 403, 404, 409 or 422 — something about the request to change.
  • authentication_error: a 401 — the key is missing, invalid, revoked or expired.
  • rate_limit_error: a 429 — slow down and retry.
  • api_error: any other status, a fault on our side.
string
Allowed values: invalid_request_error authentication_error rate_limit_error api_error
code
required

The specific error, stable and machine-readable, e.g. not_found. Branch on this, not on message.

string
message
required

A human-readable explanation for the developer. Its wording can change.

string
param

The request parameter the error is about, when there is one — e.g. expand or limit. Absent — not null — when the error names no field.

string
doc_url
required

A link to this code in the errors reference. Always present.

string
Example
{
"error": {
"type": "invalid_request_error"
}
}

Too many requests on the read budget

Media typeapplication/json

The envelope every public-API error answers with, whatever the status.

object
error
required

Every error response carries this one object.

object
type
required

The broad class of the error, from the HTTP status.

  • invalid_request_error: a 400, 403, 404, 409 or 422 — something about the request to change.
  • authentication_error: a 401 — the key is missing, invalid, revoked or expired.
  • rate_limit_error: a 429 — slow down and retry.
  • api_error: any other status, a fault on our side.
string
Allowed values: invalid_request_error authentication_error rate_limit_error api_error
code
required

The specific error, stable and machine-readable, e.g. not_found. Branch on this, not on message.

string
message
required

A human-readable explanation for the developer. Its wording can change.

string
param

The request parameter the error is about, when there is one — e.g. expand or limit. Absent — not null — when the error names no field.

string
doc_url
required

A link to this code in the errors reference. Always present.

string
Example
{
"error": {
"type": "invalid_request_error"
}
}
RateLimit-Limit
integer

Requests permitted in the read burst

RateLimit-Remaining
integer

Requests remaining in the read burst

RateLimit-Reset
integer

Seconds until the read bucket refills

RateLimit-Resource
string

Which budget the numbers describe. read here.

Retry-After
integer

Seconds to wait before retrying

X-Request-Id
string

Unique id for this request. Quote it to support: it is how a specific call is found in our logs. Generated per request, or echoed from the X-Request-Id you sent.