Skip to main content
GET
Get Bordereau Export Run

Authorizations

Authorization
string
header
required

User-principal OAuth 2.0 Bearer authentication. Send a user-scoped Auth0 access token (audience = the app API audience) as Authorization: Bearer <jwt>. The request resolves to the user's identity and is authorized by their Role on the {companyId} in the path — the same role-based permissions the web app enforces. This is the path the MCP connector uses to act on a user's behalf; endpoints that accept it list both BearerAuth and ApiKeyAuth.

Path Parameters

companyId
string<uuid>
required

Company identifier

runId
string<uuid>
required

The run identifier returned by POST /policies/bordereau/export-runs. Runs are scoped to their company AND their kind: a run id belonging to another company, or to an entity export run rather than a bordereau one, returns 404, exactly as an id that exists nowhere does.

Response

The run's current status

An export run's current status. Fixed size: there is no echo of the export request, so a poll costs the same however large the export is.

runId
string<uuid>
required

The run identifier

status
enum<string>
required

queued while the run waits for a worker (a normal state, not a stall), running while it projects and streams, then the terminal succeeded or failed — and expired once a succeeded run's CSV has passed its retention horizon and been deleted

Available options:
queued,
running,
succeeded,
failed,
expired
rowCount
integer | null
required

Data rows written to the CSV (the header row not counted); null until the run succeeds. It stays populated on an expired run, describing the file that existed.

error
string | null
required

Why the export stopped; null unless status is failed

createdAt
string<date-time>
required

When the run was started

updatedAt
string<date-time>
required

When the run last made progress or changed status

finishedAt
string<date-time> | null
required

When the run reached a terminal status; null until then

expiresAt
string<date-time>
required

When the run's CSV artifact passes its retention horizon. After this instant the run reports expired and the download answers 404 — start a new export for a fresh file.