Last updated

countries (B.XML)

This call is intended for the Connectivity Partner to be able to retrieve a list of country codes with their corresponding country names that are used on Booking.com. The codes are based as a subset of ISO 3166-1 alpha-2 codes. The list currently returned by this call should be considered the authoritative source of country codes for the API.

POST https://supply-xml.booking.com/hotels/xml/countries

Request country names/codes

<?xml version="1.0" encoding="UTF-8"?>
<request>
  <username>providermachinelogin</username>
  <password>********</password>
</request>

Request — Element Overview

Field NameNest LevelParent ElementValue RangeData TypeNode Multiplicity
passwordL1request--string1
requestL0NULL(root)----1
usernameL1request--string1
  • The request body consists of a mandatory request root element. This is the parent element to the username and password elements.
  • The mandatory child element username contains the authorized machine account login of the Connectivity Partner.
  • The mandatory child element password contains the authorized machine account password of the Connectivity Partner.

Response example

<countries>
  <country countrycode="AD" name="Andorra" />
  <country countrycode="AE" name="United Arab Emirates" />
  <!-- example output. Use the API for a complete updated list -->
</countries>
<!-- RUID: [XXXXXXXXXXXXXXXXXXXXXXXXXXX==] -->

Response — Element Overview

Field NameNest LevelParent ElementValue RangeData TypeNode Multiplicity
countriesL0NULL(root)----1
countryL1countries----[see below]
  • The response body consists of a countries root element. This is the parent node to the country element, whose multiplicity is determined by the number of countries available (250 at the time of writing).

  • The empty child element country contains the @countrycode and the @name described below.

Response — Attribute(@) Overview

Attribute NameField NameValue RangeData TypeNode Multiplicity
@countrycodecountry[see below]string1
@namecountry[see below]string1
  • The @countrycode of country contains the two uppercase letters of the country. (mostly based on the ISO 3166-1 alpha-2 code)

  • The @name of country contains the name of the corresponding @countrycode. (mostly based on the ISO 3166 country name)

As with every standard Booking.com response, an RUID string terminates the message inside an XML comment node and should be stored by the Connectivity Partner for at least 30 days.

Errors/Warnings

No common, known errors exist with this call.

If an error/warning is encountered, and basic troubleshooting methods has been found ineffective, please provide the error/warning message along with the RUID of the response message to your Booking.com support contact.