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

Rentals

Private   Deprecated

Show

GET /rentals/#{id}.xml

Returns a single rental identified by its integer ID.

Response

Status: 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<rental>
  <id type="integer">ID</id>
  <name>Anatoli</name>
  <account-id type="integer">ACCOUNT_ID</account-id>
  <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">2</position>
  <notes nil="true"/>
  <currency nil="true"/>
  <damage-deposit type="decimal">0.0</damage-deposit>
  <downpayment-percentage type="integer">30</downpayment-percentage>
  <description>Sleeps 10, 300m²</description>
  <owner-email nil="true"/>
  <owner-fullname nil="true"/>
</rental>

List all

GET /rentals.xml

Returns a list of all rentals. A default of maximum 50 rentals is returned per page, ordered by position.

Parameters

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

Response

Status: 200 OK

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

Create

POST /rentals.xml

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

If the account doesn’t allow for more rentals to be created, a “507 Insufficient Storage” response will be returned.

If the account is active (trial period finished), new rentals must be added from the web interface as a payment is required. Otherwise a “402 Payment Required” response will be returned.
Registering your BookingSync account as an External Application will remove such limitation. To do so, please contact info@bookingsync.com

Request

<?xml version="1.0" encoding="UTF-8"?>
<rental>
  <description>6 pers. 220m²</description>
  <name>Villa Sivota</name>
</rental>

Response

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

<?xml version="1.0" encoding="UTF-8"?>
<rental>
  <id type="integer">1</id>
  <name>Villa Sivota</name>
  <account-id type="integer">ACCOUNT_1</account-id>
  <created-at type="dateTime">2018-01-17T13:11:21Z</created-at>
  <updated-at type="dateTime">2018-01-17T13:11:21Z</updated-at>
  <position type="integer">POSITION</position>
  <notes nil="true"/>
  <currency nil="true"/>
  <damage-deposit type="decimal">0.0</damage-deposit>
  <downpayment-percentage type="integer">30</downpayment-percentage>
  <description>Sleeps 8, 200m²</description>
  <owner-email nil="true"/>
  <owner-fullname nil="true"/>
</rental>

Update

PUT /rentals/#{id}.xml

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

Request

<?xml version="1.0" encoding="UTF-8"?>
<rental>
  <description>6 pers. 240m²</description>
</rental>

Response

Status: 200 OK

Destroy

DELETE /rentals/#{id}.xml

Destroys the rental identified by its integer ID.

Response

Status: 200 OK