Using webhooks

This section describes how you can subscribe to entity updates.

Adding a webhook

  • Go to Suite Portal
  • In Developer Tools choose Webhooks
  • Click Add Endpoint
    • Endpoint URL - a URL where the webhook payload will be sent
    • Entity - choose an entity to listen to notifications for, or select all to get all notifications
    • Type - choose a type of entity operation to listen for, or select all to get all notifications

Webhook Object

The payload is being sent via POST request to the registered Endpoint URL.

Name Description Type
id webhook internal id Integer
hotel_id hotel id to where the notification is related to Integer
type operation type, one of create, update, delete String
entity_type entity type, one of checkin String
timestamp time of the event String
source source of entity, one of: booking, pms String
version webhook payload version String
payload additional metadata of the entity String

Example checkin payload:

{
  "id": 293278,
  "hotel_id": 56789,
  "type": "update",
  "entity_type": "checkin",
  "payload": {
    "checkin_id": "8f1b76ca2df93fdd342de17df2da7698"
  },
  "timestamp": "2020-06-19T15:08:08Z",
  "source": "pms",
  "version": "1.1"
}

Delay

There may be a delay of upto 3 minutes from the time of an event to the actual webhook delivery.

A webhook is considered as sent successfully when the destination endpoint responds with 2xx code.

If for some reason the endpoint wasn't able to accept the webhook, it will be resent after (roughly): 1m, 1m, 2m, 3m, 5m, 10m, 20m, 40m.. up to 5h.

After those attempts we will try to resend the webhook every 5h.