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

Clients

Private   Deprecated

Show

GET /clients/#{id}.xml

Returns a single client identified by its integer ID.

Response

Status: 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<client>
  <id type="integer">ID</id>
  <email nil="true"/>
  <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>
  <fullname>Sébastien Grosjean</fullname>
  <notes nil="true"/>
  <passport nil="true"/>
  <preferred-locale nil="true"/>
  <address1 nil="true"/>
  <address2 nil="true"/>
  <city nil="true"/>
  <state nil="true"/>
  <vat-number nil="true"/>
  <zip nil="true"/>
  <company nil="true"/>
  <country-code nil="true"/>
  <fax nil="true"/>
  <mobile nil="true"/>
  <phone nil="true"/>
</client>

List all

GET /clients.xml

Returns a list of all clients. A default of maximum 50 clients is returned per page, ordered by fullname, then creation date.

Parameters

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

Response

Status: 200 OK

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

Create

POST /clients.xml

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

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

Request

<?xml version="1.0" encoding="UTF-8"?>
<client>
  <fullname>Sébastien Grosjean</fullname>
</client>

Response

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

<?xml version="1.0" encoding="UTF-8"?>
<client>
  <id type="integer">1</id>
  <email>client@email.com</email>
  <account-id type="integer">ACCOUNT_1</account-id>
  <created-at type="dateTime">2018-01-17T13:10:51Z</created-at>
  <updated-at type="dateTime">2018-01-17T13:10:51Z</updated-at>
  <fullname>New client</fullname>
  <notes>notes</notes>
  <passport>12S2345</passport>
  <preferred-locale>en</preferred-locale>
  <address1>123 street</address1>
  <address2>Extra details</address2>
  <city>New City</city>
  <company>Acme Inc.</company>
  <state>New State</state>
  <vat-number>FR12345678</vat-number>
  <zip>12345</zip>
  <country-code>GR</country-code>
  <fax>12341234</fax>
  <mobile>456778942</mobile>
  <phone>12348765</phone>
</client>

Update

PUT /clients/#{id}.xml

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

Request

<?xml version="1.0" encoding="UTF-8"?>
<client>
  <address1>Villa Sivota</address1>
</client>

Response

Status: 200 OK

Destroy

DELETE /clients/#{id}.xml

Destroys the client identified by its integer ID.

Response

Status: 200 OK