Contacts
Overview
This resource represents the Contacts (people responsible for managing Rentals) that can be assigned to Rentals via Rental Contacts.
Parameters
- OAuth Scopes:
- public
- rentals_write
| Group | Name | Type | Read/Write | Description |
|---|---|---|---|---|
| account | Integer | Read | Account's ID related to the Client | |
| id | Integer | Read | Contact's id. | |
| String | Read | Contact's email address. | ||
| website | String | Read | Contact's website url. | |
| private_notes | String | Read | Contact's annotations. | |
| gender | String | Read | Contact's gender. List of possible values described in enums section. | |
| firstname | String | Read | Contact's firstname | |
| lastname | String | Read | Contact's lastname | |
| fullname | String | Read | Contact's fullname | |
| address1 | String | Read | Contact's address | |
| address2 | String | Read | extension of Contact's address | |
| city | String | Read | Contact's city | |
| country_code | String | Read | Contact's country code, list of codes is available at wikipedia. | |
| state | String | Read | Contact's state | |
| zip | String | Read | Contact's zip code | |
| spoken_languages | Array | Read | List of all available languages is described in enums section. | |
| phones | Array | Read | Array of contacts's phone numbers. | |
| label | String | Read | Phone label. | |
| number | String | Read | Client's number. | |
| created_at | Time | Read | Contact's create time. | |
| updated_at | Time | Read | Contact's update time. | |
| canceled_at | Time | Read | Contact's cancel time. | |
| forget_me_at | Time | Read | Refer to GDPR guide | |
| processing_restricted_at | Time | Read | Refer to GDPR guide |
| Group | Name | Type | Read/Write | Description | Constraints |
|---|---|---|---|---|---|
| account | Integer | Read | Account's ID related to the Client | ||
| id | Integer | Read | Contact's id. | ||
| String | Read/Write | Contact's email address. | Required, must be in email format | ||
| website | String | Read/Write | Contact's website url. | Must be a URL | |
| private_notes | String | Read/Write | Contact's annotations. | ||
| gender | String | Read/Write | Contact's gender. List of possible values described in enums section. | Must be one of genders enum | |
| firstname | String | Read/Write | Contact's firstname | Required | |
| lastname | String | Read/Write | Contact's lastname | Required | |
| fullname | String | Read | Contact's fullname | ||
| address1 | String | Read/Write | Contact's address | Required, Maximum length: 100, cannot contain non-printable characters | |
| address2 | String | Read/Write | extension of Contact's address | Maximum length: 100, cannot contain non-printable characters | |
| city | String | Read/Write | Contact's city | Required, Maximum length: 100 | |
| country_code | String | Read/Write | Contact's country code, list of codes is available at wikipedia. | Required, Must be a country code enum | |
| state | String | Read/Write | Contact's state | Maximum length: 100, cannot contain non-printable characters | |
| zip | String | Read/Write | Contact's zip code | Required, Maximum length: 15, cannot contain non-printable characters | |
| spoken_languages | Array | Read/Write | List of all available languages is described in enums section. | Each item must be one of available locales, at least one element is required | |
| phones | Array | Read/Write | Array of contacts's phone numbers. | ||
| label | String | Read/Write | Phone label. | Required, must be in email format (if the element is present in phones array) | |
| number | String | Read/Write | Contacts's number. | Required, must be in phone number format (if the element is present in phones array) | |
| created_at | Time | Read | Contact's create time. | ||
| updated_at | Time | Read | Contact's update time. | ||
| canceled_at | Time | Read | Contact's cancel time. | ||
| forget_me_at | Time | Read | Contact's forget time. | ||
| processing_restricted_at | Time | Read | Contact's processing restriction time. |
List contacts
List all contacts for a given account(s).
GET /contacts
- OAuth Scopes:
- public
response.json
{
"links": {
"contacts.account": "https://www.bookingsync.com/api/v3/accounts/{contacts.account}"
},
"contacts": [
{
"links": {
"account": 1
},
"id": 1,
"fullname": "FirstName1 LastName1",
"spoken_languages": [
"en",
"fr"
],
"email": "cornelia@nienow.co.uk",
"phones": [
{
"label": "phone",
"number": "+33 (0)6 123.123.123"
},
{
"label": "mobile",
"number": "+33 (0)6 123.123.123"
},
{
"label": "fax",
"number": "+33 (0)6 123.123.123"
}
],
"website": "http://example.com",
"private_notes": "Lorem",
"address1": "Nilsa Crossroad",
"address2": null,
"city": "New Margarettafurt",
"state": "Nevada",
"zip": "44147",
"country_code": "US",
"firstname": "FirstName1",
"lastname": "LastName1",
"gender": "male",
"created_at": "2021-01-22T08:40:20Z",
"updated_at": "2021-01-22T08:40:20Z",
"canceled_at": null,
"forget_me_at": null,
"processing_restricted_at": null
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/contacts?page=1",
"last": "https://www.bookingsync.com/api/v3/contacts?page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}
Get a single contact
Returns a single contact identified by ID.
GET /contacts/:contact_id
- OAuth Scopes:
- public
response.json
{
"links": {
"contacts.account": "https://www.bookingsync.com/api/v3/accounts/{contacts.account}"
},
"contacts": [
{
"links": {
"account": 1
},
"id": 1,
"fullname": "FirstName1 LastName1",
"spoken_languages": [
"en",
"fr"
],
"email": "cornelia@nienow.co.uk",
"phones": [
{
"label": "phone",
"number": "+33 (0)6 123.123.123"
},
{
"label": "mobile",
"number": "+33 (0)6 123.123.123"
},
{
"label": "fax",
"number": "+33 (0)6 123.123.123"
}
],
"website": "http://example.com",
"private_notes": "Lorem",
"address1": "Nilsa Crossroad",
"address2": null,
"city": "New Margarettafurt",
"state": "Nevada",
"zip": "44147",
"country_code": "US",
"firstname": "FirstName1",
"lastname": "LastName1",
"gender": "male",
"created_at": "2021-01-22T08:40:20Z",
"updated_at": "2021-01-22T08:40:20Z",
"canceled_at": null,
"forget_me_at": null,
"processing_restricted_at": null
}
],
"meta": {
"Link": {
"first": "https://www.bookingsync.com/api/v3/contacts?page=1",
"last": "https://www.bookingsync.com/api/v3/contacts?page=1"
},
"X-Total-Pages": "1",
"X-Total-Count": "1",
"X-Per-Page": "100"
}
}
Create a new contact
Creates a contact
POST /contacts
- OAuth Scopes:
- rentals_write
request.json
{
"contacts": [
{
"email": "some@email.com",
"website": "http://example.com",
"private_notes": "Lorem",
"gender": "male",
"firstname": "FirstName1",
"lastname": "LastName1",
"address1": "Nilsa Crossroad",
"address2": null,
"city": "New Margarettafurt",
"state": "Nevada",
"zip": "44147",
"country_code": "US",
"spoken_languages": [
"en",
"fr"
],
"phones": [
{
"label": "phone",
"number": "+33 (0)6 123.123.123"
},
{
"label": "mobile",
"number": "+33 (0)6 123.123.123"
},
{
"label": "fax",
"number": "+33 (0)6 123.123.123"
}
]
}
]
}
response.json
{
"links": {
"contacts.account": "https://www.bookingsync.com/api/v3/accounts/{contacts.account}"
},
"contacts": [
{
"links": {
"account": 1
},
"id": 1,
"fullname": "FirstName1 LastName1",
"spoken_languages": [
"en",
"fr"
],
"email": "cornelia@nienow.co.uk",
"phones": [
{
"label": "phone",
"number": "+33 (0)6 123.123.123"
},
{
"label": "mobile",
"number": "+33 (0)6 123.123.123"
},
{
"label": "fax",
"number": "+33 (0)6 123.123.123"
}
],
"website": "http://example.com",
"private_notes": "Lorem",
"address1": "Nilsa Crossroad",
"address2": null,
"city": "New Margarettafurt",
"state": "Nevada",
"zip": "44147",
"country_code": "US",
"firstname": "FirstName1",
"lastname": "LastName1",
"gender": "male",
"created_at": "2021-01-22T08:40:20Z",
"updated_at": "2021-01-22T08:40:20Z",
"canceled_at": null,
"forget_me_at": null,
"processing_restricted_at": null
}
],
"meta": {}
}
Update a contact
Returns an updated contact identified by ID.
PUT /contact/:contact_id
- OAuth Scopes:
- rentals_write
request.json
{
"contacts": [
{
"city": "New Margarettafurt",
"state": "Nevada",
"zip": "44147",
"private_notes": "Lorem"
}
]
}
response.json
{
"links": {
"contacts.account": "https://www.bookingsync.com/api/v3/accounts/{contacts.account}"
},
"contacts": [
{
"links": {
"account": 1
},
"id": 1,
"fullname": "FirstName1 LastName1",
"spoken_languages": [
"en",
"fr"
],
"email": "cornelia@nienow.co.uk",
"phones": [
{
"label": "phone",
"number": "+33 (0)6 123.123.123"
},
{
"label": "mobile",
"number": "+33 (0)6 123.123.123"
},
{
"label": "fax",
"number": "+33 (0)6 123.123.123"
}
],
"website": "http://example.com",
"private_notes": "Lorem",
"address1": "Nilsa Crossroad",
"address2": null,
"city": "New Margarettafurt",
"state": "Nevada",
"zip": "44147",
"country_code": "US",
"firstname": "FirstName1",
"lastname": "LastName1",
"gender": "male",
"created_at": "2021-01-22T08:40:20Z",
"updated_at": "2021-01-22T08:40:20Z",
"canceled_at": null,
"forget_me_at": null,
"processing_restricted_at": null
}
],
"meta": {}
}
Destroy a contact
Required OAuth scope: :rentals_write
Returns empty response with 204 No Content status code on success.
DELETE /contacts/:contact_id