# Hotelgest Public API — complete reference Generated from the OpenAPI specification at https://public-api.hotelgest.com/specs/public.json Base URL: https://uni-api.hotelgest.com --- # Quickstart > From zero to a real response in four steps. Docs: https://public-api.hotelgest.com/public/guides/quickstart The Public API is a plain REST API over HTTPS. Everything is JSON, almost every endpoint is scoped to one property, and the only credential is a header. If you can send an HTTP request, you can integrate. 1. **Get an API key.** In the PMS, an admin opens Settings → API keys and generates one. The key belongs to a single property. Save the private key the panel shows you at that moment: responses come back encrypted, and that private key is what opens them — see Encrypted responses. 2. **Note your pcode.** The property code. It appears in the path of almost every endpoint, and your key only works for its own property — using another one returns 401, not 403. 3. **Call something harmless first.** GET /api/otas is the one endpoint with no pcode in its path: any valid key reads it, so it tells you at once whether your key and your network work. Then move to an endpoint of your property. 4. **Read before you write.** There is one environment and it holds real reservations. Build the read side first — search, availability, detail — and only then move on to the endpoints that change something. The console on this site keeps POST, PUT, PATCH and DELETE locked until you unlock them, for the same reason. ## Your first call ```bash curl -X GET 'https://uni-api.hotelgest.com/api/rooms/1234/types' \ -H 'x-api-key: YOUR_API_KEY' ``` Room types are a good first authenticated call: read-only and small. The roomTypeId values you get back are the keys of the availability maps and the room type filter of the search. With a key that answers encrypted, what arrives is the envelope; its payload decrypts to the room types. > **Note: Use the console on this site.** Every endpoint page has a console that sends the same request your server will send and prints the real response — the encrypted envelope, if your key answers encrypted; the console does not decrypt it. Paste your key once and it stays for the rest of the session. ## Where to go next - Reading a calendar: GET /api/v2/rooms/{pcode}/availability tells you what is free between two dates. - Listing reservations: GET /api/v2/bookings/{pcode}/search, filtered by date, status or free text. - Reacting to changes: register a webhook instead of polling that search endpoint on a timer. --- # Authentication > One header, `x-api-key`, for both APIs. Docs: https://public-api.hotelgest.com/public/guides/authentication One header, on every request: `x-api-key`. There is no login step and no token to refresh. A key can still stop working: when it is revoked, when it reaches a validity date set when it was issued, or — for a key that answers in plain JSON — when that scheme is retired. ## API keys A key is issued for one property: by one of its admins in the PMS, or — for a partner — when the property activates the partner’s integration in its Marketplace. A key may be limited to the endpoints chosen when it was issued. That is why a call can fail with 403 on a key that reads bookings perfectly well: the key is fine, but it was not granted that endpoint, and the 403 names it. A property’s own key also answers 403 when the property has no active API subscription. > **Important: Never ship a key to a browser.** An API key can read and write a property. It belongs on your server or in a secret store — never in front-end code, a mobile bundle, or a repository. If one leaks, revoke it and issue another. Limit what a leaked key can do by granting only the endpoints you use; an encrypted key is useless without its private key, which lives on your server too. ## When it fails ```json { "message": "Invalid ApiKey", "error": "Unauthorized", "statusCode": 401 } ``` `Invalid ApiKey` covers an unknown key and a key that belongs to a different property than the pcode in the path — check the pcode first, it is the usual one. Without the header at all, the message is `No valid API key or JWT token provided`. A key past its date, a retired plain-JSON key, and a partner connection that is paused or suspended each answer 401 with a message of their own that says so. --- # Pagination and limits > Fixed page sizes, an offset, and the ceilings you will hit. Docs: https://public-api.hotelgest.com/public/guides/pagination Search endpoints return `{ data, total }`. You move through the results with `offset`, and `total` tells you when to stop. There is no `limit` parameter: the page size is fixed per endpoint, and it is not the same number for all three. | Endpoint | Records per page | | --- | --- | | /api/v2/bookings/{pcode}/search | 20 | | /api/v2/bookings/{pcode}/search/only-single | 15 | | /api/v2/bookings/{pcode}/search/only-groups | 5 | > **Warning: Do not hardcode 20.** Advancing with `offset += 20` on the groups endpoint skips three quarters of the results in silence. Advance by the length of `data` you just received, and stop when `offset + data.length >= total`. ```javascript import { compactDecrypt, importPKCS8 } from 'jose' // The private key saved when the API key was created — see Encrypted responses. const privateKey = await importPKCS8(process.env.HOTELGEST_PRIVATE_KEY, 'RSA-OAEP-256') const open = async (e) => { const jwe = [e.protected, e.wrappedKey, e.iv, e.payload, e.tag].join('.') const { plaintext } = await compactDecrypt(jwe, privateKey) return JSON.parse(new TextDecoder().decode(plaintext)) } let offset = 0 const all = [] for (;;) { const url = new URL('https://uni-api.hotelgest.com/api/v2/bookings/1234/search') url.searchParams.set('offset', String(offset)) const envelope = await fetch(url, { headers: { 'x-api-key': process.env.HOTELGEST_API_KEY }, }).then((response) => response.json()) const { data, total } = await open(envelope) all.push(...data) offset += data.length // Both conditions matter: `total` ends a normal walk, and an empty page ends // one where rows moved underneath you between requests. if (data.length === 0 || offset >= total) break } ``` Node, with `jose`. Every key issued now answers encrypted, so each page is opened before `data` and `total` are read. A key issued before encryption answers in plain JSON: skip `open` and read the body as it comes. ## Rate limits | Counter | Ceiling | Scope | | --- | --- | --- | | Per source IP | 100 / minute | Every request from that IP, whatever the key or endpoint — usually the first one a client sending from a single server or serverless function meets | | Per API key | 120 / minute | All endpoints together, not per endpoint | | Per property | 300 / minute | Every key of that property — rotating keys buys nothing | > **Important: Repeat offences are blocked for longer.** Each limit counts in a 60-second window that starts with your first request, and every response tells you where you stand in `X-RateLimit-Limit-`, `X-RateLimit-Remaining-` and `X-RateLimit-Reset-` (seconds), where `` is `apikey-ip`, `apikey` or `apikey-pcode`. Going over one returns a 429 with the seconds to wait in `Retry-After-`, named after the limit you hit. The per-IP block lasts 60 seconds. The per-key and per-property blocks grow with every repeat offence, from 5 minutes up to 7 days, and the count of offences only resets after 14 days without going over. A request rejected by the per-IP limit still counts towards your key and your property: keep sending after a 429 and a one-minute block becomes one that lasts days. Stop every request in flight and wait out `Retry-After-`. --- # Errors > One envelope, and what each status actually means here. Docs: https://public-api.hotelgest.com/public/guides/errors A 4xx comes back in this shape. When the refusal has a reason of its own, `message` is a code such as `roomsNotAvailable` — branch on the code, never on prose: ```json { "message": "No valid API key or JWT token provided", "error": "Unauthorized", "statusCode": 401 } ``` Four variations. In a validation error `message` is an array of strings, one per rule that failed. A 500 carries only `statusCode`, `timestamp` and `path`. A 429 of the rate limiter arrives as plain text: what matters there is the `Retry-After-` header. And when a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done and you can retry in a few seconds; `outcomeUnknown` means it may have been done, so check before repeating it. ```json { "statusCode": 400, "error": "Bad Request", "message": [ "from must be a valid ISO 8601 date string", "name should not be empty" ] } ``` ```json { "statusCode": 409, "error": "Conflict", "message": "legacyTimeout", "fault": "outcomeUnknown" } ``` | Status | What it means here | | --- | --- | | 400 | The body or a query parameter failed validation. `message` names the fields. | | 401 | Missing, unknown, wrong-property, expired or retired credential, or a partner connection that is not active. Check the pcode before the key. | | 403 | The credential is valid but was not granted this endpoint — the message names it. For a property’s own key, also: the property has no active API subscription. | | 404 | No such route, or the record does not belong to that property. | | 409 | The request conflicts with the current state; `message` says how — for example `roomsNotAvailable` (nothing was created) or `creationInProgress` (a request with the same `Idempotency-Key` is still running). With `fault`, a system the API depends on failed instead: `dependency` (nothing was done; retry in a few seconds) or `outcomeUnknown` (it may have been done — `legacyTimeout`, `legacyFailed`: check before repeating it). | | 422 | `idempotencyKeyReused`: that `Idempotency-Key` was already used with a different body. | | 429 | Rate limited: 100 requests a minute per source IP, 120 per key and 300 per property, across every endpoint together. Read `Retry-After-` (the limit you hit is in the name), stop every request in flight and wait — repeat offences on a key or a property are blocked for longer each time. On the RMS push, a 429 with `rmsQueueFull` or `rmsQueueUnavailable` and `fault: dependency` means the queue is full or did not answer: nothing was stored, resend after the `Retry-After` seconds. | | 500 | Our fault, and the only 5xx the API answers. It is already in our error tracker; retry once, then tell support with the timestamp. | > **Warning: Retry a booking with an Idempotency-Key.** If a POST times out you do not know whether it landed. Send an `Idempotency-Key` header when you create bookings: a retry with the same key never creates the booking twice — it answers the same ids once the first request has finished. Without the header, search for the booking before sending it again. --- # Encrypted responses > Every key issued now answers encrypted. How to read what comes back, and by when. Docs: https://public-api.hotelgest.com/public/guides/encryption Every API key issued now answers encrypted. Nothing about the request changes — same URL, same `x-api-key` header, same parameters — but the body comes back as a sealed envelope that only the holder of the matching private key can open. A stolen key is then no longer enough to read anything. > **Note: Your current key keeps working — until a date.** A key issued before this change keeps answering in plain JSON, and every one of its responses carries `Sunset` and `Deprecation` headers with the date it stops being accepted. Moving over is creating a new key in the panel and switching to it: the old one goes on working while you deploy, so there is no outage in between. There is no in-place upgrade — a credential either answers in the clear or it does not. ## What a response looks like ```json { "crypto": { "version": 1, "keyId": "ck_9f2c41a08b7e5d3c62f1a4b8", "alg": "RSA-OAEP-256", "enc": "A256GCM" }, "protected": "eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIiwia2lkIjoi...", "wrappedKey": "Q2QwTXAveRyq-sJFH4QmHh60Ru99KWjknnNDywPFldlZ1SCH81JLY_J5qrky...", "iv": "x7HbQ2VtYmVkZGVk", "payload": "3kPq1mJ0aXNfaXNfdGhlX2NpcGhlcnRleHQ...", "tag": "bW5vdF9hX3JlYWxfdGFn" } ``` Every encrypted response has this shape, whatever the endpoint. HTTP status codes, rate limits and error handling are unchanged. > **Tip: It is a standard JWE.** Join `protected`, `wrappedKey`, `iv`, `payload` and `tag` with dots, in that order, and you have a compact JWE (RFC 7516). Hand it to the JOSE library of your language and you are done — there is nothing bespoke to implement. ## Opening it ```javascript import { compactDecrypt, importPKCS8 } from 'jose' const privateKey = await importPKCS8(pem, 'RSA-OAEP-256') const jwe = [e.protected, e.wrappedKey, e.iv, e.payload, e.tag].join('.') const { plaintext } = await compactDecrypt(jwe, privateKey) const data = JSON.parse(new TextDecoder().decode(plaintext)) ``` Node, with `jose`. `e` is the response body; `pem` is the private key you downloaded. ```python from jwcrypto import jwe, jwk import json key = jwk.JWK.from_pem(open('private.pem', 'rb').read()) token = '.'.join([e['protected'], e['wrappedKey'], e['iv'], e['payload'], e['tag']]) box = jwe.JWE() box.deserialize(token, key=key) data = json.loads(box.payload) ``` Python, with `jwcrypto`. ```php use phpseclib3\Crypt\RSA; $b64 = fn($s) => base64_decode(strtr($s, '-_', '+/')); // 1. unwrap the content key with your private key (OAEP, SHA-256 on both hashes) $rsa = RSA::loadPrivateKey(file_get_contents('private.pem')) ->withPadding(RSA::ENCRYPTION_OAEP) ->withHash('sha256') ->withMGFHash('sha256'); $cek = $rsa->decrypt($b64($e['wrappedKey'])); // 2. open the payload; the AAD is the protected header, exactly as it arrived $json = openssl_decrypt( $b64($e['payload']), 'aes-256-gcm', $cek, OPENSSL_RAW_DATA, $b64($e['iv']), $b64($e['tag']), $e['protected'] ); $data = json_decode($json, true); ``` PHP, with `phpseclib`. If you already use a JOSE library such as `web-token`, use that instead and skip both steps. > **Warning: PHP's built-in openssl will not do this.** `openssl_private_decrypt` with `OPENSSL_PKCS1_OAEP_PADDING` uses SHA-1 and gives you no way to change it, so it cannot unwrap an `RSA-OAEP-256` key and fails with a padding error. Use `phpseclib` or a JOSE library, as above. Google Apps Script has neither RSA-OAEP nor AES-GCM, and no npm, so the library goes into the project by hand. Add a script file named `forge`, write `var window = globalThis` on its first line and paste below it the content of `https://cdn.jsdelivr.net/npm/node-forge@1.4.3/dist/forge.min.js` — the bundle registers itself on `window`, which Apps Script does not have. Its SHA-256 is `a8b6d50267d709db0411a598efc4c57bffd6127f21410339f71c919e3bde725b`. Save the private key in Project Settings → Script properties as `HOTELGEST_PRIVATE_KEY`, never in the spreadsheet. Anyone who can edit the project can read those properties — for a script bound to the spreadsheet, anyone who can edit the spreadsheet: if that is more people than should read your bookings, decrypt on a server of your own instead and have the sheet call it. ```javascript // base64url without padding -> the binary string forge works with function fromBase64Url(s) { s = s.replace(/-/g, '+').replace(/_/g, '/') return forge.util.decode64(s + '===='.slice(s.length % 4 || 4)) } function openEnvelope(e) { if (!e.crypto) throw new Error('not an encrypted response') var pem = PropertiesService.getScriptProperties().getProperty('HOTELGEST_PRIVATE_KEY') var key = forge.pki.privateKeyFromPem(pem) // 1. unwrap the content key with your private key (OAEP, SHA-256 on both hashes) var cek = key.decrypt(fromBase64Url(e.wrappedKey), 'RSA-OAEP', { md: forge.md.sha256.create(), mgf1: { md: forge.md.sha256.create() }, }) // 2. open the payload; the AAD is the protected header, exactly as it arrived var decipher = forge.cipher.createDecipher('AES-GCM', cek) decipher.start({ iv: fromBase64Url(e.iv), additionalData: e.protected, tag: forge.util.createBuffer(fromBase64Url(e.tag)), }) decipher.update(forge.util.createBuffer(fromBase64Url(e.payload))) if (!decipher.finish()) throw new Error('the envelope does not verify') return JSON.parse(forge.util.decodeUtf8(decipher.output.getBytes())) } function fetchDecrypted(url, apiKey) { var res = UrlFetchApp.fetch(url, { headers: { 'x-api-key': apiKey } }) return openEnvelope(JSON.parse(res.getContentText())) } ``` Google Apps Script, with `node-forge`. Pure JavaScript, so it runs where there is no WebCrypto; on large responses expect it to take seconds, not milliseconds. To check the seal as below, with `e` the parsed response the header is `JSON.parse(forge.util.decodeUtf8(fromBase64Url(e.protected)))`. ## Check what it was sealed for Decrypting proves the body was not tampered with. It does NOT prove it is the answer to the request you just made: the same envelope, captured and sent to you again later, decrypts exactly the same. What rules that out is the protected header, and it only works if you look at it. ```javascript // The protected header is the AAD of the seal: if any of this were altered, decryption would // already have failed. So these values are trustworthy — what is left is to check they are yours. const header = JSON.parse(Buffer.from(envelope.protected, 'base64url').toString()) if (header.hg.req !== 'GET /api/v2/rooms/:pcode/availability') throw new Error('another endpoint') if (header.hg.pcode !== expectedPcode) throw new Error('another property') if (Date.now() / 1000 - header.hg.iat > 120) throw new Error('too old to be this answer') ``` `hg.req` is the endpoint that answered, `hg.pcode` the property the body is about, and `hg.iat` when it was sealed, in seconds. Two minutes is a starting point: make it as tight as your clock skew allows. ## What is not encrypted - **Errors.** A 401, a 404 or a 500 comes back as the same plain JSON it always did. The messages are generic and carry no data of yours. - **Binary bodies**, such as a guest document image. They are bytes with their own content type, ETag and caching, and wrapping them in a JSON envelope would break all three. - **Empty responses.** A `204` or a `304` has no body to seal. ## The private key > **Important: Downloaded once, and only once.** We never store your private key — not encrypted, not temporarily. It is shown once, when the pair is minted with your first encrypted key, and nowhere else: it cannot be sent to you again. Put it in your secret store the moment you get it. If it is lost, ask for a new pair to be issued and the old one revoked: there is no way to recover the one that is gone. **Pick your private key by the `keyId` in the envelope, not by configuration.** A new pair starts sealing the moment it is issued — there is no grace window — so code that holds a single hardcoded key stops being able to read anything until you deploy the new one. Code that keeps both and selects on `keyId` sees no interruption at all, which is the whole reason the field is there. ## When the old key ends A key that has been given a retirement date says so in the headers of every response it answers, long before it stops working. Watch for these in your own logs: ```http Deprecation: true Sunset: Thu, 15 Apr 2027 00:00:00 GMT Link: ; rel="sunset" ``` RFC 8594. After the date in `Sunset`, the key answers 401 with a message that says it has been retired. --- # Your own booking engine > Price, check and book from the hotel website with the property key: the same data as Hotelgest’s engine. Docs: https://public-api.hotelgest.com/public/guides/own-booking-engine For a hotel website that sells rooms with its own engine instead of Hotelgest’s. The prices, packs and promo codes come from the same service Hotelgest’s booking engine reads, so what your website shows is what the hotel set in the PMS; what changes is the credential, the key the hotel issues. Websites that called the old API (`api.hotelgest.com/v1/price/room`, `/v1/property/…`) move here. > **Warning: From your server, never from the browser.** The key opens the property’s data, so it lives on your server and your website talks to your server. The API refuses calls made from a browser on a domain that is not Hotelgest’s, on purpose: a key in front-end code is a key anyone can copy. ## The key, and what to grant it The hotel issues it in the PMS, under Settings → API keys, and chooses the endpoints it may call. The booking engine ones are only reachable when they are granted on purpose — a key issued without a selection does not reach them. Every key issued now answers encrypted: read the encryption guide before the first call. | Endpoint | What your engine uses it for | | --- | --- | | `GET /api/rooms/{pcode}/types` | Room types and their rooms: names, capacity and the ids everything else takes. | | `GET /api/properties/{pcode}/settings/custom-policies` | The names of the cancellation policies a rate refers to. | | `GET /api/direct-booking/{pcode}/prices` | The price of each rate for the stay, night by night, with the restrictions that decide whether it can be sold. | | `GET /api/direct-booking/{pcode}/packs` | The packs on sale. | | `GET /api/direct-booking/{pcode}/promo-codes` | Whether the code a guest typed exists, and what it takes off. | | `GET /api/v2/rooms/{pcode}/availability` | Which rooms are free, to pick the one you book. | | `POST /api/v5/bookings/{pcode}` | The booking. | ## From a search to a booking 1. **Price the stay.** Ask for prices with the arrival and the departure. The answer is keyed by room type; under `rate` each one lists its rates (room type, board, policy, guests) with the price of each night in `priceList`. Leave out the rates with `motor_excl` = `1`, the closed ones (`_closed` = `1`), the ones whose `_minstay` or `_maxstay` the stay does not meet (a `_maxstay` of `0` means no limit) and the ones where the stay starts on a date of `closedarrival` or ends on one of `closeddeparture`. The room type `price` leaves none of those out: recompute it from the rates you keep. 2. **Apply the promo code, if any.** Check it: an empty list means it does not exist. When it does, check `dfrom` and `dto` against the stay and apply `value` as `dtype` says: `0` an amount off each night, `-1` a percentage off the stay, `-2` an amount off the stay. 3. **Pick the room.** Availability lists the free rooms of each type. The prices answer also says how many are free, but the booking needs one in particular. 4. **Book.** Send the room, the rate and the night prices you showed. The booking checks availability again and is rejected whole if the room was taken meanwhile; send an `Idempotency-Key` so a retry never books twice. | In the booking (`rooms[]`) | Where it comes from | | --- | --- | | `rtcode`, `boardId`, `politicId` | The rate you sold: its `rtcode`, `board` and `policy`. | | `rcode` | A free room of that type, from availability. | | `adults`, `children`, `babies` | The guests; their total is the rate’s `occupancy`. | | `pax` | The total of guests, as text (kept for compatibility). Required. | | `ancillary` | The price of each night, from the rate’s `priceList`, keyed by date. | | `ancillaryWithDiscount` | With a promo code, the night prices after the discount: the booking total is their sum. | | `promoCode` | The code checked above, as `type-value-id-code`, where `type` is `fbn` for `dtype` `0`, `pbn` for `-1` and `ta` for `-2`. | | `promoCodeManual` | `{ "isActive": false }` unless reception applies a manual discount. Required. | > **Note: Prices are a snapshot.** They can change between the search and the booking — the hotel edits a rate, a channel sells the last room. Price again when the guest confirms if the search is old, and treat a rejected booking as “search again”, not as an error to show. --- # Webhooks > Get told when something happens instead of asking every minute. Docs: https://public-api.hotelgest.com/public/guides/webhooks A webhook is a URL of yours that the PMS calls with an HTTP POST when an event fires. You register it once per property, choose the events, and stop polling. ## Available events | Event | Fires when | | --- | --- | | bookings-added | A booking is created on the property — from the PMS, a channel, or the API. | > **Note: One event, for now.** That is the whole catalogue today. If you need an event that is not here, say so — the list is short because of demand, not design. ## Registering one ```bash curl -X POST 'https://uni-api.hotelgest.com/api/webhooks/1234' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Booking created → our CRM", "url": "https://example.com/hooks/hotelgest", "eventTypes": ["bookings-added"], "authentication": { "status": true, "username": "hotelgest", "password": "example-long-random-string" } }' ``` > **Warning: This one writes.** Creating a webhook takes effect immediately: the property starts sending events to your URL on the next booking. Have the endpoint up and answering 200 before you run this. Events are delivered only to properties whose plan includes the API add-on. > **Warning: Turn the basic auth on.** Your webhook URL is a public endpoint that accepts POSTs about real reservations. `authentication.status: true` with a long random password is the difference between a private notification and anyone who guesses the URL being able to feed you fake bookings. Register an `https://` URL: over plain `http://` the password and the bookings travel in clear. ## When deliveries fail 1. POST /api/webhooks/{pcode}/test sends a test payload and returns the status code, the response time and the error message of the attempt. Use it before blaming the PMS. 2. GET /api/webhooks/{pcode}/{id}/logs is the delivery history: every attempt with its payload, status code and error message. Any 2xx from your endpoint is recorded as `200`; an error status of yours is recorded as you sent it; when your endpoint could not be reached at all (refused connection, DNS, TLS), the status is `500` and the error message says why. 3. Each event is sent once and never retried: a failed delivery stays in the logs only, so reconcile with the booking search. 4. Disable rather than delete while you fix your side — a disabled webhook keeps its id, its logs and its configuration. > **Tip: Answer fast, work later.** Return 200 as soon as you have the payload and do the real work on a queue. The deliveries of a property go one after another, so a slow endpoint holds up the ones that come after it, on the busy morning when it matters most. --- # Get the property's basics `GET /api/properties/{pcode}/settings/lite` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-properties-pcode-settings-lite Auth: header `x-api-key` What an integration needs to know about the property to read its prices and bookings: its name and stars, where it is, the currency and time zone its prices and dates are in, whether those prices include tax, and its default arrival and departure times. The times, as hours of the day, are what applies to a booking that does not state its own: the booking endpoints return per-booking arrival and departure times only when someone has set them, so fall back to these when those come back empty. These two are `HH:mm`, and an empty string when the property has not set them either — then no default time applies. All of it rarely changes — fetch once and keep. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/properties/123456/settings/lite' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `arrivalHour` | string | yes | Default check-in time configured for the property (HH:mm). Empty string when the property has not set one | | `departureHour` | string | yes | Default check-out time configured for the property (HH:mm). Empty string when the property has not set one | | `name` | string | yes | Name of the property | | `stars` | number | yes | Star rating, when set | | `currency` | string | yes | Currency of its prices (ISO 4217). `EUR` when the property has none set | | `currencySymbol` | string | yes | Symbol of that currency, as the property shows it | | `timezone` | string | yes | Time zone of the property (IANA). Dates without a time, such as stay nights, are in it. `Europe/Madrid` when the property has none set | | `pricesIncludeTax` | boolean | yes | Whether the prices the property sets include tax. When false, tax is added on top | | `taxRate` | number | yes | VAT rate of the stay, in percent, when the property set one | | `country` | string | yes | Country (ISO 3166-1 alpha-3, as stored for the property). Null when not set | | `province` | string | yes | Province or region | | `city` | string | yes | City | | `address` | string | yes | Street address | | `postalCode` | string | yes | Postal code | | `latitude` | number | yes | Latitude, in decimal degrees | | `longitude` | number | yes | Longitude, in decimal degrees | ### 200 example ```json { "arrivalHour": "15:00", "departureHour": "11:00", "name": "Hotel Demo", "stars": 4, "currency": "EUR", "currencySymbol": "€", "timezone": "Europe/Madrid", "pricesIncludeTax": true, "taxRate": 10, "country": "ESP", "province": "Málaga", "city": "Nerja", "address": "Calle Mayor 1", "postalCode": "29780", "latitude": 36.74518, "longitude": -3.8818377 } ``` --- # Get custom cancellation policies `GET /api/properties/{pcode}/settings/custom-policies` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-properties-pcode-settings-custom-policies Auth: header `x-api-key` The cancellation policies this property has defined for itself, each with its ID and its name in every language the panel supports (all nine keys always present; an empty string where it has no translation). Use an ID from here as the `policy` of a room when creating a booking, and to resolve the `policy` that bookings come back with. The two built-in policies are NOT listed, because every property always has them: `4` (flexible cancellation) and `6` (non-refundable). Expect to see those two IDs on bookings even though they never appear in this response. Policies change rarely — fetch once and keep. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/properties/123456/settings/custom-policies' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `policy` | string | yes | Unique identifier of the custom cancellation policy. Note: built-in policies "4" (Flexible Cancellation) and "6" (Non-Refundable) are always available and will not appear in this list. | | `name` | PolicyDescriptionDto | yes | Policy name in every panel language. All nine keys are always present; a language with no translation is an empty string | | `name.ca` | string | yes | Policy name in Catalan | | `name.de` | string | yes | Policy name in German | | `name.en` | string | yes | Policy name in English | | `name.es` | string | yes | Policy name in Spanish | | `name.eu` | string | yes | Policy name in Basque | | `name.fr` | string | yes | Policy name in French | | `name.gl` | string | yes | Policy name in Galician | | `name.it` | string | yes | Policy name in Italian | | `name.ru` | string | yes | Policy name in Russian | ### 200 example ```json [ { "policy": "7", "name": { "ca": "Cancel·lació gratuïta fins a 7 dies abans", "de": "Kostenlose Stornierung bis 7 Tage vorher", "en": "Free cancellation up to 7 days before", "es": "Cancelación gratuita hasta 7 días antes", "eu": "Doan gabeko bertan behera uztea 7 egun lehenago", "fr": "Annulation gratuite jusqu'à 7 jours avant", "gl": "Cancelación gratuíta ata 7 días antes", "it": "Cancellazione gratuita fino a 7 giorni prima", "ru": "Бесплатная отмена за 7 дней" } } ] ``` --- # Get room availability `GET /api/v2/rooms/{pcode}/availability` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-v2-rooms-pcode-availability Auth: header `x-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. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `bookingId` | number | no | Exclude this booking's room from the occupied count. Useful when modifying an existing reservation to see which rooms are still available | | `end` | string | yes | Check-out date (YYYY-MM-DD). A room occupied by a guest checking in on this day is considered available | | `start` | string | yes | Check-in date (YYYY-MM-DD). A room occupied by a guest checking out on this day is considered available | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/v2/rooms/123456/availability?end=YYYY-MM-DD&start=YYYY-MM-DD' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `availables` | object | yes | 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 | yes | Room types whose every room is taken by a booking in the requested date range, keyed by roomTypeId. Empty object when there is none | ### 200 example ```json { "availables": { "101": { "id": 101, "rooms": [ { "id": 1, "locked": false }, { "id": 2, "locked": true } ] }, "102": { "id": 102, "rooms": [ { "id": 3, "locked": false } ] } }, "notAvailables": { "201": { "id": 201 }, "202": { "id": 202 } } } ``` --- # Get room types and rooms `GET /api/rooms/{pcode}/types` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-rooms-pcode-types Auth: header `x-api-key` The property's inventory: its room types and, inside each, the physical rooms that belong to it. A room type is what is sold (Double Standard, Suite) and carries its name and description in every supported language, its maximum occupancy and its display colour; a room is the physical unit (its number, floor and door) and carries the housekeeping status it is in right now — clean, dirty, inspected or in revision. The response is a map, not a list: keys are `roomTypeId`, and inside each type `rooms` is keyed by room ID. This is where the `roomTypeId` used to check availability and to create a booking comes from. Inventory changes rarely — fetch it once and keep it, but do not cache the housekeeping status, which changes through the day. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/rooms/123456/types' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body ### 200 example ```json { "101": { "id": 101, "name": { "en": "Single Room", "es": "Habitación Individual", "ca": "", "de": "", "it": "", "fr": "Chambre Simple", "eu": "", "gl": "", "pt": "" }, "description": { "en": "A room for one person", "es": "Una habitación para una persona", "ca": "", "de": "", "it": "", "fr": "Une chambre pour une personne", "eu": "", "gl": "", "pt": "" }, "position": 1, "occupancy": 1, "color": "#FF5733", "splits": { "1": { "name": "Standard", "color": "#33FF57" }, "2": { "name": "Deluxe", "color": "#3357FF" } }, "rooms": { "1": { "id": 1, "name": "101", "doorNum": "101", "roomTypeId": 101, "status": "dirty", "floor": 1, "position": 1 }, "2": { "id": 2, "name": "102", "doorNum": "102", "roomTypeId": 101, "status": "ready", "floor": 1, "position": 2, "dateToClean": "2026-01-11", "splitId": 1 } } } } ``` --- # Search bookings `GET /api/v2/bookings/{pcode}/search` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-v2-bookings-pcode-search Auth: header `x-api-key` Search and filter bookings for a property. Returns individual and group bookings together, one entry per booking, each with the same shape as the booking detail minus what only the detail reads. Every filter is optional: free text, room type, exact arrival date, exact departure date and status. Without `status` it returns ready, tentative, cancelled, no-show and temporary-cancelled bookings, never blocks. Results are ordered by booking ID, newest created first. How the free text (`value`) matches: name, surname, full name, email and locator by prefix, and the phone by its end; a term made only of digits matches a booking ID or locator that contains it and, failing that, the end of a phone number. A term that is not numeric and is shorter than 2 characters returns nothing. Three exceptions to keep in mind. First, a term made only of digits that is exactly a booking ID or a locator returns that single booking with `total: 1`, ignoring the room type, the dates and `offset`. Second, a text search looks first only at bookings that departed in the last 36 months, and goes through the whole history only when that finds nothing, no date filter was sent and the term has at least 3 characters or is numeric; a name search also considers at most 150 matching customers, so `total` can fall short of every possible match. Third, the `cancelled` and `no-show` status filters are the same filter: either of them returns both kinds. The response is `{ data, total }`: `data` holds up to **20 bookings** and `total` counts the matches ignoring pagination — walk the pages by adding 20 to `offset` until you have read `total` of them. To search only one kind, use `/search/only-single` or `/search/only-groups`. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `value` | string | no | 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 | no | Filter by room type ID. Get available room types from the GET /api/rooms/:pcode/types endpoint | | `status` | `ready`, `tentative`, `cancelled`, `no-show`, `temporary-cancelled` | no | Filter by one or more booking statuses (ready, tentative, cancelled, no-show, temporary-cancelled). Send multiple values to combine (e.g. status=ready&status=tentative). cancelled and no-show select the same bookings: either one returns both kinds. Default: every status, blocks excluded | | `offset` | number | no | Pagination offset — number of records to skip. Default is 0 | | `end` | string | no | Filter bookings whose check-out date matches this exact date (YYYY-MM-DD) | | `start` | string | no | Filter bookings whose check-in date matches this exact date (YYYY-MM-DD) | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/v2/bookings/123456/search' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | GetBookingResponseDto[] | yes | Bookings of this page, newest created first. Same shape as the booking detail, without what only the detail reads: no `packId`, `packInfo`, segments, `earlyDepartureOriginalEnd` nor the holder `loyalty`, and `housekeeping.dateToClean` is only the booking's own date. Empty when nothing matches | | `data[].id` | number | yes | Unique booking ID | | `data[].pcode` | number | yes | Property code (identifies which hotel/property this booking belongs to) | | `data[].groupId` | number | no | 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 | | `data[].groupPrice` | number | no | Total of the whole group reservation, extras included, as the legacy stores it on each member. Only on group bookings | | `data[].groupQuantity` | number | no | Number of rooms in the group reservation. Only on group bookings | | `data[].start` | string | yes | Check-in date (YYYY-MM-DD) | | `data[].end` | string | yes | Check-out date (YYYY-MM-DD) | | `data[].arrivalHour` | string | no | 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 | | `data[].departureHour` | string | no | Expected departure time, same rules as `arrivalHour`. Absent when the field holds no time at all | | `data[].nights` | number | yes | Total number of nights for the stay | | `data[].appUrl` | string | yes | 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. | | `data[].createdAt` | string | yes | Date the booking was received (YYYY-MM-DD), without time | | `data[].resource` | string | yes | Internal planning key, `_`, or `_PLAYGROUND` when no room is assigned. Read `room` instead | | `data[].price` | number | yes | 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 | | `data[].accommodationPrice` | number | yes | Accommodation price of this booking, without extras, for both individual and group bookings. Null when the legacy holds no amount | | `data[].paid` | number | yes | 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 | | `data[].totalExtras` | number | yes | Total of the extra services/products. On a group booking it is the total of the whole group, repeated on every member | | `data[].canceledCost` | number | no | 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 | | `data[].earlyDepartureOriginalEnd` | string | no | 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 | | `data[].cancelledAt` | string | no | 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 | | `data[].locked` | boolean | yes | Whether the booking is locked (prevents modifications) | | `data[].color` | string | no | Display color for this booking in the calendar view (hex code). Absent when not set | | `data[].imported` | boolean | yes | Whether this booking was imported from an external system or channel manager | | `data[].board` | `nb`, `bb`, `hb`, `fb`, `ai`, `pack` | yes | 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 | | `data[].policy` | string | no | 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 | | `data[].room` | gbrRoomDto | yes | Room assignment details (room ID, room type ID) | | `data[].room.id` | number | yes | ID of the assigned physical room. Null if no specific room has been assigned yet | | `data[].room.roomTypeId` | number | yes | ID of the room type for this booking. Use the GET /api/rooms/:pcode/types endpoint to get room type details | | `data[].room.originalRoomTypeId` | number | yes | Room type the booking was created with (before any room type change). Same as `roomTypeId` when it never changed | | `data[].locator` | string | no | Booking locator / confirmation code — the channel reservation code shared with the guest and OTAs. Absent when there is none | | `data[].packId` | number | no | 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` | | `data[].packInfo` | gbrPackInfoDto | no | The pack the booking was sold with. Only in the booking detail, and only when `packId` points to a pack that still exists | | `data[].packInfo.id` | number | yes | Pack ID (the same as `packId`) | | `data[].packInfo.translations` | object | yes | Pack name and description, keyed by the language code of each translation | | `data[].packInfo.dtype` | `0`, `-1`, `-2`, `1`, `2` | yes | How the pack modifies the price: 0 fixed price, -1 percentage discount, -2 fixed discount, 1 percentage increase, 2 fixed increase | | `data[].packInfo.value` | number | yes | Amount or percentage applied, depending on `dtype` | | `data[].packInfo.price` | number | yes | Price of the pack. 0 when not set | | `data[].packInfo.weekday` | `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`[] | no | Week days the pack applies to. Absent when it applies every day | | `data[].packInfo.products` | gbrPackProductDto[] | yes | Products included in the pack | | `data[].customer` | gbrCustomerDto | no | Main guest / booking holder. Absent on a block (see `bookingType`) | | `data[].customer.id` | number | yes | Unique ID of the customer record. Null only for a booking whose holder record is missing | | `data[].customer.name` | string | yes | First name. Empty string when it was not given | | `data[].customer.surname` | string | no | Last name / surname | | `data[].customer.documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | no | Type of identity document: P (passport), D (DNI), C (driving license), I (identity card), N (Spanish residence permit), X (foreign residence permit), MI (minor undocumented), E (other), IDX (foreigner ID), ID (identity card, legacy code), 50 (foreign tax ID). Absent when none of these was recorded | | `data[].customer.documentNumber` | string | no | Identity document number | | `data[].customer.address` | string | no | Street address | | `data[].customer.city` | string | no | City of residence | | `data[].customer.postalCode` | string | no | Postal / ZIP code | | `data[].customer.country` | string | no | Country code as stored, in uppercase. Usually ISO 3166-1 alpha-3 (ESP, USA, FRA); older records may hold another code | | `data[].customer.province` | string | no | Province or state, in lowercase | | `data[].customer.email` | string | no | Email address | | `data[].customer.phone` | string | no | Phone number as entered (may include the country code) | | `data[].customer.language` | string | no | Preferred language of the person, as a lowercase ISO 639-1 code. Usually one of ca, de, en, es, eu, fr, gl, it, ru, but any two-letter code the guest gave can appear (pt, nl, zh…). Absent when it is not known | | `data[].customer.documentPortrait` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the portrait image exists. Download it from `documentPortraitImagePath` instead | | `data[].customer.documentFront` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document front image exists. Download it from `documentFrontImagePath` instead | | `data[].customer.documentBack` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document back image exists. Download it from `documentBackImagePath` instead | | `data[].customer.documentPortraitImagePath` | string | no | Path on this API from which to download the portrait photo of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].customer.documentFrontImagePath` | string | no | Path on this API from which to download the front side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].customer.documentBackImagePath` | string | no | Path on this API from which to download the back side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].customer.notes` | string | no | Free-text internal notes kept on the customer record | | `data[].customer.bookingId` | number | yes | ID of the booking this record was read for | | `data[].customer.loyalty` | string | no | Loyalty / membership programme the holder belongs to, as the channel sent it. Only in the booking detail and in `/search/only-groups`; never in `/search` or `/search/only-single` | | `data[].companyId` | number | no | ID of the company associated with this booking (for corporate/business bookings). Absent when there is none | | `data[].notes` | gbrNotesDto | yes | Notes associated with the booking (guest requests, internal notes) | | `data[].notes.request` | string | yes | Guest request notes. Empty string when there are none | | `data[].notes.internal` | string | yes | Internal staff notes (only visible to hotel staff). Empty string when there are none | | `data[].notes.flat` | string | yes | Housekeeping notes. Empty string when there are none | | `data[].occupancy` | gbrOccupancyDto | yes | Number of guests for this individual room (adults, children, babies) | | `data[].occupancy.adults` | number | yes | Number of adult guests | | `data[].occupancy.children` | number | yes | Number of child guests | | `data[].occupancy.babies` | number | yes | Number of baby/infant guests | | `data[].occupancy.total` | number | yes | Total number of guests (adults + children + babies) | | `data[].groupOccupancy` | gbrOccupancyDto | no | Total occupancy across all rooms in the group. Only on group bookings | | `data[].groupOccupancy.adults` | number | yes | Number of adult guests | | `data[].groupOccupancy.children` | number | yes | Number of child guests | | `data[].groupOccupancy.babies` | number | yes | Number of baby/infant guests | | `data[].groupOccupancy.total` | number | yes | Total number of guests (adults + children + babies) | | `data[].otaId` | number | yes | OTA / channel the booking came from. Use the GET /api/otas endpoint to get its name. Null when the legacy holds no channel | | `data[].checkInStatus` | `waiting-check-in`, `checked-in`, `checked-out`, `cancelled` | yes | Check-in status: waiting-check-in, checked-in, checked-out, or cancelled (every booking whose `bookingStatus` is cancelled, blocks included) | | `data[].bookingStatus` | `ready`, `tentative`, `cancelled`, `no-show`, `temporary-cancelled` | yes | Booking status: ready (confirmed), tentative (held until its release date), cancelled, no-show, or temporary-cancelled. A block (see `bookingType`) also reads cancelled | | `data[].releaseDateTentative` | string | no | Date and time (YYYY-MM-DD HH:mm) at which a tentative booking is released if not confirmed. Only on tentative bookings | | `data[].virtualPayment` | gbrVirtualPaymentDto | no | Virtual payment details (e.g. virtual credit card from an OTA). Absent when the booking has none | | `data[].virtualPayment.type` | `directPayment`, `prePayment`, `partPayment` | yes | Type of virtual payment: directPayment, prePayment, or partPayment | | `data[].virtualPayment.amount` | number | yes | Amount collected by the channel, in the property currency. 0 for directPayment. Null when the channel did not report it | | `data[].paymentStatus` | `no-paid`, `parcial-paid`, `paid`, `over-paid` | yes | Overall payment status: no-paid, parcial-paid, paid, or over-paid | | `data[].invoiceStatus` | `no-invoiced`, `parcial-invoiced`, `invoiced` | yes | Invoice status: no-invoiced, parcial-invoiced, or invoiced | | `data[].bookingType` | gbrBookingTypeDto | no | Present only on a block — a room closed by the staff, not a sale. Absent on every booking | | `data[].bookingType.label` | string | yes | Reason the room was blocked, as the staff wrote it. Empty string when none | | `data[].bookingType.type` | `bloqued-out-order`, `bloqued_out_service` | yes | Legacy block type. Use typeV2 instead | | `data[].bookingType.typeV2` | `blocked-out-order`, `blocked-out-service` | yes | Block type: blocked-out-order (room blocked by staff) or blocked-out-service (room out of service) | | `data[].toDos` | gbrToDosDto | yes | Tasks/to-do items linked to this booking (e.g. prepare welcome gift, arrange transfer) | | `data[].toDos.data` | gbrToDoDto[] | yes | Tasks linked to this booking. Empty when there are none | | `data[].toDos.pendings` | number | yes | Number of tasks still pending (not yet completed) | | `data[].toDos.total` | number | yes | Total number of tasks for this booking | | `data[].guests` | gbrGuestDto[] | yes | Guests registered on this booking, sorted by `position`. Empty when there are none. Each one carries personal data from the identity document | | `data[].guests[].id` | number | yes | Unique ID of the customer record. Null only for a booking whose holder record is missing | | `data[].guests[].name` | string | yes | First name. Empty string when it was not given | | `data[].guests[].surname` | string | no | Last name / surname | | `data[].guests[].documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | no | Type of identity document: P (passport), D (DNI), C (driving license), I (identity card), N (Spanish residence permit), X (foreign residence permit), MI (minor undocumented), E (other), IDX (foreigner ID), ID (identity card, legacy code), 50 (foreign tax ID). Absent when none of these was recorded | | `data[].guests[].documentNumber` | string | no | Identity document number | | `data[].guests[].address` | string | no | Street address | | `data[].guests[].city` | string | no | City of residence | | `data[].guests[].postalCode` | string | no | Postal / ZIP code | | `data[].guests[].country` | string | no | Country code as stored, in uppercase. Usually ISO 3166-1 alpha-3 (ESP, USA, FRA); older records may hold another code | | `data[].guests[].province` | string | no | Province or state, in lowercase | | `data[].guests[].email` | string | no | Email address | | `data[].guests[].phone` | string | no | Phone number as entered (may include the country code) | | `data[].guests[].language` | string | no | Preferred language of the person, as a lowercase ISO 639-1 code. Usually one of ca, de, en, es, eu, fr, gl, it, ru, but any two-letter code the guest gave can appear (pt, nl, zh…). Absent when it is not known | | `data[].guests[].documentPortrait` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the portrait image exists. Download it from `documentPortraitImagePath` instead | | `data[].guests[].documentFront` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document front image exists. Download it from `documentFrontImagePath` instead | | `data[].guests[].documentBack` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document back image exists. Download it from `documentBackImagePath` instead | | `data[].guests[].documentPortraitImagePath` | string | no | Path on this API from which to download the portrait photo of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].guests[].documentFrontImagePath` | string | no | Path on this API from which to download the front side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].guests[].documentBackImagePath` | string | no | Path on this API from which to download the back side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].guests[].notes` | string | no | Free-text internal notes kept on the customer record | | `data[].guests[].bookingId` | number | yes | ID of the booking this record was read for | | `data[].guests[].sex` | `M`, `F`, `O` | no | Sex: M (male), F (female), O (other) | | `data[].guests[].nationality` | string | no | Nationality code, as stored (usually ISO 3166-1 alpha-3) | | `data[].guests[].issuingState` | string | no | Code of the state that issued the identity document, as stored | | `data[].guests[].birthDate` | string | no | Date of birth (YYYY-MM-DD) | | `data[].guests[].placeOfBirth` | string | no | Place of birth | | `data[].guests[].expirationDate` | string | no | Expiry date of the identity document (YYYY-MM-DD) | | `data[].guests[].issueDate` | string | no | Issue date of the identity document (YYYY-MM-DD) | | `data[].guests[].municipality` | string | no | Municipality, in lowercase | | `data[].guests[].placeOfOrigin` | string | no | Where the guest travels from, as recorded at check-in | | `data[].guests[].destinationPlace` | string | no | Where the guest travels to after the stay, as recorded at check-in | | `data[].guests[].position` | number | yes | Order of the guest within the booking. The list is sorted by it | | `data[].guests[].documentSupport` | string | no | Support number of the identity document (the Spanish DNI "IDESP" number) | | `data[].guests[].relationship` | `AB`, `BA`, `BN`, `CY`, `CD`, `HR`, `HJ`, `PM`, `NI`, `SB`, `SG`, `TI`, `YN`, `TU`, `OT` | no | Relationship of this guest to the holder: AB (grandparent), BA (great-grandparent), BN (great-grandchild), CY (spouse), CD (brother/sister-in-law), HR (sibling), HJ (child), PM (parent), NI (grandchild), SB (nephew/niece), SG (parent-in-law), TI (uncle/aunt), YN (son/daughter-in-law), TU (guardian), OT (other) | | `data[].guests[].signatureImagePath` | string | no | Path on this API from which to download the guest's signature image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].isSaleDirect` | boolean | yes | Whether this is a direct sale (booked directly with the hotel, not through an OTA) | | `data[].housekeeping` | gbrHousekeepingDto | yes | Housekeeping schedule and cleaning configuration for this booking | | `data[].housekeeping.dateToClean` | string | no | Next scheduled cleaning date (YYYY-MM-DD). In the booking detail and `/search/only-groups` it is the room's own date when it has one, otherwise the booking's; in `/search` and `/search/only-single` only the booking's. Absent when none is scheduled | | `data[].housekeeping.quantityNightsClean` | number | no | Clean the room every N nights (e.g. 2 = clean every other night). Absent when not set | | `data[].housekeeping.weekDaysClean` | gbrWeekDaysCleanDto | no | Weekly cleaning schedule — which days of the week the room should be cleaned. Absent when not set | | `data[].segmentsOnBooking` | gbrSegmentRefDto[] | no | Segments assigned to the booking itself. Only in the booking detail | | `data[].segmentsOnBooking[].id` | number | yes | Segment ID | | `data[].segmentsOnBooking[].name` | string | yes | Segment name | | `data[].segmentsOnCustomer` | gbrSegmentRefDto[] | no | Segments assigned to the holder and guests of the booking. Only in the booking detail | | `data[].segmentsOnCustomer[].id` | number | yes | Segment ID | | `data[].segmentsOnCustomer[].name` | string | yes | Segment name | | `data[].segmentApplyScope` | `booking`, `customer`, `both` | no | 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 | | `total` | number | yes | Number of bookings matching the search, ignoring pagination. With a free-text search it can fall short of every possible match (see the endpoint description); an exact booking ID or locator answers 1 | ### 200 example ```json { "data": [ { "id": 789, "pcode": 123456, "groupId": 4521, "groupPrice": 200, "groupQuantity": 2, "start": "2026-10-01", "end": "2026-10-05", "arrivalHour": "14:00", "departureHour": "12:00", "nights": 4, "appUrl": "https://guest.hotelgest.com/?t=AbCdEf123", "createdAt": "2026-09-30", "resource": "1_12", "price": 100, "accommodationPrice": 100, "paid": 100, "totalExtras": 20, "canceledCost": 45, "earlyDepartureOriginalEnd": "2026-10-07", "cancelledAt": "2026-09-21T08:00:00.000Z", "locked": false, "color": "#FF5733", "imported": false, "board": {}, "policy": "4", "room": { "id": 12, "roomTypeId": 1, "originalRoomTypeId": 1 }, "locator": "HG-4F7A2C", "packId": 7, "packInfo": { "id": 7, "translations": { "en": { "name": "Romantic getaway", "description": "Two nights with dinner included" } }, "dtype": -1, "value": 10, "price": 0, "weekday": [ "Fri", "Sat" ], "products": [ { "productId": 15, "value": 30 } ] }, "customer": { "id": 1234, "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "A12345678", "address": "123 Main St", "city": "New York", "postalCode": "10001", "country": "ESP", "province": "madrid", "email": "john.doe@example.com", "phone": "+1 (555) 123-4567", "language": "es", "documentPortrait": "/document-portrait/MTIzNA==.jpg", "documentFront": "/document-front/MTIzNA==.jpg", "documentBack": "/document-back/MTIzNA==.jpg", "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ", "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ", "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA", "notes": "VIP customer", "bookingId": 789, "loyalty": "GOLD-123" }, "companyId": 12, "notes": { "request": "Late check-in, extra pillow", "internal": "Guest prefers a quiet room", "flat": "No special requests" }, "occupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "groupOccupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "otaId": 3, "checkInStatus": "checked-in", "bookingStatus": "ready", "releaseDateTentative": "2026-10-01 18:00", "virtualPayment": { "type": {}, "amount": 100 }, "paymentStatus": {}, "invoiceStatus": {}, "bookingType": { "label": "Painting", "type": "bloqued-out-order", "typeV2": {} }, "toDos": { "data": [ { "id": 1, "pcode": 123456, "name": "Prepare welcome gift", "active": "2026-01-01", "start": "2026-01-01", "end": "2026-01-02", "bookingId": 1, "checked": true } ], "pendings": 5, "total": 10 }, "guests": [ { "id": 1234, "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "A12345678", "address": "123 Main St", "city": "New York", "postalCode": "10001", "country": "ESP", "province": "madrid", "email": "john.doe@example.com", "phone": "+1 (555) 123-4567", "language": "es", "documentPortrait": "/document-portrait/MTIzNA==.jpg", "documentFront": "/document-front/MTIzNA==.jpg", "documentBack": "/document-back/MTIzNA==.jpg", "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ", "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ", "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA", "notes": "VIP customer", "bookingId": 789, "sex": "M", "nationality": "ESP", "issuingState": "ESP", "birthDate": "1985-04-12", "placeOfBirth": "Barcelona", "expirationDate": "2030-04-12", "issueDate": "2020-04-12", "municipality": "barcelona", "placeOfOrigin": "Madrid", "destinationPlace": "Valencia", "position": 1, "documentSupport": "BAA123456", "relationship": "HJ", "signatureImagePath": "/api/bookings/123456/customer-image/Nzg5OnNpZ25hdHVyZToxMjM0" } ], "isSaleDirect": true, "housekeeping": { "dateToClean": "2026-10-01", "quantityNightsClean": 2, "weekDaysClean": { "mon": true, "tue": true, "wed": true, "thu": true, "fri": true, "sat": true, "sun": true } }, "segmentsOnBooking": [ { "id": 3, "name": "Corporate" } ], "segmentsOnCustomer": [ { "id": 3, "name": "Corporate" } ], "segmentApplyScope": "booking" } ], "total": 10 } ``` --- # Search individual bookings (no groups) `GET /api/v2/bookings/{pcode}/search/only-single` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-v2-bookings-pcode-search-only-single Auth: header `x-api-key` Same filters, same rules and same response shape as `/search` (read its description: the exact-ID shortcut, the 36-month window and the shared cancelled / no-show filter apply here too), but it leaves group bookings out: only reservations of a single room. Use it when a group of ten rooms would otherwise flood the results with ten entries that belong together. `data` holds up to **15 bookings** per page — a different page size from `/search`, so do not reuse the same paging step. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `value` | string | no | 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 | no | Filter by room type ID | | `status` | `ready`, `tentative`, `cancelled`, `no-show`, `temporary-cancelled` | no | 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 | | `offset` | number | no | Pagination offset — number of records to skip. Default is 0 | | `end` | string | no | Filter bookings whose check-out date matches this exact date (YYYY-MM-DD) | | `start` | string | no | Filter bookings whose check-in date matches this exact date (YYYY-MM-DD) | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/v2/bookings/123456/search/only-single' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | GetBookingResponseDto[] | yes | Bookings of this page, newest created first. Same shape as the booking detail, without what only the detail reads: no `packId`, `packInfo`, segments, `earlyDepartureOriginalEnd` nor the holder `loyalty`, and `housekeeping.dateToClean` is only the booking's own date. Empty when nothing matches | | `data[].id` | number | yes | Unique booking ID | | `data[].pcode` | number | yes | Property code (identifies which hotel/property this booking belongs to) | | `data[].groupId` | number | no | 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 | | `data[].groupPrice` | number | no | Total of the whole group reservation, extras included, as the legacy stores it on each member. Only on group bookings | | `data[].groupQuantity` | number | no | Number of rooms in the group reservation. Only on group bookings | | `data[].start` | string | yes | Check-in date (YYYY-MM-DD) | | `data[].end` | string | yes | Check-out date (YYYY-MM-DD) | | `data[].arrivalHour` | string | no | 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 | | `data[].departureHour` | string | no | Expected departure time, same rules as `arrivalHour`. Absent when the field holds no time at all | | `data[].nights` | number | yes | Total number of nights for the stay | | `data[].appUrl` | string | yes | 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. | | `data[].createdAt` | string | yes | Date the booking was received (YYYY-MM-DD), without time | | `data[].resource` | string | yes | Internal planning key, `_`, or `_PLAYGROUND` when no room is assigned. Read `room` instead | | `data[].price` | number | yes | 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 | | `data[].accommodationPrice` | number | yes | Accommodation price of this booking, without extras, for both individual and group bookings. Null when the legacy holds no amount | | `data[].paid` | number | yes | 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 | | `data[].totalExtras` | number | yes | Total of the extra services/products. On a group booking it is the total of the whole group, repeated on every member | | `data[].canceledCost` | number | no | 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 | | `data[].earlyDepartureOriginalEnd` | string | no | 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 | | `data[].cancelledAt` | string | no | 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 | | `data[].locked` | boolean | yes | Whether the booking is locked (prevents modifications) | | `data[].color` | string | no | Display color for this booking in the calendar view (hex code). Absent when not set | | `data[].imported` | boolean | yes | Whether this booking was imported from an external system or channel manager | | `data[].board` | `nb`, `bb`, `hb`, `fb`, `ai`, `pack` | yes | 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 | | `data[].policy` | string | no | 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 | | `data[].room` | gbrRoomDto | yes | Room assignment details (room ID, room type ID) | | `data[].room.id` | number | yes | ID of the assigned physical room. Null if no specific room has been assigned yet | | `data[].room.roomTypeId` | number | yes | ID of the room type for this booking. Use the GET /api/rooms/:pcode/types endpoint to get room type details | | `data[].room.originalRoomTypeId` | number | yes | Room type the booking was created with (before any room type change). Same as `roomTypeId` when it never changed | | `data[].locator` | string | no | Booking locator / confirmation code — the channel reservation code shared with the guest and OTAs. Absent when there is none | | `data[].packId` | number | no | 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` | | `data[].packInfo` | gbrPackInfoDto | no | The pack the booking was sold with. Only in the booking detail, and only when `packId` points to a pack that still exists | | `data[].packInfo.id` | number | yes | Pack ID (the same as `packId`) | | `data[].packInfo.translations` | object | yes | Pack name and description, keyed by the language code of each translation | | `data[].packInfo.dtype` | `0`, `-1`, `-2`, `1`, `2` | yes | How the pack modifies the price: 0 fixed price, -1 percentage discount, -2 fixed discount, 1 percentage increase, 2 fixed increase | | `data[].packInfo.value` | number | yes | Amount or percentage applied, depending on `dtype` | | `data[].packInfo.price` | number | yes | Price of the pack. 0 when not set | | `data[].packInfo.weekday` | `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`[] | no | Week days the pack applies to. Absent when it applies every day | | `data[].packInfo.products` | gbrPackProductDto[] | yes | Products included in the pack | | `data[].customer` | gbrCustomerDto | no | Main guest / booking holder. Absent on a block (see `bookingType`) | | `data[].customer.id` | number | yes | Unique ID of the customer record. Null only for a booking whose holder record is missing | | `data[].customer.name` | string | yes | First name. Empty string when it was not given | | `data[].customer.surname` | string | no | Last name / surname | | `data[].customer.documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | no | Type of identity document: P (passport), D (DNI), C (driving license), I (identity card), N (Spanish residence permit), X (foreign residence permit), MI (minor undocumented), E (other), IDX (foreigner ID), ID (identity card, legacy code), 50 (foreign tax ID). Absent when none of these was recorded | | `data[].customer.documentNumber` | string | no | Identity document number | | `data[].customer.address` | string | no | Street address | | `data[].customer.city` | string | no | City of residence | | `data[].customer.postalCode` | string | no | Postal / ZIP code | | `data[].customer.country` | string | no | Country code as stored, in uppercase. Usually ISO 3166-1 alpha-3 (ESP, USA, FRA); older records may hold another code | | `data[].customer.province` | string | no | Province or state, in lowercase | | `data[].customer.email` | string | no | Email address | | `data[].customer.phone` | string | no | Phone number as entered (may include the country code) | | `data[].customer.language` | string | no | Preferred language of the person, as a lowercase ISO 639-1 code. Usually one of ca, de, en, es, eu, fr, gl, it, ru, but any two-letter code the guest gave can appear (pt, nl, zh…). Absent when it is not known | | `data[].customer.documentPortrait` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the portrait image exists. Download it from `documentPortraitImagePath` instead | | `data[].customer.documentFront` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document front image exists. Download it from `documentFrontImagePath` instead | | `data[].customer.documentBack` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document back image exists. Download it from `documentBackImagePath` instead | | `data[].customer.documentPortraitImagePath` | string | no | Path on this API from which to download the portrait photo of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].customer.documentFrontImagePath` | string | no | Path on this API from which to download the front side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].customer.documentBackImagePath` | string | no | Path on this API from which to download the back side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].customer.notes` | string | no | Free-text internal notes kept on the customer record | | `data[].customer.bookingId` | number | yes | ID of the booking this record was read for | | `data[].customer.loyalty` | string | no | Loyalty / membership programme the holder belongs to, as the channel sent it. Only in the booking detail and in `/search/only-groups`; never in `/search` or `/search/only-single` | | `data[].companyId` | number | no | ID of the company associated with this booking (for corporate/business bookings). Absent when there is none | | `data[].notes` | gbrNotesDto | yes | Notes associated with the booking (guest requests, internal notes) | | `data[].notes.request` | string | yes | Guest request notes. Empty string when there are none | | `data[].notes.internal` | string | yes | Internal staff notes (only visible to hotel staff). Empty string when there are none | | `data[].notes.flat` | string | yes | Housekeeping notes. Empty string when there are none | | `data[].occupancy` | gbrOccupancyDto | yes | Number of guests for this individual room (adults, children, babies) | | `data[].occupancy.adults` | number | yes | Number of adult guests | | `data[].occupancy.children` | number | yes | Number of child guests | | `data[].occupancy.babies` | number | yes | Number of baby/infant guests | | `data[].occupancy.total` | number | yes | Total number of guests (adults + children + babies) | | `data[].groupOccupancy` | gbrOccupancyDto | no | Total occupancy across all rooms in the group. Only on group bookings | | `data[].groupOccupancy.adults` | number | yes | Number of adult guests | | `data[].groupOccupancy.children` | number | yes | Number of child guests | | `data[].groupOccupancy.babies` | number | yes | Number of baby/infant guests | | `data[].groupOccupancy.total` | number | yes | Total number of guests (adults + children + babies) | | `data[].otaId` | number | yes | OTA / channel the booking came from. Use the GET /api/otas endpoint to get its name. Null when the legacy holds no channel | | `data[].checkInStatus` | `waiting-check-in`, `checked-in`, `checked-out`, `cancelled` | yes | Check-in status: waiting-check-in, checked-in, checked-out, or cancelled (every booking whose `bookingStatus` is cancelled, blocks included) | | `data[].bookingStatus` | `ready`, `tentative`, `cancelled`, `no-show`, `temporary-cancelled` | yes | Booking status: ready (confirmed), tentative (held until its release date), cancelled, no-show, or temporary-cancelled. A block (see `bookingType`) also reads cancelled | | `data[].releaseDateTentative` | string | no | Date and time (YYYY-MM-DD HH:mm) at which a tentative booking is released if not confirmed. Only on tentative bookings | | `data[].virtualPayment` | gbrVirtualPaymentDto | no | Virtual payment details (e.g. virtual credit card from an OTA). Absent when the booking has none | | `data[].virtualPayment.type` | `directPayment`, `prePayment`, `partPayment` | yes | Type of virtual payment: directPayment, prePayment, or partPayment | | `data[].virtualPayment.amount` | number | yes | Amount collected by the channel, in the property currency. 0 for directPayment. Null when the channel did not report it | | `data[].paymentStatus` | `no-paid`, `parcial-paid`, `paid`, `over-paid` | yes | Overall payment status: no-paid, parcial-paid, paid, or over-paid | | `data[].invoiceStatus` | `no-invoiced`, `parcial-invoiced`, `invoiced` | yes | Invoice status: no-invoiced, parcial-invoiced, or invoiced | | `data[].bookingType` | gbrBookingTypeDto | no | Present only on a block — a room closed by the staff, not a sale. Absent on every booking | | `data[].bookingType.label` | string | yes | Reason the room was blocked, as the staff wrote it. Empty string when none | | `data[].bookingType.type` | `bloqued-out-order`, `bloqued_out_service` | yes | Legacy block type. Use typeV2 instead | | `data[].bookingType.typeV2` | `blocked-out-order`, `blocked-out-service` | yes | Block type: blocked-out-order (room blocked by staff) or blocked-out-service (room out of service) | | `data[].toDos` | gbrToDosDto | yes | Tasks/to-do items linked to this booking (e.g. prepare welcome gift, arrange transfer) | | `data[].toDos.data` | gbrToDoDto[] | yes | Tasks linked to this booking. Empty when there are none | | `data[].toDos.pendings` | number | yes | Number of tasks still pending (not yet completed) | | `data[].toDos.total` | number | yes | Total number of tasks for this booking | | `data[].guests` | gbrGuestDto[] | yes | Guests registered on this booking, sorted by `position`. Empty when there are none. Each one carries personal data from the identity document | | `data[].guests[].id` | number | yes | Unique ID of the customer record. Null only for a booking whose holder record is missing | | `data[].guests[].name` | string | yes | First name. Empty string when it was not given | | `data[].guests[].surname` | string | no | Last name / surname | | `data[].guests[].documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | no | Type of identity document: P (passport), D (DNI), C (driving license), I (identity card), N (Spanish residence permit), X (foreign residence permit), MI (minor undocumented), E (other), IDX (foreigner ID), ID (identity card, legacy code), 50 (foreign tax ID). Absent when none of these was recorded | | `data[].guests[].documentNumber` | string | no | Identity document number | | `data[].guests[].address` | string | no | Street address | | `data[].guests[].city` | string | no | City of residence | | `data[].guests[].postalCode` | string | no | Postal / ZIP code | | `data[].guests[].country` | string | no | Country code as stored, in uppercase. Usually ISO 3166-1 alpha-3 (ESP, USA, FRA); older records may hold another code | | `data[].guests[].province` | string | no | Province or state, in lowercase | | `data[].guests[].email` | string | no | Email address | | `data[].guests[].phone` | string | no | Phone number as entered (may include the country code) | | `data[].guests[].language` | string | no | Preferred language of the person, as a lowercase ISO 639-1 code. Usually one of ca, de, en, es, eu, fr, gl, it, ru, but any two-letter code the guest gave can appear (pt, nl, zh…). Absent when it is not known | | `data[].guests[].documentPortrait` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the portrait image exists. Download it from `documentPortraitImagePath` instead | | `data[].guests[].documentFront` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document front image exists. Download it from `documentFrontImagePath` instead | | `data[].guests[].documentBack` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document back image exists. Download it from `documentBackImagePath` instead | | `data[].guests[].documentPortraitImagePath` | string | no | Path on this API from which to download the portrait photo of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].guests[].documentFrontImagePath` | string | no | Path on this API from which to download the front side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].guests[].documentBackImagePath` | string | no | Path on this API from which to download the back side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].guests[].notes` | string | no | Free-text internal notes kept on the customer record | | `data[].guests[].bookingId` | number | yes | ID of the booking this record was read for | | `data[].guests[].sex` | `M`, `F`, `O` | no | Sex: M (male), F (female), O (other) | | `data[].guests[].nationality` | string | no | Nationality code, as stored (usually ISO 3166-1 alpha-3) | | `data[].guests[].issuingState` | string | no | Code of the state that issued the identity document, as stored | | `data[].guests[].birthDate` | string | no | Date of birth (YYYY-MM-DD) | | `data[].guests[].placeOfBirth` | string | no | Place of birth | | `data[].guests[].expirationDate` | string | no | Expiry date of the identity document (YYYY-MM-DD) | | `data[].guests[].issueDate` | string | no | Issue date of the identity document (YYYY-MM-DD) | | `data[].guests[].municipality` | string | no | Municipality, in lowercase | | `data[].guests[].placeOfOrigin` | string | no | Where the guest travels from, as recorded at check-in | | `data[].guests[].destinationPlace` | string | no | Where the guest travels to after the stay, as recorded at check-in | | `data[].guests[].position` | number | yes | Order of the guest within the booking. The list is sorted by it | | `data[].guests[].documentSupport` | string | no | Support number of the identity document (the Spanish DNI "IDESP" number) | | `data[].guests[].relationship` | `AB`, `BA`, `BN`, `CY`, `CD`, `HR`, `HJ`, `PM`, `NI`, `SB`, `SG`, `TI`, `YN`, `TU`, `OT` | no | Relationship of this guest to the holder: AB (grandparent), BA (great-grandparent), BN (great-grandchild), CY (spouse), CD (brother/sister-in-law), HR (sibling), HJ (child), PM (parent), NI (grandchild), SB (nephew/niece), SG (parent-in-law), TI (uncle/aunt), YN (son/daughter-in-law), TU (guardian), OT (other) | | `data[].guests[].signatureImagePath` | string | no | Path on this API from which to download the guest's signature image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `data[].isSaleDirect` | boolean | yes | Whether this is a direct sale (booked directly with the hotel, not through an OTA) | | `data[].housekeeping` | gbrHousekeepingDto | yes | Housekeeping schedule and cleaning configuration for this booking | | `data[].housekeeping.dateToClean` | string | no | Next scheduled cleaning date (YYYY-MM-DD). In the booking detail and `/search/only-groups` it is the room's own date when it has one, otherwise the booking's; in `/search` and `/search/only-single` only the booking's. Absent when none is scheduled | | `data[].housekeeping.quantityNightsClean` | number | no | Clean the room every N nights (e.g. 2 = clean every other night). Absent when not set | | `data[].housekeeping.weekDaysClean` | gbrWeekDaysCleanDto | no | Weekly cleaning schedule — which days of the week the room should be cleaned. Absent when not set | | `data[].segmentsOnBooking` | gbrSegmentRefDto[] | no | Segments assigned to the booking itself. Only in the booking detail | | `data[].segmentsOnBooking[].id` | number | yes | Segment ID | | `data[].segmentsOnBooking[].name` | string | yes | Segment name | | `data[].segmentsOnCustomer` | gbrSegmentRefDto[] | no | Segments assigned to the holder and guests of the booking. Only in the booking detail | | `data[].segmentsOnCustomer[].id` | number | yes | Segment ID | | `data[].segmentsOnCustomer[].name` | string | yes | Segment name | | `data[].segmentApplyScope` | `booking`, `customer`, `both` | no | 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 | | `total` | number | yes | Number of bookings matching the search, ignoring pagination. With a free-text search it can fall short of every possible match (see the endpoint description); an exact booking ID or locator answers 1 | ### 200 example ```json { "data": [ { "id": 789, "pcode": 123456, "groupId": 4521, "groupPrice": 200, "groupQuantity": 2, "start": "2026-10-01", "end": "2026-10-05", "arrivalHour": "14:00", "departureHour": "12:00", "nights": 4, "appUrl": "https://guest.hotelgest.com/?t=AbCdEf123", "createdAt": "2026-09-30", "resource": "1_12", "price": 100, "accommodationPrice": 100, "paid": 100, "totalExtras": 20, "canceledCost": 45, "earlyDepartureOriginalEnd": "2026-10-07", "cancelledAt": "2026-09-21T08:00:00.000Z", "locked": false, "color": "#FF5733", "imported": false, "board": {}, "policy": "4", "room": { "id": 12, "roomTypeId": 1, "originalRoomTypeId": 1 }, "locator": "HG-4F7A2C", "packId": 7, "packInfo": { "id": 7, "translations": { "en": { "name": "Romantic getaway", "description": "Two nights with dinner included" } }, "dtype": -1, "value": 10, "price": 0, "weekday": [ "Fri", "Sat" ], "products": [ { "productId": 15, "value": 30 } ] }, "customer": { "id": 1234, "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "A12345678", "address": "123 Main St", "city": "New York", "postalCode": "10001", "country": "ESP", "province": "madrid", "email": "john.doe@example.com", "phone": "+1 (555) 123-4567", "language": "es", "documentPortrait": "/document-portrait/MTIzNA==.jpg", "documentFront": "/document-front/MTIzNA==.jpg", "documentBack": "/document-back/MTIzNA==.jpg", "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ", "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ", "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA", "notes": "VIP customer", "bookingId": 789, "loyalty": "GOLD-123" }, "companyId": 12, "notes": { "request": "Late check-in, extra pillow", "internal": "Guest prefers a quiet room", "flat": "No special requests" }, "occupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "groupOccupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "otaId": 3, "checkInStatus": "checked-in", "bookingStatus": "ready", "releaseDateTentative": "2026-10-01 18:00", "virtualPayment": { "type": {}, "amount": 100 }, "paymentStatus": {}, "invoiceStatus": {}, "bookingType": { "label": "Painting", "type": "bloqued-out-order", "typeV2": {} }, "toDos": { "data": [ { "id": 1, "pcode": 123456, "name": "Prepare welcome gift", "active": "2026-01-01", "start": "2026-01-01", "end": "2026-01-02", "bookingId": 1, "checked": true } ], "pendings": 5, "total": 10 }, "guests": [ { "id": 1234, "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "A12345678", "address": "123 Main St", "city": "New York", "postalCode": "10001", "country": "ESP", "province": "madrid", "email": "john.doe@example.com", "phone": "+1 (555) 123-4567", "language": "es", "documentPortrait": "/document-portrait/MTIzNA==.jpg", "documentFront": "/document-front/MTIzNA==.jpg", "documentBack": "/document-back/MTIzNA==.jpg", "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ", "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ", "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA", "notes": "VIP customer", "bookingId": 789, "sex": "M", "nationality": "ESP", "issuingState": "ESP", "birthDate": "1985-04-12", "placeOfBirth": "Barcelona", "expirationDate": "2030-04-12", "issueDate": "2020-04-12", "municipality": "barcelona", "placeOfOrigin": "Madrid", "destinationPlace": "Valencia", "position": 1, "documentSupport": "BAA123456", "relationship": "HJ", "signatureImagePath": "/api/bookings/123456/customer-image/Nzg5OnNpZ25hdHVyZToxMjM0" } ], "isSaleDirect": true, "housekeeping": { "dateToClean": "2026-10-01", "quantityNightsClean": 2, "weekDaysClean": { "mon": true, "tue": true, "wed": true, "thu": true, "fri": true, "sat": true, "sun": true } }, "segmentsOnBooking": [ { "id": 3, "name": "Corporate" } ], "segmentsOnCustomer": [ { "id": 3, "name": "Corporate" } ], "segmentApplyScope": "booking" } ], "total": 10 } ``` --- # Search group bookings only `GET /api/v2/bookings/{pcode}/search/only-groups` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-v2-bookings-pcode-search-only-groups Auth: header `x-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. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `value` | string | no | 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 | no | Filter by room type ID | | `status` | `ready`, `tentative`, `cancelled`, `no-show`, `temporary-cancelled` | no | 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 | | `offset` | number | no | Pagination offset — number of records to skip. Default is 0 | | `end` | string | no | Filter bookings whose check-out date matches this exact date (YYYY-MM-DD) | | `start` | string | no | Filter bookings whose check-in date matches this exact date (YYYY-MM-DD) | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/v2/bookings/123456/search/only-groups' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | GetBookingSearchGroupDto[] | yes | Groups matching the search criteria, up to 5 per page | | `data[].groupId` | number | yes | ID shared by every booking of this group. It is the `groupId` seen on the bookings themselves | | `data[].bookings` | GetBookingResponseDto[] | yes | The bookings that make up the group, one per room, sorted by booking ID. Same shape as the booking detail except `packInfo`, segments and `earlyDepartureOriginalEnd`, which only the detail reads | | `data[].bookings[].id` | number | yes | Unique booking ID | | `data[].bookings[].pcode` | number | yes | Property code (identifies which hotel/property this booking belongs to) | | `data[].bookings[].groupId` | number | no | 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 | | `data[].bookings[].groupPrice` | number | no | Total of the whole group reservation, extras included, as the legacy stores it on each member. Only on group bookings | | `data[].bookings[].groupQuantity` | number | no | Number of rooms in the group reservation. Only on group bookings | | `data[].bookings[].start` | string | yes | Check-in date (YYYY-MM-DD) | | `data[].bookings[].end` | string | yes | Check-out date (YYYY-MM-DD) | | `data[].bookings[].arrivalHour` | string | no | 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 | | `data[].bookings[].departureHour` | string | no | Expected departure time, same rules as `arrivalHour`. Absent when the field holds no time at all | | `data[].bookings[].nights` | number | yes | Total number of nights for the stay | | `data[].bookings[].appUrl` | string | yes | 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. | | `data[].bookings[].createdAt` | string | yes | Date the booking was received (YYYY-MM-DD), without time | | `data[].bookings[].resource` | string | yes | Internal planning key, `_`, or `_PLAYGROUND` when no room is assigned. Read `room` instead | | `data[].bookings[].price` | number | yes | 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 | | `data[].bookings[].accommodationPrice` | number | yes | Accommodation price of this booking, without extras, for both individual and group bookings. Null when the legacy holds no amount | | `data[].bookings[].paid` | number | yes | 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 | | `data[].bookings[].totalExtras` | number | yes | Total of the extra services/products. On a group booking it is the total of the whole group, repeated on every member | | `data[].bookings[].canceledCost` | number | no | 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 | | `data[].bookings[].earlyDepartureOriginalEnd` | string | no | 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 | | `data[].bookings[].cancelledAt` | string | no | 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 | | `data[].bookings[].locked` | boolean | yes | Whether the booking is locked (prevents modifications) | | `data[].bookings[].color` | string | no | Display color for this booking in the calendar view (hex code). Absent when not set | | `data[].bookings[].imported` | boolean | yes | Whether this booking was imported from an external system or channel manager | | `data[].bookings[].board` | `nb`, `bb`, `hb`, `fb`, `ai`, `pack` | yes | 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 | | `data[].bookings[].policy` | string | no | 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 | | `data[].bookings[].room` | gbrRoomDto | yes | Room assignment details (room ID, room type ID) | | `data[].bookings[].locator` | string | no | Booking locator / confirmation code — the channel reservation code shared with the guest and OTAs. Absent when there is none | | `data[].bookings[].packId` | number | no | 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` | | `data[].bookings[].packInfo` | gbrPackInfoDto | no | The pack the booking was sold with. Only in the booking detail, and only when `packId` points to a pack that still exists | | `data[].bookings[].customer` | gbrCustomerDto | no | Main guest / booking holder. Absent on a block (see `bookingType`) | | `data[].bookings[].companyId` | number | no | ID of the company associated with this booking (for corporate/business bookings). Absent when there is none | | `data[].bookings[].notes` | gbrNotesDto | yes | Notes associated with the booking (guest requests, internal notes) | | `data[].bookings[].occupancy` | gbrOccupancyDto | yes | Number of guests for this individual room (adults, children, babies) | | `data[].bookings[].groupOccupancy` | gbrOccupancyDto | no | Total occupancy across all rooms in the group. Only on group bookings | | `data[].bookings[].otaId` | number | yes | OTA / channel the booking came from. Use the GET /api/otas endpoint to get its name. Null when the legacy holds no channel | | `data[].bookings[].checkInStatus` | `waiting-check-in`, `checked-in`, `checked-out`, `cancelled` | yes | Check-in status: waiting-check-in, checked-in, checked-out, or cancelled (every booking whose `bookingStatus` is cancelled, blocks included) | | `data[].bookings[].bookingStatus` | `ready`, `tentative`, `cancelled`, `no-show`, `temporary-cancelled` | yes | Booking status: ready (confirmed), tentative (held until its release date), cancelled, no-show, or temporary-cancelled. A block (see `bookingType`) also reads cancelled | | `data[].bookings[].releaseDateTentative` | string | no | Date and time (YYYY-MM-DD HH:mm) at which a tentative booking is released if not confirmed. Only on tentative bookings | | `data[].bookings[].virtualPayment` | gbrVirtualPaymentDto | no | Virtual payment details (e.g. virtual credit card from an OTA). Absent when the booking has none | | `data[].bookings[].paymentStatus` | `no-paid`, `parcial-paid`, `paid`, `over-paid` | yes | Overall payment status: no-paid, parcial-paid, paid, or over-paid | | `data[].bookings[].invoiceStatus` | `no-invoiced`, `parcial-invoiced`, `invoiced` | yes | Invoice status: no-invoiced, parcial-invoiced, or invoiced | | `data[].bookings[].bookingType` | gbrBookingTypeDto | no | Present only on a block — a room closed by the staff, not a sale. Absent on every booking | | `data[].bookings[].toDos` | gbrToDosDto | yes | Tasks/to-do items linked to this booking (e.g. prepare welcome gift, arrange transfer) | | `data[].bookings[].guests` | gbrGuestDto[] | yes | Guests registered on this booking, sorted by `position`. Empty when there are none. Each one carries personal data from the identity document | | `data[].bookings[].isSaleDirect` | boolean | yes | Whether this is a direct sale (booked directly with the hotel, not through an OTA) | | `data[].bookings[].housekeeping` | gbrHousekeepingDto | yes | Housekeeping schedule and cleaning configuration for this booking | | `data[].bookings[].segmentsOnBooking` | gbrSegmentRefDto[] | no | Segments assigned to the booking itself. Only in the booking detail | | `data[].bookings[].segmentsOnCustomer` | gbrSegmentRefDto[] | no | Segments assigned to the holder and guests of the booking. Only in the booking detail | | `data[].bookings[].segmentApplyScope` | `booking`, `customer`, `both` | no | 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 | | `data[].total` | number | yes | Number of bookings in this group | | `total` | number | yes | Total number of groups matching the search criteria, ignoring pagination. Divide by the page size to know how many pages there are | ### 200 example ```json { "data": [ { "groupId": 4521, "bookings": [ { "id": 789, "pcode": 123456, "groupId": 4521, "groupPrice": 200, "groupQuantity": 2, "start": "2026-10-01", "end": "2026-10-05", "arrivalHour": "14:00", "departureHour": "12:00", "nights": 4, "appUrl": "https://guest.hotelgest.com/?t=AbCdEf123", "createdAt": "2026-09-30", "resource": "1_12", "price": 100, "accommodationPrice": 100, "paid": 100, "totalExtras": 20, "canceledCost": 45, "earlyDepartureOriginalEnd": "2026-10-07", "cancelledAt": "2026-09-21T08:00:00.000Z", "locked": false, "color": "#FF5733", "imported": false, "board": {}, "policy": "4", "room": { "id": 12, "roomTypeId": 1, "originalRoomTypeId": 1 }, "locator": "HG-4F7A2C", "packId": 7, "packInfo": { "id": 7, "translations": { "en": { "name": "Romantic getaway", "description": "Two nights with dinner included" } }, "dtype": -1, "value": 10, "price": 0, "weekday": [ "Fri", "Sat" ], "products": [] }, "customer": { "id": 1234, "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "A12345678", "address": "123 Main St", "city": "New York", "postalCode": "10001", "country": "ESP", "province": "madrid", "email": "john.doe@example.com", "phone": "+1 (555) 123-4567", "language": "es", "documentPortrait": "/document-portrait/MTIzNA==.jpg", "documentFront": "/document-front/MTIzNA==.jpg", "documentBack": "/document-back/MTIzNA==.jpg", "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ", "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ", "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA", "notes": "VIP customer", "bookingId": 789, "loyalty": "GOLD-123" }, "companyId": 12, "notes": { "request": "Late check-in, extra pillow", "internal": "Guest prefers a quiet room", "flat": "No special requests" }, "occupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "groupOccupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "otaId": 3, "checkInStatus": "checked-in", "bookingStatus": "ready", "releaseDateTentative": "2026-10-01 18:00", "virtualPayment": { "type": {}, "amount": 100 }, "paymentStatus": {}, "invoiceStatus": {}, "bookingType": { "label": "Painting", "type": "bloqued-out-order", "typeV2": {} }, "toDos": { "data": [], "pendings": 5, "total": 10 }, "guests": [ { "id": null, "name": null, "surname": null, "documentType": null, "documentNumber": null, "address": null, "city": null, "postalCode": null, "country": null, "province": null, "email": null, "phone": null, "language": null, "documentPortrait": null, "documentFront": null, "documentBack": null, "documentPortraitImagePath": null, "documentFrontImagePath": null, "documentBackImagePath": null, "notes": null, "bookingId": null, "sex": null, "nationality": null, "issuingState": null, "birthDate": null, "placeOfBirth": null, "expirationDate": null, "issueDate": null, "municipality": null, "placeOfOrigin": null, "destinationPlace": null, "position": null, "documentSupport": null, "relationship": null, "signatureImagePath": null } ], "isSaleDirect": true, "housekeeping": { "dateToClean": "2026-10-01", "quantityNightsClean": 2, "weekDaysClean": { "mon": null, "tue": null, "wed": null, "thu": null, "fri": null, "sat": null, "sun": null } }, "segmentsOnBooking": [ { "id": null, "name": null } ], "segmentsOnCustomer": [ { "id": null, "name": null } ], "segmentApplyScope": "booking" } ], "total": 3 } ], "total": 12 } ``` --- # Get booking details `GET /api/bookings/{pcode}/detail/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-bookings-pcode-detail-bookingid Auth: header `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. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/bookings/123456/detail/789' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | number | yes | Unique booking ID | | `pcode` | number | yes | Property code (identifies which hotel/property this booking belongs to) | | `groupId` | number | no | 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 | no | Total of the whole group reservation, extras included, as the legacy stores it on each member. Only on group bookings | | `groupQuantity` | number | no | Number of rooms in the group reservation. Only on group bookings | | `start` | string | yes | Check-in date (YYYY-MM-DD) | | `end` | string | yes | Check-out date (YYYY-MM-DD) | | `arrivalHour` | string | no | 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 | no | Expected departure time, same rules as `arrivalHour`. Absent when the field holds no time at all | | `nights` | number | yes | Total number of nights for the stay | | `appUrl` | string | yes | 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 | yes | Date the booking was received (YYYY-MM-DD), without time | | `resource` | string | yes | Internal planning key, `_`, or `_PLAYGROUND` when no room is assigned. Read `room` instead | | `price` | number | yes | 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 | yes | Accommodation price of this booking, without extras, for both individual and group bookings. Null when the legacy holds no amount | | `paid` | number | yes | 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 | yes | Total of the extra services/products. On a group booking it is the total of the whole group, repeated on every member | | `canceledCost` | number | no | 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 | no | 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 | no | 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 | yes | Whether the booking is locked (prevents modifications) | | `color` | string | no | Display color for this booking in the calendar view (hex code). Absent when not set | | `imported` | boolean | yes | Whether this booking was imported from an external system or channel manager | | `board` | `nb`, `bb`, `hb`, `fb`, `ai`, `pack` | yes | 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 | no | 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 | | `room` | gbrRoomDto | yes | Room assignment details (room ID, room type ID) | | `room.id` | number | yes | ID of the assigned physical room. Null if no specific room has been assigned yet | | `room.roomTypeId` | number | yes | ID of the room type for this booking. Use the GET /api/rooms/:pcode/types endpoint to get room type details | | `room.originalRoomTypeId` | number | yes | Room type the booking was created with (before any room type change). Same as `roomTypeId` when it never changed | | `locator` | string | no | Booking locator / confirmation code — the channel reservation code shared with the guest and OTAs. Absent when there is none | | `packId` | number | no | 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` | | `packInfo` | gbrPackInfoDto | no | The pack the booking was sold with. Only in the booking detail, and only when `packId` points to a pack that still exists | | `packInfo.id` | number | yes | Pack ID (the same as `packId`) | | `packInfo.translations` | object | yes | Pack name and description, keyed by the language code of each translation | | `packInfo.dtype` | `0`, `-1`, `-2`, `1`, `2` | yes | How the pack modifies the price: 0 fixed price, -1 percentage discount, -2 fixed discount, 1 percentage increase, 2 fixed increase | | `packInfo.value` | number | yes | Amount or percentage applied, depending on `dtype` | | `packInfo.price` | number | yes | Price of the pack. 0 when not set | | `packInfo.weekday` | `Mon`, `Tue`, `Wed`, `Thu`, `Fri`, `Sat`, `Sun`[] | no | Week days the pack applies to. Absent when it applies every day | | `packInfo.products` | gbrPackProductDto[] | yes | Products included in the pack | | `packInfo.products[].productId` | number | yes | ID of the product included in the pack | | `packInfo.products[].value` | number | yes | Value of the product inside the pack | | `customer` | gbrCustomerDto | no | Main guest / booking holder. Absent on a block (see `bookingType`) | | `customer.id` | number | yes | Unique ID of the customer record. Null only for a booking whose holder record is missing | | `customer.name` | string | yes | First name. Empty string when it was not given | | `customer.surname` | string | no | Last name / surname | | `customer.documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | no | Type of identity document: P (passport), D (DNI), C (driving license), I (identity card), N (Spanish residence permit), X (foreign residence permit), MI (minor undocumented), E (other), IDX (foreigner ID), ID (identity card, legacy code), 50 (foreign tax ID). Absent when none of these was recorded | | `customer.documentNumber` | string | no | Identity document number | | `customer.address` | string | no | Street address | | `customer.city` | string | no | City of residence | | `customer.postalCode` | string | no | Postal / ZIP code | | `customer.country` | string | no | Country code as stored, in uppercase. Usually ISO 3166-1 alpha-3 (ESP, USA, FRA); older records may hold another code | | `customer.province` | string | no | Province or state, in lowercase | | `customer.email` | string | no | Email address | | `customer.phone` | string | no | Phone number as entered (may include the country code) | | `customer.language` | string | no | Preferred language of the person, as a lowercase ISO 639-1 code. Usually one of ca, de, en, es, eu, fr, gl, it, ru, but any two-letter code the guest gave can appear (pt, nl, zh…). Absent when it is not known | | `customer.documentPortrait` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the portrait image exists. Download it from `documentPortraitImagePath` instead | | `customer.documentFront` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document front image exists. Download it from `documentFrontImagePath` instead | | `customer.documentBack` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document back image exists. Download it from `documentBackImagePath` instead | | `customer.documentPortraitImagePath` | string | no | Path on this API from which to download the portrait photo of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `customer.documentFrontImagePath` | string | no | Path on this API from which to download the front side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `customer.documentBackImagePath` | string | no | Path on this API from which to download the back side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `customer.notes` | string | no | Free-text internal notes kept on the customer record | | `customer.bookingId` | number | yes | ID of the booking this record was read for | | `customer.loyalty` | string | no | Loyalty / membership programme the holder belongs to, as the channel sent it. Only in the booking detail and in `/search/only-groups`; never in `/search` or `/search/only-single` | | `companyId` | number | no | ID of the company associated with this booking (for corporate/business bookings). Absent when there is none | | `notes` | gbrNotesDto | yes | Notes associated with the booking (guest requests, internal notes) | | `notes.request` | string | yes | Guest request notes. Empty string when there are none | | `notes.internal` | string | yes | Internal staff notes (only visible to hotel staff). Empty string when there are none | | `notes.flat` | string | yes | Housekeeping notes. Empty string when there are none | | `occupancy` | gbrOccupancyDto | yes | Number of guests for this individual room (adults, children, babies) | | `occupancy.adults` | number | yes | Number of adult guests | | `occupancy.children` | number | yes | Number of child guests | | `occupancy.babies` | number | yes | Number of baby/infant guests | | `occupancy.total` | number | yes | Total number of guests (adults + children + babies) | | `groupOccupancy` | gbrOccupancyDto | no | Total occupancy across all rooms in the group. Only on group bookings | | `groupOccupancy.adults` | number | yes | Number of adult guests | | `groupOccupancy.children` | number | yes | Number of child guests | | `groupOccupancy.babies` | number | yes | Number of baby/infant guests | | `groupOccupancy.total` | number | yes | Total number of guests (adults + children + babies) | | `otaId` | number | yes | OTA / channel the booking came from. Use the GET /api/otas endpoint to get its name. Null when the legacy holds no channel | | `checkInStatus` | `waiting-check-in`, `checked-in`, `checked-out`, `cancelled` | yes | Check-in status: waiting-check-in, checked-in, checked-out, or cancelled (every booking whose `bookingStatus` is cancelled, blocks included) | | `bookingStatus` | `ready`, `tentative`, `cancelled`, `no-show`, `temporary-cancelled` | yes | 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 | no | Date and time (YYYY-MM-DD HH:mm) at which a tentative booking is released if not confirmed. Only on tentative bookings | | `virtualPayment` | gbrVirtualPaymentDto | no | Virtual payment details (e.g. virtual credit card from an OTA). Absent when the booking has none | | `virtualPayment.type` | `directPayment`, `prePayment`, `partPayment` | yes | Type of virtual payment: directPayment, prePayment, or partPayment | | `virtualPayment.amount` | number | yes | Amount collected by the channel, in the property currency. 0 for directPayment. Null when the channel did not report it | | `paymentStatus` | `no-paid`, `parcial-paid`, `paid`, `over-paid` | yes | Overall payment status: no-paid, parcial-paid, paid, or over-paid | | `invoiceStatus` | `no-invoiced`, `parcial-invoiced`, `invoiced` | yes | Invoice status: no-invoiced, parcial-invoiced, or invoiced | | `bookingType` | gbrBookingTypeDto | no | Present only on a block — a room closed by the staff, not a sale. Absent on every booking | | `bookingType.label` | string | yes | Reason the room was blocked, as the staff wrote it. Empty string when none | | `bookingType.type` | `bloqued-out-order`, `bloqued_out_service` | yes | Legacy block type. Use typeV2 instead | | `bookingType.typeV2` | `blocked-out-order`, `blocked-out-service` | yes | Block type: blocked-out-order (room blocked by staff) or blocked-out-service (room out of service) | | `toDos` | gbrToDosDto | yes | Tasks/to-do items linked to this booking (e.g. prepare welcome gift, arrange transfer) | | `toDos.data` | gbrToDoDto[] | yes | Tasks linked to this booking. Empty when there are none | | `toDos.data[].id` | number | yes | Unique ID of the task | | `toDos.data[].pcode` | number | yes | Property code this task belongs to | | `toDos.data[].name` | string | yes | Task name / description | | `toDos.data[].active` | string | no | Date the task was completed (YYYY-MM-DD). Absent while it is pending — see `checked` | | `toDos.data[].start` | string | yes | Start date of the task (YYYY-MM-DD) | | `toDos.data[].end` | string | yes | End date / due date of the task (YYYY-MM-DD) | | `toDos.data[].bookingId` | number | no | ID of the booking this task is linked to | | `toDos.data[].checked` | boolean | yes | Whether this task has been completed | | `toDos.pendings` | number | yes | Number of tasks still pending (not yet completed) | | `toDos.total` | number | yes | Total number of tasks for this booking | | `guests` | gbrGuestDto[] | yes | Guests registered on this booking, sorted by `position`. Empty when there are none. Each one carries personal data from the identity document | | `guests[].id` | number | yes | Unique ID of the customer record. Null only for a booking whose holder record is missing | | `guests[].name` | string | yes | First name. Empty string when it was not given | | `guests[].surname` | string | no | Last name / surname | | `guests[].documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | no | Type of identity document: P (passport), D (DNI), C (driving license), I (identity card), N (Spanish residence permit), X (foreign residence permit), MI (minor undocumented), E (other), IDX (foreigner ID), ID (identity card, legacy code), 50 (foreign tax ID). Absent when none of these was recorded | | `guests[].documentNumber` | string | no | Identity document number | | `guests[].address` | string | no | Street address | | `guests[].city` | string | no | City of residence | | `guests[].postalCode` | string | no | Postal / ZIP code | | `guests[].country` | string | no | Country code as stored, in uppercase. Usually ISO 3166-1 alpha-3 (ESP, USA, FRA); older records may hold another code | | `guests[].province` | string | no | Province or state, in lowercase | | `guests[].email` | string | no | Email address | | `guests[].phone` | string | no | Phone number as entered (may include the country code) | | `guests[].language` | string | no | Preferred language of the person, as a lowercase ISO 639-1 code. Usually one of ca, de, en, es, eu, fr, gl, it, ru, but any two-letter code the guest gave can appear (pt, nl, zh…). Absent when it is not known | | `guests[].documentPortrait` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the portrait image exists. Download it from `documentPortraitImagePath` instead | | `guests[].documentFront` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document front image exists. Download it from `documentFrontImagePath` instead | | `guests[].documentBack` | string | no | Deprecated: a retired relative path (`/document-…/.jpg`) that no endpoint serves any more. Present only when the document back image exists. Download it from `documentBackImagePath` instead | | `guests[].documentPortraitImagePath` | string | no | Path on this API from which to download the portrait photo of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `guests[].documentFrontImagePath` | string | no | Path on this API from which to download the front side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `guests[].documentBackImagePath` | string | no | Path on this API from which to download the back side of the identity document image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `guests[].notes` | string | no | Free-text internal notes kept on the customer record | | `guests[].bookingId` | number | yes | ID of the booking this record was read for | | `guests[].sex` | `M`, `F`, `O` | no | Sex: M (male), F (female), O (other) | | `guests[].nationality` | string | no | Nationality code, as stored (usually ISO 3166-1 alpha-3) | | `guests[].issuingState` | string | no | Code of the state that issued the identity document, as stored | | `guests[].birthDate` | string | no | Date of birth (YYYY-MM-DD) | | `guests[].placeOfBirth` | string | no | Place of birth | | `guests[].expirationDate` | string | no | Expiry date of the identity document (YYYY-MM-DD) | | `guests[].issueDate` | string | no | Issue date of the identity document (YYYY-MM-DD) | | `guests[].municipality` | string | no | Municipality, in lowercase | | `guests[].placeOfOrigin` | string | no | Where the guest travels from, as recorded at check-in | | `guests[].destinationPlace` | string | no | Where the guest travels to after the stay, as recorded at check-in | | `guests[].position` | number | yes | Order of the guest within the booking. The list is sorted by it | | `guests[].documentSupport` | string | no | Support number of the identity document (the Spanish DNI "IDESP" number) | | `guests[].relationship` | `AB`, `BA`, `BN`, `CY`, `CD`, `HR`, `HJ`, `PM`, `NI`, `SB`, `SG`, `TI`, `YN`, `TU`, `OT` | no | Relationship of this guest to the holder: AB (grandparent), BA (great-grandparent), BN (great-grandchild), CY (spouse), CD (brother/sister-in-law), HR (sibling), HJ (child), PM (parent), NI (grandchild), SB (nephew/niece), SG (parent-in-law), TI (uncle/aunt), YN (son/daughter-in-law), TU (guardian), OT (other) | | `guests[].signatureImagePath` | string | no | Path on this API from which to download the guest's signature image: `/api/bookings/{pcode}/customer-image/{hash}`. Call it on the API host with the same credentials. Present only when the image exists | | `isSaleDirect` | boolean | yes | Whether this is a direct sale (booked directly with the hotel, not through an OTA) | | `housekeeping` | gbrHousekeepingDto | yes | Housekeeping schedule and cleaning configuration for this booking | | `housekeeping.dateToClean` | string | no | Next scheduled cleaning date (YYYY-MM-DD). In the booking detail and `/search/only-groups` it is the room's own date when it has one, otherwise the booking's; in `/search` and `/search/only-single` only the booking's. Absent when none is scheduled | | `housekeeping.quantityNightsClean` | number | no | Clean the room every N nights (e.g. 2 = clean every other night). Absent when not set | | `housekeeping.weekDaysClean` | gbrWeekDaysCleanDto | no | Weekly cleaning schedule — which days of the week the room should be cleaned. Absent when not set | | `housekeeping.weekDaysClean.mon` | boolean | yes | Indicates if the room is cleaned on Monday | | `housekeeping.weekDaysClean.tue` | boolean | yes | Indicates if the room is cleaned on Tuesday | | `housekeeping.weekDaysClean.wed` | boolean | yes | Indicates if the room is cleaned on Wednesday | | `housekeeping.weekDaysClean.thu` | boolean | yes | Indicates if the room is cleaned on Thursday | | `housekeeping.weekDaysClean.fri` | boolean | yes | Indicates if the room is cleaned on Friday | | `housekeeping.weekDaysClean.sat` | boolean | yes | Indicates if the room is cleaned on Saturday | | `housekeeping.weekDaysClean.sun` | boolean | yes | Indicates if the room is cleaned on Sunday | | `segmentsOnBooking` | gbrSegmentRefDto[] | no | Segments assigned to the booking itself. Only in the booking detail | | `segmentsOnBooking[].id` | number | yes | Segment ID | | `segmentsOnBooking[].name` | string | yes | Segment name | | `segmentsOnCustomer` | gbrSegmentRefDto[] | no | Segments assigned to the holder and guests of the booking. Only in the booking detail | | `segmentsOnCustomer[].id` | number | yes | Segment ID | | `segmentsOnCustomer[].name` | string | yes | Segment name | | `segmentApplyScope` | `booking`, `customer`, `both` | no | 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 | ### 200 example ```json { "id": 789, "pcode": 123456, "groupId": 4521, "groupPrice": 200, "groupQuantity": 2, "start": "2026-10-01", "end": "2026-10-05", "arrivalHour": "14:00", "departureHour": "12:00", "nights": 4, "appUrl": "https://guest.hotelgest.com/?t=AbCdEf123", "createdAt": "2026-09-30", "resource": "1_12", "price": 100, "accommodationPrice": 100, "paid": 100, "totalExtras": 20, "canceledCost": 45, "earlyDepartureOriginalEnd": "2026-10-07", "cancelledAt": "2026-09-21T08:00:00.000Z", "locked": false, "color": "#FF5733", "imported": false, "board": {}, "policy": "4", "room": { "id": 12, "roomTypeId": 1, "originalRoomTypeId": 1 }, "locator": "HG-4F7A2C", "packId": 7, "packInfo": { "id": 7, "translations": { "en": { "name": "Romantic getaway", "description": "Two nights with dinner included" } }, "dtype": -1, "value": 10, "price": 0, "weekday": [ "Fri", "Sat" ], "products": [ { "productId": 15, "value": 30 } ] }, "customer": { "id": 1234, "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "A12345678", "address": "123 Main St", "city": "New York", "postalCode": "10001", "country": "ESP", "province": "madrid", "email": "john.doe@example.com", "phone": "+1 (555) 123-4567", "language": "es", "documentPortrait": "/document-portrait/MTIzNA==.jpg", "documentFront": "/document-front/MTIzNA==.jpg", "documentBack": "/document-back/MTIzNA==.jpg", "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ", "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ", "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA", "notes": "VIP customer", "bookingId": 789, "loyalty": "GOLD-123" }, "companyId": 12, "notes": { "request": "Late check-in, extra pillow", "internal": "Guest prefers a quiet room", "flat": "No special requests" }, "occupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "groupOccupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "otaId": 3, "checkInStatus": "checked-in", "bookingStatus": "ready", "releaseDateTentative": "2026-10-01 18:00", "virtualPayment": { "type": {}, "amount": 100 }, "paymentStatus": {}, "invoiceStatus": {}, "bookingType": { "label": "Painting", "type": "bloqued-out-order", "typeV2": {} }, "toDos": { "data": [ { "id": 1, "pcode": 123456, "name": "Prepare welcome gift", "active": "2026-01-01", "start": "2026-01-01", "end": "2026-01-02", "bookingId": 1, "checked": true } ], "pendings": 5, "total": 10 }, "guests": [ { "id": 1234, "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "A12345678", "address": "123 Main St", "city": "New York", "postalCode": "10001", "country": "ESP", "province": "madrid", "email": "john.doe@example.com", "phone": "+1 (555) 123-4567", "language": "es", "documentPortrait": "/document-portrait/MTIzNA==.jpg", "documentFront": "/document-front/MTIzNA==.jpg", "documentBack": "/document-back/MTIzNA==.jpg", "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ", "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ", "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA", "notes": "VIP customer", "bookingId": 789, "sex": "M", "nationality": "ESP", "issuingState": "ESP", "birthDate": "1985-04-12", "placeOfBirth": "Barcelona", "expirationDate": "2030-04-12", "issueDate": "2020-04-12", "municipality": "barcelona", "placeOfOrigin": "Madrid", "destinationPlace": "Valencia", "position": 1, "documentSupport": "BAA123456", "relationship": "HJ", "signatureImagePath": "/api/bookings/123456/customer-image/Nzg5OnNpZ25hdHVyZToxMjM0" } ], "isSaleDirect": true, "housekeeping": { "dateToClean": "2026-10-01", "quantityNightsClean": 2, "weekDaysClean": { "mon": true, "tue": true, "wed": true, "thu": true, "fri": true, "sat": true, "sun": true } }, "segmentsOnBooking": [ { "id": 3, "name": "Corporate" } ], "segmentsOnCustomer": [ { "id": 3, "name": "Corporate" } ], "segmentApplyScope": "booking" } ``` --- # Create booking `POST /api/v5/bookings/{pcode}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/post-api-v5-bookings-pcode Auth: header `x-api-key` Create one or more bookings for a property in a single call. Every entry of `rooms` becomes its own booking, so a request for a double and a single creates two bookings and the response carries two ids, in the same order as they were sent. Availability is checked before the bookings are written: if any of the requested rooms is not available for the date range, the whole request is rejected with `409` `roomsNotAvailable` and nothing is created. The one exception is a booking that says where it was already sold — `settings.otaId` or `settings.locator` sent: it is not checked and is written even over a full night, because refusing it would lose a sale that already happened elsewhere; the overbooking is left to the property. Room types and their ids come from `GET /api/rooms/{pcode}/types`, and availability from `GET /api/v2/rooms/{pcode}/availability`. Send an `Idempotency-Key` header to make retries safe: if the answer is lost (a timeout, a dropped connection), repeating the same request with the same key never creates the bookings twice — it answers `409` `creationInProgress` while the first request is still running and the same ids once it has finished. Reusing a key with a different body answers `422` `idempotencyKeyReused`. When the bookings could not be stored and none was created, the answer is `409` `legacyWriteFailed` with `fault: dependency`: the same request may be sent again, except that a holder company sent as new was already created, so it has to be sent as an existing one. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `Idempotency-Key` | string | no | Optional. A value you choose for this attempt (a UUID, 8 to 128 characters of letters, digits, "-" or "_"), repeated when you retry the same request after a timeout or a lost answer. While the first request is still running, a repeat — same body or not — answers `409` with `creationInProgress`; once it finished, a repeat answers with the same response — the same ids — and creates nothing new (the response carries `Idempotent-Replayed: true`). Kept for 24 hours. Once the first request finished, reusing its key with a different body answers `422` with `idempotencyKeyReused`. A request that failed is not remembered, so it can be retried with the same key. | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X POST 'https://uni-api.hotelgest.com/api/v5/bookings/123456' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "date": { "from": "2024-12-20", "to": "2024-12-25" }, "host": { "name": "John", "surname": "Doe", "phone": "+1 234 567 8900", "email": "john.doe@example.com", "documentType": "D", "sex": {}, "documentNumber": "12345678A", "city": "Cityville", "address": "123 Main St.", "postalCode": "12345", "country": "Countryland", "province": "Provinceland", "notes": "Some notes about the booking", "customerType": "particular", "companyId": 123, "isNewCompany": true, "company": { "name": "Company Ltd.", "documentNumber": "123456789", "phone": "+1 234 567 8900", "address": "123 Main St.", "city": "Cityville", "postalCode": "12345", "country": "Countryland", "province": "Provinceland" }, "language": "en" }, "rooms": [ { "boardId": "hb", "politicId": "4", "pax": "2", "adults": 2, "children": 1, "babies": 0, "rtcode": "11111", "rcode": "22222", "ancillary": { "2025-01-01": 100 }, "ancillaryWithDiscount": { "2025-01-01": 80 }, "promoCode": "PROMO-123", "promoCodeManual": { "isActive": true, "type": "fbn", "value": 20.5 } } ], "settings": { "tentative": { "isActive": true, "releaseDateTentative": "2025-01-01" }, "hidePrices": false, "sendEmail": true, "locator": "ABC123", "otaId": 1, "arrivalHour": "15:00", "departureHour": "18:00", "requestNotes": "Please prepare a crib for the baby.", "internalNotes": "Internal notes about the booking" }, "products": [ { "id": 1, "quantity": 1, "start": "2024-12-20", "end": "2024-12-25", "startTime": "14:00", "endTime": "16:00", "tax": 10.5, "price": 100, "name": "Sample Product", "description": "This is a sample product description.", "discountType": "p", "discountValue": 15, "discountCalculated": 15, "productType": "pbd", "accounting": 12, "experticket": { "productId": "idft1of16amcg", "sessionId": "string", "saleKey": "3f9c0a7d12e44b6a", "answers": [ { "profileId": "5df8t6ku41djh", "level": "ticket", "ticketId": "string", "questionId": "nr1k8sehrno3a", "value": "string" } ] } } ], "groupId": 123, "segmentIds": [ 1 ], "segmentApplyScope": "booking", "packId": 456 }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `date` | Dates | yes | Booking dates | | `date.from` | string | yes | Check-in date | | `date.to` | string | yes | Check-out date | | `host` | Host | yes | Host information | | `host.name` | string | yes | First name of the host | | `host.surname` | string | yes | Last name of the host | | `host.phone` | string | no | Phone number of the host | | `host.email` | string | no | Email address of the host | | `host.documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | no | Document type of the host | | `host.sex` | `M`, `F`, `O` | no | Sex of the host | | `host.documentNumber` | string | no | Document number of the host | | `host.city` | string | no | City of the host | | `host.address` | string | no | Address of the host | | `host.postalCode` | string | no | Postal code of the host | | `host.country` | string | no | Country of the host | | `host.province` | string | no | Province of the host | | `host.notes` | string | no | Additional notes about the booking | | `host.customerType` | `particular`, `company`, `agency` | yes | Type of customer | | `host.companyId` | number | no | Company ID, required if isNewCompany is false and customerType is Agency or Company | | `host.isNewCompany` | boolean | yes | Whether the company billed for this booking has to be created from `company` (true) or already exists and is referenced by `companyId` (false). Only read when `customerType` is Agency or Company | | `host.company` | Company | no | Company to create. Required if isNewCompany is true | | `host.company.name` | string | yes | Name of the company | | `host.company.documentNumber` | string | yes | Document number of the company | | `host.company.phone` | string | no | Phone number of the company | | `host.company.address` | string | no | Address of the company | | `host.company.city` | string | no | City of the company | | `host.company.postalCode` | string | no | Postal code of the company | | `host.company.country` | string | no | Country of the company | | `host.company.province` | string | no | Province of the company | | `host.language` | string | yes | Preferred language of the host, as an ISO 639-1 code | | `rooms` | Room[] | yes | Rooms information | | `rooms[].boardId` | `nb`, `bb`, `hb`, `fb`, `ai` | yes | Board | | `rooms[].politicId` | string | yes | Policy | | `rooms[].pax` | string | yes | Pax (total occupancy). Kept for backwards compatibility. | | `rooms[].adults` | number | no | Number of adults in this room. Optional; when omitted, `pax` is used as adults for backwards compatibility. | | `rooms[].children` | number | no | Number of children in this room. Optional; defaults to 0 when omitted. | | `rooms[].babies` | number | no | Number of babies (under 2 years) in this room. Optional; defaults to 0 when omitted. | | `rooms[].rtcode` | string | yes | Room type ID | | `rooms[].rcode` | string | yes | Room ID, a room of the room type `rtcode`. Omit it, or send '', '0' or '-1', to leave the booking without a room assigned. Any other value that is not a room of the property answers 404 `roomNotFound` and nothing is created. | | `rooms[].ancillary` | object | yes | Prices by day | | `rooms[].ancillaryWithDiscount` | object | yes | Prices with discount by day | | `rooms[].promoCode` | string | no | Promo code in the format type-value-id-code | | `rooms[].promoCodeManual` | PromoCodeManual | yes | Manual promo code application | | `rooms[].promoCodeManual.isActive` | boolean | yes | Whether a manual promo code is applied | | `rooms[].promoCodeManual.type` | `fbn`, `pbn`, `ta` | yes | Required if isActive is true | | `rooms[].promoCodeManual.value` | number | yes | Required if isActive is true | | `settings` | Settings | yes | Settings information | | `settings.tentative` | Tentative | yes | Settings related to tentative release date | | `settings.tentative.isActive` | boolean | yes | Whether the release date is tentative | | `settings.tentative.releaseDateTentative` | string | yes | Required if isActive is true | | `settings.hidePrices` | boolean | yes | Whether to hide prices | | `settings.sendEmail` | boolean | no | Whether to send a confirmation email to the host | | `settings.locator` | string | no | Locator code for the booking | | `settings.otaId` | number | no | OTA ID associated with the booking | | `settings.arrivalHour` | string | no | Arrival hour for the booking | | `settings.departureHour` | string | no | Departure hour for the booking. With the same arrival and departure date it makes a stay of some hours | | `settings.requestNotes` | string | no | Special requests or notes from the host | | `settings.internalNotes` | string | no | Internal notes for the booking | | `products` | Product[] | yes | Products information | | `products[].id` | number | yes | Product ID | | `products[].quantity` | number | yes | Quantity of the product | | `products[].start` | string | yes | Start date of the product | | `products[].end` | string | yes | End date of the product | | `products[].startTime` | string | no | Start time of the product | | `products[].endTime` | string | no | End time of the product | | `products[].tax` | number | yes | Tax applied to the product | | `products[].price` | number | yes | Price of the product | | `products[].name` | string | yes | Name of the product | | `products[].description` | string | no | Description of the product | | `products[].discountType` | `f`, `p` | no | Type of discount applied to the product | | `products[].discountValue` | number | no | Value of the discount applied to the product | | `products[].discountCalculated` | number | no | Calculated discount amount for the product | | `products[].productType` | `pbd`, `pbpd`, `pbb`, `pbp` | yes | Type of the product | | `products[].accounting` | number | no | Accounting category ID bound to this line. Meant for custom products, which have no catalog article to inherit the accounting account from. | | `products[].experticket` | ExperticketLine | no | Present only on Experticket sales | | `products[].experticket.productId` | string | yes | Experticket product identifier | | `products[].experticket.sessionId` | string | no | Chosen time slot, for products sold by session | | `products[].experticket.saleKey` | string | yes | Same for every attempt at one purchase and for every line of it: a retry never buys twice | | `products[].experticket.answers` | ExperticketAnswer[] | no | Answers to the questions the venue asks before it reserves | | `groupId` | number | no | Group ID | | `segmentIds` | number[] | no | Market segment ids to attach | | `segmentApplyScope` | `booking`, `customer`, `both` | no | Deprecated and ignored. segmentIds always apply to the reservation. | | `packId` | number | no | Pack/Promotion ID (code_pack) | ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — roomsNotAvailable: a requested room is not available, nothing was created. creationInProgress: a request with the same Idempotency-Key is still running. legacyWriteFailed: the bookings could not be stored and none was created; the request may be sent again. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `422` — idempotencyKeyReused: the Idempotency-Key was already used with a different body - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | number | yes | ID of the created booking. Use it against the booking endpoints (`GET /api/bookings/{pcode}/detail/{bookingId}`) | ### 200 example ```json [ { "id": 789 } ] ``` --- # Check-in / Check-out booking `PUT /api/bookings/{pcode}/check-in-out/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/put-api-bookings-pcode-check-in-out-bookingid Auth: header `x-api-key` Move one booking to a new check-in state. Send the state you want in `nextStatus`: `waiting-check-in` (the guest has not arrived), `checked-in` (the guest is in the room) or `checked-out` (the stay is over). `cancelled` is a state a booking can show, not one you can move it to here: it answers `400` — cancel a booking by changing its status. It affects this booking only — in a group, each room is checked in on its own. Not every move is allowed: the states follow an order, and one that does not follow it is rejected with `400`. Sending `waiting-check-in` on a booking that is `checked-in` is how you undo a check-in made by mistake. Checking out can be refused with `409` `pendingPayment` while the booking still has money pending, but only if the property turned that check on — so the same request can succeed for one property and fail for another. A partner connection is held to that one only: the invoicing rules of the property are work for reception, so the booking checks out without its invoice and reception issues it afterwards. With the own key of the property, checking out can also be refused with `409` `pendingInvoicePayment` or `pendingInvoice` while invoices are pending, again only if the property turned those checks on. Checking in answers `409` `pendingCheckout` while an earlier booking of the same room is still checked in. With an API key the change is credited to the integration, and the key must have this endpoint granted explicitly: keys issued before endpoint scopes existed answer `403` here. Answers `204` with no body; read the booking back with the detail endpoint if you need its new state. The submission to the authorities runs asynchronously after the check-in, so a guest rejected by them does not fail this call: the per-guest result lands in the booking history. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X PUT 'https://uni-api.hotelgest.com/api/bookings/123456/check-in-out/789' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "nextStatus": "checked-in" }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `nextStatus` | `waiting-check-in`, `checked-in`, `checked-out`, `cancelled` | yes | Target check-in state for the booking. Allowed values follow the check-in state machine. | ## Responses - `204` — The booking moved to the requested state. No body - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Check-out refused: pendingPayment, and for the property own key also pendingInvoicePayment or pendingInvoice (only when the property turned those checks on; a partner connection is never refused for invoices). Check-in refused: pendingCheckout, an earlier booking of the same room is still checked in. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. --- # Get booking payments `GET /api/v2/bookings/{pcode}/payments/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-v2-bookings-pcode-payments-bookingid Auth: header `x-api-key` Retrieve every payment registered against a booking, whoever took it: cash and card at reception, bank transfer, and online payments through the gateways the property has connected. When the booking is part of a group, the payments of every booking in the group come back — including those of bookings in other properties, when the group spans several: each payment carries its own `bookingId` and `pcode`, so filter on them to keep the ones of a single booking. `type` says how it was paid, as the property named it, and `providerType` which gateway handled it; it is absent when the payment was taken by hand. A refunded payment stays in the list and is marked as such, so the list is the history, not the balance — add the amounts to get what has actually been collected. Amounts are in the property's currency. Money held as a guarantee rather than collected is not here: see `/deposits`. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/v2/bookings/123456/payments/789' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | number | no | Unique ID of the payment | | `invoiceId` | number | no | ID of the invoice this payment is linked to. Absent while it is on no invoice | | `reference` | string | no | Reference of the payment as it was recorded: free text typed at reception, or the identifier of the gateway or channel that took it (for example the Paycomet order or the channel payment ID). Empty string when there is none. It is not generated by Hotelgest and is not unique | | `amountAuth` | number | no | Amount authorized by the payment provider (may differ from the captured amount for card payments). 0 when there was no authorization | | `amount` | number | no | Actual amount captured/received | | `date` | string | no | Date the payment was made (YYYY-MM-DD) | | `paymentType` | string | no | Same value as `type`. Kept for older integrations: read `type` instead | | `type` | string | no | Payment method, as the property named it. It is free text, not a closed list: besides the usual Cash, Credit Card, Credit Card2, Bank Transfer, Virtual POS, bizum, PayPal, Paycomet, Monei, Stripe, Amex, Paycheck, CashDro and others, a property can record its own names (for example "TPV BBVA", "Booking.com", "VISA", "Bank Transfer booking"), and Hotelgest itself writes "Preauthorization" for a captured card pre-authorisation and "credit" for a payment recorded against a company account | | `providerType` | `paycomet`, `monei`, `stripe` | no | Online payment gateway that took the payment: paycomet, monei or stripe. Absent when it was recorded by hand or came through any other way | | `notes` | string | no | Free-text notes about the payment. Empty string when there are none | | `userId` | number | no | ID of the user who registered this payment. 0 when it was not registered by a person (a gateway, a channel or an integration) | | `bookingId` | number | no | ID of the booking this payment belongs to | | `pcode` | number | no | Property code of the booking the payment belongs to. In a group that spans several properties it can be another property than the one in the path | | `createdAt` | string | no | When the payment was recorded, as an ISO 8601 date-time. The value is Spain local time (Europe/Madrid) written with a `Z` suffix: read the digits as Madrid wall-clock time, not as UTC | | `prePay` | boolean | no | Whether this is a pre-payment (advance payment before check-in, typically from OTA or booking engine) | | `prePayChannel` | number | no | A 0/1 flag, not a channel ID: 1 on a payment the sales channel (OTA) collected and on a captured card pre-authorisation, 0 otherwise | | `transactionType` | string | no | Kind of transaction, as the numeric code the legacy stores, in text: "0" for an ordinary payment (almost all of them), "1" and "2" for card operations handled by a gateway. Absent when the row has no code | | `isRefunded` | boolean | no | Whether this payment has been refunded | | `isAdvancePayment` | boolean | no | Whether this payment already is an advance payment ("pago a cuenta"), so it cannot be converted again | | `locator` | string | no | The booking code on the channel the reservation of this payment came from. Absent when it has none | | `authCode` | string | no | Authorization code the card gateway returned for the payment. Absent on payments that did not go through a gateway | ### 200 example ```json [ { "id": 101, "invoiceId": 450, "reference": "1023-pay-1736935320", "amountAuth": 120.5, "amount": 120.5, "date": "2025-01-15", "paymentType": "Cash", "type": "Cash", "providerType": "paycomet", "notes": "Paid via virtual POS", "userId": 12, "bookingId": 999, "pcode": 123456, "createdAt": "2025-01-15T10:22:00.000Z", "prePay": false, "prePayChannel": 0, "transactionType": "0", "isRefunded": false, "isAdvancePayment": false, "locator": "4417230981", "authCode": "123456" } ] ``` --- # Get booking invoices `GET /api/v2/bookings/{pcode}/invoices/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-v2-bookings-pcode-invoices-bookingid Auth: header `x-api-key` Retrieve the invoices issued for a booking and, when it is part of a group, for every booking of the group in the same property; batch invoices that bill a line of any of them come too. These are the final, legally numbered documents: once issued they are not edited, and a correction is made by issuing a credit note against them. Credit notes come back in the same list, with `type: refund` and the invoice they correct pointing at them through `refundId` — so the amount actually invoiced is the sum of the invoices minus the sum of the credit notes, not the sum of everything. Each entry carries its series and number, date, total, the line items it bills with the tax rate of each, and the customer or company it was billed to; tax bases and tax amounts are not broken out. Amounts are in the currency the invoice was issued in, given in `coin` as it was stored. A booking may have no invoices yet, several, or one per guest when the bill was split. Quotes sent before invoicing are a different document: see `/proformas`. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/v2/bookings/123456/invoices/789' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | number | no | Unique ID of the invoice | | `pcode` | number | no | Property code this invoice belongs to | | `coin` | string | no | Currency of the invoice as it was stored when it was issued: the symbol for most properties (€), an ISO 4217 code for some others (COP, MAD). Not normalised | | `date` | string | no | Invoice issue date (YYYY-MM-DD) | | `prefix` | string | no | Invoice series prefix (e.g. INV, F, RE) as configured in the property settings | | `prefixAdditional` | number | no | Additional numeric prefix for sub-series. Absent when the invoice has none | | `reference` | integer | no | Sequential number of the invoice within its series, as a number. The series is in `prefix` (and `prefixAdditional`): the printed reference is the two together | | `total` | number | no | Total amount of the invoice (including taxes) | | `refundId` | number | no | ID of the credit note that refunds this invoice. Absent when it was not refunded | | `paymentsIds` | number[] | no | List of payment IDs linked to this invoice | | `totalPaid` | number | no | Total amount already paid towards this invoice | | `isCredit` | boolean | no | Whether the invoice was issued on credit, to be paid later. It does not mark a credit note: a credit note is `type: refund` | | `invoiceWasSent` | string | no | Day the invoice was emailed (YYYY-MM-DD). Absent when it was never sent | | `type` | `invoice`, `refund`, `deposit`, `service` | no | Invoice type: invoice, refund (a credit note) or deposit. Invoices and credit notes of the services module (POS) also come as invoice and refund; `servicesDocument` tells them apart. The value service is listed by the enum but never returned here | | `bookingsIds` | number[] | no | List of booking IDs included in this invoice (an invoice can cover multiple bookings) | | `items` | object | no | Line items breakdown. Keyed by item ID, each entry shows the booking it belongs to, tax percentage, and total amount; `type` is the kind of line as stored — an open set: `main` for the stay, `tax` for the tourist tax, and others such as `prePay`, `refund`, `tax2` or the type of a POS integration; absent when the line has none — and `start`/`end` the first and last night it covers (YYYY-MM-DD) when it has them. Taxes come only as a rate per line: the invoice carries no tax bases or tax amounts | | `customerType` | `particular`, `company`, `agency` | no | Billing customer type: particular, company, or agency | | `name` | string | no | Billing customer first name. For a particular it is every word of the billing name but the last; for a company or an agency it is the whole billing name | | `surname` | string | no | Billing customer last name: the last word of the billing name for a particular (empty when the name is one word), and always empty for a company or an agency | | `documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | no | Billing customer document type: P (passport), D (DNI), C (driving license), I (identity card), N (Spanish residence permit), X (foreign residence permit), MI (minor undocumented), E (other), IDX (foreigner ID), ID (identity card, legacy code), 50 (foreign tax ID). P when the stored type is missing or not one of these | | `documentNumber` | string | no | Billing customer document number. Absent when it was not recorded | | `phone` | string | no | Billing customer phone number. Absent when empty | | `address` | string | no | Billing address. Absent when empty | | `postalCode` | string | no | Billing postal code. Absent when empty | | `city` | string | no | Billing city. Absent when empty | | `country` | string | no | Billing country code as stored: almost always ISO 3166-1 alpha-3, a two-letter code on a few older invoices. Absent when empty | | `province` | string | no | Billing province or state. Absent when empty | | `observations` | string | no | Additional notes or observations on the invoice. Absent when empty | | `signed` | boolean | no | Whether the invoice carries the verification URL of a fiscal digital signature (TicketBAI or Veri*factu): see `fiscalUrl` | | `fiscalUrl` | string | no | Verification URL of the fiscal digital signature (TicketBAI or Veri*factu) the invoice was signed with. Absent when it is not signed | | `error` | string | no | Why the fiscal digital signature failed, on an invoice that is not signed. Absent on a signed invoice and when nothing failed | | `errorProvider` | `ticketbai`, `verifactu` | no | Signature provider that reported `error`. Absent when there is no error | | `errorCode` | string | no | The provider's own code for `error` (for example B4_1000002). Absent when the provider gave none | | `signStatus` | `processing`, `signed`, `error` | no | Where an asynchronous signature of an unsigned invoice stands: processing, signed or error. Absent when no signature is in flight | | `companyId` | number | no | ID of the billing customer record (company, agency or particular) the invoice was issued to | | `countryName` | string | no | Country name of the billing customer as it was typed (for example "france"), the text the invoice prints. Absent when empty | | `irpf` | number | yes | Withholding tax rate (IRPF) of the invoice, in percent. 0 when there is none | | `servicesDocument` | boolean | no | true on the invoices and credit notes of the services module (POS sales billed on their own series). Absent on every other invoice | | `bookingTotal` | number | no | Only on an invoice that bills bookings outside the group of the one asked for (a batch invoice): what this booking owes on it. `total` keeps meaning the whole invoice | | `bookingPaid` | number | no | Only on a batch invoice, with `bookingTotal`: what has been paid for this booking on it. `totalPaid` keeps meaning the whole invoice | ### 200 example ```json [ { "id": 1, "pcode": 123456, "coin": "€", "date": "2025-01-20", "prefix": "INV", "prefixAdditional": 2, "reference": 1, "total": 450.75, "refundId": 99, "paymentsIds": [ 10, 11 ], "totalPaid": 300.5, "isCredit": false, "invoiceWasSent": "2025-01-21", "type": "invoice", "bookingsIds": [ 1001, 1002 ], "items": { "1": { "bookingId": 1001, "tax": 10, "total": 100, "type": "main", "start": "2026-01-10", "end": "2026-01-11" }, "2": { "bookingId": 1002, "tax": 10, "total": 200 } }, "customerType": "particular", "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "X1234567", "phone": "+34 600 123 456", "address": "Main Street 123", "postalCode": "08001", "city": "Barcelona", "country": "ESP", "province": "Barcelona", "observations": "Customer requested digital invoice", "signed": true, "fiscalUrl": "https://batuz.eus/QRTBAI/?id=TBAI-00000000A-010126-btFpwP8dcLGAF-237", "error": "Invalid tax calculation", "errorProvider": "verifactu", "errorCode": "B4_1000002", "signStatus": "processing", "companyId": 12, "countryName": "france", "irpf": 0, "servicesDocument": true, "bookingTotal": 180, "bookingPaid": 180 } ] ``` --- # Get booking proformas `GET /api/v2/bookings/{pcode}/proformas/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-v2-bookings-pcode-proformas-bookingid Auth: header `x-api-key` Retrieve the proformas issued for a booking. A proforma is a quote in the shape of an invoice: it is sent to the guest or the company before the stay to state what it will cost, and it has no accounting value — it does not use the invoice numbering and it settles nothing. The real document is the invoice (`/invoices`), which may be issued later for a different amount if the stay changed. When the booking is part of a group, the proformas of every booking of the group in the same property come too. Each entry carries its series and number, date, total, line items and the customer or company it was addressed to. Amounts are in the currency the proforma was issued in, given in `coin` as it was stored. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/v2/bookings/123456/proformas/789' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `coin` | string | no | Currency of the proforma as it was stored when it was issued: the symbol for most properties (€, $, S./), an ISO 4217 code for some others (COP, MAD, PHP). Not normalised; null on a few old proformas that stored none | | `date` | string | no | Proforma issue date (YYYY-MM-DD) | | `id` | number | no | Unique ID of the proforma | | `prefix` | string | no | Proforma series prefix (e.g. PRO) as configured in the property settings | | `reference` | string | no | Number of the proforma within its series, as text. The series is in `prefix`: the printed reference is the two together | | `total` | number | no | Total amount of the proforma (including taxes) | | `isCredit` | boolean | no | Always false: proformas have no credit flag. Kept so that the shape matches the invoices one | | `proformaWasSent` | string | no | Day the proforma was emailed (YYYY-MM-DD). Absent when it was never sent | | `bookingsIds` | number[] | no | List of booking IDs included in this proforma | | `items` | object | no | Line items breakdown. Keyed by item ID, each entry shows the booking it belongs to, tax percentage, and total amount | | `customerType` | `particular`, `company`, `agency` | no | Billing customer type: particular, company, or agency | | `name` | string | no | Billing customer first name. For a particular it is every word of the billing name but the last; for a company or an agency it is the whole billing name | | `surname` | string | no | Billing customer last name: the last word of the billing name for a particular (empty when the name is one word), and always empty for a company or an agency | | `documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | no | Billing customer document type: P (passport), D (DNI), C (driving license), I (identity card), N (Spanish residence permit), X (foreign residence permit), MI (minor undocumented), E (other), IDX (foreigner ID), ID (identity card, legacy code), 50 (foreign tax ID). P when the stored type is missing or not one of these | | `documentNumber` | string | no | Billing customer document number. Absent when it was not recorded | | `phone` | string | no | Billing customer phone number. Absent when empty | | `address` | string | no | Billing address. Absent when empty | | `postalCode` | string | no | Billing postal code. Absent when empty | | `city` | string | no | Billing city. Absent when empty | | `country` | string | no | Billing country code as stored: almost always ISO 3166-1 alpha-3, a two-letter code on a few older documents. Absent when empty | | `province` | string | no | Billing province or state. Absent when empty | | `observations` | string | no | Additional notes or observations on the proforma. Absent when empty | | `countryName` | string | no | Country name of the billing customer as it was typed (for example "france"), the text the proforma prints. Absent when empty | ### 200 example ```json [ { "coin": "€", "date": "2025-02-10", "id": 50, "prefix": "PRO", "reference": "45", "total": 325, "isCredit": false, "proformaWasSent": "2025-02-10", "bookingsIds": [ 1001, 1005 ], "items": { "1": { "bookingId": 1001, "tax": 10, "total": 150 }, "2": { "bookingId": 1005, "tax": 10, "total": 175 } }, "customerType": "particular", "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "X9876543", "phone": "+34 600 123 456", "address": "Main Street 123", "postalCode": "08001", "city": "Barcelona", "country": "ESP", "province": "Barcelona", "observations": "Client requested summary breakdown.", "countryName": "france" } ] ``` --- # Get booking products `GET /api/v2/bookings/{pcode}/products/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-v2-bookings-pcode-products-bookingid Auth: header `x-api-key` Retrieve everything charged to a booking, plus a breakdown of what was booked. When the booking is part of a group, the charges of every booking of the group come back, one set of entries per booking — including bookings of other properties when the group spans several. `breakdown` summarises a group by room type — how many rooms and for what occupancy — and is an empty array for a booking on its own. `items` carries the charges themselves, grouped by where they came from: each entry has exactly one key, `booking` for the lines produced by the PMS (the accommodation, the tourist tax and the extras), `experticket` for the tickets sold through the Experticket integration, or `revo`, `agora`, `spalopia` or `ticksy` for charges imported from the corresponding POS integration. Lines returned by a credit note are left out of `booking` and kept in the POS groups; lines of the retired Tiller integration are not returned. The `experticket` entry of a booking comes right after its `booking` entry, and its lines are no longer part of `booking.total`. Each ticket line carries its sale under `experticket`; when the request is authenticated with an API key, the ticket PDF link (`sale.documentUrl`), the access codes (`sale.accessCode`, `sale.tickets[].accessCode`) and the billing codes (`sale.tickets[].billingCode`) come back as null, and the guest answers (`answers`) are omitted. A line already billed carries the `invoiceId` of its invoice; a line still pending invoicing has none. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/v2/bookings/123456/products/789' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `breakdown` | gbpBreakdownDto[] | yes | What was booked, grouped by room type: how many rooms of each type and the occupancy they were priced for. Filled only for a booking that is part of a group; an empty array for a booking on its own | | `breakdown[].quantity` | number | yes | Number of rooms booked of this room type | | `breakdown[].roomTypeId` | number | yes | Room type ID. Resolve it against `GET /api/rooms/{pcode}/types` | | `breakdown[].occupancy` | gbpOccupancyDto | yes | Combined occupancy across the rooms of this room type | | `breakdown[].occupancy.total` | number | yes | Total number of guests (adults + children + babies) | | `breakdown[].occupancy.adults` | number | yes | Number of adults | | `breakdown[].occupancy.children` | number | yes | Number of children | | `breakdown[].occupancy.babies` | number | yes | Number of babies (not counted towards capacity) | | `items` | gbpItemDto[] | yes | Charge groups. Each entry has exactly one key, naming where the charges came from: `booking` for the accommodation itself, `experticket` for the tickets sold through Experticket, or one of the POS integrations. In a group, there is one set of entries per booking of the group, which may belong to other properties when the group spans several. Lines of the retired Tiller integration (none since 2022) are not returned | | `items[].booking` | gbpBookingDataDto | no | Accommodation charges, produced by the PMS | | `items[].booking.values` | GetBookingResponseDto | yes | Full booking the accommodation lines belong to — same shape as the booking detail | | `items[].booking.bookingId` | number | yes | ID of the booking. Read it from `values.id` instead | | `items[].booking.customer` | object | no | Holder of the booking. Read it from `values.customer` instead | | `items[].booking.companyId` | number | no | Company billed for the booking. Read it from `values.companyId` instead | | `items[].booking.guests` | gbrGuestDto[] | no | Guests staying in the room. Read them from the booking detail endpoint instead | | `items[].booking.data` | gbpBaseDataDto[] | yes | Every line of the booking that no integration owns: the accommodation, the tourist tax, the extras of the catalogue, and the pre-payment and discount lines. Lines returned by a credit note are left out | | `items[].booking.total` | number | yes | Sum of the lines in `data` | | `items[].booking.invoicedStayDifference` | number | no | What the stay is worth now minus what its accommodation lines add up to (invoiced plus pending), taxes included. Present only when the two differ, which happens when the stay changed after it was invoiced: positive when part of the stay is on no invoice, negative when the invoice charges more than the stay is worth now. Never present for a cancelled or no-show booking charged only the amount it keeps, which is invoiced against that amount | | `items[].experticket` | gbpProductDataDto | no | Tickets sold through the Experticket integration. One entry per booking, right after that booking's `booking` entry; these lines are not part of `booking.total` | | `items[].experticket.bookingId` | number | yes | ID of the booking these lines were charged to | | `items[].experticket.data` | gbpBaseDataDto[] | yes | Product lines of this integration | | `items[].experticket.total` | number | yes | Sum of the lines in `data` | | `items[].revo` | gbpProductDataDto | no | Charges imported from the Revo POS integration. Unlike the `booking` group, lines returned by a credit note are included | | `items[].revo.bookingId` | number | yes | ID of the booking these lines were charged to | | `items[].revo.data` | gbpBaseDataDto[] | yes | Product lines of this integration | | `items[].revo.total` | number | yes | Sum of the lines in `data` | | `items[].agora` | gbpProductDataDto | no | Charges imported from the Ágora POS integration. Unlike the `booking` group, lines returned by a credit note are included | | `items[].agora.bookingId` | number | yes | ID of the booking these lines were charged to | | `items[].agora.data` | gbpBaseDataDto[] | yes | Product lines of this integration | | `items[].agora.total` | number | yes | Sum of the lines in `data` | | `items[].spalopia` | gbpProductDataDto | no | Charges imported from the Spalopia spa integration. Unlike the `booking` group, lines returned by a credit note are included | | `items[].spalopia.bookingId` | number | yes | ID of the booking these lines were charged to | | `items[].spalopia.data` | gbpBaseDataDto[] | yes | Product lines of this integration | | `items[].spalopia.total` | number | yes | Sum of the lines in `data` | | `items[].ticksy` | gbpProductDataDto | no | Charges imported from the Ticksy activities integration. Unlike the `booking` group, lines returned by a credit note are included | | `items[].ticksy.bookingId` | number | yes | ID of the booking these lines were charged to | | `items[].ticksy.data` | gbpBaseDataDto[] | yes | Product lines of this integration | | `items[].ticksy.total` | number | yes | Sum of the lines in `data` | ### 200 example ```json { "breakdown": [ { "quantity": 2, "roomTypeId": 101, "occupancy": { "total": 3, "adults": 2, "children": 1, "babies": 0 } } ], "items": [ { "booking": { "values": { "id": 789, "pcode": 123456, "groupId": 4521, "groupPrice": 200, "groupQuantity": 2, "start": "2026-10-01", "end": "2026-10-05", "arrivalHour": "14:00", "departureHour": "12:00", "nights": 4, "appUrl": "https://guest.hotelgest.com/?t=AbCdEf123", "createdAt": "2026-09-30", "resource": "1_12", "price": 100, "accommodationPrice": 100, "paid": 100, "totalExtras": 20, "canceledCost": 45, "earlyDepartureOriginalEnd": "2026-10-07", "cancelledAt": "2026-09-21T08:00:00.000Z", "locked": false, "color": "#FF5733", "imported": false, "board": {}, "policy": "4", "room": { "id": 12, "roomTypeId": 1, "originalRoomTypeId": 1 }, "locator": "HG-4F7A2C", "packId": 7, "packInfo": { "id": 7, "translations": { "en": { "name": "Romantic getaway", "description": "Two nights with dinner included" } }, "dtype": -1, "value": 10, "price": 0, "weekday": [ "Fri", "Sat" ], "products": [] }, "customer": { "id": 1234, "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "A12345678", "address": "123 Main St", "city": "New York", "postalCode": "10001", "country": "ESP", "province": "madrid", "email": "john.doe@example.com", "phone": "+1 (555) 123-4567", "language": "es", "documentPortrait": "/document-portrait/MTIzNA==.jpg", "documentFront": "/document-front/MTIzNA==.jpg", "documentBack": "/document-back/MTIzNA==.jpg", "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ", "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ", "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA", "notes": "VIP customer", "bookingId": 789, "loyalty": "GOLD-123" }, "companyId": 12, "notes": { "request": "Late check-in, extra pillow", "internal": "Guest prefers a quiet room", "flat": "No special requests" }, "occupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "groupOccupancy": { "adults": 2, "children": 2, "babies": 1, "total": 5 }, "otaId": 3, "checkInStatus": "checked-in", "bookingStatus": "ready", "releaseDateTentative": "2026-10-01 18:00", "virtualPayment": { "type": {}, "amount": 100 }, "paymentStatus": {}, "invoiceStatus": {}, "bookingType": { "label": "Painting", "type": "bloqued-out-order", "typeV2": {} }, "toDos": { "data": [], "pendings": 5, "total": 10 }, "guests": [ { "id": null, "name": null, "surname": null, "documentType": null, "documentNumber": null, "address": null, "city": null, "postalCode": null, "country": null, "province": null, "email": null, "phone": null, "language": null, "documentPortrait": null, "documentFront": null, "documentBack": null, "documentPortraitImagePath": null, "documentFrontImagePath": null, "documentBackImagePath": null, "notes": null, "bookingId": null, "sex": null, "nationality": null, "issuingState": null, "birthDate": null, "placeOfBirth": null, "expirationDate": null, "issueDate": null, "municipality": null, "placeOfOrigin": null, "destinationPlace": null, "position": null, "documentSupport": null, "relationship": null, "signatureImagePath": null } ], "isSaleDirect": true, "housekeeping": { "dateToClean": "2026-10-01", "quantityNightsClean": 2, "weekDaysClean": { "mon": null, "tue": null, "wed": null, "thu": null, "fri": null, "sat": null, "sun": null } }, "segmentsOnBooking": [ { "id": null, "name": null } ], "segmentsOnCustomer": [ { "id": null, "name": null } ], "segmentApplyScope": "booking" }, "bookingId": 789, "customer": { "name": "John", "surname": "Doe" }, "companyId": 12, "guests": [ { "id": 1234, "name": "John", "surname": "Doe", "documentType": "D", "documentNumber": "A12345678", "address": "123 Main St", "city": "New York", "postalCode": "10001", "country": "ESP", "province": "madrid", "email": "john.doe@example.com", "phone": "+1 (555) 123-4567", "language": "es", "documentPortrait": "/document-portrait/MTIzNA==.jpg", "documentFront": "/document-front/MTIzNA==.jpg", "documentBack": "/document-back/MTIzNA==.jpg", "documentPortraitImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LXBvcnRyYWl0OjEyMzQ", "documentFrontImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWZyb250OjEyMzQ", "documentBackImagePath": "/api/bookings/123456/customer-image/Nzg5OmRvY3VtZW50LWJhY2s6MTIzNA", "notes": "VIP customer", "bookingId": 789, "sex": "M", "nationality": "ESP", "issuingState": "ESP", "birthDate": "1985-04-12", "placeOfBirth": "Barcelona", "expirationDate": "2030-04-12", "issueDate": "2020-04-12", "municipality": "barcelona", "placeOfOrigin": "Madrid", "destinationPlace": "Valencia", "position": 1, "documentSupport": "BAA123456", "relationship": "HJ", "signatureImagePath": "/api/bookings/123456/customer-image/Nzg5OnNpZ25hdHVyZToxMjM0" } ], "data": [ { "id": 15342, "quantity": 1, "room": { "id": null, "name": null, "doorNum": null, "roomTypeId": null, "floor": null, "position": null }, "pack": { "id": null, "room": null, "name": null, "text": null }, "occupancy": { "total": null, "adults": null, "children": null, "babies": null }, "board": "bb", "policy": "4", "invoiceId": 3021, "start": "2026-01-10", "end": "2026-01-12", "prices": [], "product": { "id": null, "name": null, "translate": null, "price": null, "tax": null, "isTuristicTax": null, "start": null, "end": null, "startTime": null, "endTime": null, "discount": null }, "discount": { "originalTotal": null, "type": null, "value": null, "code": null }, "createdAt": "2026-01-08 12:00:00", "externalOrder": "A/000123", "parentItemId": 15340, "refundInvoiceId": 3022, "experticket": { "productId": null, "providerId": null, "providerName": null, "productName": null, "sessionId": null, "sessionTime": null, "answers": null, "sale": null }, "paymentId": 101, "itemType": "prePay", "accountUnassigned": true, "invoiceItems": [], "total": 25 } ], "total": 240, "invoicedStayDifference": 35.5 }, "experticket": { "bookingId": 789, "data": [ { "id": 15342, "quantity": 1, "room": { "id": null, "name": null, "doorNum": null, "roomTypeId": null, "floor": null, "position": null }, "pack": { "id": null, "room": null, "name": null, "text": null }, "occupancy": { "total": null, "adults": null, "children": null, "babies": null }, "board": "bb", "policy": "4", "invoiceId": 3021, "start": "2026-01-10", "end": "2026-01-12", "prices": [], "product": { "id": null, "name": null, "translate": null, "price": null, "tax": null, "isTuristicTax": null, "start": null, "end": null, "startTime": null, "endTime": null, "discount": null }, "discount": { "originalTotal": null, "type": null, "value": null, "code": null }, "createdAt": "2026-01-08 12:00:00", "externalOrder": "A/000123", "parentItemId": 15340, "refundInvoiceId": 3022, "experticket": { "productId": null, "providerId": null, "providerName": null, "productName": null, "sessionId": null, "sessionTime": null, "answers": null, "sale": null }, "paymentId": 101, "itemType": "prePay", "accountUnassigned": true, "invoiceItems": [], "total": 25 } ], "total": 74.3 }, "revo": { "bookingId": 789, "data": [ { "id": 15342, "quantity": 1, "room": { "id": null, "name": null, "doorNum": null, "roomTypeId": null, "floor": null, "position": null }, "pack": { "id": null, "room": null, "name": null, "text": null }, "occupancy": { "total": null, "adults": null, "children": null, "babies": null }, "board": "bb", "policy": "4", "invoiceId": 3021, "start": "2026-01-10", "end": "2026-01-12", "prices": [], "product": { "id": null, "name": null, "translate": null, "price": null, "tax": null, "isTuristicTax": null, "start": null, "end": null, "startTime": null, "endTime": null, "discount": null }, "discount": { "originalTotal": null, "type": null, "value": null, "code": null }, "createdAt": "2026-01-08 12:00:00", "externalOrder": "A/000123", "parentItemId": 15340, "refundInvoiceId": 3022, "experticket": { "productId": null, "providerId": null, "providerName": null, "productName": null, "sessionId": null, "sessionTime": null, "answers": null, "sale": null }, "paymentId": 101, "itemType": "prePay", "accountUnassigned": true, "invoiceItems": [], "total": 25 } ], "total": 74.3 }, "agora": { "bookingId": 789, "data": [ { "id": 15342, "quantity": 1, "room": { "id": null, "name": null, "doorNum": null, "roomTypeId": null, "floor": null, "position": null }, "pack": { "id": null, "room": null, "name": null, "text": null }, "occupancy": { "total": null, "adults": null, "children": null, "babies": null }, "board": "bb", "policy": "4", "invoiceId": 3021, "start": "2026-01-10", "end": "2026-01-12", "prices": [], "product": { "id": null, "name": null, "translate": null, "price": null, "tax": null, "isTuristicTax": null, "start": null, "end": null, "startTime": null, "endTime": null, "discount": null }, "discount": { "originalTotal": null, "type": null, "value": null, "code": null }, "createdAt": "2026-01-08 12:00:00", "externalOrder": "A/000123", "parentItemId": 15340, "refundInvoiceId": 3022, "experticket": { "productId": null, "providerId": null, "providerName": null, "productName": null, "sessionId": null, "sessionTime": null, "answers": null, "sale": null }, "paymentId": 101, "itemType": "prePay", "accountUnassigned": true, "invoiceItems": [], "total": 25 } ], "total": 74.3 }, "spalopia": { "bookingId": 789, "data": [ { "id": 15342, "quantity": 1, "room": { "id": null, "name": null, "doorNum": null, "roomTypeId": null, "floor": null, "position": null }, "pack": { "id": null, "room": null, "name": null, "text": null }, "occupancy": { "total": null, "adults": null, "children": null, "babies": null }, "board": "bb", "policy": "4", "invoiceId": 3021, "start": "2026-01-10", "end": "2026-01-12", "prices": [], "product": { "id": null, "name": null, "translate": null, "price": null, "tax": null, "isTuristicTax": null, "start": null, "end": null, "startTime": null, "endTime": null, "discount": null }, "discount": { "originalTotal": null, "type": null, "value": null, "code": null }, "createdAt": "2026-01-08 12:00:00", "externalOrder": "A/000123", "parentItemId": 15340, "refundInvoiceId": 3022, "experticket": { "productId": null, "providerId": null, "providerName": null, "productName": null, "sessionId": null, "sessionTime": null, "answers": null, "sale": null }, "paymentId": 101, "itemType": "prePay", "accountUnassigned": true, "invoiceItems": [], "total": 25 } ], "total": 74.3 }, "ticksy": { "bookingId": 789, "data": [ { "id": 15342, "quantity": 1, "room": { "id": null, "name": null, "doorNum": null, "roomTypeId": null, "floor": null, "position": null }, "pack": { "id": null, "room": null, "name": null, "text": null }, "occupancy": { "total": null, "adults": null, "children": null, "babies": null }, "board": "bb", "policy": "4", "invoiceId": 3021, "start": "2026-01-10", "end": "2026-01-12", "prices": [], "product": { "id": null, "name": null, "translate": null, "price": null, "tax": null, "isTuristicTax": null, "start": null, "end": null, "startTime": null, "endTime": null, "discount": null }, "discount": { "originalTotal": null, "type": null, "value": null, "code": null }, "createdAt": "2026-01-08 12:00:00", "externalOrder": "A/000123", "parentItemId": 15340, "refundInvoiceId": 3022, "experticket": { "productId": null, "providerId": null, "providerName": null, "productName": null, "sessionId": null, "sessionTime": null, "answers": null, "sale": null }, "paymentId": 101, "itemType": "prePay", "accountUnassigned": true, "invoiceItems": [], "total": 25 } ], "total": 74.3 } } ] } ``` --- # Get booking deposits `GET /api/bookings/{pcode}/deposits/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-bookings-pcode-deposits-bookingid Auth: header `x-api-key` Retrieve the security deposits held against a booking. A deposit is money taken as a guarantee, not as payment for the stay: it is returned at check-out unless it is converted into a payment. That is what `type` says — `deposit` for money taken, `refund` for money given back — so a deposit that was returned appears as two entries, the `refund` one with the amount negative. A deposit converted into a payment carries the `paymentId` it became; a returned one carries the `refundId` of its `refund` entry. Each entry gives its currency in `currency`, as it was stored. Payments for the stay itself are a different endpoint: `/payments`. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/bookings/123456/deposits/789' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | number | no | Unique ID of the deposit | | `pcode` | number | no | Property code this deposit belongs to | | `bookingId` | number | no | ID of the booking this deposit is linked to | | `amount` | number | no | Amount of the entry, in the currency given by `currency`: positive on a `deposit`, negative on the `refund` that gave it back | | `currency` | string | no | Currency of the deposit as it was stored: the currency symbol (€) for deposits recorded in the PMS, the ISO 4217 code for some recorded by the legacy panel. Not normalised | | `date` | string | no | Date the deposit was taken (YYYY-MM-DD). Null when it was recorded without one | | `observations` | string | no | Free-text notes about this deposit. Null when none were written | | `createdAt` | string | no | When the deposit was recorded, as an ISO 8601 date-time with a `Z` suffix. Deposits recorded in the PMS hold UTC; older ones recorded by the legacy panel hold Spain local time (Europe/Madrid) under the same suffix | | `paymentId` | number | no | ID of the payment this deposit was converted into. Absent when it was not converted | | `refundId` | number | no | On a `deposit` entry that was given back, the ID of its `refund` entry. Absent when it was not returned | | `type` | `deposit`, `refund` | no | Type of deposit: deposit (money received) or refund (money returned) | ### 200 example ```json [ { "id": 1, "pcode": 123456, "bookingId": 789, "amount": 150, "currency": "€", "date": "2025-01-10", "observations": "Deposit made at check-in", "createdAt": "2025-01-10T12:00:00.000Z", "paymentId": 101, "refundId": 12, "type": "deposit" } ] ``` --- # Get customer document image `GET /api/bookings/{pcode}/customer-image/{hash}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-bookings-pcode-customer-image-hash Auth: header `x-api-key` Download a scan of a guest's identity document — passport, ID card or residence permit — or the guest's signature, as binary image data. The `hash` is not something you build: read it from the booking detail, as the last segment of the customer fields `documentPortraitImagePath`, `documentFrontImagePath`, `documentBackImagePath` or `signatureImagePath`, which hold the whole path of this endpoint. A guest who never uploaded a document has none, and there is nothing to fetch. Responses carry a strong `ETag` and may be cached for 10 minutes; send the ETag back as `If-None-Match` and you get `304 Not Modified`, with no body, instead of the bytes. The same document keeps the same hash even if the guest replaces the file, so rely on the ETag rather than the URL to tell whether it changed. With an API key, this endpoint counts against the key's quota like any other. This is personal data: the response is marked as privately cacheable so no shared cache keeps a copy. Store it accordingly, or not at all. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | | `hash` | string | yes | Identifier of the document image: the last segment of the path in the customer fields `documentPortraitImagePath`, `documentFrontImagePath`, `documentBackImagePath` or `signatureImagePath` of the booking detail. Take it from there rather than building it | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `If-None-Match` | string | no | The `ETag` of the copy you already have. When it still matches, the answer is `304 Not Modified` without the bytes | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/bookings/123456/customer-image/MTAyMzpkb2N1bWVudC1mcm9udDo3Nw' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — The document image, as binary data. The content type is the one the file was stored with: `image/jpg` for documents scanned in the PMS (a non-standard spelling of JPEG; treat it as `image/jpeg`), `application/octet-stream` for older ones uploaded through the legacy panel, and `image/png` or `image/jpeg` when the file was stored that way. Read the bytes rather than trusting the type - `304` — Not Modified: the `If-None-Match` sent matches the current `ETag`. No body; keep using the copy you have - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too many requests: the rate limit of the API key (or of the session) was hit - `500` — Internal Server Error. An unexpected error occurred on the server. --- # List OTAs (Online Travel Agencies) `GET /api/otas` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-otas Auth: header `x-api-key` The catalogue of sales channels the PMS knows about — Booking.com, Expedia, Airbnb and the rest — with the ID, name and display colour of each. Use it to resolve the `otaId` that bookings carry into a channel name: that field is a number, and this is the only place that says what it means. The list is sorted by name; `0` is the property itself (a sale at reception), and a channel withdrawn from the catalogue is not listed, so an old booking may carry an `otaId` that is not here. The catalogue is the same for every property, so this is the one endpoint with no `pcode` in its path — any valid API key can read it. It changes very rarely: fetch it once and keep it, rather than on every booking. ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/otas' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | number | yes | Unique identifier of the OTA. Use this value to match the `otaId` field in booking responses. `0` is the property itself (direct sale at reception) | | `name` | string | yes | Display name of the OTA (e.g. Booking.com, Expedia, Airbnb) | | `color` | string | yes | Brand color of the OTA for UI display, usually a hex code. Empty string when the channel has none | ### 200 example ```json [ { "id": 1, "name": "Booking.com", "color": "#1E90FF" } ] ``` --- # List all webhooks `GET /api/webhooks/{pcode}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-webhooks-pcode Auth: header `x-api-key` The outgoing webhooks configured for a property. Each one is a URL of yours that the PMS calls with an HTTP POST when an event it subscribes to happens, and each shows whether it is currently enabled. The Basic password is never returned, only whether one is stored (`passwordSet`). The only event available today is `bookings-added`, sent when bookings are created. Requires an admin user and a subscription with the API add-on; without either, every endpoint in this section answers 403. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/webhooks/123456' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | yes | Unique identifier of the webhook (a 24-character hex id) | | `pcode` | number | yes | Property code the webhook belongs to | | `name` | string | yes | Name of the webhook | | `url` | string | yes | URL of the webhook | | `eventTypes` | `bookings-added`[] | yes | Event types that trigger a delivery | | `authentication` | WebhookAuthenticationDto | yes | Authentication sent with each delivery | | `authentication.status` | boolean | yes | Whether deliveries carry an `Authorization: Basic` header | | `authentication.username` | string | no | Username for basic authentication. Only validated, and only meaningful, when `status` is true | | `authentication.password` | string | no | Always empty: the password is never returned. `passwordSet` says whether one is stored | | `authentication.passwordSet` | boolean | no | Whether a password is stored. To keep it when updating the webhook, send `password` empty with the same URL origin and username | | `isAvailable` | boolean | yes | Whether the webhook is enabled | | `createdAt` | string (date-time) | no | When the webhook was created (ISO 8601) | ### 200 example ```json [ { "id": "65f1c2a9b4d3e2f1a0c9b8d7", "pcode": 1010, "name": "Booking Created Webhook", "url": "https://myapp.com/webhooks", "eventTypes": [ "bookings-added" ], "authentication": { "status": true, "username": "myUser", "password": "", "passwordSet": true }, "isAvailable": true, "createdAt": "2025-01-10T14:35:00.000Z" } ] ``` --- # Create webhook `POST /api/webhooks/{pcode}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/post-api-webhooks-pcode Auth: header `x-api-key` Register a URL to be called when an event happens. It starts receiving deliveries immediately. What to expect on your endpoint: a POST with a JSON body, `Content-Type: application/json`, and an `Authorization: Basic` header when you configure credentials here. Redirects are not followed — register the final URL, not one that redirects to it — and **a failed delivery is not retried**: it is recorded in the delivery log and dropped, so treat the webhook as a notification to act on, not as a guaranteed feed. There is no delivery timeout, and the deliveries of one property go out one after another, so a slow answer delays the next webhook: answer quickly and do your work afterwards. Use `/test` once the webhook exists to check its URL is reachable before relying on it. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X POST 'https://uni-api.hotelgest.com/api/webhooks/123456' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "My Webhook", "url": "https://mywebhook.com", "eventTypes": [ "bookings-added" ], "authentication": { "status": true, "username": "myUser", "password": "myPassword" } }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | yes | Name | | `url` | string | yes | Url | | `eventTypes` | `bookings-added`[] | yes | List of event types | | `authentication` | Authentication | yes | Authentication details | | `authentication.status` | boolean | yes | status | | `authentication.username` | string | yes | username | | `authentication.password` | string | no | Password for basic authentication. Required to create one. On update, empty keeps the stored password, if the URL origin and the username are the ones it was stored with | ## Responses - `201` — Created. - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. --- # Update webhook `PUT /api/webhooks/{pcode}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/put-api-webhooks-pcode Auth: header `x-api-key` Change an existing webhook's URL, subscribed events, name or authentication. The ID goes in the request body, not in the path — unlike delete, enable and disable, which take it in the path. The change applies to the next delivery; deliveries already sent are not affected. The Basic password is never returned: send it empty to keep the stored one, which is only kept while the URL origin and the username stay the same. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X PUT 'https://uni-api.hotelgest.com/api/webhooks/123456' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "My Webhook", "url": "https://mywebhook.com", "eventTypes": [ "bookings-added" ], "authentication": { "status": true, "username": "myUser", "password": "myPassword" }, "id": "60d21b4667d0d8992e610c85" }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `name` | string | yes | Name | | `url` | string | yes | Url | | `eventTypes` | `bookings-added`[] | yes | List of event types | | `authentication` | Authentication | yes | Authentication details | | `authentication.status` | boolean | yes | status | | `authentication.username` | string | yes | username | | `authentication.password` | string | no | Password for basic authentication. Required to create one. On update, empty keeps the stored password, if the URL origin and the username are the ones it was stored with | | `id` | string | yes | Webhook ID | ## Responses - `204` — No Content. - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. --- # Delete webhook `DELETE /api/webhooks/{pcode}/{id}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/delete-api-webhooks-pcode-id Auth: header `x-api-key` Permanently delete a webhook. Deliveries stop immediately and the configuration is gone — to stop them for a while and keep the setup, disable it instead. Its delivery log is not recoverable through the API afterwards. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | | `id` | string | yes | Webhook ID, as returned by `GET /api/webhooks/{pcode}`. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X DELETE 'https://uni-api.hotelgest.com/api/webhooks/123456/65f1c2a9b4d3e2f1a0c9b8d7' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `204` — No Content. - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. --- # Enable webhook `PATCH /api/webhooks/{pcode}/{id}/enable` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/patch-api-webhooks-pcode-id-enable Auth: header `x-api-key` Re-enable a disabled webhook. Deliveries resume with the next event; nothing that happened while it was disabled is replayed. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | | `id` | string | yes | Webhook ID, as returned by `GET /api/webhooks/{pcode}`. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X PATCH 'https://uni-api.hotelgest.com/api/webhooks/123456/65f1c2a9b4d3e2f1a0c9b8d7/enable' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `204` — No Content. - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. --- # Disable webhook `PATCH /api/webhooks/{pcode}/{id}/disable` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/patch-api-webhooks-pcode-id-disable Auth: header `x-api-key` Stop deliveries without deleting the webhook, keeping its URL and settings for later. Events that happen while it is disabled are lost, not queued — they are not delivered when you enable it again. Use it while your endpoint is down or being deployed. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | | `id` | string | yes | Webhook ID, as returned by `GET /api/webhooks/{pcode}`. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X PATCH 'https://uni-api.hotelgest.com/api/webhooks/123456/65f1c2a9b4d3e2f1a0c9b8d7/disable' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `204` — No Content. - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. --- # Test webhook `POST /api/webhooks/{pcode}/test` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/post-api-webhooks-pcode-test Auth: header `x-api-key` Send a sample delivery to the URL of a webhook you already created — the body names it by `id` — and report back what happened: the outcome Hotelgest recorded, how long it took, and the error if it failed. Any 2xx comes back as `200`; no response at all (network error, or a URL refused because it resolves to a private network) comes back as `500` with the reason in `errorMessage`. The body is the same envelope a real delivery has, with a fixed sample booking, so your endpoint can be tested against the real shape. The webhook is tested whether it is enabled or not. A test does not appear in the delivery log. An unknown `id` answers 404. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X POST 'https://uni-api.hotelgest.com/api/webhooks/123456/test' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "id": "60d21b4667d0d8992e610c85", "eventType": "bookings-added" }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | yes | Webhook ID | | `eventType` | `bookings-added` | yes | Webhook Event Type | ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code | | `webhookId` | string | yes | ID of the webhook that was tested | | `url` | string | yes | URL the test delivery was sent to: the one configured on the webhook | | `eventType` | `bookings-added` | yes | Event type of the sample payload | | `payload` | object | yes | The JSON body POSTed to your URL: `{ "eventType": "bookings-added", "data": { "bookings": [ … ] } }`. Each item of `data.bookings` has the shape `GET /api/bookings/{pcode}/detail/{bookingId}` answers. Keys whose value was missing when it was sent can hold `null` here. For a test, the bookings are a fixed sample, not real ones. | | `statusCode` | number | yes | Outcome of the delivery as Hotelgest records it: `200` for any 2xx answer from your endpoint (the exact 2xx is not kept), the status your endpoint answered for any other response (redirects are not followed, so a 3xx is recorded as is), and `500` when there was no response at all — a network error, a TLS failure, or a URL refused because it resolves to a private network. In that last case the `500` is Hotelgest's, not your endpoint's. | | `errorMessage` | string | no | Why the delivery failed: the HTTP client's message (e.g. `Request failed with status code 404`, `connect ECONNREFUSED 203.0.113.10:443`) or the reason the URL was refused. `null` or absent when the delivery succeeded. | | `durationMs` | number | yes | Duration of the test delivery in milliseconds | ### 200 example ```json { "pcode": 1010, "webhookId": "65f1c2a9b4d3e2f1a0c9b8d7", "url": "https://myapp.com/webhooks", "eventType": "bookings-added", "payload": { "eventType": "bookings-added", "data": { "bookings": [ { "id": 12345, "pcode": 1010, "groupId": 987, "groupPrice": 950, "groupQuantity": 3, "start": "2025-11-10", "end": "2025-11-13", "arrivalHour": "15:00", "departureHour": "11:00", "nights": 3, "appUrl": "https://app.example.com/booking/12345", "createdAt": "2025-10-26T16:00:00.000Z", "resource": "room-101", "text": "", "board": "hb", "policy": "4", "price": 1200, "paid": 600, "totalExtras": 100, "locked": false, "color": "#ffcc00", "imported": false, "room": { "id": 101, "roomTypeId": 2, "originalRoomTypeId": 2 }, "locator": "ABC123XYZ", "customer": { "id": 1, "name": "Test", "surname": "User", "documentType": "D", "documentNumber": "A12345678", "phone": "+34911111222", "email": "agustin@example.com", "address": "Calle Falsa 123", "city": "Barcelona", "postalCode": "08001", "country": "ES", "province": "Barcelona", "notes": "Vegetariano", "language": "es" }, "companyId": 42, "notes": { "request": "Cuna para bebé, por favor.", "internal": "Cliente frecuente – revisar upgrade", "flat": "Ninguna" }, "occupancy": { "total": 3, "adults": 2, "children": 1, "babies": 0 }, "groupOccupancy": { "total": 9, "adults": 6, "children": 2, "babies": 1 }, "otaId": 3, "checkInStatus": "checked-in", "bookingStatus": "ready", "virtualPayment": { "type": "directPayment", "amount": 600 }, "paymentStatus": "no-paid", "invoiceStatus": "no-invoiced", "bookingType": { "label": "Oferta larga estancia", "type": "bloqued-out-order", "typeV2": "blocked-out-order" }, "toDos": { "data": [], "pendings": 0, "total": 0 }, "guests": [ { "id": 2, "name": "Test", "surname": "User", "documentType": "D", "documentNumber": "98765432A", "phone": "+34666666666", "email": "laura@example.com", "address": "Calle Real 45", "city": "Madrid", "postalCode": "28001", "country": "ES", "province": "Madrid", "notes": "", "language": "es" } ], "isSaleDirect": true, "housekeeping": { "dateToClean": "2025-11-11", "quantityNightsClean": 2, "weekDaysClean": { "mon": true, "tue": false, "wed": true, "thu": false, "fri": false, "sat": false, "sun": false } } } ] } }, "statusCode": 200, "errorMessage": "Request failed with status code 404", "durationMs": 87 } ``` --- # Get webhook delivery logs `GET /api/webhooks/{pcode}/{id}/logs` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-webhooks-pcode-id-logs Auth: header `x-api-key` The delivery history of one webhook, newest first: for each attempt, the event, the payload sent (keys that were missing when it was sent are stored as `null`), the outcome, how long it took and the error if there was one. Any 2xx is recorded as `200`; a delivery that never got a response — a network error, or a URL refused because it resolves to a private network — is recorded as `500` with the reason in its message. This is the place to look when an event you expected never arrived — and, since failures are not retried, the only record that it was attempted. **Entries are kept for 30 days** and then deleted automatically, so pull anything you need to keep before then. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | | `id` | string | yes | Webhook ID, as returned by `GET /api/webhooks/{pcode}`. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/webhooks/123456/65f1c2a9b4d3e2f1a0c9b8d7/logs' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | yes | Unique identifier of the log entry (a 24-character hex id) | | `pcode` | number | yes | Property code | | `webhookId` | string | yes | ID of the webhook this delivery belongs to | | `url` | string | yes | URL the delivery was sent to, as the webhook had it at that moment | | `eventType` | `bookings-added` | yes | Event type that triggered the delivery | | `payload` | object | yes | The JSON body POSTed to your URL: `{ "eventType": "bookings-added", "data": { "bookings": [ … ] } }`. Each item of `data.bookings` has the shape `GET /api/bookings/{pcode}/detail/{bookingId}` answers. Keys whose value was missing when it was sent can hold `null` here. | | `statusCode` | number | yes | Outcome of the delivery as Hotelgest records it: `200` for any 2xx answer from your endpoint (the exact 2xx is not kept), the status your endpoint answered for any other response (redirects are not followed, so a 3xx is recorded as is), and `500` when there was no response at all — a network error, a TLS failure, or a URL refused because it resolves to a private network. In that last case the `500` is Hotelgest's, not your endpoint's. | | `errorMessage` | string | no | Why the delivery failed: the HTTP client's message (e.g. `Request failed with status code 404`, `connect ECONNREFUSED 203.0.113.10:443`) or the reason the URL was refused. `null` or absent when the delivery succeeded. | | `durationMs` | number | yes | Duration of the delivery in milliseconds | | `createdAt` | string (date-time) | yes | When the delivery was made (ISO 8601). Entries are deleted 30 days after it | ### 200 example ```json [ { "id": "6735b0e1c2a9b4d3e2f1a0c9", "pcode": 1010, "webhookId": "65f1c2a9b4d3e2f1a0c9b8d7", "url": "https://myapp.com/webhooks", "eventType": "bookings-added", "payload": { "eventType": "bookings-added", "data": { "bookings": [ { "id": 12345, "pcode": 1010, "groupId": 987, "groupPrice": 950, "groupQuantity": 3, "start": "2025-11-10", "end": "2025-11-13", "arrivalHour": "15:00", "departureHour": "11:00", "nights": 3, "appUrl": "https://app.example.com/booking/12345", "createdAt": "2025-10-26T16:00:00.000Z", "resource": "room-101", "text": "", "board": "hb", "policy": "4", "price": 1200, "paid": 600, "totalExtras": 100, "locked": false, "color": "#ffcc00", "imported": false, "room": { "id": 101, "roomTypeId": 2, "originalRoomTypeId": 2 }, "locator": "ABC123XYZ", "customer": { "id": 1, "name": "Test", "surname": "User", "documentType": "D", "documentNumber": "A12345678", "phone": "+34911111222", "email": "agustin@example.com", "address": "Calle Falsa 123", "city": "Barcelona", "postalCode": "08001", "country": "ES", "province": "Barcelona", "notes": "Vegetariano", "language": "es" }, "companyId": 42, "notes": { "request": "Cuna para bebé, por favor.", "internal": "Cliente frecuente – revisar upgrade", "flat": "Ninguna" }, "occupancy": { "total": 3, "adults": 2, "children": 1, "babies": 0 }, "groupOccupancy": { "total": 9, "adults": 6, "children": 2, "babies": 1 }, "otaId": 3, "checkInStatus": "checked-in", "bookingStatus": "ready", "virtualPayment": { "type": "directPayment", "amount": 600 }, "paymentStatus": "no-paid", "invoiceStatus": "no-invoiced", "bookingType": { "label": "Oferta larga estancia", "type": "bloqued-out-order", "typeV2": "blocked-out-order" }, "toDos": { "data": [], "pendings": 0, "total": 0 }, "guests": [ { "id": 2, "name": "Test", "surname": "User", "documentType": "D", "documentNumber": "98765432A", "phone": "+34666666666", "email": "laura@example.com", "address": "Calle Real 45", "city": "Madrid", "postalCode": "28001", "country": "ES", "province": "Madrid", "notes": "", "language": "es" } ], "isSaleDirect": true, "housekeeping": { "dateToClean": "2025-11-11", "quantityNightsClean": 2, "weekDaysClean": { "mon": true, "tue": false, "wed": true, "thu": false, "fri": false, "sat": false, "sun": false } } } ] } }, "statusCode": 200, "errorMessage": null, "durationMs": 154, "createdAt": "2025-01-10T14:35:00.000Z" } ] ``` --- # Get booking engine prices `GET /api/direct-booking/{pcode}/prices` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-direct-booking-pcode-prices Auth: header `x-api-key` What each room type costs for a stay, rate by rate, with the availability and the restrictions that decide whether it can be sold. Keyed by room type id; each room type carries the lowest price of all its rates for the whole stay and every rate under `rate`, with the price of each night in `priceList`. It is the answer Hotelgest's own booking engine prices with. A rate with `_closed` = `1`, or a stay shorter than `_minstay` or longer than `_maxstay` (when not `0`), cannot be booked, and neither can a stay starting on a date of `closedarrival` or ending on one of `closeddeparture`; leave out the rates with `motor_excl` = `1`, which the hotel keeps off its engine. The room type `price` does NOT leave any of those out: recompute it from the rates you keep. `availability` is negative when the room type is overbooked. Ask for at most 365 days: a wider range answers with that window instead of an error. An arrival before yesterday or a stay ending more than 730 days ahead answers `{}`, and so does a property with nothing to sell or one whose prices could not be built — an empty answer is not proof that there is no availability. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `end` | string | yes | Departure date (YYYY-MM-DD). The night before it is the last one priced | | `start` | string | yes | Arrival date (YYYY-MM-DD) | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/direct-booking/123456/prices?end=YYYY-MM-DD&start=YYYY-MM-DD' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body --- # Get booking engine packs `GET /api/direct-booking/{pcode}/packs` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-direct-booking-pcode-packs Auth: header `x-api-key` The packs the property sells on its booking engine: an offer tied to room types, a date window and a minimum stay, sometimes with products included. It is the list Hotelgest's own booking engine offers; packs whose last day is before yesterday, and packs the hotel hides from its engine, are left out. `name` and `text` carry only the languages the hotel wrote, and are an empty object when it wrote none. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/direct-booking/123456/packs' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | yes | Pack id | | `room` | BookingEnginePackRoomDto[] | yes | The room type, occupancy, board and policy combinations the pack is sold on | | `room[].id` | string | yes | Id of this row of the pack: what a booking of the pack refers to | | `room[].rtcode` | string | yes | Room type the row sells | | `room[].occupancy` | string | yes | Guests | | `room[].board` | string | yes | Board | | `room[].policy` | string | yes | Cancellation policy id | | `name` | object | yes | Pack name per language, keyed by language code. Only the languages the hotel wrote; an empty object when it wrote none | | `text` | object | yes | Pack description per language, keyed by language code. Only the languages the hotel wrote; an empty object when it wrote none | | `board` | string | yes | Board of the pack (that of its last room row) | | `type` | string | yes | Kind of pack, as the legacy stores it | | `weekday` | string | yes | Weekdays the pack is restricted to, as the legacy stores them. Null or empty when any day | | `match_weekday` | number | yes | How `weekday` applies, as the legacy stores it: `0` when it does not restrict | | `iframe` | string | yes | Whether the pack is kept off the booking engine, as the legacy stores it: always `0` or lower here, because packs hidden from it are left out | | `extcode` | string | yes | External code the hotel gave the pack, if any | | `promo_code_excl` | string | yes | `1` when promo codes cannot be combined with the pack | | `dfrom` | string | yes | First day the pack can be booked | | `dto` | string | yes | Last day the pack can be booked | | `price` | number | yes | Price of the pack | | `dtype` | string | yes | How `value` applies: `0` replaces the price with `value`, `-1` takes `value` % off, `-2` takes `value` off, `1` adds `value` %, `2` adds `value` | | `value` | string | yes | Amount or percentage `dtype` applies | | `min_stay` | string | yes | Minimum nights | | `max_stay` | string | yes | Maximum nights (`0` means no limit) | | `pack_prod` | BookingEnginePackProductDto[] | no | Products included in the pack, when it includes any | | `pack_prod[].product_id` | number | yes | Product included in the pack | | `pack_prod[].value` | number | yes | Units included | ### 200 example ```json [ { "id": "12", "room": [ { "id": "481", "rtcode": "101", "occupancy": "2", "board": "bb", "policy": "4" } ], "name": { "es": "Escapada romántica", "en": "Romantic getaway" }, "text": { "es": "Dos noches con cena", "en": "Two nights with dinner" }, "board": "bb", "type": null, "weekday": null, "match_weekday": 0, "iframe": "0", "extcode": null, "promo_code_excl": "0", "dfrom": "2027-01-01", "dto": "2027-12-31", "price": 240, "dtype": "-1", "value": "10", "min_stay": "2", "max_stay": "0", "pack_prod": [ { "product_id": 33, "value": 1 } ] } ] ``` --- # Check a promo code `GET /api/direct-booking/{pcode}/promo-codes` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/public/reference/get-api-direct-booking-pcode-promo-codes Auth: header `x-api-key` Whether a promo code a guest typed exists, and what it takes off. Answers a list with the promotion when the code matches one the hotel shows on its engine — compared without case — and an empty list when it does not, or when the code has used up all its uses. Several promotions can share a code, and then all of them come. Check `dfrom` and `dto` against the stay: the code is returned whatever the dates. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `code` | string | yes | The code the guest typed | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/direct-booking/123456/promo-codes?code=SUMMER27' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | string | yes | Promotion id | | `code` | string | yes | The code, as the hotel created it | | `dfrom` | string | yes | Start of the validity of the code (`YYYY-MM-DD HH:mm:ss`) | | `dto` | string | yes | End of the validity of the code (`YYYY-MM-DD HH:mm:ss`) | | `dtype` | string | yes | How `value` applies: `0` takes `value` off each night, `-1` takes `value` % off the stay, `-2` takes `value` off the stay. When booking, send them as `fbn`, `pbn` and `ta` | | `value` | string | yes | Amount or percentage `dtype` applies, with two decimals | | `name` | string | yes | Name of the promotion | ### 200 example ```json [ { "id": "7", "code": "SUMMER27", "dfrom": "2027-06-01 00:00:00", "dto": "2027-09-30 00:00:00", "dtype": "-1", "value": "10.00", "name": "Summer offer" } ] ``` --- # Partner API — endpoints reserved for the programme A property's own API key is refused on these; they take a credential issued by Hotelgest to a partner, and answer encrypted to the partner key. Full specification: https://public-api.hotelgest.com/specs/partner.json --- # The partner programme > One private key for you, one credential per property, and who decides what. Docs: https://public-api.hotelgest.com/partner/guides/partner-programme The programme is for integrations that serve several properties: revenue management systems, CRMs, POS, self check-in kiosks, lock systems and other platforms. It exists because the shape of the Public API — one key, one property, issued by the hotel — stops working once you have forty hotels and forty keys with nothing tying them together. ## How it fits together 1. **You join the programme.** We register you and mint your keypair. The private half is handed over once and never stored — it is what you decrypt every response with, from every property, for as long as you are in the programme. 2. **A ceiling is set.** The endpoints you may ever be granted, agreed with us when you join. No connection can go outside it — which is also what lets a hotel say yes to you without reading a permissions list. 3. **Each property switches you on.** When a property wants to work with you, its admin switches your integration on in its Marketplace, and that connects you with everything in your ceiling. That issues a credential for that property alone, and switching it off revokes it. Forty properties means forty credentials, and the one that leaks opens exactly one of them. If you asked for it when joining, the property's id with you — our pcode, or the number it types when switching you on — reaches you with the credential as `accountRef`, so you know which of your customers each pcode is; see below. Hotelgest can also connect, pause or revoke a property by hand. > **Note: One private key, many credentials.** The two halves do different jobs. The credential in `x-api-key` says which property you are asking about; your private key opens what comes back. You hold one private key and as many credentials as properties. The `keyId` in every envelope tells you which private half to use, so keeping two installed during a key change costs you no downtime. ## Server to server, without exception Every call to the partner API leaves your backend. Never a mobile app, a browser, a till, a tablet or any other device — yours or the property’s. The credential of each property and the private key that opens the responses live on your servers and only there: a key in an app or on a device is a key anyone holding it can copy. > **Warning: Your apps talk to your backend, not to us.** If what you sell runs on a phone, a kiosk or a device in the hotel, that device calls your servers and your servers call the API. It is a condition of joining the programme, and it applies to every partner. ## Which of your customers a property is A credential tells you the pcode, which means nothing on your platform. If you need the id you know the property by, it reaches you with the credential as `accountRef`, in one of two ways agreed when you join. Neither is required. | Way | What the property does | What you give us | | --- | --- | --- | | Our pcode (nothing to type) | Nothing beyond switching your integration on: `accountRef` is its pcode, as a JSON number. | Nothing: you know your customers by our pcode. | | An id the property types when activating your integration in its Marketplace — a whole number | Types its customer number or hotel code with you in your integration's form. Without it, the integration cannot be switched on. | Which id it is, so the form asks for it in those words. It is a positive whole number and reaches you as a JSON number. | A typed id only says which customer the property claims to be. Answer 4xx to a delivery whose `accountRef` is not one of your customers: the integration is not switched on, and the property sees why and can correct the id. ## What you can call Everything in the Public API, plus the endpoints reserved for the programme — the ones a property’s own key is refused on. Which of them you may call is your ceiling, agreed with us when you join, and every connection carries all of it. An endpoint outside it answers 403 and names itself, so you always know what to ask us for. When we widen it, every connection you already hold gets the new endpoints on the same key: there is no new credential to wait for. ## The endpoint you have to expose Joining the programme asks one thing of your side: an HTTPS endpoint of your own where we POST a credential every time a property switches your integration on. That is how your integration learns which key belongs to which property — nobody copies a key out of a screen and pastes it into a ticket, and no property waits for somebody to do it. ```json POST https://your-domain.example/hotelgest/credentials Content-Type: application/json X-Hotelgest-Signature: sha256=9f2c41a08b7e5d3c62f1a4b8... { "pcode": 1234, "connectionId": "68cac30b93a55b1138a46882", "accountRef": 4512, "apiKey": "2f1a4b8c...-9f2c41a08b7e5d3c62f1a4b8", "issuedAt": "2026-10-01T09:14:22.104Z" } ``` Store `apiKey` against `pcode`: that is the credential to send in `x-api-key` for that property, and no other. `accountRef` is the property's id with you, our pcode or exactly as the property typed it — use it to match the pcode to your customer; it is only present when you asked for it. `connectionId` is the stable name of the relationship — keep it to quote one connection to us without spelling out which hotel; it stays the same when the credential is sent again. What the key may call is not in here on purpose: the selection can change afterwards, so a copy you stored would go quietly out of date. The 403 tells you, and names the endpoint. > **Warning: Verify the signature before you store anything.** The URL is yours and somebody could guess it, and this request carries a live credential — so a forged one would have you sending your requests with an attacker’s key, to an endpoint of theirs. `X-Hotelgest-Signature` is `sha256=` followed by the HMAC-SHA256 of the RAW body with your signing secret. Compare it in constant time, over the bytes you received and not over a re-serialised object. | Secret | Where it comes from | What it is for | | --- | --- | --- | | Your signing secret (`whsec_…`) | We generate it when we register your endpoint and pass it to you then, once. Ask for a new one and the previous stops working immediately. | Verifying that a delivery is ours. We hold a copy — signing needs it. | | Your private key (`.pem`) | Downloaded once, when your keys are issued. We keep only the public half, so it cannot be reissued to you — lost means rotating. | Decrypting the responses the API sends you. Nothing to do with the signature. | Two different secrets, in two different directions: never use the PEM to verify a signature — it is not what we sign with, and it does not belong in the server that receives deliveries. ```javascript import express from 'express' import { createHmac, timingSafeEqual } from 'crypto' // The secret we handed you when you registered this endpoint. Read it from your environment. const SECRET = process.env.HOTELGEST_DELIVERY_SECRET // express.json() parses the body and throws the original bytes away, and the signature is over // those bytes: a re-serialised object is not the same string, so it will never match. app.post('/hotelgest/credentials', express.raw({ type: 'application/json' }), (req, res) => { const raw = req.body // the bytes as they arrived, a Buffer const header = req.get('X-Hotelgest-Signature') // sha256=... const expected = `sha256=${createHmac('sha256', SECRET).update(raw).digest('hex')}` const received = Buffer.from(header ?? '') const ours = Buffer.from(expected) if (received.length !== ours.length || !timingSafeEqual(received, ours)) { return res.sendStatus(401) } // Only now is it safe to read: everything above ran on bytes nobody had vouched for yet. const { pcode, connectionId, accountRef, apiKey, issuedAt } = JSON.parse(raw.toString('utf8')) // When you ask properties for their id with you: refuse one you do not recognise, with a 4xx. // The property sees the delivery failed and can correct the id and send it again. if (accountRef !== undefined && !findCustomer(accountRef)) return res.sendStatus(404) saveCredential({ pcode, connectionId, accountRef, apiKey, issuedAt }) res.sendStatus(200) }) ``` Answer 2xx once you have stored it. Answer 4xx when the `accountRef` is not one of your customers: the delivery is recorded as failed, we see it at once, and once the id is corrected the credential is sent again — a new key for the same connection and `connectionId`, which replaces the one you may have. Anything else that is not 2xx is also a failed delivery: no key is stored, the integration stays off, and the property sees why and can try again. | Requirement | Why | | --- | --- | | HTTPS, with a valid certificate | The body carries a credential in the clear. Plain HTTP is refused when you register the endpoint, not at delivery time. | | A publicly resolvable host | An address that resolves to a private range is refused: we will not post a credential to something inside somebody’s network. | | Not open to the internet | Tell us a header to send — `Authorization: Bearer …`, `X-Api-Key: …`, whichever you already use — and reject anything arriving without it. The signature proves a body is ours; the header is what stops a stranger being answered at all. If you would rather protect it another way, that works too: the requirement is that it is not open, not that it is ours. | | Keyed by `pcode` | A credential can be reissued for a property you already have — a failed delivery was sent again, or the integration was switched off and on. Store it against the pcode and let the new one replace the old, rather than ending up with two keys for the same hotel and no way to tell which works: when a delivery is sent again the previous key stops working. | ## When access stops | What happened | What you see | What to do | | --- | --- | --- | | Hotelgest paused a connection | 401 on that property only | Nothing on your side: resuming gives back the SAME credential, so there is nothing to redeploy. | | A connection was revoked | 401 on that property only | The property switched your integration off in its Marketplace, or Hotelgest revoked it. That credential is gone for good; switching it on again issues a new one under the same connectionId. | | The programme suspended you | 401 everywhere at once | Talk to us. Your connections are kept, so resuming does not mean connecting every property again. | ## Ask to join The conditions for joining are set for each integration: depending on the case, we ask for a minimum number of properties committed to using it and for both account-management teams to work together. We sign an NDA when talks start, and the programme contract before production credentials are issued. Access is through a partner licence, which may or may not have a cost depending on the conditions agreed. Tell us what you integrate and which properties use it or are committed to it, and we reply by email: approved, with the endpoints of your ceiling; rejected; or asking you first for the committed properties. Sending this activates nothing: it starts a conversation, and the ceiling and the keys come out of it. To apply, use the form at https://public-api.hotelgest.com/partner/guides/partner-programme#apply or write to integrations@hotelgest.com. > **Warning: Holding the private key grants nothing.** It only opens envelopes. What you may call, and about which property, is decided before any data is generated — by your ceiling and by what each connection was given. Losing your private key does not widen anybody’s access, and neither does holding somebody else’s. --- # Revenue management systems > Read what a property sells and has sold, and push its prices and restrictions — and what changes coming from the legacy API. Docs: https://public-api.hotelgest.com/partner/guides/revenue-management For an RMS on the partner programme: everything it needs to price a property, from reading its rooms and its current prices to pushing new ones and following its bookings. Every route below takes your partner key and is reached only once it is enabled on your connection to that property; the answers come sealed to your key, as the encryption guide explains. > **Warning: The property has to have its rates on Unified.** A push for a property whose rates are still managed on the legacy platform is refused with 409 `rmsPropertyNotOnUnified`, and nothing is stored. Hotelgest moves the property to Unified before your integration goes live; ask your Hotelgest contact. Reading works either way. ## What to ask us for These go in your ceiling when you join, and every connection carries your whole ceiling: when a property switches your integration on in its Marketplace, all of them are enabled for that property. None of them reaches you without being in your ceiling first. | Endpoint | What it is for | | --- | --- | | `GET /api/properties/{pcode}/settings/lite` | The property: name, stars, where it is, its currency and time zone, and whether its prices include tax. | | `GET /api/rooms/{pcode}/types` | Its room types and rooms. | | `GET /api/integrations/{pcode}/rms/rates` | The rates you may push to, with their room type, channel, board, policy and guests: map yours onto their `id`. | | `GET /api/direct-booking/{pcode}/prices` | What the booking engine sells: the price of each of its rates, night by night, with availability and restrictions. | | `GET /api/integrations/{pcode}/rms/prices` | The price each rate of `rms/rates` sells at, night by night, channel rates and linked ones included, plus the free rooms and the stay restrictions of each night; a night without a price comes as `null`, never `0`. Narrow it with `rateId`, with `roomTypeId`, or with both. | | `POST /api/integrations/{pcode}/rms/push` | Your prices or restrictions for one rate. | | `GET /api/integrations/{pcode}/rms/on-the-books` | What is sold and what is left: bookings with their nights, and rooms sold, blocked and free per day. | | `GET /api/integrations/{pcode}/rms/booking-changes` | The bookings that changed since your last call: status, channel, dates, room type, guests counted by age, board, policy and amounts. No personal data beyond the holder’s country, nationality and language. | ## Coming from the legacy API The data keeps the shape the legacy endpoints use, field names included, so moving over is mostly a matter of new addresses and a new credential. Where something changes, the table says so. | Legacy | Now | What changes | | --- | --- | --- | | `POST /panel/channel/rms`, `/panel/channel/rmsRestriction` | `POST …/rms/push` | The same elements (`StartUtc`, `EndUtc`, `Value`, `min_stay`…). The property goes in the path and no `publicToken`: the key says who you are. The answer is `{ requestId, ignored }` and refusals carry a code. | | `POST /panel/channel/rate` | `GET …/rms/rates` | The same rates and fields, without the `{ success, data }` envelope; with `roomTypeId`, `occupancy`, `active` and `anchored` added. | | `GET /v1/booking/price` | `GET /api/direct-booking/{pcode}/prices` | The same answer for the booking engine’s rates (`rate`). The channel rates of `channel=1` (`rateChannel`) are not in it: read them from `…/rms/prices`. | | `GET /v1/booking/price` with `channel=1`, `rateChannel[…].priceList` | `GET …/rms/prices` | The same nightly price, one entry per rate with the ids of `…/rms/rates`, its `roomTypeId` and its `anchored`. Each night also carries what the legacy gave alongside the price: `availability` (the legacy `availabilityList`) and the stay restrictions `minStay` (the legacy `minstay`, `1` when none is set), `maxStay`, `closed`, `closedToArrival` and `closedToDeparture`. A channel rate’s restrictions come from its OTA’s own calendar; the legacy read them all from the direct-sale one. Every rate you may push to comes, whether or not its room type is on the booking engine, `main` and `mainchannel` included. A night without a price is `null`, never `0`, and so is `availability` when there are no rooms to read. Filter with `rateId`, `roomTypeId` or both; `start` and `end` are both included, and `end` at most 366 days after `start`. | | `POST /panel/thirdPart/revbell` | `GET …/rms/on-the-books` | The same answer and parameters, plus, on each booking, `roomTypeId`, `currency`, `commission`, `taxRate`, its `extras` and a `netPrice` per night. On a cancelled booking, `Fecha_Anulacion` is when it was cancelled, read from its history: the legacy gave its last change, which any later edit moved. `dfrom` is required, and `dto` at most 366 days after `dfrom`. | | `GET /v1/property/{pcode}` | `GET /api/properties/{pcode}/settings/lite` | The fields an integration needs, not the whole property record. | | `GET /v1/property/{pcode}/room`, `/v1/booking/room` | `GET /api/rooms/{pcode}/types` | Room types with their rooms, in the Public API shape. | | A nightly push from Hotelgest | `GET …/rms/booking-changes` | You poll for what changed, as often as you need, instead of waiting for it. | ## Pushing prices and restrictions ```json POST /api/integrations/1234/rms/push x-api-key: { "rateId": 48122, "sentAt": "2026-10-15T08:30:00Z", "rate": [ { "StartUtc": "2026-11-01", "EndUtc": "2026-11-15", "Value": "129.90" }, { "StartUtc": "2026-11-16", "EndUtc": "2026-11-30", "Value": "119.00" } ] } → 200, once opened with your key: { "requestId": "9b2f6c1e-…", "ignored": [] } ``` One rate per push, either prices (`Value`) or restrictions (`min_stay_through`, `stop_sell`, `max_stay`; `min_stay` only counts beside one of them, so send minimum stays as `min_stay_through`), never both. Dates go from yesterday to 700 days ahead. `ignored` lists what you sent that is accepted and not applied: closures and maximum stays, for now. > **Note: The queue is not the legacy one.** A push is applied within the minute, not when a cron gets to it hours later, and the answer still comes as soon as it is queued. Each day keeps only the newest value sent for it, so resending a whole calendar costs nothing; inside one push, a later tranche wins over an earlier one on the days they share. Send `sentAt` and a late retry built before your last accepted push is refused with 409 `rmsPushStale` instead of overwriting newer prices. A 429 with `rmsQueueFull` or `rmsQueueUnavailable` means nothing was stored: resend after the `Retry-After` seconds. | Refusal | What to do | | --- | --- | | 400 `rmsRateNotFound`, `rmsRoomTypeNotFound` | The id is not one of the property: list the rates again and remap. | | 400 `rmsRateNotPushable` | A price modifier: push the rate it derives from. | | 400 with a `validation` list | The body does not have the shape: prices and restrictions mixed, a price that is not an amount, a date outside yesterday to 700 days ahead. Each entry names the field, as the errors guide explains. | | 400 `rmsPushTooLarge` | The ranges overlap so much they spell out too many days: send ranges that do not repeat days. | | 409 `rmsPropertyNotOnUnified` | The property is not ready: ask Hotelgest to move it, then push again. | | 409 `rmsPushStale` | Nothing to do: a newer push of yours already won. | | 429 `rmsQueueFull`, `rmsQueueUnavailable` | Resend after `Retry-After` seconds. | ## Reading what is sold 1. **Take the picture.** On-the-books with `dfrom` and `dto` gives the bookings arriving in the range, each night with its price, and the capacity of every day: sold, blocked, free. Ask for `article` to get the articles sold too. 2. **Then follow the changes.** Call booking-changes with `since`; while the answer has a `nextCursor`, call again with `cursor` set to it. Every page of that pass answers the same `until`: once `nextCursor` is null, use it as the `since` of your next poll. Changes are compared to the second, so a booking can come twice: keep the latest version of each by its id. Cancellations come too. --- # CRMs > Follow the bookings of a property with their guests, to keep a CRM in step — and what changes coming from the legacy CRM export. Docs: https://public-api.hotelgest.com/partner/guides/crm For a CRM on the partner programme: the bookings of a property that changed since your last call, each with its guest, the property and the room. The route takes your partner key and is reached only once it is enabled on your connection to that property; the answers come sealed to your key, as the encryption guide explains. | Endpoint | What it is for | | --- | --- | | `GET /api/integrations/{pcode}/crm/booking-changes` | The bookings that changed since `since`, with their guests, oldest change first, 50 per page. | ## Following the changes 1. **Start from an instant.** Call with `since` as an ISO 8601 instant with its zone: the moment you start, or further back to load history. The answer is `{ data, until, nextCursor }`, and fixes a window from `since` to `until`. 2. **Follow the cursor.** While `nextCursor` is not null, call again with `cursor=` and nothing else: the cursor carries the window. A booking that changes while you page leaves the window and comes in your next poll, so pages never skip one. 3. **Poll from `until`.** Every page of a pass answers the same `until`; once `nextCursor` is null, use it as the `since` of your next poll. Changes are compared to the second, so a booking can come twice: keep the latest version of each by its id. Cancellations come too. A cursor that was not issued by the feed is refused with 400 `bookingChangesCursorInvalid`: start again from your last `until`. ## Coming from the legacy API Each booking keeps the field names of `POST /panel/thirdPart/clientify` and `POST /panel/thirdPart/crm` — `rscode`, `extcode`, `name`, `email`, `marketing`, `name_property`, `name_room` and the rest — so your mapping stays as it is. What changes: | Legacy | Now | | --- | --- | | `publicToken` and `pcode` in the body | Your partner key in `x-api-key`, the property in the path. | | `updateDate` as `Y-m-d H:i:s` in Spanish local time, changes strictly after it | `since` as an ISO 8601 instant with its zone, changes at or after it. | | At most 100 rows in no particular order, so a second call could skip or repeat bookings | 50 per page, oldest change first, paged with `nextCursor` inside a fixed window, and `until` to poll from. | | A bare array, or `{ success, errors, data }` when empty | Always `{ data, until, nextCursor }`. | | Every value as text | Numbers as JSON numbers, and a missing date (`0000-00-00`) as `null`. Each item adds `last_modified`, the instant of the change in UTC. | | `private_notes`, `issue_date`, `date_of_expiry`, `app_url`, `ancillary`, `modified_reservations`, the room’s `doornum`, `lcode`, `position`, `location_id` and its location fields | Not sent. A CRM has no use for the hotel’s internal notes, the issue and expiry dates of the guest’s identity document (its type and number still come, in `type_vat` and `vat`), or the room’s lock, and `app_url` carries the guest’s access token. | | `thirdPart/crm` filters (`date_arrival`, `date_departure`, `sex`, `email`, `language`) and its empty `phone` | No filters: the feed is every change, and you filter on your side. `phone` comes as the property recorded it. | | Room blocks among the rows | Only bookings: confirmed, tentative and cancelled. | > **Note: Marketing consent is the property’s call.** `marketing` is `1` when the guest accepted marketing communications and `0` when not. Every guest comes, whatever its value: the property is the controller of its guests’ data and tells you what may be done with each contact. --- # Self check-in kiosks > Check a guest in at a kiosk: find the booking, register its guests with their documents, check it in, give the guest the door PIN and record what was paid — and what changes coming from the legacy API. Docs: https://public-api.hotelgest.com/partner/guides/self-check-in-kiosks For a self check-in kiosk on the partner programme. Every route takes your partner key and is reached only once it is enabled on your connection to that property; the answers come sealed to your key, as the encryption guide explains. The kiosk routes write to the booking or hand out the door PIN, so each has to be granted on purpose. > **Warning: From your server, never from the kiosk.** The kiosk talks to your backend, and your backend calls Hotelgest with the key kept on your server. No kiosk, tablet or app calls the API directly. ## The check-in, step by step 1. **Find the booking.** Search it with `GET /api/v2/bookings/{pcode}/search` and read it with `GET /api/bookings/{pcode}/detail/{bookingId}`: dates, room, guests already on it and status. 2. **Register each guest.** `POST /api/integrations/{pcode}/kiosk/guests/{bookingId}`, one call per guest, with the document you read. Send `holder: true` for the guest the booking is for, so their record is completed instead of a second one being added. Sending a guest again updates them in place. 3. **Check the booking in.** `PUT /api/bookings/{pcode}/check-in-out/{bookingId}` with `nextStatus: checked-in`, once every guest is registered: it is the check-in that sends them to the police registration, as when reception does it. 4. **Give the guest the door PIN.** Once the booking is checked in, `GET /api/integrations/{pcode}/kiosk/door-keys/{bookingId}` answers the key of its room door, whatever lock system the property has: `pin` with the PIN as text (leading zeros kept), `keyWithoutPin` when the key carries no PIN (send the guest to reception), or `none`. Before the check-in it answers `409` `kioskBookingNotCheckedIn`. Each read goes in the booking history under your name; the answer is not cached, so do not keep the PIN after handing it over. 5. **Record what was paid.** Read what is due with `GET /api/v2/bookings/{pcode}/payments/{bookingId}`, collect it, and record it with `POST /api/integrations/{pcode}/kiosk/payments/{bookingId}`. Your `transactionId` is the payment reference, stored behind your partner slug (`:`): resending it never records the payment twice, and another kiosk or reception using the same reference never gets in the way. ## Coming from the legacy API | Legacy | Now | | --- | --- | | `/v1/user/getToken` with a user and password of the property | Your partner key in `x-api-key`, the property in the path. | | `/v1/reservation/get` and `getAll` | The booking search and the booking detail. | | `/v1/user/setHost` with `rscode`, `main` and the legacy field names (`document_class_code`, `date_of_birth`…) | `POST …/kiosk/guests/{bookingId}`: `holder` instead of `main`, camelCase fields, dates as `YYYY-MM-DD`, countries as ISO 3166-1 alpha-3, images as JPEG data URIs. | | `/v1/reservation/checkin` | `PUT /api/bookings/{pcode}/check-in-out/{bookingId}`. | | `/panel/invoice/setPayment` with a free payment type, which recorded the same payment again on every resend | `POST …/kiosk/payments/{bookingId}` with `method` `card` or `cash`, and `transactionId` to make resends safe. It does not invoice, as `setPayment` did not: the property issues the invoice. | --- # Locks that issue their own PIN > Write the door PIN your lock system issued to the booking, remove it when the booking moves to a room the PIN does not open, and what the guest and the property see afterwards. Docs: https://public-api.hotelgest.com/partner/guides/locks-with-their-own-pin For a lock system on the partner programme that generates the PIN itself. The PIN goes on the booking, where every reader takes it from: the guest webapp, the arrivals report of the property and the self check-in kiosks. The route takes your partner key and is reached only once it is granted on purpose on your connection to that property; the answers come sealed to your key, as the encryption guide explains. One booking is one room: in a group, write each booking with its own id. 1. **Write the PIN.** `PUT /api/integrations/{pcode}/locks/door-keys/{bookingId}` with `{ "pin": "0427" }`: the PIN as text, digits only, 4 to 8 of them, leading zeros kept. A JSON number is refused, as are all zeros and zeros ending in 1 (`0000`, `0001`), which older readers of the booking take for "no key" or "key without PIN": `400` `doorKeyPinInvalid`. 2. **A key without a PIN.** When the booking has a key but no PIN to give the guest (a card, a link), send `{ "state": "keyWithoutPin" }`: the guest is sent to reception. 3. **Remove the key.** When the booking moves to a room your PIN does not open, send `{ "state": "none" }`, and then write the new PIN the same way. Only bookings still to come or in house can be written: a cancelled booking, a no-show or a block answers `409` `doorKeyBookingNotActive`, and a checked-out booking `409` `doorKeyBookingCheckedOut`, removing the key included. Nothing reads the key of a stay that is over or cancelled, so there is nothing to clean up: void the PIN in your own system. ```http PUT /api/integrations/114/locks/door-keys/789 x-api-key: Content-Type: application/json { "pin": "0427" } → 200 { "bookingId": 789, "status": "pin", "changed": true } ``` The answer says the status the booking has now and never repeats the PIN. Exactly one of `pin` and `state` per request; anything else is `400` `doorKeyRequestInvalid`. > **Note: Safe to send again.** Sending the key the booking already has writes nothing and answers `changed: false`: retry whenever you did not hear back. Every change goes in the booking history under your partner name, with the status before and after and never the PIN. ## What the guest and the property see - The guest sees the PIN in the keys card of their webapp when the property’s own rules release it — the arrival day, the check-in time or an earlier release the property chose, the online check-in done and nothing blocking left to pay. Hotelgest applies them, so you do not have to time the write: write the PIN as soon as you have it. - Hotelgest sends the guest no email with the PIN: if the guest has to receive it by email or SMS, that stays with your system, as it was with the legacy API. - Reception sees it in the arrivals report, and a self check-in kiosk hands it to the guest once the booking is checked in. An open guest webapp and the property’s panel refresh on their own when it changes. > **Warning: From your server, never from a device, app or browser.** A PIN opens a guest’s room: the call goes from your server to Hotelgest’s, with the key kept on your server. Do not keep PINs in your logs longer than you need them. ## Coming from the legacy API | Legacy | Now | | --- | --- | | `/v1/user/getToken` with a user and password of the property | Your partner key in `x-api-key`, the property in the path. | | `/v1/reservation/update` with `rscode` and `pin_door` | `PUT …/locks/door-keys/{bookingId}` with `pin` as text. `pin_door` `1` is `state: keyWithoutPin`, and `0` is `state: none`. | --- # Get the bookings changed since an instant, with their guests `GET /api/integrations/{pcode}/crm/booking-changes` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/get-api-integrations-pcode-crm-booking-changes Auth: header `x-api-key` What changed since you last asked. Every booking whose row changed at or after `since` — created, edited, moved, cancelled — oldest change first, 50 per page. The first call fixes a window, from `since` to `until` (the moment it was answered), and every page of it answers that same `until`. While `nextCursor` is not null, call again with `cursor=` (`since` is ignored then); once it is null, wait and poll again with `since=`. It is null on a page with fewer than 50 bookings: a last page of exactly 50 still carries a cursor, and the page it leads to comes empty. Send `since` with its zone; a value without one is read as UTC, and a bare date as that day's midnight in UTC. A booking that changes while you page leaves the window and comes in your next poll, so nothing is skipped. Changes are compared to the second, so a booking changed in the same second as `until` comes again in the next poll: keep the latest version of each booking by its id. A cursor that was not issued by the feed is refused with 400 `bookingChangesCursorInvalid`: start again from your last `until`. A change to something hanging off a booking that does not touch the booking itself (a payment, an edit of the guest record) does not bring it back. Cancelled bookings come too: a cancellation is a change. Each item carries the booking, its guest, the property and the room under the field names of the legacy CRM export (`/panel/thirdPart/clientify`, `/panel/thirdPart/crm`), plus `last_modified`, the instant of the change in UTC. Numbers come as JSON numbers — all but `num_property`, the street number, which is text — and a missing date as `null`. `country` and `nationality` are names, as the guest record holds them, not codes. Phone and email come in clear, as the property recorded them, and `marketing` says whether the guest accepted marketing: the property decides what is done with it. Left out on purpose, because a CRM has no use for them: the hotel's internal notes (`private_notes`), the identity document dates (`issue_date`, `date_of_expiry`), the guest webapp link (`app_url`, which carries the guest's access token), `ancillary`, and the room's door, lock, position and location. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `since` | string | no | An instant with its time and zone (ISO 8601): the bookings whose row changed at or after it. On the first poll, the moment you start; after that, the `until` of your last poll. Without a zone it is read as UTC, and a bare date (`2026-10-15`) as that day’s midnight in UTC. Required unless `cursor` is sent; ignored when it is | | `cursor` | string | no | The `nextCursor` of the previous page, as it came. It carries the window of the first page, so `since` is ignored with it. A cursor that was not issued by this feed is refused with 400 `bookingChangesCursorInvalid` | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/integrations/123456/crm/booking-changes' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request: neither `since` nor `cursor` was sent, `since` is not an ISO 8601 date or date-time (a `validation` list names it; one without a zone is accepted and read as UTC), or the `cursor` was not issued by this feed (`bookingChangesCursorInvalid`: start again from your last `until` as `since`). - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | CrmBookingChangeDto[] | yes | The bookings changed in the window, oldest change first, 50 per page, each with its guest, its property and its room under the legacy CRM export field names | | `data[].pcode` | number | yes | Property code | | `data[].rscode` | number | yes | Booking id. `reservation_id` and `id` carry the same value, as in the legacy export | | `data[].reservation_id` | number | yes | Booking id, same as `rscode` | | `data[].id` | number | yes | Booking id, same as `rscode` | | `data[].extcode` | number | yes | Booking number the property sees (`reservation_code`) | | `data[].correlative` | number | yes | Correlative number of the booking | | `data[].multibook` | number | yes | Group the booking belongs to, when it is part of one | | `data[].channelcode` | string | yes | Booking code on the channel it came from | | `data[].channel_reservation_code` | string | yes | Same value as `channelcode` | | `data[].rcode` | number | yes | Room assigned, or `null` while none is | | `data[].rtcode` | number | yes | Room type | | `data[].subroom` | number | yes | Sub-room of the room assigned | | `data[].amount` | number | yes | Amount of the booking | | `data[].orig_amount` | number | yes | Amount before the discount | | `data[].discount` | number | yes | Discount applied | | `data[].discount_type` | number | yes | How `discount` reads: `1` a percentage per night, `2` an amount on the whole stay, any other value an amount per night | | `data[].price` | number | yes | Price of the stay | | `data[].pay` | number | yes | Amount paid | | `data[].date_received` | string | yes | Day the booking was received, `YYYY-MM-DD` | | `data[].date_arrival` | string | yes | Arrival, `YYYY-MM-DD` | | `data[].date_departure` | string | yes | Departure, `YYYY-MM-DD` | | `data[].arrival_hour` | string | yes | Arrival time the guest gave | | `data[].board` | string | yes | `nb` room only, `bb` breakfast, `hb` half board, `fb` full board, `ai` all inclusive | | `data[].policy` | number | yes | Cancellation policy id | | `data[].roomnight` | number | yes | Nights | | `data[].checkin` | number | yes | `1` once the guest checked in | | `data[].checkout` | number | yes | `1` once the guest checked out | | `data[].promo_code` | string | yes | Promo code used | | `data[].men` | number | yes | Adults; `-1` when the booking does not say | | `data[].person` | number | yes | Guests (`occupancy`) | | `data[].children` | number | yes | Children | | `data[].device` | number | yes | Device the booking was made from, when known | | `data[].customer_notes` | string | yes | Notes the guest left on the booking | | `data[].customer_holder` | string | yes | Name the booking is held under | | `data[].host_name` | string | yes | First name of the guest staying | | `data[].host_surname` | string | yes | Surname of the guest staying | | `data[].customer_language_iso` | string | yes | Language of the booking, ISO 639-1 | | `data[].bussines` | number | yes | `1` for a business booking | | `data[].pack` | number | yes | Pack booked, when one was | | `data[].id_channel` | number | yes | Channel id; `0` is the property’s own sale | | `data[].ota` | string | yes | Channel name | | `data[].status` | number | yes | Legacy status code: `1` confirmed, `2` temporarily cancelled, `4` tentative, `5` cancelled | | `data[].booked_rate` | string | yes | Rate booked, as the channel named it | | `data[].preCheckin` | number | yes | `1` once the guest completed the online check-in | | `data[].customer_id` | number | yes | Guest id | | `data[].name` | string | yes | Guest first name | | `data[].surname` | string | yes | Guest surname | | `data[].email` | string | yes | Guest email | | `data[].phone` | string | yes | Guest phone | | `data[].province` | string | yes | Guest province | | `data[].country` | string | yes | Guest country, by name as the guest record holds it (the guest form and the kiosk store the name, e.g. `España`). Not a code: older records may hold anything typed by hand | | `data[].city` | string | yes | Guest city | | `data[].address` | string | yes | Guest address | | `data[].zip` | string | yes | Guest postcode | | `data[].notes` | string | yes | Notes on the guest record | | `data[].type_vat` | string | yes | Type of the guest’s identity document, as the booking detail’s `documentType` (`P` passport, `D` DNI, `I` identity card…); older records may hold another value | | `data[].vat` | string | yes | Number of the guest’s identity document (or tax id), as `type_vat` says | | `data[].birthdate` | string | yes | Date of birth, `YYYY-MM-DD`; `null` when unknown | | `data[].language` | number | yes | Guest language, legacy id | | `data[].language_iso` | string | yes | Guest language, ISO 639-1 | | `data[].sex` | string | yes | Sex | | `data[].nationality` | string | yes | Nationality, by name as the guest record holds it, like `country`. Not a code | | `data[].marketing` | number | yes | `1` when the guest accepted marketing communications, `0` when not. Passed through as the property recorded it: what to do with it is the property’s decision | | `data[].name_property` | string | yes | Property name | | `data[].address_property` | string | yes | Property street | | `data[].num_property` | string | yes | Property street number, as text: the property types it (`12`, `12 B`, `s/n`). The one number of the feed that is not a JSON number | | `data[].zip_property` | string | yes | Property postcode | | `data[].city_property` | string | yes | Property city | | `data[].province_property` | string | yes | Property province | | `data[].sub_name_property` | string | yes | Property secondary name | | `data[].name_room` | string | yes | Room name | | `data[].shortname` | string | yes | Room short name | | `data[].last_modified` | string | yes | When the booking row last changed, ISO 8601 in UTC, to the second. Not in the legacy export: the order of the feed | | `until` | string | yes | The end of the window, ISO in UTC, fixed by the first page and the same on every page of it. Once `nextCursor` is null, it is the `since` of your next poll | | `nextCursor` | string | yes | Pass it as `cursor` to read the next page of the same window. `null` when this page came with fewer than 50 bookings; a last page of exactly 50 still carries a cursor, and the page it leads to comes empty with `null` | ### 200 example ```json { "data": [ { "pcode": 114, "rscode": 52341, "reservation_id": 52341, "id": 52341, "extcode": 1873, "correlative": null, "multibook": null, "channelcode": "4417230981", "channel_reservation_code": "4417230981", "rcode": 1551809177, "rtcode": 101, "subroom": 0, "amount": 240, "orig_amount": 260, "discount": 20, "discount_type": 0, "price": 240, "pay": 100, "date_received": "2026-10-01", "date_arrival": "2026-11-05", "date_departure": "2026-11-07", "arrival_hour": "16:00", "board": "bb", "policy": 4, "roomnight": 2, "checkin": 0, "checkout": 0, "promo_code": null, "men": 2, "person": 2, "children": 0, "device": null, "customer_notes": "Late arrival", "customer_holder": "Jane Doe", "host_name": "Jane", "host_surname": "Doe", "customer_language_iso": "en", "bussines": 0, "pack": null, "id_channel": 9, "ota": "Booking.com", "status": 1, "booked_rate": null, "preCheckin": 0, "customer_id": 880123, "name": "Jane", "surname": "Doe", "email": "guest@example.invalid", "phone": "+34600000000", "province": null, "country": "España", "city": null, "address": null, "zip": null, "notes": null, "type_vat": "D", "vat": null, "birthdate": null, "language": 2, "language_iso": "en", "sex": "F", "nationality": "España", "marketing": 1, "name_property": "Hotel Demo", "address_property": "Calle Mayor", "num_property": "1", "zip_property": "28001", "city_property": "Madrid", "province_property": "Madrid", "sub_name_property": null, "name_room": "Double 101", "shortname": "101", "last_modified": "2026-10-15T08:59:12.000Z" } ], "until": "2026-10-15T09:00:00.000Z", "nextCursor": "eyJ2IjoxLCJzIjoiMjAyNi0xMC0xNVQwODowMDowMC4wMDBaIn0" } ``` --- # Set the housekeeping state of a room `PUT /api/integrations/{pcode}/house-keeping/room-status` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/put-api-integrations-pcode-house-keeping-room-status Auth: header `x-api-key` For a housekeeping system (a phone system on which housekeeping dials the state of the room, a housekeeping app): sets the state one room is in now, the one the property's rack and room list show and `GET /rooms/{pcode}/types` returns. Name the room by its door number, as text: `{ "doorNum": "101", "status": "clean" }`. `status` is `ready` (cleaned and inspected, ready for the next guest), `clean` (cleaned, waiting to be inspected) or `dirty` (to be cleaned); `revision` is not one you can write. The state is saved as the property's own change would be: the next cleaning date of the guest in the room follows it, it goes in the room's housekeeping history as a partner's report, and the property's screens and the guest app of whoever is in the room are updated. Idempotent: a room already in that state is left alone and answers `changed: false`, so it is safe to retry. When the property has your integration switched on, the states the property sets itself are sent to your system too: one you have just reported may come back to you, and reporting it again writes nothing. Answers `400` `housekeepingRoomStatusRequestInvalid` when the door number is not text of 1 to 80 characters or the state is not one of the three; `404` `housekeepingRoomNotFound` when no room of the property has that door number; and `409` `housekeepingRoomAmbiguous` when more than one does, which the property has to fix by giving each room its own. Partner keys only, with this endpoint granted to the connection. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X PUT 'https://uni-api.hotelgest.com/api/integrations/123456/house-keeping/room-status' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "doorNum": "101", "status": "clean" }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `doorNum` | string | yes | The door number of the room, as text and as the property wrote it: the `doorNum` of the room in `GET /rooms/{pcode}/types`. Never a JSON number. Blanks around it do not count | | `status` | `ready`, `clean`, `dirty` | yes | The state the room is in now. `ready`: cleaned and inspected, ready for the next guest. `clean`: cleaned, waiting to be inspected. `dirty`: to be cleaned | ## Responses - `200` — 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 - `400` — Refused, nothing written: `housekeepingRoomStatusRequestInvalid` - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — No room of the property has that door number: `housekeepingRoomNotFound` - `409` — Refused, nothing written: more than one room has that door number, `housekeepingRoomAmbiguous`. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `roomId` | number | yes | ID of the room the door number names | | `doorNum` | string | yes | Door number of the room, as the property wrote it | | `status` | `ready`, `dirty`, `clean`, `revision` | yes | The state the room is in now, as `GET /rooms/{pcode}/types` returns it: the one that was sent | | `changed` | boolean | yes | False when the room was already in that state: nothing was written, so a request can be safely sent again | ### 200 example ```json { "roomId": 2014, "doorNum": "101", "status": "clean", "changed": true } ``` --- # Register a guest of a booking `POST /api/integrations/{pcode}/kiosk/guests/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/post-api-integrations-pcode-kiosk-guests-bookingid Auth: header `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. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X POST 'https://uni-api.hotelgest.com/api/integrations/123456/kiosk/guests/789' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "holder": true, "name": "Lucía", "surname": "García López", "documentType": "P", "documentNumber": "XDC123456", "documentSupport": "BAA000589", "issuingState": "ESP", "issueDate": "2021-05-19", "expirationDate": "2031-05-19", "sex": "F", "birthDate": "1988-02-14", "nationality": "ESP", "country": "ESP", "address": "Calle Mayor 1, 2º B", "postalCode": "28013", "city": "Madrid", "province": "Madrid", "municipality": "Madrid", "email": "lucia@example.com", "phone": "+34600000000", "relationship": "AB", "signatureImage": "string", "documentFrontImage": "string", "documentBackImage": "string", "documentPortraitImage": "string" }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `holder` | boolean | no | 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 | yes | Given name, as the document prints it | | `surname` | string | yes | Surnames, as the document prints them | | `documentType` | `P`, `D`, `C`, `MI`, `I`, `N`, `X`, `E`, `IDX`, `ID`, `50` | yes | `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 | | `documentNumber` | string | no | Number of the document, up to 15 characters. Required except for `MI` | | `documentSupport` | string | no | Support number of a Spanish DNI or NIE. The police registration refuses an adult with one of those documents without it | | `issuingState` | string | no | Country that issued the document, ISO 3166-1 alpha-3 | | `issueDate` | string | no | Issue date, `YYYY-MM-DD` | | `expirationDate` | string | no | Expiry date, `YYYY-MM-DD` | | `sex` | `M`, `F`, `O` | yes | As the document prints it: `M` male, `F` female, `O` other | | `birthDate` | string | yes | Date of birth, `YYYY-MM-DD` | | `nationality` | string | yes | Nationality, ISO 3166-1 alpha-3 | | `country` | string | no | Country of residence, ISO 3166-1 alpha-3. The nationality when left out | | `address` | string | no | | | `postalCode` | string | no | | | `city` | string | no | | | `province` | string | no | Province, for a residence in Spain | | `municipality` | string | no | Municipality, for a residence in Spain | | `email` | string | no | | | `phone` | string | no | | | `relationship` | `AB`, `BA`, `BN`, `CY`, `CD`, `HR`, `HJ`, `PM`, `NI`, `SB`, `SG`, `TI`, `YN`, `TU`, `OT` | no | Relationship to the holder, which the police registration asks for a minor: `PM` parent, `TU` guardian, `HJ` child, `OT` other… | | `signatureImage` | string | no | The guest’s signature, a JPEG as a data URI | | `documentFrontImage` | string | no | Front of the document, a JPEG as a data URI. Kept only while the property stores document images | | `documentBackImage` | string | no | Back of the document, a JPEG as a data URI. Kept only while the property stores document images | | `documentPortraitImage` | string | no | Photo of the document holder, a JPEG as a data URI. Kept only while the property stores document images | ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Refused, nothing written: `kioskBookingCheckedOut`, `kioskBookingNotActive`, `kioskInProgress` (retry in a moment) or `fileScanUnavailable` (retry later). When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `guestId` | number | yes | 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 | ### 200 example ```json { "guestId": 4471203 } ``` --- # Record a payment collected at the kiosk `POST /api/integrations/{pcode}/kiosk/payments/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/post-api-integrations-pcode-kiosk-payments-bookingid Auth: header `x-api-key` Records on the booking a payment the kiosk has already collected, by card or in cash, as reception would: it counts towards what the booking has paid, and the invoice is issued by the property as usual — this call does not invoice. Read what is due first with `GET /api/v2/bookings/{pcode}/payments/{bookingId}` and the booking detail. `collectedAt` dates the payment on that day in the property time zone. `transactionId` is stored as the payment reference behind your partner slug (`:`, which is how it reads in the booking payments) and makes it safe to retry: sending a transaction of yours that is already on the booking writes nothing and answers `200` with what is there and `replayed: true`; the same `transactionId` with a different amount answers `409` `kioskPaymentIdReused`, and so does the same `transactionId` already recorded on another booking of the same group, whatever the amount. Only your own payments are matched: another kiosk’s, or reception’s, with the same reference never are. A checked-out booking still takes it. Answers `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. Partner keys only, with this endpoint granted to the connection. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X POST 'https://uni-api.hotelgest.com/api/integrations/123456/kiosk/payments/789' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "transactionId": "RMK-20261103-000123", "amount": 246, "method": "card", "collectedAt": "2026-11-03T15:10:00+01:00" }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `transactionId` | string | yes | The kiosk's own id for the transaction, 1 to 50 characters: letters, digits, `.`, `_`, `/` or `-`. It is stored as the payment's reference behind your partner slug (`:`), and sending the same transaction again never records it twice. | | `amount` | number | yes | Amount collected, in the property currency, more than 0, up to two decimals | | `method` | `card`, `cash` | yes | How the guest paid: `card` or `cash` | | `collectedAt` | string | yes | When it was collected, ISO 8601 with its offset. The payment is dated on that day, in the property time zone | ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Refused, nothing written: `kioskPaymentIdReused`, `kioskBookingNotActive` or `kioskInProgress` (retry in a moment). When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `transactionId` | string | yes | The kiosk’s own id for the transaction, as it was sent | | `replayed` | boolean | yes | True when the payment was already on the booking and nothing was written this time: a resend of the same transaction | | `paymentId` | number | yes | ID of the payment on the booking, as `GET /api/v2/bookings/{pcode}/payments/{bookingId}` lists it | | `amount` | number | yes | Amount recorded | ### 200 example ```json { "transactionId": "RMK-20261103-000123", "replayed": false, "paymentId": 13214021, "amount": 246 } ``` --- # Get the door key of a checked-in booking `GET /api/integrations/{pcode}/kiosk/door-keys/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/get-api-integrations-pcode-kiosk-door-keys-bookingid Auth: header `x-api-key` The key of the booking room door, for the kiosk to give the guest at the end of the check-in: whichever lock system the property has, the PIN it issued for this booking is stored here. Only once the booking is checked in: check it in first with `PUT /api/bookings/{pcode}/check-in-out/{bookingId}`; before that it answers `409` `kioskBookingNotCheckedIn`, whatever the booking holds, so it never tells whether a booking still to arrive has a PIN. `status` says what there is: `pin` with the PIN in `pin`, as a string with its leading zeros; `keyWithoutPin` when the booking has a key but no PIN to give (a card, a link, the fixed code of the room, or a lock system that did not return one), so send the guest to reception; and `none` when no key was issued for the booking or its room has no lock. `pin` is null unless `status` is `pin`. A PIN is usually issued on the arrival day, so a booking checked in without one may get it later: read it again rather than keep it. One booking is one room: in a group, read each booking with its own id. Answers `409` `kioskBookingCheckedOut` once the booking is checked out, and `409` `kioskBookingNotActive` for a cancelled booking, a no-show or a block. Every read is recorded in the booking history under your partner name, with the status and never the PIN. The answer is never cached (`Cache-Control: no-store`): do not store the PIN beyond handing it to the guest. Partner keys only, with this endpoint granted to the connection. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/integrations/123456/kiosk/door-keys/789' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — No booking with this id in this property - `409` — Refused, no key read: `kioskBookingNotCheckedIn` (check the booking in first), `kioskBookingCheckedOut` or `kioskBookingNotActive`. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `bookingId` | number | yes | ID of the booking, as it was asked for | | `status` | `none`, `keyWithoutPin`, `pin` | yes | `pin`: the PIN of the room door is in `pin`. `keyWithoutPin`: the booking has a key but no PIN to give the guest (a card, a link, the fixed code of the room, or a lock system that did not return one): reception hands it. `none`: no key was issued for the booking, or its room has no lock | | `pin` | string | yes | The PIN as the lock system issued it: a string, digits with their leading zeros. Null unless `status` is `pin` | ### 200 example ```json { "bookingId": 789, "status": "pin", "pin": "0482" } ``` --- # Set the door key of a booking `PUT /api/integrations/{pcode}/locks/door-keys/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/put-api-integrations-pcode-locks-door-keys-bookingid Auth: header `x-api-key` For a lock system that issues the PIN itself: stores the key of the booking room door where every reader takes it from — the guest webapp, which shows it to the guest when the property chose to, the arrivals report and the self check-in kiosks. Send `{ "pin": "0427" }` with the PIN as text (digits only, 4 to 8, leading zeros kept); `{ "state": "keyWithoutPin" }` when the booking has a key but no PIN to give the guest; or `{ "state": "none" }` to remove the key, when the booking is cancelled or moved to a room the PIN does not open. Exactly one of `pin` and `state`. Only a booking still to come or in house: cancelled bookings, no-shows, blocks and checked-out bookings are refused, removing the key included — nothing reads the key of a stay that is over. Idempotent: sending the key the booking already has writes nothing and answers `changed: false`, so it is safe to retry. The answer says the status the booking has now and never repeats the PIN. Every change goes in the booking history under your partner name, with the status before and after and never the PIN. Hotelgest sends the guest no email with the PIN. One booking is one room: in a group, write each booking with its own id. Answers `400` `doorKeyPinInvalid` for a PIN that is not 4 to 8 digits sent as text, or is all zeros or zeros ending in 1 (`0000`, `0001`), which older readers of the booking take for "no key"; `400` `doorKeyRequestInvalid` when the body is not exactly one of `pin` and `state`; `409` `doorKeyBookingNotActive` for a cancelled booking, a no-show or a block; `409` `doorKeyBookingCheckedOut` once the booking is checked out; and `404` for a booking that is not of this property. Partner keys only, with this endpoint granted to the connection. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X PUT 'https://uni-api.hotelgest.com/api/integrations/123456/locks/door-keys/789' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "pin": "0427", "state": "none" }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `pin` | string | no | The PIN your system issued for this booking, as text: digits only, 4 to 8 of them, leading zeros kept. Never a JSON number. All zeros and zeros ending in 1 (`0000`, `0001`) are refused: older readers of the booking take them for "no key". Send either `pin` or `state`, not both | | `state` | `keyWithoutPin`, `none` | no | `keyWithoutPin`: the booking has a key, but no PIN to give the guest (a card, a link); the guest is sent to reception. `none`: the booking has no key any more, e.g. it was cancelled or moved to a room your PIN does not open. Send either `pin` or `state`, not both | ## Responses - `200` — 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 - `400` — Refused, nothing written: `doorKeyPinInvalid` or `doorKeyRequestInvalid` - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — No booking with this id in this property - `409` — Refused, nothing written: `doorKeyBookingNotActive` or `doorKeyBookingCheckedOut`. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `bookingId` | number | yes | ID of the booking, as it was sent | | `status` | `none`, `keyWithoutPin`, `pin` | yes | The key the booking has now, as every reader of the door key sees it: `pin` (a PIN is stored), `keyWithoutPin` (a key that carries no PIN) or `none` (no key). The PIN itself is never sent back | | `changed` | boolean | yes | False when the booking already had exactly this key: nothing was written and nothing was recorded, so a request can be safely sent again | ### 200 example ```json { "bookingId": 789, "status": "pin", "changed": true } ``` --- # List the guests staying now `GET /api/integrations/{pcode}/pos/in-house` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/get-api-integrations-pcode-pos-in-house Auth: header `x-api-key` The bookings whose guest is in the property right now: checked in, not yet checked out, and today (in the property time zone) between arrival and departure, both included. It is the list a POS charges rooms against: each entry carries the `bookingId` to post a ticket to with `POST /api/integrations/{pcode}/pos/tickets/{bookingId}`, the room with its door number, the board and the booking holder. It takes one optional filter, `room`: the exact door number, compared as text (`201`, not `201.0`), which narrows the list to that one room — no booking there answers an empty list, not a `404`. It returns only these fields — no contact details, documents or prices. Sorted by door number as text (`10` before `9`), bookings without a room first. Partner keys only, with this endpoint granted to the connection. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `room` | string | no | Exact door number to filter by, compared as text. Omit for every room. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/integrations/123456/pos/in-house' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | InHouseBookingDto[] | yes | The bookings in house, sorted by door number as text (`10` before `9`), bookings without a room first | | `data[].bookingId` | number | yes | ID of the booking: the one a POS ticket is posted to | | `data[].start` | string | yes | Arrival date (YYYY-MM-DD) | | `data[].end` | string | yes | Departure date (YYYY-MM-DD) | | `data[].board` | `nb`, `bb`, `hb`, `fb`, `ai`, `pack` | yes | Board of the stay: `nb` room only, `bb` breakfast, `hb` half board, `fb` full board, `ai` all inclusive; `pack` on the rare booking whose board is the one of the pack it was booked with | | `data[].occupancy` | InHouseOccupancyDto | yes | | | `data[].occupancy.adults` | number | yes | Adults in the room; `-1` when the booking does not say | | `data[].occupancy.children` | number | yes | Children in the room | | `data[].room` | InHouseRoomDto | yes | | | `data[].room.id` | number | yes | ID of the room | | `data[].room.roomTypeId` | number | yes | ID of its room type | | `data[].room.name` | string | yes | Name of the room | | `data[].room.doorNum` | string | yes | Door number, as the staff knows the room | | `data[].guest` | InHouseGuestDto | yes | The booking holder | | `data[].guest.name` | string | yes | First name | | `data[].guest.surname` | string | yes | Last name | ### 200 example ```json { "data": [ { "bookingId": 789, "start": "2026-10-06", "end": "2026-10-09", "board": "hb", "occupancy": { "adults": 2, "children": 0 }, "room": { "id": 1619202529, "roomTypeId": 101, "name": "Suite 203", "doorNum": "203" }, "guest": { "name": "Laura", "surname": "García" } } ] } ``` --- # Charge a POS ticket to a booking `POST /api/integrations/{pcode}/pos/tickets/{bookingId}` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/post-api-integrations-pcode-pos-tickets-bookingid Auth: header `x-api-key` Posts a restaurant or bar ticket paid as a room charge. Each line becomes a charge of the booking, billed with the rest of the stay at check-out, and shows up in the booking products like any other charge. Send prices with taxes included and the tax rate as a percentage; `consumedAt` dates the charge on that day in the property time zone. `ticketId` makes it safe to retry: sending a ticket that is already on the booking writes nothing and answers `200` with what is stored and `replayed: true` — the line names as stored (an apostrophe `'` is stored as `´`) and each unit price worked back from the stored net price, which can differ from what you sent by a cent; the same `ticketId` with a different total answers `409` `posTicketIdReused`. Find the guests staying now with `GET /api/integrations/{pcode}/pos/in-house`. Answers `409` `posTicketBookingCheckedOut` once the booking is checked out, `409` `posTicketBookingNotActive` for a cancelled booking, a no-show or a block, and `409` `posTicketInProgress` while another ticket for the same booking is being written — retry in a moment. Partner keys only, with this endpoint granted to the connection. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | yes | Booking ID. Obtained from the search endpoints (`GET /api/v2/bookings/{pcode}/search`) or returned by the booking creation endpoint. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X POST 'https://uni-api.hotelgest.com/api/integrations/123456/pos/tickets/789' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "ticketId": "T-2026-000123", "consumedAt": "2026-10-07T21:34:00+02:00", "lines": [ { "name": "Menú del día", "quantity": 2, "unitPrice": 18.5, "taxRate": 10 } ] }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `ticketId` | string | yes | The POS's own id for the ticket, 1 to 22 characters: letters, digits, `.`, `_`, `/` or `-`. Sending the same ticket again never charges it twice. | | `consumedAt` | string | yes | When the ticket was closed, ISO 8601 with its offset. The charge is dated on that day, in the property time zone | | `lines` | PosTicketLineDto[] | yes | The lines of the ticket, 1 to 200 | | `lines[].name` | string | yes | What was served, as the ticket prints it | | `lines[].quantity` | number | yes | Units, more than 0, up to two decimals | | `lines[].unitPrice` | number | yes | Price of one unit, taxes included, up to two decimals. 0 or more | | `lines[].taxRate` | number | yes | Tax rate as a percentage (10 for 10 %), 0 to 99.99 | ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Refused, nothing written: `posTicketIdReused`, `posTicketBookingCheckedOut`, `posTicketBookingNotActive` or `posTicketInProgress` (retry in a moment). When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `ticketId` | string | yes | The POS’s own id for the ticket, as it was sent | | `replayed` | boolean | yes | True when the ticket was already on the booking and nothing was written this time: a resend of the same ticket | | `total` | number | yes | Sum of the lines, taxes included | | `items` | AddPosTicketItemDto[] | yes | One charge per line of the ticket | | `items[].id` | number | yes | ID of the charge on the booking | | `items[].name` | string | yes | Name of the line: as the POS sent it on the first answer; on a resend (`replayed: true`) as it was stored, where an apostrophe `'` becomes `´` | | `items[].quantity` | number | yes | Units charged | | `items[].unitPrice` | number | yes | Price of one unit, taxes included. On a resend it is worked back from the stored net price, and can differ from what was sent by a cent | | `items[].taxRate` | number | yes | Tax rate as a percentage | ### 200 example ```json { "ticketId": "T-2026-000123", "replayed": false, "total": 37, "items": [ { "id": 22898324, "name": "Menú del día", "quantity": 2, "unitPrice": 18.5, "taxRate": 10 } ] } ``` --- # Get what the property has sold and has left `GET /api/integrations/{pcode}/rms/on-the-books` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/get-api-integrations-pcode-rms-on-the-books Auth: header `x-api-key` What an RMS reads to know how the property is doing, in the shape of the legacy export (`/panel/thirdPart/revbell`), field names included. `rsvList` holds the bookings — with `dfrom` and `dto`, those arriving in the range; with `dfrom` alone, those received that day — each with its nights and their prices in `PrecioNoche`, channel, segment, country, age and status; cancelled, no-show and tentative ones included, each with its `bookingStatus`, and a cancelled one with when it was cancelled in `Fecha_Anulacion`; blocked ones not, nor a booking whose room type is not sold on the booking engine or no longer exists, nor one with no priced night. `capList` holds each day and room type sold on the booking engine: rooms sold (confirmed bookings only: a tentative one is neither sold nor taken from the free rooms), blocked, free and in total, one row per room type name, so two room types with the same name come as one row. With `article`, `productionList` holds the articles sold: one row per invoice line, its units and amounts prorated to the days inside the range. `dto` at most 366 days after `dfrom`. Unlike the legacy, a call without dates is refused: there it matched almost nothing; and `Fecha_Anulacion` is when the booking was cancelled, read from its history, where the legacy gave its last change. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `dfrom` | string | yes | With `dto`, the first arrival date of the bookings and the first day of the capacity. Alone, the day the bookings were received on, and the one day of capacity | | `dto` | string | no | Last arrival date and last day of capacity, at most 366 days after `dfrom` | | `article` | boolean | no | Also return `productionList`: the articles sold day by day in the same range | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/integrations/123456/rms/on-the-books?dfrom=2026-10-01' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `rsvList` | RmsOnTheBooksBookingDto[] | yes | The bookings | | `rsvList[].Fecha_Estancia` | string | yes | One night of the stay, not a specific one: which night is not fixed, as in the legacy export. Read the nights from `PrecioNoche` | | `rsvList[].Importe` | number | yes | Sum of the prices of every night of the booking (`PrecioNoche`), whatever the date range asked for | | `rsvList[].PrecioNoche` | RmsOnTheBooksNightDto[] | yes | Every night with its price | | `rsvList[].PrecioNoche[].day` | string | yes | Night | | `rsvList[].PrecioNoche[].price` | number | yes | Price of the night: the room with its board, as the rate sold it. Extras are not in it: they come in `extras` and `extras_excl_tax` | | `rsvList[].PrecioNoche[].board` | string | yes | Board of the night | | `rsvList[].PrecioNoche[].extras_excl_tax` | string | yes | Extras of the night without tax, a decimal as text with four decimals | | `rsvList[].PrecioNoche[].extras` | string | yes | Extras of the night, a decimal as text with four decimals | | `rsvList[].PrecioNoche[].netPrice` | number | yes | The night without tax (`price` / (1 + `taxRate` / 100)); `price` itself when the property enters its prices without tax. Extras excluded: the night without tax plus its extras without tax is `netPrice` + `extras_excl_tax` | | `rsvList[].Hotel` | string | yes | Property name | | `rsvList[].pcode` | number | yes | Property code | | `rsvList[].Reserva_ID` | number | yes | Booking id | | `rsvList[].Fecha_Reserva` | string | yes | Date received | | `rsvList[].Fecha_Llegada` | string | yes | Arrival | | `rsvList[].Fecha_Salida` | string | yes | Departure | | `rsvList[].Fecha_Anulacion` | string | yes | YYYY-MM-DD HH:MM:SS, the server time in Spain; empty on a confirmed booking. On a cancelled booking (`Estado` `anulada`), when it was 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. On any other booking that is not confirmed, its last change | | `rsvList[].Pension` | string | yes | Board | | `rsvList[].Provincia` | string | yes | Guest province | | `rsvList[].Adultos` | number | yes | Adults; `-1` when the booking does not say | | `rsvList[].Ninos` | number | yes | Children | | `rsvList[].Estado` | `confirmada`, `anulada`, `cancelacion temporal`, `` | yes | Status as the legacy export names it: `anulada` covers cancelled, no-show and temporarily cancelled bookings, and a tentative one comes empty. Read `bookingStatus` to tell them apart | | `rsvList[].Habitacion` | string | yes | Room type | | `rsvList[].Agencia` | string | yes | Channel, by the name the channel list gives it. The property’s own sale is channel `0`, which comes with its name in that list (`Recepcion`); `WebPage` only when the channel is not in the list | | `rsvList[].Segmento` | string | yes | Market segment | | `rsvList[].Customer_type` | `bloques`, `individuales` | yes | `bloques` when the booking is part of a group | | `rsvList[].Pais` | string | yes | Guest nationality, ISO 3166-1 alpha-2; an empty string when the guest record has none or holds something that is not a country code | | `rsvList[].Edad` | string | yes | Guest age in years | | `rsvList[].Rate_Code` | object | yes | The channel rate of its occupancy, board, policy and channel (the `id` in `GET /api/integrations/{pcode}/rms/rates`, what a push names in `rateId`), or an empty string when there is none | | `rsvList[].roomTypeId` | number | yes | The room type booked: `Codigo_habitacion` in `capList`, `roomTypeId` in the rest of the API | | `rsvList[].currency` | string | yes | ISO 4217 code of the currency every amount is in | | `rsvList[].commission` | number | yes | The channel's commission on the whole booking, an amount in `currency` | | `rsvList[].taxRate` | number | yes | The property's tax on the stay, a percentage; null when it has none set | | `rsvList[].extras` | RmsOnTheBooksExtraDto[] | yes | What the booking sold besides the stay | | `rsvList[].extras[].id` | number | yes | Id of the item on the booking | | `rsvList[].extras[].productId` | number | yes | Product sold | | `rsvList[].extras[].name` | string | yes | What was sold | | `rsvList[].extras[].category` | string | yes | Its category | | `rsvList[].extras[].dateFrom` | string | yes | First day | | `rsvList[].extras[].dateTo` | string | yes | Last day | | `rsvList[].extras[].units` | number | yes | Units sold | | `rsvList[].extras[].unitPrice` | number | yes | Price of one unit, without tax | | `rsvList[].extras[].netPrice` | number | yes | `units` × `unitPrice`, without tax | | `rsvList[].extras[].pvpPrice` | number | yes | What the guest pays for it, tax included | | `rsvList[].extras[].taxRate` | number | yes | Tax of the item, a percentage | | `rsvList[].bookingStatus` | `ready`, `tentative`, `cancelled`, `no-show`, `temporary-cancelled` | yes | Status of the booking, as the rest of the API names it | | `capList` | RmsOnTheBooksCapacityDto[] | yes | Capacity per day and room type | | `capList[].Hotel` | string | yes | Property name | | `capList[].pcode` | number | yes | Property code, as a number (as in `rsvList`) | | `capList[].Fecha` | string | yes | Day | | `capList[].Habitacion` | string | yes | Room type, by name. Rows are per name: two room types with the same name come as one row | | `capList[].Codigo_habitacion` | string | yes | Room type id, as text. On a row that folds two room types of the same name, one of them | | `capList[].Vendidas` | string | yes | Rooms sold that day, as text: confirmed bookings only. A tentative booking is neither sold nor taken from `Disponibles` | | `capList[].Bloqueadas` | string | yes | Rooms blocked that day, as text | | `capList[].Disponibles` | string | yes | Rooms free that day, as text | | `capList[].Total_fisicas` | string | yes | Physical rooms of the type, as text | | `productionList` | RmsOnTheBooksProductionDto[] | no | Articles sold, one row per invoice line with its units and amounts prorated to the days inside the range; only when `article` is asked for | | `productionList[].invoiceRef` | string | yes | Invoice | | `productionList[].category` | string | yes | Category | | `productionList[].name` | string | yes | Article | | `productionList[].type` | string | yes | Line type | | `productionList[].reservation_ID` | string | yes | Booking id | | `productionList[].refound` | number | yes | `1` when it is a refund | | `productionList[].issue_date` | string | yes | Invoice date | | `productionList[].created_at` | string | yes | When it was added, or `--` | | `productionList[].date_service` | string | yes | Service date | | `productionList[].date_service_end` | string | yes | Last service date, or empty for one day | | `productionList[].units_sold` | number | yes | Units of the line that fall in the range: a line that spans several days is prorated by its days, and only the days inside the range count | | `productionList[].base` | number | yes | Base amount of `units_sold`, prorated as they are | | `productionList[].taxes` | number | yes | Taxes of `units_sold`, prorated as they are | | `productionList[].type_tax` | number | yes | Tax rate | | `productionList[].total` | number | yes | Total | | `productionList[].account` | number | yes | Accounting account | | `productionList[].id` | number | yes | Invoice line id: one row per line | ### 200 example ```json { "rsvList": [ { "Fecha_Estancia": "2026-10-05", "Importe": 185, "PrecioNoche": [ { "day": "2026-10-05", "price": 92.5, "board": "bb", "extras_excl_tax": "0.0000", "extras": "0.0000", "netPrice": 84.09 } ], "Hotel": "Hotel Demo", "pcode": 1234, "Reserva_ID": 100684613, "Fecha_Reserva": "2026-09-20", "Fecha_Llegada": "2026-10-05", "Fecha_Salida": "2026-10-07", "Fecha_Anulacion": "", "Pension": "bb", "Provincia": "Madrid", "Adultos": 2, "Ninos": 0, "Estado": "confirmada", "Habitacion": "Double room", "Agencia": "Booking.com", "Segmento": "Leisure", "Customer_type": "individuales", "Pais": "ES", "Edad": "41", "Rate_Code": 48123, "roomTypeId": 1551809814, "currency": "EUR", "commission": 33.3, "taxRate": 10, "extras": [ { "id": 512340, "productId": 87, "name": "Parking", "category": "Services", "dateFrom": "2026-10-05", "dateTo": "2026-10-07", "units": 2, "unitPrice": 10, "netPrice": 20, "pvpPrice": 24.2, "taxRate": 21 } ], "bookingStatus": "ready" } ], "capList": [ { "Hotel": "Hotel Demo", "pcode": 1234, "Fecha": "2026-10-05", "Habitacion": "Double room", "Codigo_habitacion": "101", "Vendidas": "7", "Bloqueadas": "1", "Disponibles": "2", "Total_fisicas": "10" } ], "productionList": [ { "invoiceRef": "F2026-0012", "category": "Restaurant", "name": "Dinner", "type": "product", "reservation_ID": "100684613", "refound": 0, "issue_date": "2026-10-07", "created_at": "2026-10-05", "date_service": "2026-10-05", "date_service_end": "", "units_sold": 2, "base": 40, "taxes": 4, "type_tax": 10, "total": 44, "account": 70500000, "id": 5521 } ] } ``` --- # List the rates you can push to `GET /api/integrations/{pcode}/rms/rates` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/get-api-integrations-pcode-rms-rates Auth: header `x-api-key` Every rate of the property a push may name: the base rate of its own sale (`main`), each channel’s base rate (`mainchannel`) and the channel rates (`planchannel`), with its room type, channel, board, policy and guests. Price modifiers are not listed: they derive from one of these, so you push the one they derive from. Inactive rates are listed and can be pushed, as on the legacy channel. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/integrations/123456/rms/rates' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | number | yes | The rate id: what a push names in `rateId` | | `roomName` | string | yes | Room type of the rate | | `ota` | string | yes | Channel the rate sells on, by the name the channel list gives it. The property’s own sale is channel `0`, which comes with its name in that list (`Recepcion`); `direct` only when the channel is not in the list | | `otaId` | number | yes | Channel id; `0` is the property’s own sale | | `board` | string | yes | `nb` room only, `bb` breakfast, `hb` half board, `fb` full board, `ai` all inclusive | | `policy` | string | yes | Cancellation policy id | | `typechannel` | string | yes | Channel manager the rate is mapped through, as stored (`wubook`, `SiteMinder`, `YieldPlanet`, `Channex`, `Neobookings`, `Pghc`); `wubook` unless the property set another | | `type` | `main`, `mainchannel`, `planchannel` | yes | `main` is the base rate of the property’s own sale, `mainchannel` a channel’s own base rate and `planchannel` a channel rate | | `roomTypeId` | number | yes | Room type id (`roomTypeId` elsewhere). Not in the legacy `/panel/channel/rate` | | `occupancy` | number | yes | Guests the price is for. Not in the legacy answer | | `active` | boolean | yes | Whether the rate is on sale. Not in the legacy answer | | `anchored` | number | yes | `0` when the rate sets its own price; otherwise the `id` of the rate it follows, because the hotel linked it to that one (the same `anchored` the legacy `/v1/booking/price` gave in `rateChannel`). Any type can be linked, `planchannel` included. A linked rate can still be pushed, but a pushed price gives it a price of its own for those days and it stops following its rate there; to keep the hotel’s link, push to the rate it follows | ### 200 example ```json [ { "id": 48122, "roomName": "Double room", "ota": "Booking.com", "otaId": 0, "board": "bb", "policy": "4", "typechannel": "wubook", "type": "main", "roomTypeId": 101, "occupancy": 2, "active": true, "anchored": 0 } ] ``` --- # Get the daily price of the rates you can push to `GET /api/integrations/{pcode}/rms/prices` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/get-api-integrations-pcode-rms-prices Auth: header `x-api-key` The price each rate of `rms/rates` sells at, night by night from `start` to `end` (both included), as Hotelgest prices it: the rate’s base, a channel rate’s derived from its channel base, the price set for a night on top of it, and a linked rate (`anchored`) worked out from the rate it follows unless that night has a price of its own. For a channel rate it is what the legacy `/v1/booking/price` gave with `channel=1` in `rateChannel[…].priceList`; unlike there, a channel rate comes whether or not its room type is on the booking engine, and `main` and `mainchannel` come too. A night with no price comes with `price: null`, never `0`. Each rate carries its `roomTypeId`, and each night also carries, as the legacy `/v1/booking/price` did: `availability`, the free rooms of that room type (the legacy `availabilityList`), which can be `0` (full) or negative (overbooked) and is `null` only when there are no rooms to read; and the stay restrictions `minStay` (the legacy `minstay`, `1` when none is set), `maxStay` (`0` when there is no maximum), `closed`, `closedToArrival` and `closedToDeparture`. A channel rate’s restrictions come from its OTA’s own calendar; the legacy read them all from the direct-sale one. `end` at most 366 days after `start`; a wider range is refused with `rmsDateRangeTooLong`. Narrow it with `rateId`, with `roomTypeId`, or with both (an intersection); an id that is not one of `rms/rates` is left out. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `start` | string | yes | First night | | `end` | string | yes | Last night, included. At most 366 days after `start` | | `rateId` | number[] | no | Only these rates, by the `id` of `rms/rates`: repeat it (`rateId=1&rateId=2`) or separate them with commas. Without it, every rate | | `roomTypeId` | number[] | no | Only rates of these room types, by the `roomTypeId` of `rms/rates`: repeat it (`roomTypeId=1&roomTypeId=2`) or separate them with commas. Combined with `rateId` as an intersection — a rate must match both. An id that is not a room type of this property is left out, as with `rateId` | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/integrations/123456/rms/prices?start=2026-12-01&end=2026-12-31' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — A date that is not `YYYY-MM-DD`, `end` before `start` (`invalidDateRange`) or more than the allowed days after it (`rmsDateRangeTooLong`) - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `start` | string | yes | First night, as asked | | `end` | string | yes | Last night, as asked (included) | | `rates` | RmsRatePricesDto[] | yes | The rates of `rms/rates` (or the ones asked for in `rateId`), in the same order | | `rates[].id` | number | yes | The rate id, the `id` of `rms/rates` | | `rates[].type` | `main`, `mainchannel`, `planchannel` | yes | | | `rates[].roomTypeId` | number | yes | The room type the rate prices, as `rms/rates` gives it | | `rates[].active` | boolean | yes | Whether the rate is on sale. An inactive rate has `price: null` every night | | `rates[].anchored` | number | yes | `0` when the rate sets its own price; otherwise the `id` of the rate it follows. Its nights with `origin: clone` move when that rate’s do | | `rates[].prices` | RmsRatePriceDayDto[] | yes | Every night from `start` to `end`, in order | | `rates[].prices[].date` | string | yes | Night | | `rates[].prices[].price` | number | yes | What the rate sells at that night, in the property’s currency and as you push it. `null` when it has no price that night: the rate is inactive, the rate it follows has no price that night or cannot be resolved, it is a channel rate with no channel base to derive from, or it works out at 0 or less. Never `0` for “no price” | | `rates[].prices[].origin` | `main`, `static`, `clone` | yes | `static`: a price set for that night (by the hotel or by a push). `main`: the rate’s base price — for a `planchannel`, derived from its channel’s base. `clone`: derived from the rate it follows (`anchored`) with the hotel’s modifier. `null` exactly when `price` is | | `rates[].prices[].availability` | number | yes | Free rooms of the rate’s room type that night, the legacy `availabilityList[dt]`: the room type’s rooms less the confirmed and blocked bookings covering the night. `0` is full and a negative number is overbooked, as on the legacy. `null` only when the room type has no rooms to read — never `0` for “unknown” | | `rates[].prices[].minStay` | number | yes | Minimum nights to stay over that night, the legacy `minstay[dt]`. `1` when no restriction is set for the night, as the legacy returned for a day with no row | | `rates[].prices[].maxStay` | number | yes | Maximum nights, the legacy `maxstay[dt]`. `0` when there is no maximum | | `rates[].prices[].closed` | boolean | yes | The night is closed to sale (the legacy `closed[dt]`) | | `rates[].prices[].closedToArrival` | boolean | yes | No stay may start on the night. Only ever `true` where the property has the columns for it | | `rates[].prices[].closedToDeparture` | boolean | yes | No stay may end on the night. Only ever `true` where the property has the columns for it | ### 200 example ```json { "start": "2026-12-01", "end": "2026-12-31", "rates": [ { "id": 48122, "type": "planchannel", "roomTypeId": 101, "active": true, "anchored": 0, "prices": [ { "date": "2026-12-01", "price": 112.5, "origin": "static", "availability": 3, "minStay": 2, "maxStay": 0, "closed": false, "closedToArrival": false, "closedToDeparture": false } ] } ] } ``` --- # Push prices or restrictions `POST /api/integrations/{pcode}/rms/push` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/post-api-integrations-pcode-rms-push Auth: header `x-api-key` Prices or restrictions for one rate, as tranches of dates. Dates go from yesterday to 700 days ahead, and prices and restrictions travel in separate pushes. The property must have its rates on Unified; otherwise the push is refused with 409 `rmsPropertyNotOnUnified`. **The queue is not the legacy one.** If you push to the legacy API today, these are the differences that change what you see: - **Applied within the minute, not hours later.** The legacy kept a push in a queue a cron drained hours after; here the push itself wakes the writer, and a watchdog picks up anything left within 60 seconds. The answer still comes as soon as the push is queued, not once it is written. - **The newest value of a day wins, not every push in turn.** Each push is split into its days and a day keeps only the last value sent for it. Resending a whole calendar costs nothing, and an older value never reappears after a newer one. - **Inside a push, the later tranche wins.** Where two tranches of the same push share days, the one further down the array wins. The legacy sorted them by start date first, so an earlier element starting later could win there. - **A late retry can be refused.** Across pushes the last to arrive wins; send `sentAt` and a push built before the last accepted one for the same rate is refused with 409 `rmsPushStale` instead of overwriting it. - **Full or down means 429, and nothing was stored.** Resend after the `Retry-After` seconds. The legacy took every push and fell behind instead. - **What is not applied is said.** Closures (`stop_sell`) and maximum stays (`max_stay`) are accepted and not applied for now, as on the legacy, but the answer lists them in `ignored` instead of a bare success. - **A write that fails is retried, then reported.** A day that cannot be written is retried a few times and then set aside and reported to us, rather than lost silently. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for. | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X POST 'https://uni-api.hotelgest.com/api/integrations/123456/rms/push' \ -H 'x-api-key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "rateId": 48122, "roomId": 1551809177, "sentAt": "2026-10-15T08:30:00Z", "rate": [ { "StartUtc": "2026-08-25", "EndUtc": "2026-08-31", "Value": "129.90", "stop_sell": 1, "min_stay": 2, "min_stay_through": 2, "max_stay": 14 } ] }' ``` ## Request body | Field | Type | Required | Description | | --- | --- | --- | --- | | `rateId` | object | yes | Id of the rate being pushed: the `id` of `GET /integrations/{pcode}/rms/rates` | | `roomId` | object | no | Room type a restriction lands on, when it is not the rate’s own. Prices ignore it. | | `sentAt` | string | no | When you built this push (ISO 8601). A push sent before the last one accepted for the same rate is refused with 409 `rmsPushStale` instead of overwriting newer values. Leave it out and the last push to arrive wins. | | `rate` | RmsPushItemDto[] | yes | The tranches. Either all prices (`Value`) or all restrictions (`stop_sell`, `min_stay_through`, `min_stay`, `max_stay`): never both in one push. | | `rate[].StartUtc` | string | yes | First day of the range (YYYY-MM-DD), from yesterday onwards | | `rate[].EndUtc` | string | yes | Last day of the range (YYYY-MM-DD), included and not before `StartUtc`. `Endutc` is accepted too | | `rate[].Value` | object | no | Price of each day of the range, up to two decimals. `0` clears the price of those days | | `rate[].stop_sell` | object | no | Closes (`1`) or opens (`0`) sale on those days. Accepted but not applied yet: it comes back in `ignored` | | `rate[].min_stay` | object | no | Minimum stay in nights, 0 to 999. `min_stay_through` wins when both are sent | | `rate[].min_stay_through` | object | no | Minimum stay in nights for any stay that includes those days, 0 to 999 | | `rate[].max_stay` | object | no | Maximum stay in nights, 0 to 999. Accepted but not applied yet: it comes back in `ignored` | ## Responses - `200` — 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 - `400` — Bad Request. The request was invalid or cannot be served. - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Refused, nothing stored: `rmsPushStale` (a `sentAt` older than the last push accepted for the rate) or `rmsPropertyNotOnUnified` (the property does not have its rates on Unified). When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Nothing was stored. `rmsQueueFull` or `rmsQueueUnavailable` (with `fault: dependency`): the queue is full or did not answer; resend after the `Retry-After` seconds. With no code, a rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `requestId` | string | yes | Id of the push, to quote it to support | | `ignored` | `stop_sell`, `max_stay`[] | yes | Fields you sent that are accepted and NOT applied: closures and maximum stays are switched off on the platform for now. Empty when everything you sent is applied. | ### 200 example ```json { "requestId": "9b2f6c1e-1d1a-4f6a-9a55-0e3c3c2f4a71", "ignored": [] } ``` --- # Get the bookings changed since an instant `GET /api/integrations/{pcode}/rms/booking-changes` Base URL: `https://uni-api.hotelgest.com` Docs: https://public-api.hotelgest.com/partner/reference/get-api-integrations-pcode-rms-booking-changes Auth: header `x-api-key` What changed since you last asked. Every booking whose row changed at or after `since` — created, edited, moved, cancelled — oldest change first, 50 per page. The first call fixes a window, from `since` to `until` (the moment it was answered), and every page of it answers that same `until`. While `nextCursor` is not null, call again with `cursor=` (`since` is ignored then); once it is null, wait and poll again with `since=`. It is null on a page with fewer than 50 bookings: a last page of exactly 50 still carries a cursor, and the page it leads to comes empty. Send `since` with its zone; a value without one is read as UTC, and a bare date as that day's midnight in UTC. A booking that changes while you page leaves the window and comes in your next poll, so nothing is skipped. Changes are compared to the second, so a booking changed in the same second as `until` comes again in the next poll: keep the latest version of each booking by its id. A cursor that was not issued by the feed is refused with 400 `bookingChangesCursorInvalid`: start again from your last `until`. A change to something hanging off a booking that does not touch the booking itself (a payment, an edit of the guest record) does not bring it back. Cancelled bookings come too: a cancellation is a change. Each item carries what an RMS reads of a booking: its status, channel, dates and nights, room type and room, guests counted by age, board, policy and rate, and its amounts. It carries no personal data beyond the holder's `country`, `nationality` and `language`: no name, contact, identity document, notes, guest list, to-dos or company. ## Path parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `pcode` | number | yes | 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 | Name | Type | Required | Description | | --- | --- | --- | --- | | `since` | string | no | An instant with its time and zone (ISO 8601): the bookings whose row changed at or after it. On the first poll, the moment you start; after that, the `until` of your last poll. Without a zone it is read as UTC, and a bare date (`2026-10-15`) as that day’s midnight in UTC. Required unless `cursor` is sent; ignored when it is | | `cursor` | string | no | The `nextCursor` of the previous page, as it came. It carries the window of the first page, so `since` is ignored with it. A cursor that was not issued by this feed is refused with 400 `bookingChangesCursorInvalid` | ## Header parameters | Name | Type | Required | Description | | --- | --- | --- | --- | | `x-api-key` | string | yes | Your API key for authentication. You can generate API keys from the hotelgest dashboard under Settings > API. Each API key is scoped to a specific property. | ## Example request ```bash curl -X GET 'https://uni-api.hotelgest.com/api/integrations/123456/rms/booking-changes' \ -H 'x-api-key: YOUR_API_KEY' ``` ## Responses - `200` — 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 - `400` — Bad Request: neither `since` nor `cursor` was sent, `since` is not an ISO 8601 date or date-time (a `validation` list names it; one without a zone is accepted and read as UTC), or the `cursor` was not issued by this feed (`bookingChangesCursorInvalid`: start again from your last `until` as `since`). - `401` — Unauthorized. Invalid or missing API key. - `403` — Forbidden. You do not have permission to access this resource. - `404` — Not Found. The requested resource could not be found. - `409` — Conflict. The request clashes with the current state; `message` carries the code. When a system the API depends on failed (the legacy platform, a provider, a queue), the body also carries `fault`: `dependency` means nothing was done — retry in a few seconds; `outcomeUnknown` means it may have been done — check before repeating it. - `429` — Too Many Requests. A rate limit of the key, the property or the IP was exceeded; wait the seconds in the `Retry-After-` header before retrying. - `500` — Internal Server Error. An unexpected error occurred on the server. ### 200 body | Field | Type | Required | Description | | --- | --- | --- | --- | | `data` | RmsBookingChangeDto[] | yes | The bookings changed in the window, oldest change first, 50 per page | | `data[].id` | number | yes | Booking id | | `data[].pcode` | number | yes | Property code | | `data[].locator` | string | no | The booking code on the channel it came from | | `data[].groupId` | number | no | The group the booking belongs to, when it is part of one | | `data[].start` | string | yes | Arrival, `YYYY-MM-DD` | | `data[].end` | string | yes | Departure, `YYYY-MM-DD` | | `data[].nights` | number | yes | Nights | | `data[].createdAt` | string | yes | Day the booking was received, `YYYY-MM-DD` | | `data[].bookingStatus` | `ready`, `tentative`, `cancelled`, `no-show`, `temporary-cancelled` | yes | Status of the booking | | `data[].releaseDateTentative` | string | no | When a tentative booking lapses, `YYYY-MM-DD HH:mm` | | `data[].board` | `nb`, `bb`, `hb`, `fb`, `ai`, `pack` | yes | Board: `nb` room only, `bb` breakfast, `hb` half board, `fb` full board, `ai` all inclusive; `pack` on the rare booking whose board is the one of the pack it was booked with | | `data[].policy` | string | yes | Cancellation policy id | | `data[].bookedRate` | string | yes | The rate as the channel named it, when it did | | `data[].price` | number | yes | Price of the stay (of the whole group, on a group booking) | | `data[].accommodationPrice` | number | yes | Accommodation alone | | `data[].paid` | number | yes | Amount paid | | `data[].totalExtras` | number | yes | Extras | | `data[].canceledCost` | number | no | What the hotel keeps from a cancellation, no-show or early departure | | `data[].room` | RmsBookingChangeRoomDto | yes | | | `data[].room.id` | number | yes | Room assigned, or `null` while none is | | `data[].room.roomTypeId` | number | yes | Room type | | `data[].room.originalRoomTypeId` | number | yes | Room type the booking was made for, before any move | | `data[].room.roomTypeName` | string | yes | Name of the room type | | `data[].occupancy` | RmsBookingChangeOccupancyDto | yes | | | `data[].occupancy.total` | number | yes | `adults` + `children` + `babies` | | `data[].occupancy.adults` | number | yes | Adults; `-1` when the booking does not say | | `data[].occupancy.children` | number | yes | | | `data[].occupancy.babies` | number | yes | | | `data[].otaId` | number | yes | Channel id; `0` is the property’s own sale | | `data[].otaName` | string | yes | Channel name | | `data[].isSaleDirect` | boolean | yes | Whether the booking is the property’s own sale | | `data[].customer` | RmsBookingChangeCustomerDto | yes | Market data of the booking’s holder, each only when known. Nothing else of the guest travels | | `data[].customer.country` | string | no | Country of the holder, ISO 3166-1 alpha-2. Absent when the guest record has none or holds something that is not a country code | | `data[].customer.nationality` | string | no | Nationality of the holder, ISO 3166-1 alpha-2. Absent when the guest record has none or holds something that is not a country code | | `data[].customer.language` | string | no | Language of the holder, ISO 639-1 | | `data[].lastModified` | string | yes | When the booking row last changed, ISO 8601 in UTC, to the second | | `until` | string | yes | The end of the window, ISO in UTC, fixed by the first page and the same on every page of it. Once `nextCursor` is null, it is the `since` of your next poll | | `nextCursor` | string | yes | Pass it as `cursor` to read the next page of the same window. `null` when this page came with fewer than 50 bookings; a last page of exactly 50 still carries a cursor, and the page it leads to comes empty with `null` | ### 200 example ```json { "data": [ { "id": 52341, "pcode": 114, "locator": "4417230981", "groupId": 52340, "start": "2026-11-05", "end": "2026-11-07", "nights": 2, "createdAt": "2026-10-01", "bookingStatus": "ready", "releaseDateTentative": "2026-10-03 12:00", "board": "bb", "policy": "4", "bookedRate": null, "price": 240, "accommodationPrice": 220, "paid": 100, "totalExtras": 20, "canceledCost": 0, "room": { "id": 345, "roomTypeId": 101, "originalRoomTypeId": 101, "roomTypeName": "Double room" }, "occupancy": { "total": 2, "adults": 2, "children": 0, "babies": 0 }, "otaId": 9, "otaName": "Booking.com", "isSaleDirect": false, "customer": { "country": "ES", "nationality": "ES", "language": "en" }, "lastModified": "2026-10-15T08:59:12.000Z" } ], "until": "2026-10-15T09:00:00.000Z", "nextCursor": "eyJ2IjoxLCJzIjoiMjAyNi0xMC0xNVQwODowMDowMC4wMDBaIn0" } ``` ---