Countries
URL: /countries.[json|xml]
Parameters:
Name | Description | Default | Example |
---|---|---|---|
limit | 1-100 | 100 | |
from_id | get records with id grater than from_id | 0 | from_id=123&limit=10 |
country_ids | Comma-separated list of countries | - | country_ids=1,2,3 |
Cities
URL: /cities.[json|xml]
Parameters:
Name | Description | Default | Example |
---|---|---|---|
limit | 1-100 | 100 | |
from_id | get records with id grater than from_id | 0 | from_id=123&limit=10 |
country_ids | Comma-separated list of countries | - | country_ids=1,2,3 |
city_ids | Comma-separated list of cities | - | |
state | State code | - | state=NY |
Hotels
URL: /hotels.[json|xml]
Parameters:
Name | Description | Default | Example |
---|---|---|---|
limit | 1-100 | 100 | |
from_id | get records with id grater than from_id | 0 | from_id=123&limit=10 |
hotel_ids | Comma-separated list of hotels | - | hotel_ids=1,2,3 |
city_ids | Comma-separated list of cities | - | |
last_update | hotels updated later than last_update (%Y-%m-%d) | - | last_update=2014-01-01 |
City availability
Request
URL: /city_avail.[json|xml]
Parameters:
Name | Description | Default | Example |
---|---|---|---|
avail_id | availability request id | ||
OR | |||
city_id | City ID | - | city_id=12345 |
hotel_id | Hotel list ID | hotel_id=46&hotel_id=47&hotel_id=48 | |
check_in | Check-in date (%Y-%m-%d) | - | check_in=2014-05-01 |
check_out | Check-out date (%Y-%m-%d) | - | check_out=2014-05-03 |
adults | Number of adults | 2 | adults=2 |
children | Number of children | 0 | children=2 |
currency | ISO-4217 currency code | USD | currency=EUR |
child_age_* | Child age | - | child_age_1=3&child_age_2=3 |
ip | user's ip (optional) | - | ip=192.168.11.6 |
ipcountry | user's ip country code | - | ipcountry=gb |
lang_code | Use either lang_code or lang_id | en | lang_code=de |
lang_id | See Appendix 1 for list of supported languages | 1 | lang_id=2 |
full | Show avail hotels with rooms | 0 | full=1 |
Response
/city_avail.json?check_in=2014-05-01&check_out=2014-05-03&city_id=18881
{ "avail": { "id": "407728895", "finished": "no" } } |
/city_avail.json?avail_id=407728895¤cy=USD
{ "avail": { "id": "407728895", "finished": "yes" }, "data": [ { "hotel_id": "42563", "price_from": 49 } ] } |
Hotel availability
Request
URL: /hotel_avail.[json|xml]
Parameters:
Name | Description | Default | Example |
---|---|---|---|
avail_id | availability request id | ||
OR | |||
hotel_id | Hotel ID | - | hotel_id=12345 |
check_in | Check-in date (%Y-%m-%d) | - | check_in=2014-05-01 |
check_out | Check-out date (%Y-%m-%d) | - | check_out=2014-05-03 |
adults | Number of adults | 2 | adults=2 |
children | Number of children | 0 | children=2 |
currency | ISO-4217 currency code | USD | currency=EUR |
child_age_* | Child age | - | child_age_1=3&child_age_2=3 |
lang_code | Use either lang_code or lang_id | en | lang_code=de |
lang_id | See Appendix 1 for list of supported languages | 1 | lang_id=1 |
ip | user's ip (optional) | - | ip=192.168.11.6 |
ipcountry | user's ip country code | - | ipcountry=gb |
Response
/hotel_avail.json?check_in=2014-05-01&check_out=2014-05-03&hotel_id=42563
{ "avail": { "id": "407728724", "finished": "no" } } |
/hotel_avail.json?avail_id=407728724&lang_code=en¤cy=EUR
{ "avail": { "finished": "yes", "id": "407728724" }, "data": { "attr": { "meals_info": { "price": "UAH 300 ", "type": "3" } }, "rooms": [{ "amenities": ["TV", "Balcony"], "bed_config": "Double Bed", "description": "", "name": "Double Room - Room Only", "photos": [ { "large": { "h": "252", "src": "http://i0.bookcdn.com/data/Photos/LargePhoto/77/7761/7761834.JPEG", "w": "336" }, "medium": { "h": "125", "src": "http://i0.bookcdn.com/data/Photos/SmallPhoto2/77/7761/7761834.JPEG", "w": "141" }, "name": "Standard Double or Twin Room", "small": { "h": "51", "src": "http://i0.bookcdn.com/data/Photos/SmallPhoto3/77/7761/7761834.JPEG", "w": "51" } } ... ], "rate": [ { "id": "3567940362", "meal_plan": "Breakfast not included", "meal_plan_id": "1", "price": "237", "ptaxes": [ { "included": "1", "name": "Value Added Tax (VAT)", "val": "20%" } ] }, ... ] } } } |
Errors
Code | Description |
---|---|
1 | Wrong login/password |
2 | You have no access to API |
3 | Error check-in/check-out params |
4 | Wrong availability ID |
5 | Empty hotel_id parameter |
6 | Hotel not exists |
7 | Empty city_id parameter |
8 | City not exists |
9 | Check-in date in past |
10 | Check-out date less check-in |
11 | Number of nights greater 30 |
12 | Hotel is temporary unavailable |
13 | Wrong currency |
14 | Wrong adults number |
15 | Wrong children number |
16 | Specify all children ages |
Example:
<error code="2"> You have no access to API. Please, contact office at hotelholder.ae </error> |
{ "error": { "code": 2, "text": "You have no access to API. Please, contact office at hotelholder.at" } } |
Appendix 1. Languages
ID | Code | Name |
---|---|---|
1 | en | English |
2 | de | Deutch |
3 | fr | French |
4 | es | Spanish |
5 | it | Italiano |
6 | nl | Dutch |
8 | pt | Portuguese |
11 | sv | Swedish |
12 | da | Danish |
13 | cs | Czech |
14 | hu | Hungarian |
16 | ja | Japanese |
17 | zh | Chinese |
18 | pl | Polish |
19 | el | Greek |
20 | ru | Russian |
21 | tr | Turkish |
22 | ar | Arabic |
24 | ko | Korean |
25 | he | Hebrew |