---
title: "Queue an export of the appointments list"
method: GET
path: "/shop/appointments/queue"
tags: ["Appointments"]
---

# Queue an export of the appointments list

`GET /shop/appointments/queue`

Queues a background job that exports the same `Appointment` list
returned by `GET /shop/appointments` as a CSV download. Use this
when the result set is too large to retrieve synchronously, or when
you want the export delivered to the calling user as a downloadable
file.

The response returns a `QueuedJob` resource you can poll via
`GET /shop/queued-jobs/{queuedJobId}`. Once the job has finished,
its `download_url` becomes available and the CSV can be streamed.

All filters supported by the list endpoint (date range, order
submitted range, practitioner, room, zone) are accepted here and
are applied to the export.

## Query parameters

- `site_id` string, required
- `date_from` string, date
- `date_to` string, date
- `order_submitted_at_from` string, date
- `order_submitted_at_to` string, date
- `practitioner_id` string[]
- `room_id` string[]
- `zone_id` string[]

## Response `200`

The job was successfully queued

- object
  - `data` QueuedJob, required
    - `id` string, uuid, required — The ID of the queued job.
    - `status` 'pending' | 'complete' | 'failed', required — The status of the queued job.
    - `output` object, required — The output of the queued job.
    - `created_at` string, date-time, required — The date and time the queued job was created.
    - `updated_at` string, date-time, required — The date and time the queued job was last updated.

## Other responses

- `401` — The user is unauthenticated
- `403` — The authenticated user does not have permission.

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
