Skip to main content
POST
Create a guest

Autorizări

Authorization
string
header
obligatoriu

An integration token, sent as Authorization: Bearer <token>.

A token belongs to one installation of an app. Someone at the property who may manage its integrations installs the app in Gridbeds, under Settings → Integrations, and issues the token there, granting the scopes the app requested or a subset of them. The token is shown once; issuing a new one revokes the previous one.

Every request reads and writes the data of the organization that installed the app, and nothing else. Each operation names the scope it requires. A token without that scope, and the token of an installation that is disabled or in error, are refused with 403; a token that is missing, unknown or revoked, and a user's own sign-in token, are refused with 401.

Anteturi

Idempotency-Key
string

A key of your choosing, such as a UUID, that makes a retry safe: for at least 24 hours the same key with the same body answers with the first response instead of repeating the write. Only a successful response is remembered; after a failure the same key may be tried again.

Maximum string length: 255

Corp

application/json

A guest to create.

first_name
string
obligatoriu

The guest's first name.

Maximum string length: 255
last_name
string
obligatoriu

The guest's last name.

Maximum string length: 255
email
string<email> | null

The guest's email address.

Maximum string length: 255
phone
string | null

The guest's phone number.

Maximum string length: 20
address
string | null

The street address.

Maximum string length: 255
city
string | null

The city.

Maximum string length: 100
country
string | null

The guest's country, as a two-letter ISO 3166-1 alpha-2 code.

Required string length: 2
language
string

The language the guest prefers to be written to in, as a language code such as en. Omit it for the default.

postal_code
string | null

The postal code.

Maximum string length: 20
codice_fiscale
string | null

The guest's Italian tax code (codice fiscale), for guests it applies to. Letters are upper-cased and spaces removed before it is checked.

document_type
enum<string> | null

The kind of identity document the guest travels on.

Opțiuni disponibile:
passport,
id_card,
driving_license,
null
document_number
string | null

The number of that document.

Maximum string length: 50
date_of_birth
string<date> | null

The guest's date of birth, as YYYY-MM-DD. Before today.

nationality
string | null

The guest's nationality, as a two-letter ISO 3166-1 alpha-2 code.

Required string length: 2
is_vip
boolean

Whether the guest is marked as a VIP. Defaults to false.

is_blacklisted
boolean

Whether the guest is blacklisted. Defaults to false.

Răspuns

The guest created.

data
Guest · object
obligatoriu
meta
object
obligatoriu