New API available

Great news, we just opened a new world of possibilities based on your favorite vacation rental platform :)

Check the latest BookingSync API

The API described bellow will be retired May 1st, 2016

Sources

Private   Deprecated

Show

GET /sources/#{id}.xml

Returns a single source identified by its integer ID.

Response

Status: 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<source>
  <id type="integer">ID</id>
  <account-id type="integer">ACCOUNT_ID</account-id>
  <name>NAME</name>
  <created-at type="dateTime">2018-01-17T10:00:00Z</created-at>
  <updated-at type="dateTime">2018-01-17T11:00:00Z</updated-at>
  <position type="integer">POSITION</position>
  <canceled-at type="dateTime" nil="true"/>
</source>

List all

GET /sources.xml

Returns a list of all sources. A default of maximum 50 sources is returned per page.

Parameters

  • page. Optional. Specifies the page of sources to retrieve. (default: 1)
    • Example: https://www.bookingsync.com/sources.xml?page=2
  • per_page. Optional. Specifies the maximum number of sources to return per page. (default: 50, maximum: 500)
    • Example: https://www.bookingsync.com/sources.xml?per_page=500

Response

Status: 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<sources type="array">
  <source>
    ...
  </source>
  <source>
    ...
  </source>
  ...
</sources>

Create

POST /sources.xml

Creates a new source. The XML for the new source is returned on a successful request with the timestamps recorded.

Request

<?xml version="1.0" encoding="UTF-8"?>
<source>
  <name>HomeAway.co.uk</name>
</source>

Response

Status: 201 Created
Location: https://www.bookingsync.com/sources/#{new-source-id}.xml

<?xml version="1.0" encoding="UTF-8"?>
<source>
  <id type="integer">1</id>
  <account-id type="integer">ACCOUNT_1</account-id>
  <name>HomeAway.co.uk</name>
  <created-at type="dateTime">2018-01-17T13:11:15Z</created-at>
  <updated-at type="dateTime">2018-01-17T13:11:15Z</updated-at>
  <position type="integer">POSITION</position>
  <canceled-at type="dateTime" nil="true"/>
</source>

Update

PUT /sources/#{id}.xml

Updates an existing source with new details from the submitted XML.

Request

<?xml version="1.0" encoding="UTF-8"?>
<source>
  <name>HomeAway.com</name>
</source>

Response

Status: 200 OK