Skip to Content

Export documents

GET
/v1/ec/documents/export

The documents that match the list's filters, from newest to oldest, as UTF-8 CSV: number, type, counterparty_name, counterparty_identification, issue_date, total (negative on a credit note; empty on a delivery note), status, channel, access_key, authorization_number and authorized_at; with format=zip, comprobantes.csv and each authorized XML under xml/, named as its own download. It is streamed as it is built. Up to 10000 documents; if there are more, 422: narrow it down with filters.

Authorization

headerAuthorizationBearer <token>

Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.

Query Parameters

status?|array<>

Only in these statuses; repeat it for several (status=returned&status=not_authorized).

channel?|array<>

Only those that arrived through these channels; repeat it for several.

counterparty?string

The identification of the document's buyer or supplier; on a delivery note, that of the carrier or of any of its recipients.

point?|array<>

Only those numbered at these emission points, 001-002 (establishment and emission point, as GET /v1/ec/series lists them); repeat it for several.

q?string

Searches words in the number (001-001-000000123), the access key, the name of whoever appears on the document (ignoring case and accents) or the start of their identification. Each word must appear somewhere; it combines with the other filters.

Length1 <= length <= 100
issue_date[gte]?string
Formatdate
issue_date[lte]?string
Formatdate
updated_at[gte]?string
Formatdate-time
type?|array<>

Only these types, by their object; repeat it for several (type=invoice&type=credit_note). Without it, all of them.

format?string

csv, the rows alone; zip, the same CSV and each document's XML under xml/.

Default"csv"
Value in"csv""zip"

Header Parameters

Fiscalbase-Environment?string

The environment the call acts in. Required with a person's session; a key's own environment is the one that counts, so a key may leave it out, and naming another is 422 environment_mismatch.

Value in"sandbox""test""live"
Fiscalbase-Business?string

The business the call acts for. With a person's session, the one the call is about (without it, a call about one business is 422 business_required and a list covers every business of the organization); a key acts for its own, so naming another is 422 business_mismatch.

Formatuuid
Fiscalbase-Channel?string

Which of Fiscalbase's own integrations a key's call comes from, recorded as the channel of the documents it issues: a record, not a permission. Without it, api. A person's call is always console.

Value in"api""mcp"
Fiscalbase-Agent?string

The AI agent a key's call comes from, as its client names itself (the MCP server sets it); recorded with the request and shown in the console's request log.

Response Body

The CSV, or the ZIP

response?string
Example Request
curl -X GET 'https://api.fiscalbase.io/v1/ec/documents/export'
Example Response
"string"