---
title: "Get consents for CSV export"
method: GET
path: "/api/consents/export"
tags: ["consents"]
---

# Get consents for CSV export

`GET /api/consents/export`

Returns consents with given statuses (multi-value ?status=) with full patient/operator join.

## Query parameters

- `status` string[], required

## Response `200`

Successful Response

- ConsentResponse[]
  - `id` string, uuid, required
  - `patient_id` string, uuid, nullable
  - `operator_id` string, uuid, nullable
  - `consent_type` 'psychological' | 'nutritional' — Informed consent type constants.
  - `status` 'draft' | 'pending_otp' | 'pending_approval' | 'revision_required' | 'verified' | 'expired' | 'revoked' — Informed consent status constants.
  - `form_data` object, nullable
  - `created_at` string, date-time, nullable
  - `verified_at` string, date-time, nullable
  - `expires_at` string, date-time, nullable
  - `rejected_at` string, date-time, nullable
  - `rejection_reason` string, nullable
  - `otp_code` string, nullable
  - `otp_expires_at` string, date-time, nullable
  - `otp_attempts` integer, nullable
  - `otp_locked_until` string, date-time, nullable
  - `otp_verified_at` string, date-time, nullable
  - `email_sent_at` string, date-time, nullable
  - `guardian_name` string, nullable
  - `guardian_relationship` string, nullable
  - `consent_pdf_signed_at` string, date-time, nullable
  - `revision_type` 'documents' | 'signed_pdf' — Revision type requested after minor consent rejection.
  - `patient` ConsentPatientResponse — Minimal patient payload for legacy consent endpoints.
    - `id` string, required
    - `user_id` string, nullable
    - `user` ConsentUserResponse — Minimal user payload for legacy consent endpoints.
      - `id` string, required
      - `first_name` string, nullable
      - `last_name` string, nullable
      - `email` string, nullable
      - `date_of_birth` string, nullable
      - `phone` string, nullable
  - `operator` ConsentOperatorResponse — Minimal operator payload for legacy consent endpoints.
    - `id` string, required
    - `user_id` string, nullable
    - `profession` string, nullable
    - `user` ConsentUserResponse — Minimal user payload for legacy consent endpoints.
      - `id` string, required
      - `first_name` string, nullable
      - `last_name` string, nullable
      - `email` string, nullable
      - `date_of_birth` string, nullable
      - `phone` string, nullable

## Other responses

- `422` — Validation Error

---

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