Get booking details

Bookings

get/api/bookings/{pcode}/detail/{bookingId}x-api-key

Retrieve everything the PMS holds about one booking: holder and guests, assigned room, dates and times, price and amounts, board and cancellation policy, occupancy, source channel, notes, housekeeping, tasks, the pack it was sold with and its segments. Money is always in the property's own currency. A cancelled booking says when it was cancelled in cancelledAt, read from its history. The ID of a block (a room closed by the staff) also answers here: it comes with bookingType, no customer, bookingStatus cancelled and cancelledAt null. What it does NOT include, because each has its own endpoint: the charge breakdown (/products), payments, invoices, proformas and deposits. Booking IDs come from the search endpoints or from the response of the creation endpoint.

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

gethttps://uni-api.hotelgest.com/api/bookings/123456/detail/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.

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

id
number

Unique booking ID

pcode
number

Property code (identifies which hotel/property this booking belongs to)

groupId
number

Group ID if this booking is part of a multi-room group reservation. All bookings in the same group share this ID. Absent for an individual booking

groupPrice
number

Total of the whole group reservation, extras included, as the legacy stores it on each member. Only on group bookings

groupQuantity
number

Number of rooms in the group reservation. Only on group bookings

start
string

Check-in date (YYYY-MM-DD)

end
string

Check-out date (YYYY-MM-DD)

arrivalHour
string

Expected arrival time as the guest or channel wrote it. Usually HH:mm, but it is free text: it may be H:mm, HH:mm:ss or a sentence that contains a time. Absent when the field holds no time at all

departureHour
string

Expected departure time, same rules as arrivalHour. Absent when the field holds no time at all

nights
number

Total number of nights for the stay

appUrl
stringDeprecated

Deprecated: the link to the previous guest web app, retired in November 2026. It no longer opens the booking: it leads to a page that offers the guest, once verified, the link to the new guest web app by email. It will be removed. The new link carries access to the stay, so no API hands it out: the property sends it to the guest.

createdAt
string

Date the booking was received (YYYY-MM-DD), without time

resource
stringDeprecated

Internal planning key, <roomTypeId>_<roomId>, or <roomTypeId>_PLAYGROUND when no room is assigned. Read room instead

price
number

Price of this booking. For an individual booking it is the booking total as the legacy stores it (accommodation plus extras and taxes); for a member of a group it is the accommodation of this room. Use accommodationPrice for the accommodation alone

accommodationPrice
number

Accommodation price of this booking, without extras, for both individual and group bookings. Null when the legacy holds no amount

paid
number

Amount already paid. On a group booking it is the paid amount of the whole group, repeated on every member. Null when the legacy holds no value

totalExtras
number

Total of the extra services/products. On a group booking it is the total of the whole group, repeated on every member

canceledCost
number

Amount the hotel keeps from a cancelled or no-show booking, or from an early departure (a confirmed booking with a value above 0). Absent when the booking has none

earlyDepartureOriginalEnd
string

Departure date (YYYY-MM-DD) the booking had before an early departure shortened it. Only in the booking detail, and only for a confirmed booking with a retained amount whose history records it

cancelledAt
string

When the booking was cancelled, ISO 8601 in UTC; on a cancelled, no-show or temporary-cancelled booking; null on any other, and on a block, although a block reads bookingStatus cancelled. When it entered the cancellation it is in now: the first cancellation its history records after the last status change that brought it back, so a cancellation recorded again later (a channel manager notifying it twice) does not move it; never later than the last change of the booking. A booking whose history records no cancellation (some imported or very old ones) gives its last change instead, which any edit after the cancellation moves. Only in the booking detail

locked
boolean

Whether the booking is locked (prevents modifications)

color
string

Display color for this booking in the calendar view (hex code). Absent when not set

imported
boolean

Whether this booking was imported from an external system or channel manager

BookingBoard

Meal plan / board type: nb (no board), bb (bed & breakfast), hb (half board), fb (full board), ai (all inclusive). A booking the legacy recorded as sold inside a pack may carry pack instead

policy
string

Cancellation policy ID, as a string: 4 (flexible cancellation) and 6 (non-refundable) are the built-in ones; any other value is a custom policy of the property (see GET /api/properties/{pcode}/settings/custom-policies). Absent when the booking has none

