Probar un webhook
Webhooks
Envía una entrega de prueba a la URL de un webhook ya creado —el cuerpo lo indica por su id— y cuenta qué pasó: el resultado que anotó Hotelgest, cuánto tardó y el error si falló. Cualquier 2xx vuelve como 200; sin respuesta (error de red, o una URL rechazada porque resuelve a una red privada) vuelve como 500 con el motivo en errorMessage. El cuerpo es el mismo sobre que una entrega real, con una reserva de ejemplo fija, así que puedes probar tu endpoint contra la forma real. El webhook se prueba esté activado o no. Una prueba no aparece en el registro de entregas. Un id que no existe responde 404.
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
Cuerpo
Desbloquear producción
Los métodos de escritura están bloqueados hasta que los desbloquees. Son datos reales de un hotel.
POST está bloqueado en producción. Desbloquéalo arriba si es lo que quieres.
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
Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for.
Cuerpo de la petición
Webhook ID
Webhook Event Type
Uno de:bookings-added
1{2 "id": "60d21b4667d0d8992e610c85",3 "eventType": "bookings-added"4}
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
Property code
ID of the webhook that was tested
URL the test delivery was sent to: the one configured on the webhook
Event type of the sample payload
Uno de:bookings-added
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.
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.
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.
Duration of the test delivery in milliseconds
¿Qué es un pcode?
Límites de uso