Aller au contenu

Retrieve a guest

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

Returns one guest profile from the restaurant’s guest book: names, contact details, the restaurant’s own flags (vip, blacklisted, allergies, dietary preferences, staff notes) and the counted visit history. The same object ?expand=guest embeds on a reservation.

Requires the guests:read scope; a key without it is refused 403 insufficient_scope, whatever else it carries.

Merged profiles resolve here. When two profiles are merged, the absorbed one’s gst_… keeps working and returns the SURVIVING profile — under the survivor’s own id, not the one you asked for. So an id you stored never breaks, and the way to notice a merge is that the id you get back differs from the one you sent. A guest.merged webhook announces it as it happens.

id
required
string

The guest’s public id, gst_…. The public id of a profile that has since been merged away also resolves, to the surviving profile.

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.

Guest found

Media typeapplication/json

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
Example
{
"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.

No API key, or not a live one

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.

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"
}
}

No such guest

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.