---
title: "Generate Slots"
method: POST
path: "/api/v1/seller/sites/{site_id}/slots"
---

# Generate Slots

`POST /api/v1/seller/sites/{site_id}/slots`

## Request

- Base URL: `https://trovastorage.it` (the document declares no server; this is the origin it was published from)
- URL: `https://trovastorage.it/api/v1/seller/sites/{site_id}/slots`
- Auth: one of:
  - API key in header `X-Access-Token`
  - HTTP bearer

Materialise a weekly pattern. Running it twice creates nothing the second
time, so a seller can adjust and re-run without moving anyone's appointment.

## Path parameters

- `site_id` string, uuid, required

## Request body

- SlotPatternRequest: A weekly pattern, materialised into rows. Not stored as a template. Re-posting the same pattern is a no-op, so a seller can adjust and re-run it without moving an appointment somebody already took.
  - `from_date` string, date, required
  - `to_date` string, date, required
  - `duration_min` integer
  - `rules` WeeklyRuleRequest[], required
    - `weekday` integer, required
    - `start_time` string, time, required
    - `end_time` string, time, required

## Response `201`

Successful Response

- SlotGenerationResult
  - `created` integer, required
  - `already_there` integer, required
  - `skipped_nonexistent` integer, required
  - `from_date` string, date, required
  - `to_date` string, date, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/trovastorage/apis/stock-your-inventory.md) · [All operations](https://skmtc.dev/trovastorage/apis/stock-your-inventory/llms.txt) · [OpenAPI document](https://skmtc.dev/trovastorage/apis/stock-your-inventory/revisions/c75f591a585c?raw)