gbrRoomDto

Room assignment details (room ID, room type ID)

locator
string

Booking locator / confirmation code — the channel reservation code shared with the guest and OTAs. Absent when there is none

packId
number

ID of the pack the booking was sold with. Only in the booking detail and in /search/only-groups; never in /search or /search/only-single

gbrPackInfoDto

The pack the booking was sold with. Only in the booking detail, and only when packId points to a pack that still exists

gbrCustomerDto

Main guest / booking holder. Absent on a block (see bookingType)

companyId
number

ID of the company associated with this booking (for corporate/business bookings). Absent when there is none

gbrNotesDto

Notes associated with the booking (guest requests, internal notes)

gbrOccupancyDto

Number of guests for this individual room (adults, children, babies)

gbrOccupancyDto

Total occupancy across all rooms in the group. Only on group bookings

otaId
number

OTA / channel the booking came from. Use the GET /api/otas endpoint to get its name. Null when the legacy holds no channel

CheckInStatus

Check-in status: waiting-check-in, checked-in, checked-out, or cancelled (every booking whose bookingStatus is cancelled, blocks included)

BookingStatus

Booking status: ready (confirmed), tentative (held until its release date), cancelled, no-show, or temporary-cancelled. A block (see bookingType) also reads cancelled

releaseDateTentative
string

Date and time (YYYY-MM-DD HH:mm) at which a tentative booking is released if not confirmed. Only on tentative bookings

gbrVirtualPaymentDto

Virtual payment details (e.g. virtual credit card from an OTA). Absent when the booking has none

PaymentStatus

Overall payment status: no-paid, parcial-paid, paid, or over-paid

InvoiceStatus

Invoice status: no-invoiced, parcial-invoiced, or invoiced

gbrBookingTypeDto

Present only on a block — a room closed by the staff, not a sale. Absent on every booking

gbrToDosDto

Tasks/to-do items linked to this booking (e.g. prepare welcome gift, arrange transfer)

gbrGuestDto[]

Guests registered on this booking, sorted by position. Empty when there are none. Each one carries personal data from the identity document

isSaleDirect
boolean

Whether this is a direct sale (booked directly with the hotel, not through an OTA)

gbrHousekeepingDto

Housekeeping schedule and cleaning configuration for this booking

gbrSegmentRefDto[]

Segments assigned to the booking itself. Only in the booking detail

gbrSegmentRefDto[]

Segments assigned to the holder and guests of the booking. Only in the booking detail

segmentApplyScope
enum

Where the segments of the booking apply: booking, customer or both. Only in the booking detail, where it is null when the booking has no segments

One of:bookingcustomerboth

