Skip to main content
GET
/
api
/
v1
/
locations
/
{id}
/
availability
curl --request GET \
  --url 'https://anivahealth.com/api/v1/locations/b7e2d1f5-3c4a-4e8b-a2f1-9d0c1e2f3a4b/availability?start_date=2026-05-01&end_date=2026-05-07' \
  --header 'x-api-key: YOUR_API_KEY'
{
  "location_id": "b7e2d1f5-3c4a-4e8b-a2f1-9d0c1e2f3a4b",
  "timezone": "Europe/Berlin",
  "slot_duration_minutes": 10,
  "slot_interval_minutes": 15,
  "availability": [
    {
      "date": "2026-05-04",
      "slots": [
        "2026-05-04T09:00:00+02:00",
        "2026-05-04T09:15:00+02:00",
        "2026-05-04T09:30:00+02:00"
      ]
    },
    {
      "date": "2026-05-05",
      "slots": ["2026-05-05T08:00:00+02:00", "2026-05-05T08:15:00+02:00"]
    }
  ]
}
Returns the bookable slot starts for a single location across the requested window. Slots are generated from the location’s open_hours, with global / per-location blocked dates skipped and already-booked Aniva test sessions subtracted, so the result reflects what your partners can actually reserve client-side. Requires the test_sessions_schedule scope. The location must also fall within your API key’s location-group access context.
Use this endpoint instead of inferring availability from the static open_hours returned by List Locations — only this endpoint accounts for live bookings and provider-side schedule changes.
Responses are returned with Cache-Control: private, max-age=30, stale-while-revalidate=60, so the browser may serve a cached payload for up to ~30 seconds. A slot booked inside that window can still appear bookable until the next refresh — surface conflicts at booking time as well.

Path parameters

id
string
required
Location identifier (UUID). Use the id from List Locations.

Query parameters

start_date
string
Inclusive start of the window in YYYY-MM-DD (interpreted in timezone). Optional. Defaults to today when neither date is supplied, or to end_date − 30 days when only end_date is supplied. Past dates are silently clamped to today.
end_date
string
Inclusive end of the window in YYYY-MM-DD (interpreted in timezone). Optional. Defaults to today + 30 days when neither date is supplied, or to start_date + 30 days when only start_date is supplied. Must be on or after start_date and within 90 days of today.
timezone
string
IANA timezone (e.g. Europe/Berlin) used to interpret start_date / end_date and to render the offset on every returned slot. Optional — defaults to the location’s own timezone. The wall-clock bookable times are unchanged; only the offset notation differs.

Response

On success, the API returns 200 OK with a single availability object.
location_id
string
required
Echoed location identifier.
timezone
string
IANA timezone used to render the response (e.g., Europe/Berlin) — echoes the timezone query param when supplied, otherwise the location’s timezone. May be null if unknown.
slot_duration_minutes
integer
Length of each appointment in minutes. null only when the location has no scheduling configuration at all.
slot_interval_minutes
integer
Gap between consecutive slot starts in minutes — inferred from the response. null when fewer than two slots were returned. The buffer between back-to-back appointments equals slot_interval_minutes − slot_duration_minutes.
availability
array
required
Per-day bookable slots. Days with zero bookable slots are omitted to keep the payload tight. Each entry has:

Error responses

StatusDescription
400Invalid date or timezone format, end_date before start_date, or end_date more than 90 days in the future.
403Forbidden — missing test_sessions_schedule scope or location outside your access context.
404Location not found or inactive.
500Internal server error.
curl --request GET \
  --url 'https://anivahealth.com/api/v1/locations/b7e2d1f5-3c4a-4e8b-a2f1-9d0c1e2f3a4b/availability?start_date=2026-05-01&end_date=2026-05-07' \
  --header 'x-api-key: YOUR_API_KEY'
{
  "location_id": "b7e2d1f5-3c4a-4e8b-a2f1-9d0c1e2f3a4b",
  "timezone": "Europe/Berlin",
  "slot_duration_minutes": 10,
  "slot_interval_minutes": 15,
  "availability": [
    {
      "date": "2026-05-04",
      "slots": [
        "2026-05-04T09:00:00+02:00",
        "2026-05-04T09:15:00+02:00",
        "2026-05-04T09:30:00+02:00"
      ]
    },
    {
      "date": "2026-05-05",
      "slots": ["2026-05-05T08:00:00+02:00", "2026-05-05T08:15:00+02:00"]
    }
  ]
}