Inquiries

  1. Overview
  2. List inquiries
  3. Get a single inquiry
  4. Create a new inquiry
  5. Update a inquiry

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

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.
email 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
email 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)  
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
email 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)  
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

Response

{
  "links": {
    "inquiries.booking": "https://www.bookingsync.com/api/v3/bookings/{inquiries.booking}",
    "inquiries.rental": "https://www.bookingsync.com/api/v3/rentals/{inquiries.rental}",
    "inquiries.source": "https://www.bookingsync.com/api/v3/sources/{inquiries.source}"
  },
  "inquiries": [
    {
      "id": 1,
      "adults": 4,
      "children": 2,
      "country_code": "GB",
      "email": "john@example.com",
      "firstname": "John",
      "lastname": "Smith",
      "locked": null,
      "message": "Important message",
      "phone": 7273647616,
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "start_at": "2023-12-18T08:26:24Z",
      "end_at": "2023-12-25T08:26:24Z",
      "links": {
        "booking": null,
        "rental": 2,
        "source": null
      }
    }
  ]
}

Get a single inquiry

Returns a single inquiry identified by ID.

GET /inquiries/:inquiry_id

Response

{
  "links": {
    "inquiries.booking": "https://www.bookingsync.com/api/v3/bookings/{inquiries.booking}",
    "inquiries.rental": "https://www.bookingsync.com/api/v3/rentals/{inquiries.rental}",
    "inquiries.source": "https://www.bookingsync.com/api/v3/sources/{inquiries.source}"
  },
  "inquiries": [
    {
      "id": 1,
      "adults": 4,
      "children": 2,
      "country_code": "GB",
      "email": "john@example.com",
      "firstname": "John",
      "lastname": "Smith",
      "locked": null,
      "message": "Important message",
      "phone": 7273647616,
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "start_at": "2023-12-18T08:26:24Z",
      "end_at": "2023-12-25T08:26:24Z",
      "links": {
        "booking": null,
        "rental": 2,
        "source": null
      }
    }
  ]
}

Create a new inquiry

Creates an inquiry for given rental.

POST /rentals/:rental_id/inquiries

Example JSON request

{
  "inquiries": [
    {
      "adults": 4,
      "children": 2,
      "country_code": "GB",
      "email": "john@example.com",
      "firstname": "John",
      "lastname": "Smith",
      "message": "Important message",
      "phone": 7273647616,
      "start_at": "2023-12-18T08:26:24Z",
      "end_at": "2023-12-25T08:26:24Z"
    }
  ]
}

Response

{
  "links": {
    "inquiries.booking": "https://www.bookingsync.com/api/v3/bookings/{inquiries.booking}",
    "inquiries.rental": "https://www.bookingsync.com/api/v3/rentals/{inquiries.rental}",
    "inquiries.source": "https://www.bookingsync.com/api/v3/sources/{inquiries.source}"
  },
  "inquiries": [
    {
      "id": 1,
      "adults": 4,
      "children": 2,
      "country_code": "GB",
      "email": "john@example.com",
      "firstname": "John",
      "lastname": "Smith",
      "locked": null,
      "message": "Important message",
      "phone": 7273647616,
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "start_at": "2023-12-18T08:26:24Z",
      "end_at": "2023-12-25T08:26:24Z",
      "links": {
        "booking": null,
        "rental": 2,
        "source": null
      }
    }
  ]
}

Update a inquiry

Returns an updated inquiry identified by ID.

PUT /inquiries/:id

Example JSON request

{
  "inquiries": [
    {
      "adults": 4,
      "children": 2,
      "country_code": "GB",
      "email": "john@example.com",
      "firstname": "John",
      "lastname": "Smith",
      "message": "Important message",
      "phone": 7273647616,
      "rental_id": 3,
      "start_at": "2023-12-18T08:26:24Z",
      "end_at": "2023-12-25T08:26:24Z"
    }
  ]
}

Response

{
  "links": {
    "inquiries.booking": "https://www.bookingsync.com/api/v3/bookings/{inquiries.booking}",
    "inquiries.rental": "https://www.bookingsync.com/api/v3/rentals/{inquiries.rental}",
    "inquiries.source": "https://www.bookingsync.com/api/v3/sources/{inquiries.source}"
  },
  "inquiries": [
    {
      "id": 1,
      "adults": 4,
      "children": 2,
      "country_code": "GB",
      "email": "john@example.com",
      "firstname": "John",
      "lastname": "Smith",
      "locked": null,
      "message": "Important message",
      "phone": 7273647616,
      "created_at": "2023-12-11T08:26:24Z",
      "updated_at": "2023-12-11T08:26:24Z",
      "start_at": "2023-12-18T08:26:24Z",
      "end_at": "2023-12-25T08:26:24Z",
      "links": {
        "booking": null,
        "rental": 2,
        "source": null
      }
    }
  ]
}