← Tutorial: Create a test property | Step 1 – Create property →

Prologue – Hello, World!

As a "Hello, World!" exercise, you can retrieve your company's legal entity details. Use this method and URL for the call:

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

Construct a new request with an empty body and a header that includes your machine account name and password. How you construct this request is up to you. You can use cURL, Postman, or a self-built solution. This example uses cURL:

curl -H "Host: supply-xml.booking.com" \
-H "Authorization: Basic {username:password}" \
-H "Content-Type: application/xml" \
-H "Cache-Control: no-cache" \
--http1.1 \
-X POST "https://supply-xml.booking.com/hotels/xml/legalentities"

Replace {username:password} with your Base64-encoded credentials.

Reading the response

In most cases, the response looks like this:

  <legalentity affiliateid="123456"
    companyname="Great Vacations"
  <legalentity affiliateid="654321"
    companyname="Athens Villas"
<!-- RUID: [UmFu...] -->

Your response may contain more, fewer, or even zero legal entities.

All responses contain a unique RUID. This is for troubleshooting. If you need our help fixing an error, be sure to tell us the RUID.

Learn more about the last call here: legalentities

Then we have bad news, and good news:

  • Bad news: you cannot complete this tutorial.
  • Good news: you may still be able to use the API for your business.

You need legal entities to create properties through the API, but you don't need them to update existing properties. This tutorial involves creating a new property, so you can't complete it without at least one legal entity. But you can still use many other API features.

Contact your account manager if:

  • you believe the response should contain legal entities, but it doesn't;
  • you're not sure which API features you need.

← Tutorial: Create a test property | Step 1 – Create property →