Webhooks payload

Health check

When you subscribe, apaleo will send a health-check event. If that fails, the subscription would not be created.

A webhook is considered as successful when the endpointUrl responds with 2xx code.

Here is a sample healthcheck payload:

{
  "id": "56eca994-f272-47b3-a56b-1327e9125ff3",
  "topic": "system",
  "type": "healthcheck",
  "accountId": "SDXE",
  "propertyIds": [
    "MUC",
    "BER"
  ],
  "timestamp": 1655824163606
}

Once you have created your subscription, all you have to do is process the incoming events from apaleo.

The webhook service will send all types of events as a POST request to the endpointUrl that you have set up for your subscription.

Events that we send to your webhooks all have the same structure as follows:

{
  "topic": "Reservation",
  "type": "created",
  "id": "ec5a1fe4-331c-450a-915c-5caa231cc825",
  "accountId": "HFTF",
  "propertyId": "HFTF-AADS",
  "data": {
    "entityId": "XPGMSXGF-1"
  },
  "timestamp": 1530741026
}

The payload has the following fields:

Field Description
topic The webhook topic
type The operation type (created, changed, and so on)
id The webhook internal id
accountId The account id to where the notification is related to
propertyId The property id to where the notification is related to
entityId The object for which the event is created
timestamp The time of the event

Typically, you might want to use this information to query more data. For example, get the reservation entity by its ID. The data element is optional and can in the future contain payloads with different schemas. For now, it’s always the entityId.