> ## Documentation Index
> Fetch the complete documentation index at: https://docs.koulis.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /widget/{token}/slots — Bookable Time Slots

> GET /api/v1/widget/{publicToken}/slots — returns bookable times for a date and party size. Each slot includes availability, capacity, and service name.

The slots endpoint returns all time slots for a given date, including which slots still have capacity for the requested party size. Use this after the guest picks a date from the availability calendar to show them the exact times they can book.

## Endpoint

```
GET https://api.lakreme.fr/api/v1/widget/{publicToken}/slots
```

No authentication is required.

## Path parameters

<ParamField path="publicToken" type="string" required>
  The public token for the restaurant.
</ParamField>

## Query parameters

<ParamField query="date" type="string" required placeholder="YYYY-MM-DD">
  The date to fetch slots for, in `YYYY-MM-DD` format. For example, `2025-05-15`.
</ParamField>

<ParamField query="guests" type="number" required>
  The number of guests in the party. Slots where `remaining_capacity` is less than this value will be returned with `available: false`.
</ParamField>

## Response fields

<ResponseField name="date" type="string" required>
  The date that was queried, echoed back in `YYYY-MM-DD` format.
</ResponseField>

<ResponseField name="guests" type="number" required>
  The party size that was queried, echoed back.
</ResponseField>

<ResponseField name="slots" type="object[]" required>
  Array of time slot objects for the requested date. Includes both available and unavailable slots so you can show a complete schedule with greyed-out times.

  <Expandable title="slot properties">
    <ResponseField name="time" type="string" required>
      The start time of the slot in `HH:MM` format (24-hour clock). For example, `"12:30"`.
    </ResponseField>

    <ResponseField name="service_name" type="string" required>
      The name of the service period this slot belongs to — for example, `"Lunch"` or `"Dinner"`. Useful for grouping slots visually if the restaurant runs multiple services per day.
    </ResponseField>

    <ResponseField name="duration_min" type="number" required>
      The duration of the reservation in minutes. For example, `90` means the table is held for 90 minutes.
    </ResponseField>

    <ResponseField name="available" type="boolean" required>
      `true` if this slot has enough remaining capacity for the requested party size. `false` if the slot is fully booked or does not have enough seats.
    </ResponseField>

    <ResponseField name="remaining_capacity" type="number" required>
      The number of additional guests this slot can still accommodate. A value of `0` means the slot is fully booked.
    </ResponseField>
  </Expandable>
</ResponseField>

<Tip>
  Show all slots in the response — even those with `available: false` — so guests can see the full schedule. Displaying unavailable slots as greyed-out gives a clearer picture of the restaurant's rhythm than hiding them entirely.
</Tip>

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.lakreme.fr/api/v1/widget/tok_abc123/slots?date=2025-05-15&guests=2"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "date": "2025-05-15",
    "guests": 2,
    "slots": [
      {
        "time": "12:00",
        "service_name": "Lunch",
        "duration_min": 90,
        "available": true,
        "remaining_capacity": 10
      },
      {
        "time": "12:30",
        "service_name": "Lunch",
        "duration_min": 90,
        "available": true,
        "remaining_capacity": 6
      },
      {
        "time": "13:00",
        "service_name": "Lunch",
        "duration_min": 90,
        "available": false,
        "remaining_capacity": 0
      },
      {
        "time": "19:30",
        "service_name": "Dinner",
        "duration_min": 120,
        "available": true,
        "remaining_capacity": 14
      },
      {
        "time": "20:00",
        "service_name": "Dinner",
        "duration_min": 120,
        "available": true,
        "remaining_capacity": 8
      }
    ]
  }
  ```
</ResponseExample>
