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. Below is the structure of the payload.
stringalphanumericrequiredhotelId
The unique identifier for the hotel. Max length 200 characters.
Example:
hotelId: 'HOTEL123'
stringYYYY-MM-DDrequiredcheckIn
The check-in date formatted as YYYY-MM-DD.
Example:
checkIn: '2024-06-15'
integerrequirednights
The number of nights for the stay, minimum value is 1.
Default:
1
Example:
nights: 3
numberoptionalguests
The number of guests, default value is 2.
Default:
2
Example:
guests: 4
arrayrequiredrooms
An array of room details, each object contains specific information about the room.
Example:
rooms: [{"name": "Deluxe Suite", "id": "DS101", "description": "A spacious room with a beautiful sea view.", "capacity": 4, "occupancy": 2}]
stringrequiredname
The name of the rate, as presented to users. Max length 200 characters.
Example:
name: 'Summer Special Offer'
stringrequiredrule
A rate rule ID, currently only 'member' or 'default'.
Example:
rule: 'member'
stringrequireddescription
Description of the rate.
Example:
description: 'Includes free breakfast, Wi-Fi and parking.'
integerrequiredoccupancy
The number of guests that the rate is intended for.
Example:
occupancy: 2
booleanoptionalbreakfastIncluded
Indicates if breakfast is included.
Example:
breakfastIncluded: true
booleanoptionallunchIncluded
Indicates if lunch is included.
Example:
lunchIncluded: false
booleanoptionaldinnerIncluded
Indicates if dinner is included.
Example:
dinnerIncluded: true
booleanoptionalallInclusive
Indicates if all-inclusive service is provided.
Example:
allInclusive: true
booleanoptionalparkingIncluded
Indicates if parking is included.
Example:
parkingIncluded: true
booleanoptionalinternetIncluded
Indicates if internet access is included.
Example:
internetIncluded: true
booleanoptionalrefundable
Indicates if the rate is refundable.
Example:
refundable: true
stringISO 4217requiredcurrencyCode
ISO 4217 Currency Code.
Example:
currencyCode: 'USD'
integerrequiredvalue
An integer in the smallest currency unit.
Example:
value: 100
arrayrequiredtaxes
An array of tax objects, each specifying details about a specific tax.
Example:
taxes: [{"type": "NamedPrice", "name": "City Tax", "code": "city-tax", "price": {"currencyCode": "USD", "value": 100}}]
arrayrequiredfees
An array of fee objects, each specifying details about a specific fee.
Example:
fees: [{"type": "NamedPrice", "name": "Hotel Fee", "code": "hotel-fee", "price": {"currencyCode": "USD", "value": 100}}]
Request sample
Below is an example of our HTTP request to your API with an example room and rate data:
curl -X PUT 'https://your-domain.com/ubio/rates' \
-H 'X-API-KEY: <YOUR-API-KEY>' \
-H 'Content-Type: application/json' \
--data '
{
"estimated": false,
"crawledAt": 100500600,
"rooms": [{
"id": "123456",
"name": "example room name",
"capacity": 2,
"rates": [
{
"id": "abcdef",
"name": "Standard Rate",
"occupancy": 2,
"baseRate": {
"value": 16000,
"currencyCode": "eur"
},
"taxes": [],
"rule": "default"
}
]
}]
}
'