Computes the free start times for the given services within a date range of up to 7 days, optionally narrowed to one Team Member, by the same calculation as online booking. A slot is one Team Member at one start time: when several Team Members are free at the same time, each gets its own slot. starts_at carries the Location's UTC offset; pass it with team_member_id to createAppointment. Slots are sorted by starts_at, then team_member_id. For the dates with free time over a longer range (a booking calendar) use getAvailabilityDates.
- Only services with online booking enabled in the Location are searched. Without
team_member_idthe search covers Team Members open for online booking. A working Team Member currently hidden from online booking yields200with an empty result, including when passed explicitly. An explicit id does not bypass the Team Member's current visibility setting. - The Location's technical Team Member setting is separate from the Team Member's online visibility. If a technical Team Member is configured, an incompatible explicit
team_member_idreturns200with an empty result. Without the parameter, the existing technical Team Member setting applies. An explicit matching id or an omitted parameter can return availability only if that technical Team Member is currently visible for online booking and the acting user's rights permit it. - Days before today in the Location's time zone have no free time.
- Package services are planned: a package in
service_ids[]fails with422 validation_failedanderrors[0].code = unsupported_service_type. - Visibility follows the acting user's rights in the Digital schedule: a Team Member outside the user's allowed Team Members (own appointments or own position) yields an empty result, and without
team_member_idonly allowed Team Members are searched.
This is a computed read-only aggregate: slots have no ids and can disappear at any moment when another request schedules an overlapping appointment (a lost race on create returns 409 slot_taken).
Services the appointment will consist of, 1 to 10 ids. An unknown, deleted or foreign id, a service with online booking disabled in the Location, or more than 10 ids fails with 422 validation_failed, errors[0].pointer = service_ids[], source = query and code = invalid_value; a package service fails the same way with code = unsupported_service_type.
Restrict the search to one Team Member. An id that is not a working Team Member of the Location (unknown, deleted or dismissed) fails with 422 validation_failed, errors[0].pointer = team_member_id, source = query and code = invalid_value. A working Team Member currently hidden from online booking returns 200 with empty slots or dates, including when explicitly requested; it does not fail with 422. An explicit id does not bypass the current online visibility setting. The Location's technical Team Member setting is separate from that visibility: an incompatible explicit id returns 200 with an empty result. When omitted, the existing technical Team Member setting applies. A matching explicit id and an omitted parameter both require that technical Team Member to be currently visible for online booking and permitted by the acting user's Team Member permissions.
Last date of the range (inclusive), YYYY-MM-DD. Must not be earlier than date_from; the range covers at most 7 calendar days inclusive, i.e. date_to is at most 6 days after date_from; otherwise 422 validation_failed with errors[0].pointer = date_to, source = query and code = invalid_value.
- Mock serverhttps://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}/availability
- Preview resource API contract - endpoint surface is not live yethttps://api.alteg.io/api/v3/locations/{location_id}/availability
curl -i -X GET \
'https://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}/availability?service_ids%5B%5D=0&team_member_id=0&date_from=2019-08-24&date_to=2019-08-24' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Free slots of the requested services within the range.
Requests left in the most constrained policy window that applies to this request.
On 429, seconds until the most constrained policy frees up; it equals Retry-After there. On a successful response it reports the length of that policy's window rather than the time left in the current one, so treat it as the window size, not as a countdown — the counter to pace against is RateLimit-Remaining.
Most constrained policy applied to the request, as <limit>;w=<window in seconds>.
{ "object": "availability", "slots": [ { … }, { … }, { … } ] }