Inquiries

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

Parameters

Name Type Read/Write Description
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
id Integer Read Inquiry’s id.
source_id Integer Write Source id related to the Inquiry.
rental_id Integer Write Only update Id of rental related to the Inquiry
adults Integer Read/Write Inquiry’s booking number of adults.
children Integer Read/Write Inquiry’s booking number of children.
country_code String Read/Write Inquiry’s client country code, list of codes is available at wikipedia.
email String Read/Write Required. Inquiry’s client email.
firstname String Read/Write Required. Inquiry’s client firstname. (50 characters max)
lastname String Read/Write Required. Inquiry’s client lastname. (99 characters max)
message Text Read/Write Inquiry’s message. (500 characters max)
phone String Read/Write Inquiry’s client phone number.
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.
end_at Time Read/Write Inquiry’s booking end time.
Name Type Read/Write Description
id Integer Read Inquiry’s id.
source_id Integer Write Source id related to the Inquiry.
rental_id Integer Write Only update Id of rental related to the Inquiry
adults Integer Read/Write Inquiry’s booking number of adults.
children Integer Read/Write Inquiry’s booking number of children.
country_code String Read/Write Inquiry’s client country code, list of codes is available at wikipedia.
email String Read/Write Required. Inquiry’s client email.
firstname String Read/Write Required. Inquiry’s client firstname. (50 characters max)
lastname String Read/Write Required. Inquiry’s client lastname. (99 characters max)
message Text Read/Write Inquiry’s message. (500 characters max)
phone String Read/Write Inquiry’s client phone number.
locked String Read/Write Inquiry’s locked status.
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.
end_at Time Read/Write Inquiry’s booking end time.

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": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "start_at": "2017-11-16T09:08:17Z",
      "end_at": "2017-11-23T09:08:17Z",
      "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": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "start_at": "2017-11-16T09:08:17Z",
      "end_at": "2017-11-23T09:08:17Z",
      "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": "2017-11-16T09:08:17Z",
      "end_at": "2017-11-23T09:08:17Z"
    }
  ]
}

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": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "start_at": "2017-11-16T09:08:17Z",
      "end_at": "2017-11-23T09:08:17Z",
      "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": "2017-11-16T09:08:17Z",
      "end_at": "2017-11-23T09:08:17Z"
    }
  ]
}

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": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "start_at": "2017-11-16T09:08:17Z",
      "end_at": "2017-11-23T09:08:17Z",
      "links": {
        "booking": null,
        "rental": 2,
        "source": null
      }
    }
  ]
}