Consultar los packs del motor de reservas

Motor de reservas

get/api/direct-booking/{pcode}/packsx-api-key

Los packs que el establecimiento vende en su motor de reservas: una oferta atada a tipos de habitación, una ventana de fechas y una estancia mínima, a veces con productos incluidos. Es la lista que ofrece el propio motor de reservas de Hotelgest; se dejan fuera los packs cuyo último día es anterior a ayer y los que el hotel oculta en su motor. name y text llevan solo los idiomas que escribió el hotel, y son un objeto vacío cuando no escribió ninguno.

Consola

Llama a la API desde tu navegador, con la misma petición que enviará tu servidor.

Entorno

Producción

https://uni-api.hotelgest.com

Las llamadas van contra datos reales con tu propia clave. Un POST, PUT, PATCH o DELETE aquí modifica un establecimiento de verdad.

Credenciales

La clave de API, en cada petición. La crea un administrador del establecimiento en el PMS, en Configuración → Claves de API; un partner recibe una por establecimiento cuando este activa su integración. Solo funciona con el establecimiento para el que se emitió y con los endpoints que tiene concedidos.

Este endpoint necesita una credencial. Sin ella recibirás un 401.

Se guarda solo en este navegador. No se envía a ningún sitio que no sea el host de la API de arriba.

Parámetros de ruta

gethttps://uni-api.hotelgest.com/api/direct-booking/123456/packs

Envía la petición y aquí verás la respuesta real.

No hay nada simulado. Lo que aparezca es lo que devolvió la API.

Las peticiones salen directamente de tu navegador al host de la API de arriba: esta web no hace de intermediaria.

Parámetros de ruta

pcode
number

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

Respuestas

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

id
string

Pack id

BookingEnginePackRoomDto[]

The room type, occupancy, board and policy combinations the pack is sold on

name
object

Pack name per language, keyed by language code. Only the languages the hotel wrote; an empty object when it wrote none

text
object

Pack description per language, keyed by language code. Only the languages the hotel wrote; an empty object when it wrote none

board
string

Board of the pack (that of its last room row)

type
string

Kind of pack, as the legacy stores it

weekday
string

Weekdays the pack is restricted to, as the legacy stores them. Null or empty when any day

match_weekday
number

How weekday applies, as the legacy stores it: 0 when it does not restrict

iframe
string

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

External code the hotel gave the pack, if any

promo_code_excl
string

1 when promo codes cannot be combined with the pack

dfrom
string

First day the pack can be booked

dto
string

Last day the pack can be booked

price
number

Price of the pack

dtype
string

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

Amount or percentage dtype applies

min_stay
string

Minimum nights

max_stay
string

Maximum nights (0 means no limit)

BookingEnginePackProductDto[]

Products included in the pack, when it includes any

Respuesta de ejemplo
1[
2 {
3 "id": "12",
4 "room": [
5 {
6 "id": "481",
7 "rtcode": "101",
8 "occupancy": "2",
9 "board": "bb",
10 "policy": "4"
11 }
12 ],
13 "name": {
14 "es": "Escapada romántica",
15 "en": "Romantic getaway"
16 },
17 "text": {
18 "es": "Dos noches con cena",
19 "en": "Two nights with dinner"
20 },
21 "board": "bb",
22 "type": null,
23 "weekday": null,
24 "match_weekday": 0,
25 "iframe": "0",
26 "extcode": null,
27 "promo_code_excl": "0",
28 "dfrom": "2027-01-01",
29 "dto": "2027-12-31",
30 "price": 240,
31 "dtype": "-1",
32 "value": "10",
33 "min_stay": "2",
34 "max_stay": "0",
35 "pack_prod": [
36 {
37 "product_id": 33,
38 "value": 1
39 }
40 ]
41 }
42]

¿Qué es un pcode?

El código de propiedad. Cada endpoint está limitado a un establecimiento, y tu clave de API solo funciona con el establecimiento para el que se emitió.

Límites de uso

100 peticiones por minuto por IP de origen, 120 por clave de API y 300 por establecimiento, cada una contada entre todos los endpoints a la vez, no por endpoint. Al pasarte de cualquiera recibes un 429 con los segundos de espera en Retry-After-<límite> (apikey-ip, apikey o apikey-pcode): para y espera. Cada reincidencia en una clave o un establecimiento se bloquea más tiempo, hasta 7 días.