Example response
1{
2 "id": 789,
3 "pcode": 123456,
4 "groupId": 4521,
5 "groupPrice": 200,
6 "groupQuantity": 2,
7 "start": "2026-10-01",
8 "end": "2026-10-05",
9 "arrivalHour": "14:00",
10 "departureHour": "12:00",
11 "nights": 4,
12 "appUrl": "https://guest.hotelgest.com/?t=AbCdEf123",
13 "createdAt": "2026-09-30",
14 "resource": "1_12",
15 "price": 100,
16 "accommodationPrice": 100,
17 "paid": 100,
18 "totalExtras": 20,
19 "canceledCost": 45,
20 "earlyDepartureOriginalEnd": "2026-10-07",
21 "cancelledAt": "2026-09-21T08:00:00.000Z",
22 "locked": false,
23 "color": "#FF5733",
24 "imported": false,
25 "board": {},
26 "policy": "4",
27 "room": {
28 "id": 12,
29 "roomTypeId": 1,
30 "originalRoomTypeId": 1
31 },
32 "locator": "HG-4F7A2C",
33 "packId": 7,
34 "packInfo": {
35 "id": 7,
36 "translations": {
37 "en": {
38 "name": "Romantic getaway",
39 "description": "Two nights with dinner included"
40 }
41 },
42 "dtype": -1,
43 "value": 10,
44 "price": 0,
45 "weekday": [
46 "Fri",
47 "Sat"
48 ],
49 "products": [
50 {
51 "productId": 15,
52 "value": 30
53 }
54 ]
55 },
56 "customer": {
57 "id": 1234,
58 "name": "John",
59 "surname": "Doe",
60 "documentType": "D",
61 "documentNumber": "A12345678",
62 "address": "123 Main St",
63 "city": "New York",
64 "postalCode": "10001",
65 "country": "ESP",
66 "province": "madrid",
67 "email": "john.doe@example.com",
68 "phone": "+1 (555) 123-4567",
69 "language": "es",
70 "documentPortrait": "/document-portrait/MTIzNA==.jpg",
71 "documentFront": "/document-front/MTIzNA==.jpg",
72 "documentBack": "/document-back/MTIzNA==.jpg",
73 "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ",
74 "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ",
75 "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA",
76 "notes": "VIP customer",
77 "bookingId": 789,
78 "loyalty": "GOLD-123"
79 },
80 "companyId": 12,
81 "notes": {
82 "request": "Late check-in, extra pillow",
83 "internal": "Guest prefers a quiet room",
84 "flat": "No special requests"
85 },
86 "occupancy": {
87 "adults": 2,
88 "children": 2,
89 "babies": 1,
90 "total": 5
91 },
92 "groupOccupancy": {
93 "adults": 2,
94 "children": 2,
95 "babies": 1,
96 "total": 5
97 },
98 "otaId": 3,
99 "checkInStatus": "checked-in",
100 "bookingStatus": "ready",
101 "releaseDateTentative": "2026-10-01 18:00",
102 "virtualPayment": {
103 "type": {},
104 "amount": 100
105 },
106 "paymentStatus": {},
107 "invoiceStatus": {},
108 "bookingType": {
109 "label": "Painting",
110 "type": "bloqued-out-order",
111 "typeV2": {}
112 },
113 "toDos": {
114 "data": [
115 {
116 "id": 1,
117 "pcode": 123456,
118 "name": "Prepare welcome gift",
119 "active": "2026-01-01",
120 "start": "2026-01-01",
121 "end": "2026-01-02",
122 "bookingId": 1,
123 "checked": true
124 }
125 ],
126 "pendings": 5,
127 "total": 10
128 },
129 "guests": [
130 {
131 "id": 1234,
132 "name": "John",
133 "surname": "Doe",
134 "documentType": "D",
135 "documentNumber": "A12345678",
136 "address": "123 Main St",
137 "city": "New York",
138 "postalCode": "10001",
139 "country": "ESP",
140 "province": "madrid",
141 "email": "john.doe@example.com",
142 "phone": "+1 (555) 123-4567",
143 "language": "es",
144 "documentPortrait": "/document-portrait/MTIzNA==.jpg",
145 "documentFront": "/document-front/MTIzNA==.jpg",
146 "documentBack": "/document-back/MTIzNA==.jpg",
147 "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ",
148 "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ",
149 "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA",
150 "notes": "VIP customer",
151 "bookingId": 789,
152 "sex": "M",
153 "nationality": "ESP",
154 "issuingState": "ESP",
155 "birthDate": "1985-04-12",
156 "placeOfBirth": "Barcelona",
157 "expirationDate": "2030-04-12",
158 "issueDate": "2020-04-12",
159 "municipality": "barcelona",
160 "placeOfOrigin": "Madrid",
161 "destinationPlace": "Valencia",
162 "position": 1,
163 "documentSupport": "BAA123456",
164 "relationship": "HJ",
165 "signatureImagePath": "/api/bookings/123456/customer-image/Nzg5OnNpZ25hdHVyZToxMjM0"
166 }
167 ],
168 "isSaleDirect": true,
169 "housekeeping": {
170 "dateToClean": "2026-10-01",
171 "quantityNightsClean": 2,
172 "weekDaysClean": {
173 "mon": true,
174 "tue": true,
175 "wed": true,
176 "thu": true,
177 "fri": true,
178 "sat": true,
179 "sun": true
180 }
181 },
182 "segmentsOnBooking": [
183 {
184 "id": 3,
185 "name": "Corporate"
186 }
187 ],
188 "segmentsOnCustomer": [
189 {
190 "id": 3,
191 "name": "Corporate"
192 }
193 ],
194 "segmentApplyScope": "booking"
195}

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.