### Connect API Endpoint Example (Demand API V2 Compatible) Source: https://developers.booking.com/metasearch/connect-api/migration-guide/migration-from-demand-api-v2.md Example GET request for hotel availability using the Connect API, compatible with Demand API V2. ```bash GET https://metasearch-connect-api.booking.com/demand-api-v2-compatible/hotelAvailability? city_ids=-2140479 &guest_country="nl" &room1="A,A" &checkin="2023-08-15" &checkout="2023-08-16" ``` -------------------------------- ### Example Call with Query Parameters for Location-Based Retrieval Source: https://developers.booking.com/connectivity/docs/licences-api/managing-licences.md An example of how to construct a GET request using latitude, longitude, country code, and property type ID to retrieve licence requirements. ```http GET https://supply-xml.booking.com/licenses/rules?lat={latitude}&long={longitude}&country_code={country_code}&property_type_id={property_type_id} ``` -------------------------------- ### Start XML Example Source: https://developers.booking.com/connectivity/docs/api-reference/start.md Provides an example of how the 'Start' element can be represented in XML format. ```APIDOC ## Start XML Example ### Description Provides an example of how the 'Start' element can be represented in XML format. ### Code ```xml ``` ``` -------------------------------- ### Example Order Create Request Source: https://developers.booking.com/demand/docs/orders-api/order-preview-create.md This JSON example demonstrates a complete order creation request, including optional fields such as accommodation product bed configuration, remarks, and receipt generation. It covers accommodation details, booker information, and payment specifics. ```json { "accommodation": { "products": [ { "id": "333", "bed_configuration": "123456", "guests": [ { "email": "test.name@booking.com", "name": "Test Name" } ] } ], "remarks": { "estimated_arrival_time": { "hour": 12 }, "special_requests": "We will need an extra cot." } }, "booker": { "address": { "address_line": "Road-1, house-2", "city": "Amsterdam", "country": "nl", "post_code": "11111" }, "company": "Booking B.V", "email": "test.name@booking.com", "language": "en-gb", "name": { "first_name": "Test", "last_name": "Name" }, "telephone": "12345678" }, "order_token": "sample-token", "payment": { "card": { "cardholder": "Test Name", "cvc": "111", "expiry_date": "2030-10", "number": "23333333333333" }, "include_receipt": true, "method": "card", "timing": "pay_online_now" } } ``` -------------------------------- ### Start XML Example Source: https://developers.booking.com/connectivity/docs/api-reference/start.md Example of how to represent the Start object in XML format. Use this to specify the airport type and its IATA code. ```xml ``` -------------------------------- ### Guest Allocation Example Source: https://developers.booking.com/demand/docs/accommodations/search-for-available-properties.md This example shows how to specify guest details, including room allocation, children's ages, and the number of adults per room. It ensures that the allocation details match the total number of adults, rooms, and children specified. ```json { "guests": { "allocation": [ { "children": [13, 15], "number_of_adults": 1 }, { "children": [2, 3], "number_of_adults": 2 }, { "number_of_adults": 2 } ], "number_of_rooms": 3, "number_of_adults": 5, "children": [2, 3, 13, 15] } } ``` -------------------------------- ### Example Option Configurations in XML Source: https://developers.booking.com/connectivity/docs/api-reference/option.md This XML snippet demonstrates various configurations for the Option object, including key collection details, renovation dates, security deposit amounts, and bed linen costs. These options are used to provide additional configuration for specific types of StandardPhrase. ```xml ... ... ... ``` -------------------------------- ### Demand API V2 Endpoint Example Source: https://developers.booking.com/metasearch/connect-api/migration-guide/migration-from-demand-api-v2.md Example GET request for hotel availability using the Demand API V2. ```bash GET https://distribution-xml.booking.com/2.10/hotelAvailability? city_ids=-2140479 &guest_country="nl" &room1="A,A" &checkin="2023-08-15" &checkout="2023-08-16" ``` -------------------------------- ### Add Charge with Indefinite Period Source: https://developers.booking.com/connectivity/docs/charges-api/manage-property-room-charges.md Example of configuring a charge with a single period that starts today and continues indefinitely. The `applicable.from` date determines the start. ```json { "property_charges": [ { "charge_key": { "type": "CLEANINGFEE", "guest_origin": "ANY", "travel_purpose": "ANY" }, "charge_periods": [ { "applicable": { "from": "2024-11-01" }, "configuration": { "amount": { "value": 5.00, "base": [], "mode": "PER_PERSON_PER_NIGHT" }, "excluded": true } } ] } ], ... ... } ``` -------------------------------- ### Example Guest Allocation with Recommendation Products Source: https://developers.booking.com/demand/docs/orders-api/order-preview-create.md Shows guest allocation when using recommendation.products from the accommodations/availability response. This example includes two products with no children allocated. ```json { "recommendation": { "products": [ { "id": "1050736003_377312697_1_2_0", "allocation": { "number_of_adults": 1, "children": [] } }, { "id": "1050736003_377312697_1_2_0", "allocation": { "number_of_adults": 1, "children": [] } } ] } } ``` -------------------------------- ### Example Recommended Allocation Response Source: https://developers.booking.com/demand/docs/accommodations/occupancy-allocation.md The 'recommendation' object provides the optimal guest distribution per room to ensure occupancy rules are met. It returns 'null' if no suitable products are available. ```json { "recommendation": { "price": {...}, "total": 2140.4, "products": [ { "id": "1000426_95127794_3_2_0", "children": [2], "number_of_adults": 1, "price": {...} }, { "id": "1000434_95127794_1_2_0", "children": [4], "number_of_adults": 1, "price": {...} } ] } } ``` -------------------------------- ### OperationTime XML Example Source: https://developers.booking.com/connectivity/docs/api-reference/operationtime.md An example of how to represent opening and closing times using the OperationTime XML structure. This snippet shows how to specify which days are active and the start and end times. ```xml ``` -------------------------------- ### Accommodation Product Price Breakdown Example Source: https://developers.booking.com/demand/docs/accommodations/accommodation-tutorial.md Illustrates the detailed pricing structure for an accommodation product, including base price and extra charges like city tax. Use this to understand how different charges are calculated and applied. ```json { "...": "...", "accommodation": { "id": 10507360, "currency": { "accommodation": "EUR", "booker": "EUR" }, "...": "...", "products": [ { "id": "1050736002_377311511_0_2_0", "...": "...", "price": { "base": { "accommodation_currency": 165.14, "booker_currency": 165.14 }, "extra_charges": { "conditional": [], "non_conditional": [ { "charge": 22, "mode": "per_person_per_night", "percentage": null, "total_amount": { "accommodation_currency": 4.00, "booker_currency": 4.00 }, "unit_amount": { "accommodation_currency": 1.00, "booker_currency": 1.00 } }, { "charge": 21, "mode": "percentage", "percentage": 9.00, "total_amount": { "accommodation_currency": 14.86, "booker_currency": 14.86 }, "unit_amount": { "accommodation_currency": null, "booker_currency": null } } ] }, "total": { "accommodation_currency": 184.00, "booker_currency": 184.00 } } } ] }, "...": "..." } ``` -------------------------------- ### OTA_HotelAvailNotifRQ Request Example Source: https://developers.booking.com/connectivity/docs/ota-hotelavailnotif.md This request example demonstrates how to set the rooms to sell, minimum and maximum stay durations, and open a room and rate combination for booking within a specified date range. ```xml ``` -------------------------------- ### Retrieve Check-in Methods HTTP Request Example Source: https://developers.booking.com/connectivity/docs/checkin-methods-api/generic-calls.md Example GET request to retrieve check-in methods for a specific stream variation. The 'stream_variation_name' parameter is required and obtained from the stream-variations call. ```http GET https://supply-xml.booking.com/checkin-methods-api/checkin-methods?stream_variation_name=primary_checkin_method ``` -------------------------------- ### Example - Pagination and Sorting Parameters Source: https://developers.booking.com/demand/docs/cars/search-for-cars.md Use these parameters to control the number of results, sort order, and pagination. Ensure 'maximum_results' is a multiple of 10. ```json "maximum_results": 50, "sort": { "by": "price" }, "page": "eyJhbGciOiJIUzI1NiJ9..." ``` -------------------------------- ### Sample Request to Check Licence Requirements Source: https://developers.booking.com/connectivity/docs/tutorial-property-onboarding/step-8.md An example of a GET request to retrieve licence rules for a property with ID 14795361. ```json GET https://supply-xml.booking.com/licenses/rules/properties/14795361 ``` -------------------------------- ### Example cURL Request with Authentication Headers Source: https://developers.booking.com/demand/docs/development-guide/authentication.md This example demonstrates how to make a POST request to the Demand API sandbox environment using cURL, including the necessary Authorization and X-Affiliate-Id headers. ```bash curl --request POST 'https://demandapi-sandbox.booking.com/3.1/accommodations/search' \ --header 'X-Affiliate-Id: 123456'\ --header 'Authorization: Bearer xyz.........xyz'\ ... \ --data-raw '{ "city": -2140479, ... } ' ``` -------------------------------- ### Request to Get Room Details Source: https://developers.booking.com/demand/docs/orders-api/order-modify.md Example request to retrieve room attributes, including smoking status, using the /orders/details endpoint. ```json { "accommodations": [ 10507360 ], "extras": [ "rooms" ], "languages": [ "en-gb" ] } ``` -------------------------------- ### Sample Paginated Request for Get Promotions Source: https://developers.booking.com/connectivity/docs/b_xml-getpromotions.md An example of a paginated request to the getpromotions endpoint, including active status, pagination flag, and cursor. ```XML 1234 1 1 opaque-cursor-token ``` -------------------------------- ### Example Data Portability API Request Source: https://developers.booking.com/datasecurity/docs/development-guide/api.md An example cURL command demonstrating how to fetch user data using specific access token, filename, and URL values. ```sh curl -X GET \ -H 'X-Booking-Iam-Access-Token: CAESnAIS0gFSzS2IoVmdBcjb6MQOa9lZjA0qAQQwAQ' \ -H 'Content-Type: application/json' \ -o test.user_domain.com.zip "https://dma-data-portability-service.prod.booking.com/dma/port_report/ab12345c-abcd-1a23-b22c-f99b97a44a80" ``` -------------------------------- ### Example Guest Allocation for Multi-Room Bookings Source: https://developers.booking.com/demand/docs/orders-api/order-preview-create.md Demonstrates how to specify guest distribution for multi-room bookings using accommodation.products.allocation. Each product defines the number of adults and children assigned to a room. ```json { "products": [ { "id": "1050736002_377311511_0_2_0", "allocation": { "number_of_adults": 1, "children": [2] } }, { "id": "1050736002_377311511_0_2_0", "allocation": { "number_of_adults": 1, "children": [5] } } ] } ``` -------------------------------- ### Pay at the Property with Prepayment Schedule Source: https://developers.booking.com/demand/docs/payments/payments-schedules.md Example JSON structure for a 'pay at the property' policy that includes a prepayment installment between booking and check-in dates. ```json { "general_policies": { "payment": { "pay_at_the_property": { "method_required": true, "dates": [ { "at": "2026-11-18", "price": { "accommodation_currency": 0.00, "booker_currency": 0.00 } }, { "at": "2026-11-30", "price": { "accommodation_currency": 57.27, "booker_currency": 57.27 } }, { "at": "2026-12-01", "price": { "accommodation_currency": 76.29, "booker_currency": 76.29 } } ] } } } } ``` -------------------------------- ### List Accommodation Review Scores - With Reviewer Type Filter Source: https://developers.booking.com/metasearch/connect-api/open-api.md Example request to get review scores for specified hotels, filtered by reviewer type. ```json { "hotel_ids": [12345, 67890], "reviewer_type": "leisure" } ``` -------------------------------- ### Comprehensive Request Example Source: https://developers.booking.com/demand/docs/attractions/search-attractions.md This example demonstrates a more detailed request including country filters, date ranges, and specific filters for rating and supported languages, along with sorting preferences. ```json { "currency": "EUR", "countries": ["nl", "be"], "dates": { "start_date": "2026-09-18", "end_date": "2026-09-20" }, "filters": { "rating": { "minimum_review_score": 4.2, "minimum_review_count": 100 }, "supported_languages": ["en", "es", "fr", "de"] }, "rows": 50, "sort": { "by": "most_popular" } } ``` -------------------------------- ### Query Parameter Example for Room Rates Source: https://developers.booking.com/connectivity/docs/room-type-and-rate-plan-management/managing-roomrates.md Use this example to construct a query for retrieving active rate plans, including optional parameters like read-only status and policy overrides. ```url https://supply-xml.booking.com/hotels/ota/OTA_HotelProductNotif?HotelCode=123&IncludeReadOnly=1&OverridePolicyStart=2023-03-01&OverridePolicyEnd=2023-04-01&SupportRateRewrite=0 ``` -------------------------------- ### Retrieve Units HTTP Request Example Source: https://developers.booking.com/connectivity/docs/rooms-api/managing-units.md Use this HTTP GET request to retrieve all units associated with a specific property. The `debug_info` parameter is optional. ```http GET https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units?debug_info=false ``` -------------------------------- ### Create Apartment Room Type Source: https://developers.booking.com/connectivity/docs/room-type-and-rate-plan-management/managing-room-types.md This example demonstrates how to create an apartment room type with specific sub-room configurations like bedrooms, a living room, and bathrooms using the OTA_HotelInvNotifRQ. ```APIDOC ## POST /ota/OTA_HotelInvNotif ### Description This endpoint allows for the creation of new room types, including complex configurations like apartments with multiple bedrooms, living rooms, and bathrooms. It utilizes the `OTA_HotelInvNotifRQ` message to send inventory notifications. ### Method POST ### Endpoint /ota/OTA_HotelInvNotif ### Request Body #### Request Body Example ```xml ``` ### Response #### Success Response (200) Indicates a successful creation or update of the room type. The response includes cross-references and a success indicator. #### Response Example ```xml ``` #### Response Body Parameters - **OTA_HotelInvNotifRS** (object) - Contains the response data. - **InventoryCrossRefs** (array) - Contains the `InventoryCrossRef` objects. - **InventoryCrossRef** (object) - Contains the mapping details in terms of your room type ID and Booking.com room type ID. - **RequestInvCode** (string) - Specifies your room type ID. (To see this, you must have specified the `RoomID` attribute in the `Guestroom` object.) - **ResponseInvCode** (integer) - Specifies the unique Booking.com ID of the created room type. - **warnings** (array) - Contains potential warnings. These can help you improve your requests. - **errors** (array) - Contains potential errors. These can help you understand what went wrong with your request. - **success** (object) - Indicates the success of the request. - **ruid** (string) - Specifies the unique ID of the request. (You can send this ID to Booking.com customer support if you run into an issue.) ``` -------------------------------- ### Retrieve Property Description Response Example Source: https://developers.booking.com/connectivity/docs/property-api/description-endpoint/managing-property-description.md A successful GET request returns the property description data, including text, language code, and last update timestamp. ```json { "data": { "text" : "Some text", "language_code": "en", "last_update": "2020-04-24T15:30:00+00:00" }, "warnings": [], "errors": [], "meta": { "ruid": "..." } } ``` -------------------------------- ### Request Body Example: Age Buckets Source: https://developers.booking.com/connectivity/docs/flexible-children-rates/managing-flexible-children-rates.md This example demonstrates how to set children's prices using predefined age bucket IDs. Ensure the `type` is set to 'child' and specify the `age_bucket_id` along with the `additional` price. ```xml 5 EUR 90.00 100.00 150.00 200.00 ``` -------------------------------- ### List Accommodation Review Scores - With Language and Extras Source: https://developers.booking.com/metasearch/connect-api/open-api.md Example request to get review scores for specified hotels, requesting output in Spanish and including the review score word. ```json { "hotel_ids": [12345, 67890], "language": "es", "extras": ["review_score_word"] } ``` -------------------------------- ### GuestRoomInfo XML Example Source: https://developers.booking.com/connectivity/docs/api-reference/guestroominfo.md An example of the GuestRoomInfo object represented in XML format, showing the Quantity field. ```xml ``` -------------------------------- ### Response Example: Property Facilities Source: https://developers.booking.com/connectivity/docs/content-api-modules/facilities-api/manage-property-facilities.md This JSON object represents a sample response from the GET method when requesting property facilities with debug information enabled. It details parking and restaurant information. ```json { "data": [ { "facility_id": 2, "instances": [ { "instance_id": 48417835, "parking_details": { "name": "Parking #1", "parking_type": "UNKNOWN_PARKING_TYPE", "parking_location": "NEARBY", "parking_access": "ONLY_GUESTS", "parking_reservation": "NEEDED", "max_height_m": 0.0, "has_valet_service": "NOT_SPECIFIED", "has_onsite_staff": "NOT_SPECIFIED", "has_gated_parking": "NOT_SPECIFIED", "has_security_cameras": "NOT_SPECIFIED", "has_ev_charging_station": "NOT_SPECIFIED", "has_accessible_parking_spots": "NOT_SPECIFIED" }, "payment_details": { "charge_mode": "PAID", "charge_details": { "price": 65.0, "frequency": "PER_HOUR" } } }, { "instance_id": 56059157, "parking_details": { "name": "Parking #2", "parking_type": "UNKNOWN_PARKING_TYPE", "parking_location": "ON_SITE", "parking_access": "ONLY_GUESTS", "parking_reservation": "NEEDED", "max_height_m": 0.0, "has_valet_service": "NOT_SPECIFIED", "has_onsite_staff": "NOT_SPECIFIED", "has_gated_parking": "NOT_SPECIFIED", "has_security_cameras": "NOT_SPECIFIED", "has_ev_charging_station": "PRESENT", "has_accessible_parking_spots": "NOT_SPECIFIED" }, "payment_details": { "charge_mode": "FREE" } } ], "state": "PRESENT", "property_facility_meta": { "facility_id": 2, "facility_name": "PARKING_FEE_REQUIRED", "allowed_details_list": [ "PARKING_DETAILS", "PAYMENT_DETAILS" ] } }, { "facility_id": 3, "instances": [ { "instance_id": 3172393, "restaurant_details": { "name": "Restaurant #123", "guests_only": true, "accept_reservations": true, "outdoor_seating": true, "meal_types_list": [ "HALAL", "KOSHER", "VEGETARIAN" ], "ambiances_list": [ "FAMILY_KIDS_FRIENDLY", "MODERN" ], "open_for_meals_list": [ "BRUNCH", "LUNCH", "DINNER" ], "cuisines_list": [ "BRAZILIAN", "CAJUN_CREOLE", "CAMBODIAN", "CANTONESE" ], "is_buffet": false, "is_alacarte": true }, "schedule_details": { "schedule": [ { "from": { "hours": 1, "minutes": 0 }, "to": { "hours": 2, "minutes": 0 }, "day_of_week": "MONDAY" }, { "from": { "hours": 1, "minutes": 0 }, "to": { "hours": 2, "minutes": 0 }, "day_of_week": "TUESDAY" }, { "from": { "hours": 1, "minutes": 0 }, "to": { "hours": 2, "minutes": 0 }, "day_of_week": "WEDNESDAY" }, { "from": { "hours": 1, "minutes": 0 }, "to": { "hours": 2, "minutes": 0 }, "day_of_week": "THURSDAY" }, { "from": { "hours": 1, "minutes": 0 }, "to": { "hours": 2, "minutes": 0 }, "day_of_week": "FRIDAY" }, { "from": { "hours": 1, "minutes": 0 }, "to": { "hours": 2, "minutes": 0 }, "day_of_week": "SATURDAY" }, { "from": { "hours": 1, "minutes": 0 }, "to": { "hours": 2, "minutes": 0 }, "day_of_week": "SUNDAY" } ] } } ] } ] } ``` -------------------------------- ### POST /orders/modify Source: https://developers.booking.com/demand/docs/open-api/3.2/demand-api.md Modifies certain aspects of an accommodation order, such as credit card details, check-in/check-out dates, and room configurations. Refer to the Orders modification guide for examples and best practices. ```APIDOC ## POST /orders/modify ### Description Use this endpoint to modify certain aspects of an accommodation order, such as credit card details, checkin/checkout dates, and room configurations (guest allocation, guest names, and smoking preferences). See the Orders modification guide for examples and best practices. ### Method POST ### Endpoint /orders/modify ### Parameters #### Request Body - **order_id** (string) - Required - The ID of the order to modify. - **modification_details** (object) - Required - The specific details to modify. - **check_in_date** (string) - Optional - New check-in date. - **check_out_date** (string) - Optional - New check-out date. - **room_configuration** (object) - Optional - New room configuration. - **guest_allocation** (array) - Optional - Updated guest allocation. - **guest_names** (array) - Optional - Updated guest names. - **smoking_preferences** (string) - Optional - Updated smoking preferences. - **credit_card_details** (object) - Optional - Updated credit card details. ### Request Example ```json { "order_id": "order_abc", "modification_details": { "check_in_date": "2024-08-16", "room_configuration": { "guest_allocation": [ { "adults": 2, "children": 0 } ] } } } ``` ### Response #### Success Response (200) - **status** (string) - The status of the modification request. - **message** (string) - A confirmation message. #### Response Example ```json { "status": "success", "message": "Order modified successfully." } ``` ``` -------------------------------- ### v3.1 Accommodation Request Example Source: https://developers.booking.com/demand/docs/migration-guide/v3.2/orders/preview.md This is an example of a v3.1 request for accommodation preview. It includes booker details and accommodation specifics like check-in/out dates and product allocations. ```json { "booker": { "country": "nl", "platform": "mobile", "travel_purpose": "leisure", "user_groups": [ "authenticated" ] }, "currency": "EUR", "accommodation": { "id": 6745031, "checkin": "2025-12-10", "checkout": "2025-12-13", "products": [ { "id": "674503106_275710478_0_2_0", "allocation": { "number_of_adults": 2, "children": [8] } }, { "id": "674503113_275710486_0_1_0", "allocation": { "number_of_adults": 1, "children": [] } } ] } } ``` -------------------------------- ### Success Response Example (room_level = 0) Source: https://developers.booking.com/connectivity/docs/b_xml-roomrateavailability.md This XML response illustrates room rate availability when `room_level` is set to 0. It provides a more condensed view of room rates and availability. ```xml ```