Last updated

Self-certification tutorial: Property status

In this tutorial, you will use the Property API to:

  • Check if an existing property is Open/ Bookable
  • Open the property
  • Close a property that is open with a reason

Who is this for?

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

Before you start

You will need the following to complete the tutorial:

  • A test property with the appropriate machine account permissions

Step 1 - Check your property's status for going Open/Bookable

Use the status end point's Check operation to know if your property can go to open bookable. Save the RUID to include in your report to Connectivity Support (see below).

Sample request:

POST https://supply-xml.booking.com/property-api/properties/{propertyId}/status 

Header parameter

The following table describes the elements you can add in the header:

HeaderDescriptionTypeRequired/
Optional
Notes
Content-Type: application/jsonSpecifies the expected content type.stringRequired

Path parameter

The following table describes the elements you can add in the path:

ValueDescriptionTypeRequired/
Optional
Notes
{property ID}Specify the unique ID of the property to check or update state.integerRequired

Request body

{
   "operation" : "Check"
}
{
    "data": {
        "status": "Hotel ... is in Open / bookable status "
    },
    "warnings": [],
    "errors": [],
    "meta": {
        "ruid": "..."
    }
}

If warnings or errors are reported in the responses then take the corrective actions given in Handling errors and warnings in status endpoint before proceeding to Step 2.

Step 2 - Use status endpoint to Open the property

If you have corrected the errors in the response of the check. Then you can open your test property.

Sample request:

POST https://supply-xml.booking.com/property-api/properties/{propertyId}/status 

Header parameter

The following table describes the elements you can add in the header:

HeaderDescriptionTypeRequired/
Optional
Notes
Content-Type: application/jsonSpecifies the expected content type.stringRequired

Path parameter

The following table describes the elements you can add in the path:

ValueDescriptionTypeRequired/
Optional
Notes
{property ID}Specify the unique ID of the property to check or update state.integerRequired

Sample request:

POST https://supply-xml.booking.com/property-api/properties/{propertyId}/status 
{
    "operation" : "Open"
}

Sample response: Open

{
    "data": {
        "status": "Hotel ... is in Open / bookable status "
    },
    "warnings": [],
    "errors": [],
    "meta": {
        "ruid": "..."
    }
}

If there are no warnings or errors in the response you have successfully opened the hotel ! Make note of the ruid that was returned in the response object.

Step 3 - Close a hotel

If you have successfully opened a hotel then you can try to close the test hotel using the following sample request.

Sample request:

POST https://supply-xml.booking.com/property-api/properties/{propertyId}/status 

Header parameter

The following table describes the elements you can add in the header:

HeaderDescriptionTypeRequired/
Optional
Notes
Content-Type: application/jsonSpecifies the expected content type.stringRequired

Path parameter

The following table describes the elements you can add in the path:

ValueDescriptionTypeRequired/
Optional
Notes
{property ID}Specify the unique ID of the property to check or update state.integerRequired
{
    "operation" : "Close",
    "reason": {
        "type": "Renovation",
        "description" : "Example"
    }
}

Sample response: Closed

{
    "data": {
        "status": "Hotel ... is in Closed (requested by hotel) status "
    },
    "warnings": [],
    "errors": [],
    "meta": {
        "ruid": "..."
    }
}

Step 4 - Send the RUIDs to Booking.com

Through your organization’s domain email address, send the RUID values obtained in the response bodies of the POSTrequests to connectivity@booking.com for validation and certification.

Email template

I would like to be certified for production use of Property Status endpoints. Please find the RUIDs for all the steps in the tutorial.

I look forward to hearing from you.