/api/v1/portfolio/portfolios/{portfolio_id}/exportsQueue a portfolio export
Queues a portfolio export job in CSV, JSON, or PDF format.
freeSince 3.152.0
Why use this
Start an asynchronous export and receive the job descriptor needed to poll for a download artifact.
Common use case
Generate a downloadable portfolio report for a selected date range and format.
Parameters
| Name | In | Required | Default | Allowed | Description | Example |
|---|---|---|---|---|---|---|
| portfolio_id | path | required | — | — | Portfolio identifier. | 00000000-0000-4000-8000-000000000004 |
| format | body | required | — | CSV, JSON, PDF | Export format. | CSV |
| from | body | optional | — | — | Optional inclusive start date in ISO `YYYY-MM-DD` format. | 2026-01-01 |
| to | body | optional | — | — | Optional inclusive end date in ISO `YYYY-MM-DD` format. | 2026-09-07 |
| include_lots | body | optional | false | — | Whether to include lots; defaults to `false`. | false |
Response schema
| Field | Type | Nullable | Description |
|---|---|---|---|
| status | string | no | `success`. |
| request_id | string | no | Request correlation identifier. |
| timestamp | string | no | Response timestamp. |
| data | object | no | Queued job descriptor with `id`, `type` (`EXPORT`), `state`, `progress`, `errors`, `authority`, `created_at`, and `updated_at`. |
| data.authority | object | yes | Null until the job succeeds; a successful job carries `kind`, `reference`, `authoritative_version`, `reconciled_at`, and `evidence`. |
Sample response
·
- "status": "success"
- "request_id": "00000000-0000-4000-8000-000000000010"
- "timestamp": "2026-09-07T12:00:00Z"
- "data":
- "id": "00000000-0000-4000-8000-000000000006"
- "type": "EXPORT"
- "state": "QUEUED"
- "progress":
- "errors": []
- "authority": null
- "created_at": "2026-09-07T12:00:00Z"
- "updated_at": "2026-09-07T12:00:00Z"
Errors
| Status | Label | Description |
|---|---|---|
| 202 | Accepted; returns the queued `EXPORT` job descriptor in the success envelope. | |
| 400 | `INVALID_REQUEST` — malformed or missing request input, including an invalid Idempotency-Key. | |
| 401 | `UNAUTHENTICATED` — authentication is required. | |
| 403 | `FORBIDDEN` — the caller lacks `portfolio:export`. | |
| 404 | `NOT_FOUND` — the portfolio does not exist or is not visible to the caller. | |
| 409 | `CONFLICT` or `IDEMPOTENCY_KEY_REUSE_MISMATCH`. | |
| 413 | `PAYLOAD_TOO_LARGE` — the export request exceeds the allowed size. | |
| 422 | `VALIDATION_FAILED` — the format or date range is not valid. | |
| 429 | `RATE_LIMITED` — retry after the server-provided delay. | |
| 503 | `SERVICE_UNAVAILABLE`, `DEADLINE_EXCEEDED`, `RESULT_GRAPH_INVALID`, or `RESULT_GRAPH_LIMIT_EXCEEDED`. |
Code samples
curl -X POST "https://api.finradar.ai/api/v1/portfolio/portfolios/00000000-0000-4000-8000-000000000004/exports" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"format": "CSV",
"from": "2026-01-01",
"to": "2026-09-07",
"include_lots": false
}'Generate an API key in /account/credentials to run live queries (literal YOUR_API_KEY placeholder shown until then).