Update Guest

Update the ID document and personal details of one guest on a stay, for example after collecting a passport for local guest registration. guest_id is guests[].id from Query Reservations.

The change is saved to the guest's profile in Hostex, not only to this stay: if the same guest is linked to other stays, they show the new values too. Fields you leave out are unchanged. Values cannot be cleared through this endpoint; null or an empty string is rejected. id_number must be sent together with id_type. Changing name also stops later channel syncs from overwriting the guest's name, the same as editing the name in the Hostex web app. Other fields synced from channels only fill in empty values, so they do not overwrite what you write here.

Returns 404 when the stay does not exist, or when the guest is not linked to this stay or belongs to another account.

Path Params
string
required

The code of the stay.

integer
required

The guest ID, guests[].id returned by Query Reservations.

Body Params

Send at least one field. Omitted fields are unchanged; null or empty values are rejected.

string
enum

ID document type. Required when id_number is sent. gang_ao_tai_card (Hong Kong, Macao and Taiwan travel permit) and serviceman_card (Chinese military ID) are for mainland China; use others for documents not listed, such as a driving licence.

Allowed:
string
length ≤ 191

ID document number, up to 191 characters. Stored as sent (after trimming spaces at both ends).

string
length ≤ 191

Guest name, up to 191 characters.

string
enum

Guest gender, male or female. Omit to leave it unchanged; it cannot be reset to unknown.

Allowed:
date

Date of birth, YYYY-MM-DD. Must be after 1900-01-01 and not in the future. Returned as guests[].birthday by Query Reservations and List Guests exactly as written.

string

Nationality, ISO 3166-1 Alpha-2 (for example IT). Case-insensitive; stored in upper case.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json