Skip to main content

Available Appointment Times

Returns a list of available appointment times for the group specified by group_id. The from_date and to_date parameters specify the dates that availability will be returned for. Note that this range can be a maximum of 7 days. If you only provide a from_date parameter, it will return availability for that date only.

GET
/api/v2/appointments/group/:group_id/available-times

Request

Example request payloadGET
$ curl -X GET \
    -H "Authorization: Bearer YOUR_API_KEY" \
    "https://api.funnelleasing.com/api/v2/appointments/group/123/available-times"

Response

Example responseJSON200 · application/json
{
"available_times": [
"2019-06-19T08:00:00", "2019-06-19T08:15:00", "2019-06-19T08:30:00", "2019-06-19T08:45:00",
"2019-06-19T17:45:00", "2019-06-19T18:00:00", "2019-06-19T18:15:00", "2019-06-19T18:30:00",
"2019-06-19T18:45:00", "2019-06-19T19:00:00", "2019-06-19T19:15:00", "2019-06-19T19:30:00"
]
}

Tour Type Not Enabled (400)

If the provided tour type is not enabled, a 400 error response will be returned.

Error responseJSON400 · application/json
{
"error_type": "NotAvailable",
"errors": {
"tour_type": ["Tours are disabled."]
}
}

Invalid Tour Type (400)

If the provided tour type is invalid, a 400 error response will be returned.

Error responseJSON400 · application/json
{
"error_type": "ValidationError",
"errors": {
"tour_type": ["Select a valid choice. onlineTour is not one of the available choices."]
}
}

Date Range Exceeds 7 Days (400)

If the provided end date is too far in the future, a 400 error response will be returned.

Error responseJSON400 · application/json
{
"error_type": "ValidationError",
"errors": {
"to_date": ["Date range can not exceed 7 days."]
}
}

Invalid Date Range (400)

If the provided to_date is before the from_date, a 400 error response will be returned.

Error responseJSON400 · application/json
{
"error_type": "ValidationError",
"errors": {
"to_date": ["to_date must be after from_date"]
}
}

Missing Required Field (400)

If a required field such as from_date is missing in the request, a 400 error response will be returned.

Error responseJSON400 · application/json
{
"error_type": "ValidationError",
"errors": {
"from_date": ["This field is required."]
}
}

Invalid Data Type (400)

If the provided data type is not valid, a 400 error response will be returned.

Error responseJSON400 · application/json
{
"error_type": "ValidationError",
"errors": {
"to_date": ["Enter a valid date."]
}
}