Retrieve promotion channels – getpromotionchannels (B.XML)

Closed beta

This API is in closed beta. You can't use it unless you have been invited as a beta tester. You can sign up to be a beta tester using this form

Use this endpoint to retrieve promotion channels by ID. The response includes a list of all available channels for that promotion.

URL

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

Sample request

<request>
    <hotel_id>2773157</hotel_id>
    <type>geo_rate</type>
</request>

Request body

Field Description Type Occurrences Notes
request Root element. object 1..1 -
hotel_id The ID of the property for which you want to retrieve available promotion channels. integer 1..1 -
type Specifies a promotion type for which to filter the available channels. string 0..1 -

Sample response

This example contains all possible fields that can be included in the response.

<promotionchannels>
    <promotionchannel id="thailand_pos" name="Thailand"/>
    <promotionchannel id="colombia_pos" name="Columbia"/>
    <promotionchannel id="kuwait_pos" name="Kuwait"/>
    <promotionchannel id="eu_pos" name="Europe"/>
    <promotionchannel id="switzerland_pos" name="Switzerland"/><!-- RUID: [...] -->
    </promotionchannels>

Response body

This table gives more details about some of the fields in the response.

Note

Not all fields are relevant for all response types. A value of -1 indicates that the current field is not relevant for the current response type.

Field Description Type Min/max Notes
promotionchannels Root element. array of promotionchannel 1..1
promotionchannel Promotion channel details. object 0..1
promotionchannel[id] Promotion channel ID. string 0..1
promotionchannel[name] Name of the promotion channel string 0..1

Schema validation errors

HTTP/1.1 400 Bad Request

<?xml version='1.0' standalone='yes'?>
<getpromotionchannels>
  <fault code="400">
    <string>code= 1824 level= 2 message= Element 'hotel_id': 'test hotel' is not a valid value of the atomic type 'xs:integer'.
</string>
  </fault>
</getpromotionchannels>
<!-- RUID: [...] -->

Invalid ID errors

HTTP/1.1 403 Forbidden

<?xml version='1.0' standalone='yes'?>
<getpromotionchannels>
  <fault code="1009">
    <string>Access denied for hotel '234324'</string>
  </fault>
</getpromotionchannels>
<!-- RUID: [...] -->

HTTP/1.1 400 Bad Request

<?xml version='1.0' standalone='yes'?>
<getpromotionchannels>
  <fault code="400">
    <string>Invalid promotion ID= TR</string>
  </fault>
</getpromotionchannels>
<!-- RUID: [...] -->