# Try the Demand API

**Use the Demand API Try-out console to explore endpoints and test requests with sandbox data.**

---

## Before you start

Before testing the API, complete the [Prerequisites](/demand/docs/getting-started/prerequisites) checklist.

You need to:

- Register as a Booking.com Managed Affiliate Partner.
- Have access to Partner Centre.
- Generate a valid API key and obtain your `X-Affiliate-Id`.
- Open the Developer Portal and access the Try-out console.

For more information, see the [Authentication guide](/demand/docs/development-guide/authentication).

## Try-out console

You can test supported Demand API endpoints directly in the Developer Portal without writing code.

To try an endpoint:

1. Open the [API reference](/demand/docs/open-api/about-api-references) of the version you want to test.
2. Select the endpoint you want to test from the navigation.
3. Add your credentials to the Try-out console.
4. Select the **Sandbox** environment.
5. Submit the request and review the response.
6. Follow the relevant quick guide for a Search, look and redirect integration flow.

See [Authentication in the Try-out console](/demand/docs/development-guide/authentication#authentication-in-this-portal-try-out) for more information.

### About the sandbox

The sandbox lets you test requests with test data without creating real orders, bookings or charges. Sandbox data and supported scenarios may differ from the production environment.

See the [Sandbox guide](/demand/docs/getting-started/sandbox) for more details.

## Try the examples

The following examples show how to make basic requests to the Accommodations and Cars API collections using the latest Demand API version.

Requests sent through the Try-out console must include valid authentication. Requests with missing or invalid credentials return `401 Unauthorized`.

### Hello world: Accommodation API collection

> **Scenario:** Search for a two-night stay in Amsterdam for two adults and review the available options.

⏱️ Estimated time to complete:

 2–3 minutes

**1. Search for accommodation**

```json
{
  "city": -2140479,
  "booker": {
    "country": "nl",
    "platform": "mobile"
  },
  "checkin": "2026-11-06",
  "checkout": "2026-11-08",
  "guests": {
    "number_of_rooms": 1,
    "number_of_adults": 2
  }
}
```

→ [Try in console](/demand/docs/open-api/3.2/demand-api/accommodations/accommodations/search)

**Save an accommodation ID**

Save the id of an accommodation from the response. You need it for the availability request.

**2. Get availability:**

Include the returned accommodation `id` in the request (for this example we used one of the sandbox hotels: 10507360):

```json
{
  "accommodation": 10507360,
  "booker": {
    "country": "nl",
    "platform": "mobile"
  },
  "checkin": "2026-11-06",
  "checkout": "2026-11-08",
  "guests": {
    "number_of_rooms": 1,
    "number_of_adults": 2
  }
}
```

→ [Try in console](/demand/docs/open-api/3.2/demand-api/accommodations/accommodations/availability)

**3. Review the response**

Review the availability response to identify the recommended or best-priced option for the requested dates and guests.

Use the [Accommodation quick guide](/demand/docs/accommodations/accommodation-quick-guide) to continue with a complete Search, look and redirect flow.

---

### Hello world - Car rentals API collection

> **Scenario:** _Search for a two-day car rental at Amsterdam Airport (AMS) and review the available car rental information._

⏱️ Estimated time to complete:

 2-3 minutes

**1. Search for car rentals:**

```json
{
  "booker": {
    "country": "nl"
  },
  "currency": "EUR",
  "driver": {
    "age": 36
  },
  "route": {
    "pickup": {
      "datetime": "2026-11-05T11:05:00",
      "location": {
        "airport": "AMS"
      }
    },
    "dropoff": {
      "datetime": "2026-11-07T11:05:00",
      "location": {
        "airport": "AMS"
      }
    }
  }
}

```

→ [Try in console](/demand/docs/open-api/3.2/demand-api/cars/search)

**Save a supplier ID**

Save a supplier ID returned by the response if you want to use it in the next request.

**2. Retrieve car details:**

```json
{
  "last_modified": "2026-08-07T11:05:00+00:00",
  "maximum_results": 100
}
```

→ [Try in console](/demand/docs/open-api/3.2/demand-api/cars/details)

**3. Check car supplier details:**

Include the supplier ID returned by the previous response.

```json
{
  "suppliers": [
    516
  ]
}
```

→ [Try in console](/demand/docs/open-api/3.2/demand-api/cars/suppliers)

Review the supplier `name` returned in the response.

Use the [Cars quick guide](/demand/docs/cars/cars-quick-guide) to continue with a complete Search, look and redirect car rental integration flow.

---

## Next steps - Quick guides

Go deeper with our quick guides for a step-by-step integration flow:
