Skip to content
/api/v1/portfolio/portfolios/{portfolio_id}/exports

Queue a portfolio export

Queues a portfolio export job in CSV, JSON, or PDF format.

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

NameInRequiredDefaultAllowedDescriptionExample
portfolio_idpathrequiredPortfolio identifier.00000000-0000-4000-8000-000000000004
formatbodyrequiredCSV, JSON, PDFExport format.CSV
frombodyoptionalOptional inclusive start date in ISO `YYYY-MM-DD` format.2026-01-01
tobodyoptionalOptional inclusive end date in ISO `YYYY-MM-DD` format.2026-09-07
include_lotsbodyoptionalfalseWhether to include lots; defaults to `false`.false

Response schema

FieldTypeNullableDescription
statusstringno`success`.
request_idstringnoRequest correlation identifier.
timestampstringnoResponse timestamp.
dataobjectnoQueued job descriptor with `id`, `type` (`EXPORT`), `state`, `progress`, `errors`, `authority`, `created_at`, and `updated_at`.
data.authorityobjectyesNull 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

StatusLabelDescription
202Accepted; 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).