Inquiries
Overview
This resource represents Inquiries that can be later turned into Bookings. They usually originate from the widgets where you can select dates and either create a Booking right away or send the Inquiry with some question.
Parameters
- OAuth Scopes:
- inquiries_read
- inquiries_write
- inquiries_write_owned
Name | Type | Read/Write | Description |
---|---|---|---|
rental | Integer | Read | Rental's ID related to the Inquiry |
source | Integer | Read | Source's ID related to the Inquiry |
booking | Integer | Read | Booking's ID related to the Inquiry |
conversation | Integer | Read | Inbox Conversation's ID related to the Inquiry |
account | Integer | Read | Account's ID related to the Inquiry |
id | Integer | Read | Inquiry's ID. |
adults | Integer | Read | Inquiry's booking number of adults. |
children | Integer | Read | Inquiry's booking number of children. |
country_code | String | Read | Inquiry's client country code, list of codes is available at wikipedia. |
String | Read | Inquiry's client email. | |
firstname | String | Read | Inquiry's client firstname. |
lastname | String | Read | Inquiry's client lastname. |
message | Text | Read | Inquiry's message. |
phone | String | Read | Inquiry's client phone number. |
locked | String | Read | Inquiry's locked status. |
created_at | Time | Read | Inquiry's create time. |
updated_at | Time | Read | Inquiry's update time. |
start_at | Time | Read | Inquiry's booking start time. |
end_at | Time | Read | Inquiry's booking end time. |
Name | Type | Read/Write | Description | Constraints |
---|---|---|---|---|
rental | Integer | Read | Rental's ID related to the Inquiry | |
source | Integer | Read | Source's ID related to the Inquiry | |
booking | Integer | Read | Booking's ID related to the Inquiry | |
conversation | Integer | Read | Inbox Conversation's ID related to the Inquiry | |
account | Integer | Read | Account's ID related to the Inquiry | |
id | Integer | Read | Inquiry's ID. | |
source_id | Integer | Write | Source ID related to the Inquiry. | |
rental_id | Integer | Write (update-only) | Rental ID related to the Inquiry | |
adults | Integer | Read/Write | Inquiry's booking number of adults. | Conditionally required (depending on the config on the Account-level, it's highly recommended to treat it as required), must be greater than or equal to: 1 |
children | Integer | Read/Write | Inquiry's booking number of children. | Conditionally required (depending on the config on the Account-level, it's highly recommended to treat it as required), must be greater than or equal to: 0 |
country_code | String | Read/Write | Inquiry's client country code, list of codes is available at wikipedia. | Required if phone present, must be one on country codes enum |
String | Read/Write | Inquiry's client email. | Required, must be of email format | |
firstname | String | Read/Write | Inquiry's client firstname. | Required, Maximum length: 50 |
lastname | String | Read/Write | Inquiry's client lastname. | Required, Maximum length: 99 |
message | String | Read/Write | Inquiry's message. | Maximum length: 500 |
phone | String | Read/Write | Inquiry's client phone number. | Must be of a phone number format (regexp: \A\+?[ -.0-9+EXText()]*\Z ) |
locked | String | Read/Write (create-only) | Inquiry's locked status. | |
accept_privacy_policy | Boolean | Write (create-only) | Confirm that the Privacy Policy has been accepted (check Accounts for more details) | |
created_at | Time | Read | Inquiry's create time. | |
updated_at | Time | Read | Inquiry's update time. | |
start_at | Time | Read/Write | Inquiry's booking start time. | Conditionally required (depending on the config on the Account-level, it's highly recommended to treat it as required), must be in the future, must be before end_at |
end_at | Time | Read/Write | Inquiry's booking end time. | Conditionally required (depending on the config on the Account-level, it's highly recommended to treat it as required), must be in the future, must be after start_at |
Name | Type | Read/Write | Description | Constraints |
---|---|---|---|---|
rental | Integer | Read | Rental's ID related to the Inquiry | |
source | Integer | Read | Source's ID related to the Inquiry | |
booking | Integer | Read | Booking's ID related to the Inquiry | |
conversation | Integer | Read | Inbox Conversation's ID related to the Inquiry | |
account | Integer | Read | Account's ID related to the Inquiry | |
id | Integer | Read | Inquiry's ID. | |
source_id | Integer | Write | Source ID related to the Inquiry. | |
rental_id | Integer | Write (update-only) | Rental ID related to the Inquiry | |
adults | Integer | Read/Write | Inquiry's booking number of adults. | Conditionally required (depending on the config on the Account-level, it's highly recommended to treat it as required), must be greater than or equal to: 1 |
children | Integer | Read/Write | Inquiry's booking number of children. | Conditionally required (depending on the config on the Account-level, it's highly recommended to treat it as required), must be greater than or equal to: 0 |
country_code | String | Read/Write | Inquiry's client country code, list of codes is available at wikipedia. | Required if phone present, must be one on country codes enum |
String | Read/Write | Inquiry's client email. | Required, must be of email format | |
firstname | String | Read/Write | Inquiry's client firstname. | Required, Maximum length: 50 |
lastname | String | Read/Write | Inquiry's client lastname. | Required, Maximum length: 99 |
message | String | Read/Write | Inquiry's message. | Maximum length: 500 |
phone | String | Read/Write | Inquiry's client phone number. | Must be of a phone number format |
locked | String | Read/Write | Inquiry's locked status. | |
accept_privacy_policy | Boolean | Write (create-only) | Confirm that the Privacy Policy has been accepted (check Accounts for more details) | |
created_at | Time | Read | Inquiry's create time. | |
updated_at | Time | Read | Inquiry's update time. | |
start_at | Time | Read/Write | Inquiry's booking start time. | Conditionally required (depending on the config on the Account-level, it's highly recommended to treat it as required), must be in the future, must be before end_at |
end_at | Time | Read/Write | Inquiry's booking end time. | Conditionally required (depending on the config on the Account-level, it's highly recommended to treat it as required), must be in the future, must be after start_at |
List inquiries
Based on the OAuth token scopes bookings listing will be limited to a certain range.
Scope | Read Permissions |
---|---|
:inquiries_write_owned | Display only inquiries created by application making the request |
:inquiries_read | Display all inquiries |
:inquiries_write | Display all inquiries |
Returns a list of all inquiries for current account(s).
GET /inquiries
- OAuth Scopes:
- inquiries_read / inquiries_write / inquiries_write_owned
response.json
{
"links": {
"inquiries.rental": "https://www.bookingsync.com/api/v3/rentals/{inquiries.rental}",
"inquiries.source": "https://www.bookingsync.com/api/v3/sources/{inquiries.source}",
"inquiries.booking": "https://www.bookingsync.com/api/v3/bookings/{inquiries.booking}"
},
"inquiries": [
{
"links": {
"booking": null,
"rental": 2,
"source": null
},
"id": 1,
"firstname": "John",
"lastname": "Smith",
"email": "john@example.com",
"country_code": "GB",
"phone": 7273647616,
"start_at": "2025-04-21T17:52:11Z",
"end_at": "2025-04-28T17:52:11Z",
"adults": 4,
"children": 2,
"message": "Important message",
"locked": null,
"created_at": "2025-03-31T17:52:11.267Z",
"updated_at": "2025-04-07T17:52:11.267Z"
}
]
}
Get a single inquiry
Returns a single inquiry identified by ID.
GET /inquiries/:inquiry_id
- OAuth Scopes:
- inquiries_read / inquiries_write / inquiries_write_owned
response.json
{
"links": {
"inquiries.rental": "https://www.bookingsync.com/api/v3/rentals/{inquiries.rental}",
"inquiries.source": "https://www.bookingsync.com/api/v3/sources/{inquiries.source}",
"inquiries.booking": "https://www.bookingsync.com/api/v3/bookings/{inquiries.booking}"
},
"inquiries": [
{
"links": {
"booking": null,
"rental": 2,
"source": null
},
"id": 1,
"firstname": "John",
"lastname": "Smith",
"email": "john@example.com",
"country_code": "GB",
"phone": 7273647616,
"start_at": "2025-04-21T17:52:11Z",
"end_at": "2025-04-28T17:52:11Z",
"adults": 4,
"children": 2,
"message": "Important message",
"locked": null,
"created_at": "2025-03-31T17:52:11.268Z",
"updated_at": "2025-04-07T17:52:11.268Z"
}
]
}
Create a new inquiry
Creates an inquiry for given rental.
POST /rentals/:rental_id/inquiries
- OAuth Scopes:
- inquiries_write / inquiries_write_owned
request.json
{
"inquiries": [
{
"firstname": "John",
"lastname": "Smith",
"email": "john@example.com",
"start_at": "2025-04-21T17:52:11Z",
"end_at": "2025-04-28T17:52:11Z",
"country_code": "GB",
"phone": 7273647616,
"adults": 4,
"children": 2,
"message": "Important message"
}
]
}
response.json
{
"links": {
"inquiries.rental": "https://www.bookingsync.com/api/v3/rentals/{inquiries.rental}",
"inquiries.source": "https://www.bookingsync.com/api/v3/sources/{inquiries.source}",
"inquiries.booking": "https://www.bookingsync.com/api/v3/bookings/{inquiries.booking}"
},
"inquiries": [
{
"links": {
"booking": null,
"rental": 2,
"source": null
},
"id": 1,
"firstname": "John",
"lastname": "Smith",
"email": "john@example.com",
"country_code": "GB",
"phone": 7273647616,
"start_at": "2025-04-21T17:52:11Z",
"end_at": "2025-04-28T17:52:11Z",
"adults": 4,
"children": 2,
"message": "Important message",
"locked": null,
"created_at": "2025-03-31T17:52:11.270Z",
"updated_at": "2025-04-07T17:52:11.270Z"
}
]
}
Update a inquiry
Returns an updated inquiry identified by ID.
PUT /inquiries/:id
- OAuth Scopes:
- inquiries_write / inquiries_write_owned
request.json
{
"inquiries": [
{
"firstname": "John",
"lastname": "Smith",
"email": "john@example.com",
"start_at": "2025-04-21T17:52:11Z",
"end_at": "2025-04-28T17:52:11Z",
"country_code": "GB",
"phone": 7273647616,
"adults": 4,
"children": 2,
"message": "Important message",
"rental_id": 3
}
]
}
response.json
{
"links": {
"inquiries.rental": "https://www.bookingsync.com/api/v3/rentals/{inquiries.rental}",
"inquiries.source": "https://www.bookingsync.com/api/v3/sources/{inquiries.source}",
"inquiries.booking": "https://www.bookingsync.com/api/v3/bookings/{inquiries.booking}"
},
"inquiries": [
{
"links": {
"booking": null,
"rental": 2,
"source": null
},
"id": 1,
"firstname": "John",
"lastname": "Smith",
"email": "john@example.com",
"country_code": "GB",
"phone": 7273647616,
"start_at": "2025-04-21T17:52:11Z",
"end_at": "2025-04-28T17:52:11Z",
"adults": 4,
"children": 2,
"message": "Important message",
"locked": null,
"created_at": "2025-03-31T17:52:11.272Z",
"updated_at": "2025-04-07T17:52:11.272Z"
}
]
}