Skip to main content

Get times available for appointment booking

Returns a list of times that are available for a booking. Any of these times should be a valid value for start field when booking an appointment using the booking end-point. You must supply either date (a single day) or from_date (a date range, with optional to_date). They cannot be combined, and this is a distinct 7-day cap unrelated to the Customer API's 60-day limit on its equivalent endpoint.

GET
/api/partners/v1/community/:community_id/appointments/available-times/

Request

Example request
curl -X GET \
    -H "Authorization: Bearer YOUR_API_KEY" \
    "https://api.funnelleasing.com/api/partners/v1/community/1234/appointments/available-times/"

Response

200 OKapplication/json
{
  "available_times": [
    "2020-01-07T09:00:00"
  ],
  "duration": 30,
  "timezone": "America/New_York"
}

Errors

Errors specific to this endpoint

Date Required (400)

Returned when neither date nor from_date is supplied.

400 Bad Requestapplication/json
{
"error_type": "ValidationError",
"errors": { "date": ["Date required."] }
}

Date and Range Combined (400)

Returned when date is supplied together with from_date or to_date.

400 Bad Requestapplication/json
{
"error_type": "ValidationError",
"errors": { "date": ["Can't specify `date` and from_date/to_date at the same time."] }
}

to_date Before from_date (400)

Returned when to_date is earlier than from_date.

400 Bad Requestapplication/json
{
"error_type": "ValidationError",
"errors": { "to_date": ["to_date can't precede from_date."] }
}

Range Exceeds 7 Days (400)

Returned when the requested range exceeds 7 days (see to_date above for the exact rule).

400 Bad Requestapplication/json
{
"error_type": "ValidationError",
"errors": { "to_date": ["Date range can't be more than 7 days."] }
}

Community Not Set Up for Tour Scheduling (400)

Returned when the community has no employee group configured.

400 Bad Requestapplication/json
{
"error_type": "CommunitySchedulingInactive",
"message": "Community does not have tour scheduling enabled."
}

Tour Type Not Enabled (400)

Returned when the requested tour_type isn't enabled for this community's employee group. The message names the tour type you requested, for example, guided, self-guided, or video.

400 Bad Requestapplication/json
{
"error_type": "CommunitySchedulingInactive",
"message": "Community does not have guided tour scheduling enabled."
}