Last updated

Using labels for attribution

Learn how to use labels to track attribution across your Demand API integrations.This guide applies to both accommodation and car rental services, and is relevant for partners using Search and look (clickout) and Search, look and book integration models.


Understanding labels

Use the label parameter to track attribution across your integrations with Booking.com.

  • Labels help you associate bookings with specific marketing campaigns, traffic sources, or placements across all travel services including accommodation and car rentals.

This guide explains what a label is, where to include it in your API requests, and how to use it consistently in both Search and look (clickout) and Search, look and book flows.

What is a label?

A label is a custom, partner-defined string used to track attribution throughout the booking journey. It usually contains encoded metadata such as:

  • Campaign or channel ID.
  • Device type or platform.
  • Placement or supplier.
  • Country or language.
  • Other marketing or operational identifiers.
Example

hilton_pos-gb_web_sup-HILTON_camp-summer2025

  • Brand = Hilton
  • Market = GB
  • Channel = Web
  • Campaign = Summer 2025

There’s no enforced format for labels, but we recommend a consistent and parseable structure tailored to your reporting needs.

genius-bulb Use a unique label per context or campaign to enable accurate attribution in reports. Reach out to your Account Manager for personalised guidance.

Adding labels to your integration

Validate your label tracking

Before start using a label, ensure your label values are being logged correctly:

  • Check that your test bookings appear in your order retrieval with the expected label.
  • Confirm that orders/details endpoint shows the correct attribution breakdown.
  • Use sandbox or low-traffic campaigns to verify end-to-end label flow before scaling.

Search and look integrations (Clickout model)

If your integration redirects users to Booking.com to complete their bookings, include the label as a query parameter in the clickout URL.

Note: This applies to accommodation and car rentals.

Example - Car rental URL

In this example the label is: label=sample_labelcars_pos-gb_dev-web_loc-164449_sup-HERTZ_class-M**_pre-1_curr-gbp_lang-en_gb_plc-core_brd-BC&adcamp=jL_yz6JoiZ71TVLssGgMXA&aid=2123284*

https://cars.booking.com/search-results?vehicleInfo.vehicle.id=672633621&location=164449&dropLocation=164449&driversAge=35&puDay=24&puMonth=5&puYear=2025&puHour=0&puMinute=1&doDay=25&doMonth=5&doYear=2025&doHour=0&doMinute=1&country=&city=&locationName=Malaga%20Airport&dropCountry=&dropCity=&dropLocationName=Malaga%20Airport&affiliateCode=sample_label-bc&prefcurrency=GBP&cor=gb&pickLocationId=31896&dropLocationId=31896&vehicleId=672633621&preflang=en&label=sample_label_cars_pos-gb_dev-web_loc-164449_sup-HERTZ_class-M***_pre-1_curr-gbp_lang-en_gb_plc-core_brd-BC&adcamp=jL_yz6JoiZ71TVLssGgMXA&aid=2123284
Key instructions
  • Add the label as a query parameter in the clickout URL.
  • No additional API integration is required.
  • Labels are logged and appear in your reporting alongside the Affiliate ID.

Search, look and book integration

If you complete bookings directly via our Demand API (end-to-end booking experience integration) pass the label parameter in your order creation request.

Example – Request for accommodation booking

In this example: hilton_pos-gb_web_sup-HILTON_camp-summer2025 where:

{
  "accommodation": {
    "label": "hilton_pos-gb_web_sup-HILTON_camp-summer2025",
    "products": [
      {
        "id": "333",
        "bed_configuration": "123456",
        "guests": [
          {
            "email": "test.name@gmail.com",
            "name": "Test Name"
          }
        ]
      }
    ],
    "remarks": {
      "estimated_arrival_time": {
        "hour": 12
      },
      "special_requests": "We will need an extra cot."
    }
  },
  ...

genius-bulb Always verify that the label appears correctly in your booking reports to confirm attribution.

Retrieving and using labels in reporting

Labels passed during order creation, are stored and made available in the orders details.

You can use them to:

  • Track marketing or traffic source performance.
  • Attribute bookings to campaigns.
  • Analyse affiliate and partner performance across channels.

To retrieve attribution data based on label and affiliate_id, follow these steps:

Step 1 – Get a list of orders

→ Use the orders/details endpoint to retrieve a list of orders made within a specific timeframe.

See the orders/details guide for instructions on how to use this endpoint.

Example of orders/details request

Here's an example of how to retrieve orders created between March 1 and March 7, 2025:

{
  "created": {
    "from": "2025-03-01T02:00:00+00:00",
    "to": "2025-03-07T02:00:00+00:00"
  },
  "currency": "EUR",
  "maximum_results": 20,
  "sort": {
    "by": "updated",
    "direction": "descending"
  },
  "extras": [
    "payment"
  ]
}

After executing this request, you'll receive a list of orders.

  • Save the returned orders id values for the next step.

Step 2 – Extract label values

→ Use the POST /orders/details/accommodations endpoint to get label and affiliate ID details in each order.

  • Include the orders values from the previous step.

Example of orders/details/accommodation request

{
  "currency": "EUR",
  "orders": [
    "4859251752",
    "4859236984"
  ]
}

Example of response

The response will include the accommodation.label – the value you passed during booking creation.

{
  "request_id": "01jwgmz46g929nmsz4bshe1dyk",
  "data": [
    {
      "id": "4859251752",
      "accommodation": 6819547,
      "accommodation_order_references": [],
      "booker": {
        "platform": "unknown"
      },
      "cancellation_details": null,
      "checkin": "2025-05-12",
      "checkout": "2025-05-15",
      "credit_slip": null,
      "currency": {
        "accommodation": "AUD",
        "booker": "EUR"
      },
      "key_collection_information": [...],
      "label": "hilton_pos-gb_web_sup-HILTON_camp-summer2025",
      "pin_code": "1510",
      "price": {
        "commissionable": {
          "accommodation_currency": 0,
          "booker_currency": 0
        },
        "total": {
          "accommodation_currency": 460,
          "booker_currency": 276.94
        }
      },
    
  ]
}

Step 3 – Filter by campaign or source

Once you receive the detailed order information, you can programmatically filter this list to find orders with specific label values.

  • Use the label field to group or filter bookings by campaign, source, or other marketing identifiers.
  • Use the affiliate_id to differentiate performance across integrations.

Best practices

  • Consistent labeling - Use a structured and predictable format for your labels to enable easy filtering and attribution.
  • Efficient data handling - If you're dealing with a large number of orders, consider implementing pagination and batching in your requests to manage data volume effectively.
  • Regular data retrieval - Set up a regular schedule to retrieve and process orders, ensuring that your attribution data remains up-to-date.

Recommendation for automation

If you need to monitor multiple campaigns or affiliates:

  • Automate daily or weekly pulls using both orders/details and /orders/details/accommodations endpoints.
  • Store and group results by label, affiliate_id, or other key metadata.
  • Use the response fields like order_id, status, created_at, and label for attribution dashboards.
Important

If you work with loyalty programmes or airlines, contact your Account Manager for guidance on the standardised labels recommended by Booking.com.


Curious to know more?