Push Service

Push Service

With this functionality we will provide the client with the capability to receive automatically the reconfirmation numbers (The confirmation number of the Hotel, both for the Hotelbeds product and for that of external suppliers product) of the bookings made by the client in structured JSON messages.

This reconfirmation number (supplierConfirmationCode) will be provided using a call to a "callBackUrl".

The callBackUrl should be provided by the client and will be validated and configured in Hotelbeds side by the corresponding agent.

With this functionality, the client will receive a list with the reconfirmation numbers in the following format (see Push Response section).

The push service workflow will be:

  1. Hotelbeds receives the reconfirmation number.

  2. The new push service receives, completes the info and stores it.

  3. Once the message is ready to be sent, the push service tries to connect to the callback endpoint configured per client and sends the notification with the reconfirmation number (and other data). From here, two scenarios can happen:

    • If the request we sent returns a 200 OK code, we assume that you have received the message. The message will be marked as delivered and we won't retry to send the reconfirmation.

    • If the request returns any other code, it is assumed there was a problem and we will try to resend it after a few minutes/hours/days (configurable). We will retry until we receive the 200 or reach the limit of retries (The limit of retries is a configurable parameter).

PushService Response

This is the format of the message that will be sent to the configured callback endpoint. It will be always in JSON format.

{
  "type": "NEW_BOOKING_RECONFIRMATION",
  "notificationDate": "2019-12-19T23:59:00+01:00",
  "booking": {
    "reference": "102-10878296",
    "clientReference": "A354A65B654S65",
    "hotel": {
      "rooms": [
        {
          "id": 1,
          "code": "DBL.ST",
          "supplierConfirmationCode": [
            "A1B5545C565EE654A"
          ]
        },
        {
          "id": 2,
          "code": "DBL.ST",
          "supplierConfirmationCode": [
            "A1B5545C565EE654A"
          ]
        }
      ]
    }
  }
}