Skip to Content

Export received documents

GET
/v1/ec/received-documents/export

What your system books from the received documents that match the list's filters (an issue-date range, for one): recibidos.csv, or recibidos-<from>-<to>.csv with the days the range names (UTF-8 with a byte order mark: access_key, type, number, issue_date, issuer_ruc, issuer_name, subtotal, tax, total, sri_status, xml, withholding_number), alone or, with format=zip, beside each XML kept, under xml/, streamed as it is built. withholding_number is the withholding your business issued over it. Up to 10000 documents; more is 422 export_too_large.

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

type?|array<>

Only this family; repeat it for several.

access_key?string

The one with these 49 digits.

Match^\d{49}$
issue_date[gte]?string

Only what was issued on or after this day.

Formatdate
issue_date[lte]?string

Only what was issued on or before this day.

Formatdate
verification?|array<>
xml_status?|array<>
needs_review?string

true: only what waits for a person (no XML yet, or unconfirmed); false: only what doesn't.

Value in"true""false"
issuer?string

Only what this supplier's RUC issued.

Match^\d{13}$
q?string

Words of the issuer's name or of the document number, or the start of the issuer's RUC; each word must be found.

Length1 <= length <= 100
updated_at[gte]?string

Only what changed at or after this moment, ISO 8601 with its offset: poll with the time of your last read to get what changed since.

Formatdate-time
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/received-documents/export'
Example Response
"string"