---
title: "List my PDF exports"
method: GET
path: "/v1/erp/payouts/payables/pdf_exports"
tags: ["Payable"]
---

# List my PDF exports

`GET /v1/erp/payouts/payables/pdf_exports`

## Request

- Base URL: `https://api.cardda.com`
- URL: `https://api.cardda.com/v1/erp/payouts/payables/pdf_exports`
- Auth: HTTP bearer

Returns the current user's payable PDF exports, most recent first (at most 10). Use
`status=in_flight` to get only the export in progress (`fetching` or `zipping`), e.g. to
resume polling after a reload. Exports belong to the user, so the `company-id` header is not
used.

## Query parameters

- `status` 'in_flight'

## Response `200`

The current user's exports (max 10, most recent first).

- PdfExport[]
  - `id` string, uuid, required
  - `status` 'fetching' | 'zipping' | 'completed' | 'failed' | 'expired', required: - `fetching`: the PDFs are being retrieved (stored documents, attachments and, when needed, the SII). - `zipping`: the ZIP files are being built. - `completed`: the ZIP files are ready in `files`. - `failed`: the export could not be completed. - `expired`: the ZIP files were purged (7 days after completion); `files` is empty. Create a new export.
  - `progress` object, required: Counters of the payables in the export. All four are always present.
    - `total` integer, required: Number of payables in the export.
    - `processed` integer, required: Payables already handled (included + failed).
    - `included` integer, required: Payables whose document made it into the ZIP. Includes manual payables without a PDF whose attachments were included instead.
    - `failed` integer, required: Payables whose document could not be obtained. They are still listed in `indice.csv` with `Estado = falló`.
  - `failures_by_reason` object[]: Failed payables grouped by reason, sorted by `count` descending. `manual_without_pdf` is a manual payable with neither a PDF nor attachments; one that has attachments is included (not failed) with its attachments. `stored_file_unreadable` is a PDF stored in Cardda that could not be read; `interrupted` marks the documents still pending when the export failed.
    - `reason` 'manual_without_pdf' | 'missing_admin_key' | 'missing_company_key' | 'missing_bar_code' | 'sii_not_found' | 'sii_timeout' | 'sii_unavailable' | 'sii_session_limit' | 'not_retrieved' | 'fetch_error' | 'stored_file_unreadable' | 'interrupted'
    - `count` integer
    - `message` string: Human-readable explanation (Spanish). Starts in lowercase because it is meant to follow the count, e.g. `137: la empresa no tiene…`.
  - `include_attachments` boolean: Whether the attachments of payables that do have a PDF were included.
  - `company_ids` string[]: Companies covered by the export.
  - `date_from` string, date, nullable: Start of the issue-date range of the exported payables (used in the ZIP filename).
  - `date_to` string, date, nullable: End of the issue-date range of the exported payables (used in the ZIP filename).
  - `created_at` string, date-time
  - `completed_at` string, date-time, nullable
  - `expires_at` string, date-time, nullable: When the ZIP files will be purged (7 days after `completed_at`). `null` until completed.
  - `files` object[], required: One ZIP per company. Empty until `status` is `completed`. Each `url` is a signed link valid for **1 hour** and is re-signed on every `GET`, so fetch the export again to get a fresh link.
    - `company_id` string, uuid
    - `company_name` string
    - `filename` string, required
    - `byte_size` integer
    - `url` string, uri, required: Signed download URL, valid for 1 hour.

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/cardda/apis/erp-api.md) - [All operations](https://skmtc.dev/cardda/apis/erp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cardda/apis/erp-api/revisions/0730ed26bc3c?raw)
