### Getting Started and Tutorials
Source: https://developers.booking.com/connectivity/home/docs/ota-hotelinvnotif
Guides for developers to get started with the Booking Connectivity API, including tutorials for creating test properties and reservations, changelogs, and deprecation policies.
```APIDOC
Getting Started:
- Changelog
- Deprecation policy
- Migration guides
Tutorials:
- Create a test property: /connectivity/docs/tutorial-create-a-test-property
- Create a test reservation: /connectivity/docs/tutorial-create-a-test-reservation
```
--------------------------------
### Getting Started and Tutorials
Source: https://developers.booking.com/connectivity/home/docs/content-troubleshooting
Guides for developers new to the Booking Connectivity API. Includes tutorials for creating test properties and reservations, alongside essential documentation like changelogs and deprecation policies.
```APIDOC
Tutorials:
- Create a test property
- Create a test reservation
Guides:
- Changelog
- Deprecation policy
- Migration guides
```
--------------------------------
### Connectivity Notification Service - Getting Started
Source: https://developers.booking.com/connectivity/home/docs/notification-service/notification-service-getting-started
Steps and prerequisites for integrating with the Connectivity Notification Service (CNS), focusing on setting up endpoints for JWTs and receiving notifications.
```APIDOC
Connectivity Notification Service (CNS) Integration Guide:
Prerequisites:
- An HTTPS endpoint capable of receiving notification webhooks.
- An HTTPS endpoint that serves JSON Web Tokens (JWTs) for authenticating Booking.com API requests.
Integration Steps:
1. Set up an HTTPS endpoint to serve JWTs.
2. Set up a HTTPS endpoint to receive and process notifications.
3. Register your endpoint and share API authentication credentials with Booking.com via the Provider Portal.
- Refer to 'Setting up authentication' for JWT details.
- Refer to 'Configuring Notification Service' for subscription setup.
```
--------------------------------
### cURL Request Example
Source: https://developers.booking.com/connectivity/home/docs/curl_request
Demonstrates how to send a POST request to the Booking.com API using cURL. It includes essential headers for authentication, content type, and connection management. The example shows how to include a local XML file as the request body.
```shell
curl -H "Connection: keep-alive" \
-H "Content-Length: XXX" \
-H "Cache-Control: no-cache" \
-H "Origin: XXXXXXXXXXXXX" \
-H "User-Agent: Provider User-Agent name" \
-H "Content-Type: text/xml;charset=UTF-8" \
-H "Accept: */*" \
-H "Accept-Encoding: gzip,deflate" \
-H "Authorization: Basic XxXxXxXxXxXx=" \
--http1.1 \
-d @messagebody.xml -X POST \
'https://(secure)-supply-xml.booking.com/hotels/{ota or xml}/{API name}'
```
--------------------------------
### Promotions API - Getting Started
Source: https://developers.booking.com/connectivity/home/docs/promotions
Information on how to begin using the Promotions API, including prerequisites and essential resources for integration.
```APIDOC
Prerequisites:
- Machine account permissions required.
- Contact Connectivity Support to request permissions.
Key Resources:
- Handbook for Providers and Channel Managers: Explains API benefits and provides non-technical background.
- UI Handbook for Providers: Contains screenshots for UI design assistance.
- FAQ page: Answers common integration and troubleshooting questions.
```
--------------------------------
### RoomRateAvailability Request Example
Source: https://developers.booking.com/connectivity/home/docs/migration-guides/migrating-to-new-versions
An example XML request payload for the roomrateavailability endpoint, including hotel ID, room ID, start date, and number of days.
```xml
8011855
801185502
2022-11-02
2
```
--------------------------------
### Booking.com Connectivity APIs Overview
Source: https://developers.booking.com/connectivity/home/docs/notification-service/notification-service-getting-started
Lists the various APIs available within the Booking.com Connectivity suite, including services for reservations, content, and notifications.
```APIDOC
Connections API
Contracting API
Property API
Contacts API
Rooms API
Facilities API
Charges API
Content API
Photo API
Licences API
Rates & Availability API
Flexible children rates
Reservations API
Payments API
Reservations Recovery API
Connectivity Notification Service
Request to Book API
Promotions API
Room type and rate plan management API
Messaging API
Guest Review API
Opportunities API
Reporting API
Property scores API
Market Insights API
```
--------------------------------
### Tutorial: Create a Test Property
Source: https://developers.booking.com/connectivity/home/docs/ota-hoteldescriptiveinfo
A guide for developers to learn how to create a test property within the Booking.com connectivity system. This is part of the getting started process.
```APIDOC
Tutorial: Create a Test Property
Purpose:
This tutorial walks through the steps required to create a new test property. This is essential for developers to set up and test their integrations before going live.
Steps:
- Navigate to the property creation interface.
- Fill in the required property details.
- Save and verify the test property creation.
Prerequisites:
- Access to the Booking.com Connectivity Partner Portal.
- Understanding of property data structure.
```
--------------------------------
### Request to Book API - Versioning and Headers
Source: https://developers.booking.com/connectivity/home/docs/request-to-book/technical-overview
Details the mandatory versioning header and other required request headers for interacting with the Request to Book API. Includes versioning strategy and header specifications.
```APIDOC
Request to Book API - Versioning and Headers
Versioning:
It is mandatory to send a versioning header when using the RtB API.
Use the `X-Booking-Api-Version` header to pass the version information.
Currently, the minimum version is `1.0.0` and the latest version is `1.0.0`.
Example Header:
```
X-Booking-Api-Version: 1.0.0
```
Request Headers:
Below headers are mandatory to provide when making RtB API calls.
| Header | Description | Type | Required |
| --- | --- | --- | --- |
| `Authorization` | [Your Base-64 encoded username and password.](/connectivity/docs/request-to-book/technical-overview#authentication) | String | Required |
| `X-Booking-Api-Version` | [API Version](/connectivity/docs/request-to-book/technical-overview#versioning) | String | Required |
```
--------------------------------
### Contacts API - Go Example for Reading Contacts
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/contacts-api/contacts-api-specification/contacts/getallcontacts
Provides a Go example for fetching contact details using the standard library's `net/http` package. This snippet demonstrates making the GET request and parsing the JSON response.
```Go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
const baseUrl = "https://developers.booking.com"
type ContactInfo struct {
Contacts []interface{} `json:"contacts"`
}
type ApiResponse struct {
Data struct { ContactInfo `json:"data"` } `json:"data"`
Warnings []interface{} `json:"warnings,omitempty"`
Errors []interface{} `json:"errors,omitempty"`
Meta struct { Ruid string `json:"ruid"` } `json:"meta,omitempty"`
}
func getContacts(propertyId string, apiVersion string) (*ApiResponse, error) {
url := fmt.Sprintf("%s/properties/%s/contacts", baseUrl, propertyId)
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, fmt.Errorf("failed to create request: %w", err)
}
req.Header.Set("Accept-Version", apiVersion)
client := &http.Client{}
res, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("failed to execute request: %w", err)
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
return nil, fmt.Errorf("failed to read response body: %w", err)
}
if res.StatusCode < 200 || res.StatusCode >= 300 {
return nil, fmt.Errorf("API request failed with status code: %d, body: %s", res.StatusCode, string(body))
}
var apiResponse ApiResponse
if err := json.Unmarshal(body, &apiResponse);
err != nil {
return nil, fmt.Errorf("failed to unmarshal response: %w", err)
}
fmt.Println("Contacts:", apiResponse.Data.ContactInfo.Contacts)
if len(apiResponse.Warnings) > 0 {
fmt.Println("Warnings:", apiResponse.Warnings)
}
if len(apiResponse.Errors) > 0 {
fmt.Println("Errors:", apiResponse.Errors)
}
return &apiResponse, nil
}
// Example usage:
// func main() {
// propertyId := "YOUR_PROPERTY_ID"
// apiVersion := "string"
// _, err := getContacts(propertyId, apiVersion)
// if err != nil {
// fmt.Printf("Error: %v\n", err)
// }
// }
```
--------------------------------
### Create Unit Request Body Example
Source: https://developers.booking.com/connectivity/home/docs/rooms-api/managing-units
Example JSON payload for creating a multi-room unit. It defines the unit's configuration, including room types, bed setups, occupancy limits, and other relevant details.
```json
{
"configuration": {
"unit_type_id": 1,
"rooms": [
{
"type": "BEDROOM_SUBROOM",
"bed_configurations": [
{
"beds": [
{
"bed_type_id": 6,
"bed_count": 1
}
],
"is_default_configuration": true
}
]
},
{
"type": "BEDROOM_SUBROOM",
"bed_configurations": [
{
"beds": [
{
"bed_type_id": 4,
"bed_count": 1
}
],
"is_default_configuration": true
}
]
},
{
"type": "LIVING_ROOM_SUBROOM",
"bed_configurations": [
{
"beds": [
{
"bed_type_id": 7,
"bed_count": 1
}
],
"is_default_configuration": true
}
]
}
]
},
"unit_name_id": 138547,
"number_of_units": 5,
"smoking_policy": "SMOKING_AND_NONSMOKING",
"size": {
"value": 155.0,
"unit": "SQM"
},
"partner_reference_name": "Park facing Apartment",
"floor_numbers_located_on": [
2
],
"occupancy_details": {
"max_guests": 5,
"max_adults": 5,
"max_children": 4,
"max_infants": 4,
"max_infants_on_top": 0
},
"max_children_that_pay_children_rate": 2,
"extra_beds_configuration": {
"extra_beds": 1,
"cribs": 0,
"is_crib_and_extra_bed_allowed": false
}
}
```
--------------------------------
### Response Body Example
Source: https://developers.booking.com/connectivity/home/docs/flexible-children-rates/managing-flexible-children-rates
Example of a successful response body from the Booking.com XML API.
```XML
```
--------------------------------
### Sample cURL Request for Booking.com Opportunity API
Source: https://developers.booking.com/connectivity/home/docs/opportunities-api/retrieving-opportunities
Example cURL command to fetch properties for a specific opportunity, demonstrating GET request, query parameters for pagination, and target URL.
```curl
curl -X GET \
https://supply-xml.booking.com/opportunity-api/opportunities?opportunity_id=free_wifi&page=2&pagesize=100 \
```
--------------------------------
### Booking API Response Example
Source: https://developers.booking.com/connectivity/home/docs/room-type-and-rate-plan-management/managing-roomrates
Provides an example of a successful XML response from the Booking API, illustrating the structure of returned hotel product data.
```XML
```
--------------------------------
### Curl Example: Retrieve Room Bathroom Configuration
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/facilities-api/facilities-api-specification/manage-bathrooms
Example of how to retrieve room bathroom configuration using curl. This demonstrates the HTTP GET request to the specified endpoint with placeholder IDs.
```curl
curl -i -X GET \
'https://supply-xml.booking.com/facilities-api/properties/{propertyId}/rooms/{roomId}/bathrooms'
```
--------------------------------
### OTA_HotelProductNotifRS Response Body Example
Source: https://developers.booking.com/connectivity/home/docs/room-type-and-rate-plan-management/managing-roomrates
A successful response body example for the `OTA_HotelProductNotifRQ` request.
```XML
```
--------------------------------
### XML Example for Value Adds
Source: https://developers.booking.com/connectivity/home/docs/reservations-api/managing-reservations-bxml
An example demonstrating how to structure the `value_added_services` element in XML format, including specific service IDs and amounts.
```XML
```
--------------------------------
### Instay Service XML Example
Source: https://developers.booking.com/connectivity/home/docs/api-reference/service
An example of the XML structure for an 'Instay Service' reservation, demonstrating how service details, pricing, and TPA extensions are represented.
```XML
This service includes a bottle of cava (Catalan champagne), strawberries with chocolate, and a sensual kit.
1
Payment policy was not defined
```
--------------------------------
### Example Response Body
Source: https://developers.booking.com/connectivity/home/docs/b_xml-derivedprices
An example of a successful response body from the Derived Pricing API, indicating an 'ok' status.
```XML
```
--------------------------------
### Booking API Query Parameters and Example
Source: https://developers.booking.com/connectivity/home/docs/room-type-and-rate-plan-management/managing-roomrates
Details the query parameters for the Booking API, including their descriptions, types, and requirements. Provides an example URL for making requests.
```APIDOC
Query Parameters:
| Element | Description | Type | Required/Optional | Notes |
| --- | --- | --- | --- | --- |
| `HotelCode` | Specifies the unique ID of the property you want to retrieve the active rate plans for. | integer | required | |
| `OverridePolicyStart` | Specifies the start of the date range for which you want to retrieve policy override information. | string | optional | Follows the format (YYYY-MM-DD). |
| `OverridePolicyEnd` | Specifies the end of the date range for which you want to retrieve policy override information. | string | Required if `OverridePolicyStart` is specified | Follows the format (YYYY-MM-DD). |
| `IncludeReadOnly` | Include roomrates that are read-only from the API. You cannot modify the read-only roomrates using the API. You can edit them only by using the Booking.com Extranet. | boolean | optional | Specify: `1` - Include read-only roomrates, `0` - Exclude read-only roomrates (default) |
| `SupportRateRewrite` | If set, then the API skips rates that have been rewritten to another rate. | boolean | optional | Specify: `1` - Skip rewritten roomrates, `0` - Include rewritten roomrates (default) |
Query parameter example:
https://supply-xml.booking.com/hotels/ota/OTA_HotelProductNotif?HotelCode=123&IncludeReadOnly=1&OverridePolicyStart=2023-03-01&OverridePolicyEnd=2023-04-01&SupportRateRewrite=0
```
--------------------------------
### Room XML Structure Example
Source: https://developers.booking.com/connectivity/home/docs/api-reference/room
Provides an example of the XML structure used to represent a Room resource, demonstrating how the fields are implemented in practice.
```xml
```
--------------------------------
### Request Body Example for OTA_HotelRatePlanNotif
Source: https://developers.booking.com/connectivity/home/docs/room-type-and-rate-plan-management/managing-rate-plans
An example XML request body demonstrating how to structure the data for updating a rate relation using the OTA_HotelRatePlanNotif endpoint.
```XML
```
--------------------------------
### Successful Response Body Example
Source: https://developers.booking.com/connectivity/home/docs/photo-api/managing-photo-galleries
Provides an example of a successful API response body, including meta information, data, warnings, and errors.
```json
{
"meta": {
"ruid": "UmFuZG9tetc"
},
"data": {
"success": 1
},
"warnings": [],
"errors": []
}
```
--------------------------------
### Request Body Example
Source: https://developers.booking.com/connectivity/home/docs/checkin-methods-api/per-property-calls
Example JSON payload for the POST request to set check-in methods, illustrating various check-in method configurations with additional information and external references.
```JSON
{
"checkin_methods": [
{
"stream_variation_name": "primary_checkin_method",
"checkin_method": "instruction_will_send",
"additional_info": {
"instruction": {
"how": "phone",
"when": "day_of_arrival"
}
},
"external_references": [
{
"sequence": 1,
"type": "image_service",
"references": {
"photo_id": 57216095
}
}
]
},
{
"stream_variation_name": "alternative_checkin_method",
"checkin_method": "lock_box",
"additional_info": {
"brand_name": "The Forever Lock",
"other_text": {
"lang": "en",
"text": "In case you were not able to reach property using main method - there is a key lock where you can pick up keys."
},
"location": {
"off_location": 1,
"address": "Herengracht 597",
"city": "Amsterdam",
"zip": "1017CE"
}
}
}
]
}
```
--------------------------------
### DepositPayments XML Example
Source: https://developers.booking.com/connectivity/home/docs/api-reference/depositpayments
An example of the XML structure for DepositPayments, illustrating how payment information is represented.
```XML
Guests pay at the property
```
--------------------------------
### Booking Connectivity Tutorial - Create a Test Property
Source: https://developers.booking.com/connectivity/home/docs/tut-ready-to-check/step-2
A step-by-step guide to setting up a test property within the Booking.com connectivity system. This tutorial covers the entire process from initial creation to pushing availability.
```APIDOC
Tutorial - Create a test property:
- Introduction
- Step 1 – Create property
- Step 2 – Retrieve property details
- Step 3 – Create room type
- Step 4 – Create rate plan
- Step 5 – Create product
- Step 6 – Push availability
- Step 7 – Checks
- Epilogue – Whats next?
```
--------------------------------
### OTA_HotelProductNotifRQ Request Example
Source: https://developers.booking.com/connectivity/home/docs/room-type-and-rate-plan-management/managing-roomrates
An example of a complete request body for the OTA_HotelProductNotifRQ API, demonstrating how to specify hotel product details, policies, and value-added services.
```XML
```
--------------------------------
### Handle 400 Bad Request for Content-Type
Source: https://developers.booking.com/connectivity/home/docs/token-based-authentication
API returns HTTP 400 when the Content-Type header does not match the request body type (e.g., JSON or XML). This example shows a typical JSON response for such an error, indicating missing required parameters.
```json
{
"ruid": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
"status": "400",
"error": "Bad Request",
"message": "client_id and client_secret parameters should exist."
}
```
--------------------------------
### Sample Promotion Creation Response
Source: https://developers.booking.com/connectivity/home/docs/b_xml-promotions
An example of the XML response received upon successful creation of a promotion.
```XML
TB449324213596220037
```
--------------------------------
### Get Units - Example Request (cURL)
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/rooms-api/rooms-api-specification/rooms-api
Example cURL command to retrieve all active units for a specified property. Demonstrates how to make a GET request to the Rooms API endpoint, including optional debug parameters.
```curl
curl -i -X GET \
'https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units?debug_info=false'
```
```JavaScript
fetch('https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units?debug_info=false', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
```
```Python
import requests
url = 'https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units'
params = {'debug_info': 'false'}
response = requests.get(url, params=params)
if response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code}")
```
```Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class GetUnits {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units?debug_info=false"))
.GET()
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
```
--------------------------------
### Booking.com Connectivity API Introduction
Source: https://developers.booking.com/connectivity/home/docs
Introduction to the Booking.com Connectivity APIs, explaining their purpose for managing room availability, reservations, and prices. It guides new developers to tutorials and outlines expectations for Connectivity Partners.
```APIDOC
API Overview:
Purpose: Enable Connectivity Partners to send and retrieve data for properties listed on Booking.com.
Functionality: Manage room availability, reservations, prices, and other property-related data.
Target Audience: Connectivity Partners and their developers.
Getting Started:
Recommendation: Follow the tutorial for creating a test property.
Link: /connectivity/docs/tut-ready-to-check
Connectivity Partner Expectations:
Requirements: Meet specific onboarding requirements.
Continuous Improvement: Keep up with API changes and improvements.
Key Practices:
- Support all available API functions.
- Implement Booking.com functionalities in an end-user friendly way.
- Load at least a full year of rates and availability.
- Provide an easy-to-use interface for managing rooms and rates.
- Minimize reservations falling back to e-mail.
Proactive Communication:
- Inform properties about low room availability.
- Notify about dates beyond which properties are no longer bookable.
- Highlight unmapped rooms or rates.
- Share opportunities for business growth.
New Functionality Requests: Discuss with Booking.com Connectivity Account Manager.
```
--------------------------------
### Telephone XML Example
Source: https://developers.booking.com/connectivity/home/docs/api-reference/telephone
An example demonstrating the XML structure for the Telephone data, including the phone number.
```XML
```
--------------------------------
### Sample API Request (cURL)
Source: https://developers.booking.com/connectivity/home/docs/migration-guides/migrating-to-new-versions
Example of how to make a request to the Booking.com Room Rates API using cURL, including necessary headers.
```shell
POST 'https://supply-xml.booking.com/hotels/xml/roomrates' \
--header 'Accept-Version: 1.1' \
--header 'Authorization: Basic THVjLVNhbXVlbMblhWTdlOCghQ29qaU9pNmxlWSpIWXU9OigvS2meQpQ12puj' \
--header 'Content-Type: application/xml'
```
--------------------------------
### Get Units Example (cURL)
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/rooms-api/rooms-api-specification/rooms-api/updateunit
Example of how to retrieve all active units for a property using cURL.
```curl
curl -i -X GET \
'https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units?debug_info=false'
```
--------------------------------
### XML Example for Guarantee
Source: https://developers.booking.com/connectivity/home/docs/api-reference/guarantee
Provides an example of the XML structure for the Guarantee object, illustrating how it is represented in data exchange.
```XML
...
```
--------------------------------
### Get Units cURL Example
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/rooms-api/rooms-api-specification/rooms-api/getunits
Example of how to retrieve all active units for a property using cURL.
```curl
curl -i -X GET \
'https://supply-xml.booking.com/rooms-api/properties/{propertyId}/units?debug_info=false'
```
--------------------------------
### B.XML Standard Pricing Example
Source: https://developers.booking.com/connectivity/home/docs/pricing-models
Demonstrates setting standard pricing for maximum occupancy using the tag and for single occupancy using the tag within the B.XML availability endpoint.
```xml
1.0
150.00
135.00
```
--------------------------------
### OTA Rate Structure Example
Source: https://developers.booking.com/connectivity/home/docs/pricing-models
An XML excerpt demonstrating the structure for defining rates with different lengths of stay and occupancy-based pricing amounts.
```XML
```
--------------------------------
### Messaging API: GET /messages/latest Participant Type
Source: https://developers.booking.com/connectivity/home/docs/changelog/changelog-archive
Corrects the documentation for the GET /messages/latest request, specifically the `participant_type` field in the response body example.
```APIDOC
GET /messages/latest:
Description: Retrieves the latest messages.
Documentation Update: Corrected `participant_type` in response body example to "property".
Related Documentation: /connectivity/docs/messaging-api/managing-messages#response-body-example
```
--------------------------------
### Retrieve Facility Metadata Example (curl)
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/facilities-api/facilities-api-specification/meta-data-endpoint/meta
Example using curl to fetch the latest facility definitions from the metadata endpoint.
```curl
curl -i -X GET \
https://supply-xml.booking.com/facilities-api/meta
```
--------------------------------
### Rates & Availability API: Pricing Type Tutorials
Source: https://developers.booking.com/connectivity/home/docs/understanding-pricing-types
Guides and tutorials for implementing pricing types, including self-assessment for derived pricing.
```APIDOC
Tutorial & Troubleshooting:
+ Self-assessment tutorial for derived pricing: `/connectivity/docs/b_xml-derivedprices-self-assessment-tutorial`
```
--------------------------------
### Retrieve Facility Metadata Example (curl)
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/facilities-api/facilities-api-specification/meta-data-endpoint
Example using curl to fetch the latest facility definitions from the metadata endpoint.
```curl
curl -i -X GET \
https://supply-xml.booking.com/facilities-api/meta
```
--------------------------------
### Onboarding Solutions APIs
Source: https://developers.booking.com/connectivity/home/docs/solutions/foundational/foundational
APIs for managing property onboarding in the Homes segment, covering property details, content, rooms, rates, policies, licenses, contracting, and charges.
```APIDOC
Content API:
- Manages property profile information, photos, and hotelier messages.
- Handles key collection methods and photos.
- Manages house rules.
Room type and Rate plan management API:
- Manages room types and rate plans.
Policies API:
- Manages cancellation policies.
Licenses API:
- Manages license requirements and submissions for properties and room types.
Photos API:
- Manages property photos, including uploads, status checks, tags, retrieval, deletion, and panoramic photos.
- Handles property-level and room-level photo galleries.
Contracting API:
- Manages contract creation, legal entity IDs, and country additions to contracts.
Charges API:
- Manages property charges.
Facilities API:
- Manages facilities and services for properties.
Property Details API:
- Manages property details.
Property Settings API:
- Manages property settings, including security deposit amounts and house rules.
```
--------------------------------
### Curl Example: Retrieve Room Bathroom Configuration
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/facilities-api/facilities-api-specification/manage-bathrooms/setbathroomdetails
Example of how to retrieve room bathroom configuration using curl. This demonstrates the HTTP GET request to the specified endpoint with placeholder IDs.
```curl
curl -i -X GET \
'https://supply-xml.booking.com/facilities-api/properties/{propertyId}/rooms/{roomId}/bathrooms'
```
--------------------------------
### OTA_HotelProductNotifRS XML Example
Source: https://developers.booking.com/connectivity/home/docs/api-reference/ota_hotelproductnotifrs
Provides an example of the XML structure for the OTA_HotelProductNotifRS API response, demonstrating the root element and a success indicator.
```XML
```
--------------------------------
### Curl Example: Retrieve Room Bathroom Configuration
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/facilities-api/facilities-api-specification/manage-bathrooms/getbathroomdetails
Example of how to retrieve room bathroom configuration using curl. This demonstrates the HTTP GET request to the specified endpoint with placeholder IDs.
```curl
curl -i -X GET \
'https://supply-xml.booking.com/facilities-api/properties/{propertyId}/rooms/{roomId}/bathrooms'
```
--------------------------------
### Promotions API Documentation and Tutorial
Source: https://developers.booking.com/connectivity/home/docs/going_live
Offers documentation and a self-assessment tutorial for the Promotions API. Developers are advised to complete the self-assessment exercise to ensure correct implementation of promotional functionalities.
```APIDOC
API: Promotions API
Documentation Link: /connectivity/docs/promotions/
Tutorial Link: /connectivity/docs/promotions-api-self-assessment-tutorial/
Assessment: N/A (Self-assessment recommended)
Description: Manages property promotions, requires self-assessment.
```
--------------------------------
### Property Operation Response Body Example
Source: https://developers.booking.com/connectivity/home/docs/content-api-modules/property-details-api/implementing-property-api
Example of a JSON response body for property operations, showing property ID, warnings, and metadata.
```JSON
{
"data": {
"property_id": 10664256
},
"warnings": [],
"meta": {
"ruid": "1c9bff15-h4742-9l08-2ew3-df4fd1f1166b"
}
}
```
--------------------------------
### Contacts API - Ruby Example for Reading Contacts
Source: https://developers.booking.com/connectivity/home/docs/openapispecs/contacts-api/contacts-api-specification/contacts/getallcontacts
Provides a Ruby example for fetching contact details using the `net/http` library. This snippet shows how to make the GET request, set headers, and parse the JSON response.
```Ruby
require 'net/http'
require 'uri'
require 'json'
def get_contacts(property_id, api_version)
uri = URI.parse("https://developers.booking.com/properties/#{property_id}/contacts")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = (uri.scheme == 'https')
request = Net::HTTP::Get.new(uri.request_uri)
request['Accept-Version'] = api_version
response = http.request(request)
response_body = response.body
if response.code.to_i >= 200 && response.code.to_i < 300
data = JSON.parse(response_body)
puts "Contacts: #{data['data']['contacts']}"
puts "Warnings: #{data['warnings']}" unless data['warnings'].nil? || data['warnings'].empty?
puts "Errors: #{data['errors']}" unless data['errors'].nil? || data['errors'].empty?
return data
else
puts "HTTP error: #{response.code} - #{response_body}"
return nil
end
rescue StandardError => e
puts "Error fetching contacts: #{e.message}"
nil
end
# Example usage:
# property_id = 'YOUR_PROPERTY_ID'
# api_version = 'string'
# get_contacts(property_id, api_version)
```
--------------------------------
### Name XML Example
Source: https://developers.booking.com/connectivity/home/docs/api-reference/name
An example of the XML structure for the 'Name' API object, demonstrating how to represent contact person details.
```xml
Sam
Xu
Finance Manager
```
--------------------------------
### Reservations API - Core Processes and Guides
Source: https://developers.booking.com/connectivity/home/docs/reservations-api/implementation-guide-pcpv2-bxml
Detailed documentation for the Reservations API, covering essential processes like handling new and modified reservations, retrieving summaries, and implementing specific packages like Payments Clarity V2.
```APIDOC
Reservations API:
Overview:
- Provides endpoints for managing reservations, including creation, modification, cancellation, and retrieval.
Key Processes:
- OTA Reservations Process:
- Processing reservations using OTA.
- Retrieving new reservations (OTA).
- Acknowledging new reservations (OTA).
- Retrieving modified/cancelled reservations (OTA).
- Acknowledging modified/cancelled reservations (OTA).
- B.XML Reservations Process:
- Processing reservations using B.XML.
- Managing reservations using B.XML.
- Payments Clarity Package V2:
- Implementing Payments Clarity Package V2 using OTA.
- Implementing Payments Clarity Package V2 using B.XML.
- Reservation Summary Retrieval:
- Using reservationssummary to retrieve reservation summaries.
Troubleshooting & FAQ:
- Troubleshooting section: List of error codes and possible solutions.
- FAQ:
- Frequently asked questions about the Reservations API.
- General information.
- Testing the Reservations API.
- Missing reservation messages.
- Troubleshooting overbookings.
- Handling payment related data.
```
--------------------------------
### Handle 405 Method Not Allowed for Endpoint
Source: https://developers.booking.com/connectivity/home/docs/token-based-authentication
API returns HTTP 405 when an incorrect HTTP method (e.g., GET, PUT) is used for an endpoint that only supports POST. This JSON response clarifies that only POST requests are accepted.
```json
{
"ruid": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
"status": "405",
"error": "Method Not Allowed",
"message": "This endpoint only supports POST requests."
}
```
--------------------------------
### Sample API Response Body
Source: https://developers.booking.com/connectivity/home/docs/migration-guides/migrating-to-new-versions
An example XML response from the Booking.com Room Rates API, showcasing room details, rate information, and child pricing structures.
```xml
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.