Get webhook delivery logs

Webhooks

get/api/webhooks/{pcode}/{id}/logsx-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.

Console

Runs against the API from your browser, with the same request your server will send.

Environment

Production

https://uni-api.hotelgest.com

Calls hit live data with your own API key. A POST, PUT, PATCH or DELETE here changes a real property.

Credentials

The API key, sent on every request. A property admin creates it in the PMS under Settings → API keys; a partner receives one per property when the property activates its integration. It works only for the property it was issued for, and only on the endpoints granted to it.

This endpoint needs a credential. Without it you will get a 401.

Stored in this browser only. Never sent anywhere but the API host above.

Path parameters

gethttps://uni-api.hotelgest.com/api/webhooks/123456/65f1c2a9b4d3e2f1a0c9b8d7/logs

Send the request to see the real response here.

Nothing is mocked. What comes back is what the API returned.

Requests go straight from your browser to the API host above — nothing is proxied through this site.

Path parameters

pcode
number

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

id
string

Webhook ID, as returned by GET /api/webhooks/{pcode}.

Responses

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

id
string

Unique identifier of the log entry (a 24-character hex id)

pcode
number

Property code

webhookId
string

ID of the webhook this delivery belongs to

url
string

URL the delivery was sent to, as the webhook had it at that moment

eventType
enum

Event type that triggered the delivery

One of:bookings-added

payload
object

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

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

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

Duration of the delivery in milliseconds

createdAt
string · date-time

When the delivery was made (ISO 8601). Entries are deleted 30 days after it

Example response
1[
2 {
3 "id": "6735b0e1c2a9b4d3e2f1a0c9",
4 "pcode": 1010,
5 "webhookId": "65f1c2a9b4d3e2f1a0c9b8d7",
6 "url": "https://myapp.com/webhooks",
7 "eventType": "bookings-added",
8 "payload": {
9 "eventType": "bookings-added",
10 "data": {
11 "bookings": [
12 {
13 "id": 12345,
14 "pcode": 1010,
15 "groupId": 987,
16 "groupPrice": 950,
17 "groupQuantity": 3,
18 "start": "2025-11-10",
19 "end": "2025-11-13",
20 "arrivalHour": "15:00",
21 "departureHour": "11:00",
22 "nights": 3,
23 "appUrl": "https://app.example.com/booking/12345",
24 "createdAt": "2025-10-26T16:00:00.000Z",
25 "resource": "room-101",
26 "text": "",
27 "board": "hb",
28 "policy": "4",
29 "price": 1200,
30 "paid": 600,
31 "totalExtras": 100,
32 "locked": false,
33 "color": "#ffcc00",
34 "imported": false,
35 "room": {
36 "id": 101,
37 "roomTypeId": 2,
38 "originalRoomTypeId": 2
39 },
40 "locator": "ABC123XYZ",
41 "customer": {
42 "id": 1,
43 "name": "Test",
44 "surname": "User",
45 "documentType": "D",
46 "documentNumber": "A12345678",
47 "phone": "+34911111222",
48 "email": "agustin@example.com",
49 "address": "Calle Falsa 123",
50 "city": "Barcelona",
51 "postalCode": "08001",
52 "country": "ES",
53 "province": "Barcelona",
54 "notes": "Vegetariano",
55 "language": "es"
56 },
57 "companyId": 42,
58 "notes": {
59 "request": "Cuna para bebé, por favor.",
60 "internal": "Cliente frecuente – revisar upgrade",
61 "flat": "Ninguna"
62 },
63 "occupancy": {
64 "total": 3,
65 "adults": 2,
66 "children": 1,
67 "babies": 0
68 },
69 "groupOccupancy": {
70 "total": 9,
71 "adults": 6,
72 "children": 2,
73 "babies": 1
74 },
75 "otaId": 3,
76 "checkInStatus": "checked-in",
77 "bookingStatus": "ready",
78 "virtualPayment": {
79 "type": "directPayment",
80 "amount": 600
81 },
82 "paymentStatus": "no-paid",
83 "invoiceStatus": "no-invoiced",
84 "bookingType": {
85 "label": "Oferta larga estancia",
86 "type": "bloqued-out-order",
87 "typeV2": "blocked-out-order"
88 },
89 "toDos": {
90 "data": [],
91 "pendings": 0,
92 "total": 0
93 },
94 "guests": [
95 {
96 "id": 2,
97 "name": "Test",
98 "surname": "User",
99 "documentType": "D",
100 "documentNumber": "98765432A",
101 "phone": "+34666666666",
102 "email": "laura@example.com",
103 "address": "Calle Real 45",
104 "city": "Madrid",
105 "postalCode": "28001",
106 "country": "ES",
107 "province": "Madrid",
108 "notes": "",
109 "language": "es"
110 }
111 ],
112 "isSaleDirect": true,
113 "housekeeping": {
114 "dateToClean": "2025-11-11",
115 "quantityNightsClean": 2,
116 "weekDaysClean": {
117 "mon": true,
118 "tue": false,
119 "wed": true,
120 "thu": false,
121 "fri": false,
122 "sat": false,
123 "sun": false
124 }
125 }
126 }
127 ]
128 }
129 },
130 "statusCode": 200,
131 "errorMessage": null,
132 "durationMs": 154,
133 "createdAt": "2025-01-10T14:35:00.000Z"
134 }
135]

What is a pcode?

The property code. Every endpoint is scoped to one property, and your API key only works for the property it was issued for.

Rate limits

100 requests per minute per source IP, 120 per API key and 300 per property, each counted across every endpoint together — not per endpoint. Over any of them you get a 429 with the seconds to wait in Retry-After-<limit> (apikey-ip, apikey or apikey-pcode): stop and wait it out. Repeat offences on a key or a property are blocked for longer each time, up to 7 days.