Room Rates (Push)

Overview

This documentation provides details on how the Push service sends hotel rate information to the client when there are changes in the rates. The client needs to provide a Push URL and an API key for authentication.

Client Information

  • Push URL: Provided by the client.
  • API Key: Provided by the client.

Push Service

How it Works

The service will push data to the client-provided URL whenever there are changes in hotel rates. The data is sent in a JSON format, and the request includes the API key in the headers for authentication.

Payload

Smart Feed is using put http method during push requests. The payload is a JSON object containing hotel rate details. The whole schema for the payload is the same as described in /Pull/SmartFeedopen in new window section of docs.

Request sample

Below is an example of our HTTP request to your API with an example room and rate data:

PUT/ubio/rates
curl -X PUT 'https://your-domain.com/ubio/rates' \
    -H 'X-API-KEY: <YOUR-API-KEY>' \
    -H 'Content-Type: application/json' \
--data '
    [
      {
        "hotelId": "14885",
        "checkIn": "2022-02-15",
        "nights": 1,
        "guests": 2,
        "rooms": [
          {
            "name": "Standard Double/Twin",
            "id": "C-DBL-2",
            "description": "Room description, potentially long poorly formatted plain text",
            "images": [
              {
                "type": "Link",
                "name": "Imgname",
                "url": "http://example.com/room/image1.jpg"
              }
            ],
            "capacity": 2,
            "rates": [
              {
                "name": "BAR - 5% discount",
                "id": "5PCTBAR",
                "baseRate": {
                  "value": 16485,
                  "currencyCode": "chf"
                },
                "taxes": [
                  {
                    "type": "NamedPrice",
                    "name": "City Tax",
                    "code": "city-tax",
                    "price": {
                      "value": 16485,
                      "currencyCode": "chf"
                    }
                  }
                ],
                "fees": [
                  {
                    "type": "NamedPrice",
                    "name": "Hotel Fee",
                    "code": "hotel-fee",
                    "price": {
                      "value": 1234,
                      "currencyCode": "chf"
                    }
                  }
                ]
              }
            ]
          },
          {
            "name": "Superior Double/Twin",
            "id": "D-DBLS-2",
            "capacity": 2,
            "rates": [
              {
                "name": "BAR - 5% discount",
                "id": "5PCTBAR",
                "baseRate": {
                  "value": 16485,
                  "currencyCode": "chf"
                },
                "taxes": []
              }
            ]
          }
        ]
      },
      {
        "hotelId": "1ab2CD",
        "checkIn": "2022-02-15",
        "nights": 1,
        "guests": 2,
        "rooms": []
      }
    ]
'