---
title: "Get time slots for a date"
method: GET
path: "/api/v1/availability/slots"
tags: ["Availability"]
---

# Get time slots for a date

`GET /api/v1/availability/slots`

## Request

- Base URL: `http://localhost:3002`
- URL: `http://localhost:3002/api/v1/availability/slots`
- Auth: HTTP bearer

Returns the resolved bookable slots for a given date. A date is bookable when at least one slot is not taken and offers ≥1 duration.

## Query parameters

- `date` string, date, required: Date in YYYY-MM-DD format

## Response `200`

Resolved slots for the date

- object
  - `date` string, date, required
  - `available` boolean, required: True when some slot is not taken and offers ≥1 duration
  - `slots` object[], required
    - `slotKey` string, required
    - `label` string, required
    - `anchorTime` string, nullable, required: HH:mm anchor for the slot, or null
    - `anchorDirection` 'START' | 'END', required: Whether anchorTime marks the slot's start or end
    - `offeredDurations` object[], required
      - `hours` integer, required
      - `startTime` string, required
      - `endTime` string, required
      - `priceCents` integer, required
    - `defaultDurationHours` integer, nullable, required: Default duration to preselect, or null
    - `taken` boolean, required: True when the slot's window is occupied by a reservation

## Other responses

- `400`: Request body or query parameters failed validation.
- `401`: Authentication required, or the bearer token is missing or invalid.

---

[API](https://skmtc.dev/chartercaptain/apis/charter-captain-api.md) · [All operations](https://skmtc.dev/chartercaptain/apis/charter-captain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chartercaptain/apis/charter-captain-api/revisions/1ffea1113adb?raw)
