PT EN

Exportações de relatórios

URL base: $BUSINESS_API

Descarregar um relatório em CSV

Registos

GET /exports/{id}.csv

When the execution has a locale, the header row and known enum values (status, method, category, ageing band…) are labelled in that language; unknown values pass through. raw=true returns the stored file with snake_case column keys and raw values, for machine use.

Parâmetros

idstring · caminho · obrigatório

Execution id

rawboolean · consulta · opcional · predefinição false

true returns column keys and raw values regardless of the execution's locale.

Devolve

200 text/csv

Erros 403 · 404

Permissões reports:read · Funções: admin, analyst, finance, owner

curl -X GET "$BUSINESS_API/exports/{id}.csv" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

text/csv

Descarregar um relatório em PDF

Registos

GET /exports/{id}.pdf

Renders the stored CSV of a completed report run as a PDF with the tenant's issuer details, the report definition's name and description, and column labels and values in the caller's language; it is served inline. Runs that are not completed, or whose export file is missing or empty, return 404. Requires the reports:read permission.

Parâmetros

idstring · caminho · obrigatório

Execution id

layoutstring · consulta · opcional · predefinição a4

Page format. mobile is one narrow column sized to its content, for reading on a phone. An unknown value renders A4.

um de a4, mobile

Devolve

200 PDF document

Erros 403 · 404

Permissões reports:read · Funções: admin, analyst, finance, owner

curl -X GET "$BUSINESS_API/exports/{id}.pdf" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

PDF document