Search group bookings only

Bookings

get/api/v2/bookings/{pcode}/search/only-groupsx-api-key

Same filters as /search, but it returns only multi-room reservations — and the response shape is different: each entry of data is a **group**, not a booking. A group carries its groupId, the bookings it is made of (one per room, sorted by booking ID) and how many there are. data holds up to **5 groups** per page, newest created first; total counts the matching groups, not the bookings inside them. The filters are matched against the individual bookings, so a group is returned when any of its rooms matches. The free text works differently from /search: it looks at the whole history (no 36-month window, no limit of customers), a numeric term matches a booking ID or locator that starts with it or the end of a phone number, and there is no exact-ID shortcut. As in /search, a non-numeric term shorter than 2 characters returns nothing, and the cancelled and no-show status filters both return both kinds.

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

Query parameters

gethttps://uni-api.hotelgest.com/api/v2/bookings/123456/search/only-groups

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.

Query parameters

value
string

Free-text search: holder name, surname, email and locator (by prefix), phone (by its end) and booking ID. See the endpoint description for how it matches

roomTypeId
number

Filter by room type ID

status
enum

Filter by one or more booking statuses. cancelled and no-show select the same bookings: either one returns both kinds. Default: every status, blocks excluded

One of:readytentativecancelledno-showtemporary-cancelled

offset
number

Pagination offset — number of records to skip. Default is 0

end
string

Filter bookings whose check-out date matches this exact date (YYYY-MM-DD)

start
string

Filter bookings whose check-in date matches this exact date (YYYY-MM-DD)

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

GetBookingSearchGroupDto[]

Groups matching the search criteria, up to 5 per page

total
number

Total number of groups matching the search criteria, ignoring pagination. Divide by the page size to know how many pages there are

Example response
1{
2 "data": [
3 {
4 "groupId": 4521,
5 "bookings": [
6 {
7 "id": 789,
8 "pcode": 123456,
9 "groupId": 4521,
10 "groupPrice": 200,
11 "groupQuantity": 2,
12 "start": "2026-10-01",
13 "end": "2026-10-05",
14 "arrivalHour": "14:00",
15 "departureHour": "12:00",
16 "nights": 4,
17 "appUrl": "https://guest.hotelgest.com/?t=AbCdEf123",
18 "createdAt": "2026-09-30",
19 "resource": "1_12",
20 "price": 100,
21 "accommodationPrice": 100,
22 "paid": 100,
23 "totalExtras": 20,
24 "canceledCost": 45,
25 "earlyDepartureOriginalEnd": "2026-10-07",
26 "cancelledAt": "2026-09-21T08:00:00.000Z",
27 "locked": false,
28 "color": "#FF5733",
29 "imported": false,
30 "board": {},
31 "policy": "4",
32 "room": {
33 "id": 12,
34 "roomTypeId": 1,
35 "originalRoomTypeId": 1
36 },
37 "locator": "HG-4F7A2C",
38 "packId": 7,
39 "packInfo": {
40 "id": 7,
41 "translations": {
42 "en": {
43 "name": "Romantic getaway",
44 "description": "Two nights with dinner included"
45 }
46 },
47 "dtype": -1,
48 "value": 10,
49 "price": 0,
50 "weekday": [
51 "Fri",
52 "Sat"
53 ],
54 "products": []
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 "pendings": 5,
116 "total": 10
117 },
118 "guests": [
119 {
120 "id": null,
121 "name": null,
122 "surname": null,
123 "documentType": null,
124 "documentNumber": null,
125 "address": null,
126 "city": null,
127 "postalCode": null,
128 "country": null,
129 "province": null,
130 "email": null,
131 "phone": null,
132 "language": null,
133 "documentPortrait": null,
134 "documentFront": null,
135 "documentBack": null,
136 "documentPortraitImagePath": null,
137 "documentFrontImagePath": null,
138 "documentBackImagePath": null,
139 "notes": null,
140 "bookingId": null,
141 "sex": null,
142 "nationality": null,
143 "issuingState": null,
144 "birthDate": null,
145 "placeOfBirth": null,
146 "expirationDate": null,
147 "issueDate": null,
148 "municipality": null,
149 "placeOfOrigin": null,
150 "destinationPlace": null,
151 "position": null,
152 "documentSupport": null,
153 "relationship": null,
154 "signatureImagePath": null
155 }
156 ],
157 "isSaleDirect": true,
158 "housekeeping": {
159 "dateToClean": "2026-10-01",
160 "quantityNightsClean": 2,
161 "weekDaysClean": {
162 "mon": null,
163 "tue": null,
164 "wed": null,
165 "thu": null,
166 "fri": null,
167 "sat": null,
168 "sun": null
169 }
170 },
171 "segmentsOnBooking": [
172 {
173 "id": null,
174 "name": null
175 }
176 ],
177 "segmentsOnCustomer": [
178 {
179 "id": null,
180 "name": null
181 }
182 ],
183 "segmentApplyScope": "booking"
184 }
185 ],
186 "total": 3
187 }
188 ],
189 "total": 12
190}

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.

Pagination

Search endpoints return a fixed page per endpoint; move with offset by the length of data until you reach total.

Webhooks beat polling

If you are polling a search endpoint on a timer, subscribe to a webhook instead. It is faster for you and much cheaper for the API.

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.