Last updated

Self-certification tutorial: Facilities API

In this tutorial, you will learn how to use the Facilities API to:

  • Retrieve meta information about facilities
  • Add facilities with details
  • Retrieve facilities information
  • Remove facilities

Who is this for?

You should follow this if you are a developer who has completed the integration of Facilities API’s endpoints and is looking to start using this with live properties in production.

Before you start

To work with Facilities API, you need to have an existing Test Property. You can create a Test Property using Property API. Or alternatively, you can reach out to our support team for creating a Test Property.

For existing Content API providers

You should be able to self certify or go through the steps outlined in this topic. If you would like, you can optionally send us the RUIDs of all the API responses for a quick check/verification by the Connectivity support team. Once done, the support team can connect all existing properties.

For non-Content API/new providers

Go through the steps listed in this topic. You then need to send us the RUIDs of all the API responses for verification by the Connectivity support team.

Step 1 - Read the Meta Endpoint

The first step is to understand the Facilities structure. Use the Meta endpoint together with the Open API specification.

Sample request:

GET
https://supply-xml.booking.com/facilities-api/meta
Response body

The following is a response body example:

{
  "data": {
    "property_id": 10664256
  },
  "warnings": [],
  "meta": {
    "ruid": "08240512-21g4-4575-p94g-e76me888fwq4"
  }
}

Step 2 - Add a facility with some details

Facilities API supports various details objects that describe a certain characteristic of a facility.

For example, you can send a Sauna facility with Surcharge Details (this object describes if facility use is free of charge or paid).

Sample Request:
PUT
https://supply-xml.booking.com/facilities-api/properties/{propertyID}

The following is a request body example to add a Sauna facility:

[
  {
    "facility_id": 79,
    "instances": [
      {
        "surcharge_details": {
          "surcharge_type": "FREE"
        }
      }
    ],
    "state": "PRESENT"
  }
]

Please note that this request will only affect the specified facility id (79), leaving the remaining facilities of the property untouched.

Step 3 - Retrieve the facilities details of a property

GET
https://supply-xml.booking.com/facilities-api/properties/{propertyID}
Response body
{
  "data": {
    "position": {
      "latitude": 52.388418,
      "longitude": 4.619941
    },
    "check_in": {
      "from": "12:00"
    },
    "check_out": {
      "from": "09:30",
      "until": "10:30"
    },
    "property_name": "Floating hotel",
    "property_category": 30,
    "primary_language": "en-gb",
    "languages_spoken": [
      "en-gb",
      "ms",
      "nl"
    ],
    "room_count": 8,
    "floor_count": 1,
    "provider_property_id": "flotella003",
    "stars": "4",
    "target": "test",
    "currency_code": "EUR",
    "property_id": 10664256,
    "status": "Test Hotel",
    "physical_address": {
      "city_name": "Overveen",
      "country_code": "nl",
      "postal_code": "2051",
      "address_line": "Zandvoort",
      "display_address": true
    },
    "translations": [
      {
        "city_name": "Overveen",
        "address_line": "Zandvoort",
        "language_code": "es",
        "property_name": "Floating hotel"
      }
    ],
    "legal_entity_id": "78775"
  },
  "meta": {
    "ruid": "2ccea0cc-9a0b-4179-9c20-9436e50cc070"
  }
}

Step 4 - Remove a facility

To remove a facility from a property using the Facilities API, set it's state attribute to MISSING.

Sample Request:
PUT
https://supply-xml.booking.com/property-api/properties/{propertyID}

The following is a request body example:

[
  {
    "facility_id": 79,
    "state": "MISSING"
  }
]

Step 5 - Send the RUIDs to Booking.com

Send via your organization’s domain email the RUID values obtained in the response bodies of all the above steps to connectivity@booking.com for validation and certification.

Email template

I would like to be certified for production use of Facilities API. Please find the RUIDs for all the steps in the tutorial.

I look forward to hearing from you.