Documentation

Countries

This method is used to obtain a COUNTRIES portfolio.

Countries Request

GET https://api.hotelbeds.com/transfer-cache-api/1.0/locations/countries?fields= {{FIELDS}} &language= {{LANG}} &codes= {{CODES}} &offset= {{OFFSET}} &limit= {{LIMIT}}

Request parameters

Name Type Description
fields String comma separated list of response fields to return (mandatory)
language String ISO 639-1 (2 digit) Language code (mandatory)
codes String (String) comma separated list of ISO 3166 (2 digit) country codes (optional)
offset int it's the position in the dataset of a particular record. By specifying offset, you retrieve a subset of records starting with the offset value (optional)
limit int allows you to set the number of objects returned in one page (optional)

Request Example

https://api.hotelbeds.com/transfer-cache-api/1.0/locations/countries?fields=ALL&language=en&codes=ES,US&offset=0&limit=10

Countries Response

The response of Countries provides is described here.

Response Parameters

Name Type Description
code String ISO 3166 (2 digit) Country code
name String Country name

Response Example

[
    {
        "code": "ES",
        "name": "Spain"
    },
    {
        "code": "US",
        "name": "United States"
    }
]