Register a guest of a booking

Bookings

post/api/integrations/{pcode}/kiosk/guests/{bookingId}x-api-key

Saves one guest of the booking from the identity document the kiosk read: one call per guest, before checking the booking in with PUT /api/bookings/{pcode}/check-in-out/{bookingId}, which sends them to the police registration. Send holder: true for the guest the booking is for: their record on the booking is completed with the document instead of a second one being added. A companion goes to the first companion place, taking it over when the booking holds it by name only, or to the next free one. Only the people already on this booking are matched by their document, and sending a guest again updates them in place and answers the same guestId: it is safe to retry. The booking history credits each guest to your partner name. Fields you leave out keep what the booking already had. Dates go as YYYY-MM-DD and countries as ISO 3166-1 alpha-3. The signature and the document images are optional JPEGs as data URIs; the document images are kept only while the property stores them. Answers 409 kioskBookingCheckedOut once the booking is checked out, 409 kioskBookingNotActive for a cancelled booking, a no-show or a block, and 409 kioskInProgress while another kiosk write for the same booking runs — retry in a moment. The images go through an antivirus scan before anything is saved: 422 fileBlocked with its reason when it refuses one, 409 fileScanUnavailable when the scan cannot be done and 429 fileScanBusy with Retry-After when it is busy; nothing is saved in any of them. Partner keys only, with this endpoint granted to the connection.

Console

Runs against the API from your browser, with the same request your server will send.

Environment

Production

https://uni-api.hotelgest.com

Calls hit live data with your own API key. A POST, PUT, PATCH or DELETE here changes a real property.

Credentials

The API key, sent on every request. A property admin creates it in the PMS under Settings → API keys; a partner receives one per property when the property activates its integration. It works only for the property it was issued for, and only on the endpoints granted to it.

This endpoint needs a credential. Without it you will get a 401.

Stored in this browser only. Never sent anywhere but the API host above.

Path parameters

Body

Arm production

Writing methods are locked until you arm them. This is live hotel data.

POST is locked on production. Arm it above if you mean it.

posthttps://uni-api.hotelgest.com/api/integrations/123456/kiosk/guests/789

Send the request to see the real response here.

Nothing is mocked. What comes back is what the API returned.

Requests go straight from your browser to the API host above — nothing is proxied through this site.

Path parameters

pcode
number

Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for.

bookingId
number

Booking ID. Obtained from the search endpoints (GET /api/v2/bookings/{pcode}/search) or returned by the booking creation endpoint.

Request body

holder
boolean

This guest is who the booking is for. Their record on the booking is completed with the document, and the booking is put in their name. Leave it out, or false, for everybody else.

name
string

Given name, as the document prints it

surname
string

Surnames, as the document prints them

documentType
enum

P passport, D Spanish DNI, I identity card of another country, N Spanish residence permit (NIE), X foreign residence permit, C driving licence, MI undocumented minor

One of:PDCMIINXEIDXID50

documentNumber
string

Number of the document, up to 15 characters. Required except for MI

documentSupport
string

Support number of a Spanish DNI or NIE. The police registration refuses an adult with one of those documents without it

issuingState
string

Country that issued the document, ISO 3166-1 alpha-3

issueDate
string

Issue date, YYYY-MM-DD

expirationDate
string

Expiry date, YYYY-MM-DD

sex
enum

As the document prints it: M male, F female, O other

One of:MFO

birthDate
string

Date of birth, YYYY-MM-DD

nationality
string

Nationality, ISO 3166-1 alpha-3

country
string

Country of residence, ISO 3166-1 alpha-3. The nationality when left out

address
string
postalCode
string
city
string
province
string

Province, for a residence in Spain

municipality
string

Municipality, for a residence in Spain

email
string
phone
string
relationship
enum

Relationship to the holder, which the police registration asks for a minor: PM parent, TU guardian, HJ child, OT other…

One of:ABBABNCYCDHRHJPMNISBSGTIYNTUOT

signatureImage
string

The guest’s signature, a JPEG as a data URI

documentFrontImage
string

Front of the document, a JPEG as a data URI. Kept only while the property stores document images

documentBackImage
string

Back of the document, a JPEG as a data URI. Kept only while the property stores document images

documentPortraitImage
string

Photo of the document holder, a JPEG as a data URI. Kept only while the property stores document images

Example
1{
2 "holder": true,
3 "name": "Lucía",
4 "surname": "García López",
5 "documentType": "P",
6 "documentNumber": "XDC123456",
7 "documentSupport": "BAA000589",
8 "issuingState": "ESP",
9 "issueDate": "2021-05-19",
10 "expirationDate": "2031-05-19",
11 "sex": "F",
12 "birthDate": "1988-02-14",
13 "nationality": "ESP",
14 "country": "ESP",
15 "address": "Calle Mayor 1, 2º B",
16 "postalCode": "28013",
17 "city": "Madrid",
18 "province": "Madrid",
19 "municipality": "Madrid",
20 "email": "lucia@example.com",
21 "phone": "+34600000000",
22 "relationship": "AB",
23 "signatureImage": "string",
24 "documentFrontImage": "string",
25 "documentBackImage": "string",
26 "documentPortraitImage": "string"
27}

Responses

Ok. If your API key answers encrypted — every key issued now does, and every partner credential — this body arrives as the encryption envelope ({ crypto, protected, wrappedKey, iv, payload, tag }, a compact JWE), and the schema below is what its payload decrypts to. See https://public-api.hotelgest.com/public/guides/encryption

guestId
number

ID of the guest on the booking. The same one when the document was already on it: sending a guest again updates them in place

Example response
1{
2 "guestId": 4471203
3}

What is a pcode?

The property code. Every endpoint is scoped to one property, and your API key only works for the property it was issued for.

Rate limits

100 requests per minute per source IP, 120 per API key and 300 per property, each counted across every endpoint together — not per endpoint. Over any of them you get a 429 with the seconds to wait in Retry-After-<limit> (apikey-ip, apikey or apikey-pcode): stop and wait it out. Repeat offences on a key or a property are blocked for longer each time, up to 7 days.