Get room availability

Rooms

get/api/v2/rooms/{pcode}/availabilityx-api-key

Which rooms are free for a date range. The answer comes in two maps, both keyed by roomTypeId: availables holds the types with rooms still free, each listing the rooms themselves, and notAvailables holds the types that are fully booked. A type appears in one or the other, never both; a type with no physical rooms appears in neither. It is availability by physical room: a booking occupies the room it is assigned to, so a booking with no room assigned yet takes nothing here, and a room whose only bookings in the range are out-of-order blocks is listed with locked: true — present, but not bookable. Dates work the way a hotel night does: a room whose guest leaves on your arrival date, or arrives on your departure date, counts as free — so a stay never blocks the day it ends. Pass bookingId when you are changing an existing booking, so its own room is not counted as occupied by itself and shows up as available. Availability is a snapshot and can change between this call and creating the booking; the creation endpoint checks it again — the room, and the units sold per night, which also counts bookings with no room assigned — and rejects the request if it no longer fits.

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/rooms/123456/availability

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

bookingId
number

Exclude this booking's room from the occupied count. Useful when modifying an existing reservation to see which rooms are still available

end
string

Check-out date (YYYY-MM-DD). A room occupied by a guest checking in on this day is considered available

start
string

Check-in date (YYYY-MM-DD). A room occupied by a guest checking out on this day is considered available

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

availables
object

Room types with at least one room that is not taken by a booking in the range, keyed by roomTypeId. Each entry lists those rooms; a room with locked: true is blocked out of order and cannot be booked, so a type can be here with nothing bookable. Empty object when there is none

notAvailables
object

Room types whose every room is taken by a booking in the requested date range, keyed by roomTypeId. Empty object when there is none

Example response
1{
2 "availables": {
3 "101": {
4 "id": 101,
5 "rooms": [
6 {
7 "id": 1,
8 "locked": false
9 },
10 {
11 "id": 2,
12 "locked": true
13 }
14 ]
15 },
16 "102": {
17 "id": 102,
18 "rooms": [
19 {
20 "id": 3,
21 "locked": false
22 }
23 ]
24 }
25 },
26 "notAvailables": {
27 "201": {
28 "id": 201
29 },
30 "202": {
31 "id": 202
32 }
33 }
34}

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.