Skip to content

List appointments

Request

Returns the appointments of the Location as a cursor-paginated list, most recently created first. Client fields inside include[]=client follow the rules on client in Appointment.

Canceled appointments are left out unless include_canceled=true. There is no status query parameter in the first iteration.

To synchronize, pass order=updated_at, updated_at_from and include_canceled=true. Start each run 1 minute before the latest updated_at you have received: an appointment saved while you read can appear with an earlier updated_at than appointments already returned. Appointments in the overlap come again; store them by id.

A subject limited in the calendar to its own appointments, to the Team Members of its position, or to recent days sees only those appointments, on every page.

Cursor-paginated list. Default ordering: id descending; with order=updated_at, updated_at ascending, id tie-breaker. Cursors use the cursor query parameter, expire after one hour, and are bound to the credential, tenant, list, and filters. Expired, malformed, foreign, or re-filtered cursors fail with 422 validation_failed using field codes expired_cursor, invalid_cursor, foreign_cursor, or filter_changed.

Security
OAuth2(Required scopes: appointments:read) or ApiKey
Path
location_idintegerrequired

Identifier of the Location. Verified against the credential on every call — a Location the credential cannot access responds with 404.

Query
starts_at_fromstring, (date-time)

Only appointments starting at or after this RFC 3339 datetime.

starts_at_tostring, (date-time)

Only appointments starting before this RFC 3339 datetime.

team_member_idinteger

Only appointments of this Team Member.

client_idinteger

Only appointments of this client.

include_canceledboolean

true adds canceled appointments, with is_canceled: true.

Default:false
orderstring

Ordering of the list. Omitted — id descending, most recently created first. updated_at — updated_at ascending with an id tie-breaker, for synchronization.

Value:"updated_at"
updated_at_fromstring, (date-time)

Only appointments changed at or after this RFC 3339 datetime. Requires order=updated_at; without it the request fails with 422.

limitinteger, [ 1 .. 100 ]

Page size for cursor pagination. Default is 25; maximum is 100. Values outside 1..100 or non-integers fail with 422 validation_failed; the value is never clamped.

Default:25
cursorstring

Opaque cursor from next_cursor. An empty value is the same as omitting the parameter and returns the first page. Cursors expire one hour after the response that issued them (every page issues a fresh cursor) and are bound to credential, tenant, list, filters, and ordering; for OAuth the credential is the user's authorization, so a cursor survives a token refresh; a row whose ordering column changed between pages may be skipped or returned twice, and a row created while you page may be missing from this pass if it sorts before the current position (start a new pass to pick it up); expired, malformed, foreign, or re-filtered cursors fail with 422 validation_failed using field codes expired_cursor, invalid_cursor (also a cursor whose number of key values does not match the list's ordering), foreign_cursor (another credential or tenant), or filter_changed (another list, ordering, or filters).

include[]Array of strings

Relations to include, one level deep; each adds a new field next to its id. Including client never bypasses PII rules — see client in Appointment. Unknown values fail with 422.

Items Enum:"client""team_member"
curl -i -X GET \
  'https://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}/appointments?starts_at_from=2019-08-24T14%3A15%3A22Z&starts_at_to=2019-08-24T14%3A15%3A22Z&team_member_id=0&client_id=0&include_canceled=false&order=updated_at&updated_at_from=2019-08-24T14%3A15%3A22Z&limit=25&cursor=string&include%5B%5D=client' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

A page of appointments.

Headers
RateLimit-Remaininginteger, (int32), >= 0

Requests left in the most constrained policy window that applies to this request.

RateLimit-Resetinteger, (int32), >= 0

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.

RateLimit-Policystring

Most constrained policy applied to the request, as <limit>;w=<window in seconds>.

Example:"10;w=60"
X-Request-Idstring

Request identifier for support and log correlation.

Bodyapplication/json
dataArray of objects(Appointment)required
has_morebooleanrequired

Whether more items exist beyond this page.

next_cursorstring or nullrequired

Opaque cursor for the next page; null on the last page.

objectstringrequired
Value:"list"
Response
{ "object": "list", "data": [ { … } ], "has_more": true, "next_cursor": "cur_appt_01J3K6Y8Q4W5E9R2T7A1B0C3D4" }