List received documents
The documents addressed to your key's business in its environment, from newest to oldest: what its suppliers invoiced and the withholdings its customers issued to it, whichever way they arrived. Never in the recipient portal.
AuthorizationBearer <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.
limit?integerHow many per page, from 1 to 100.
1 <= value <= 10020cursor?stringThe next_cursor or prev_cursor of a previous response. Without a cursor, the first page.
length <= 200type?|array<>Only this family; repeat it for several.
access_key?stringThe one with these 49 digits.
^\d{49}$issue_date[gte]?stringOnly what was issued on or after this day.
dateissue_date[lte]?stringOnly what was issued on or before this day.
dateverification?|array<>xml_status?|array<>needs_review?stringtrue: only what waits for a person (no XML yet, or unconfirmed); false: only what doesn't.
"true""false"issuer?stringOnly what this supplier's RUC issued.
^\d{13}$q?stringWords of the issuer's name or of the document number, or the start of the issuer's RUC; each word must be found.
1 <= length <= 100updated_at[gte]?stringOnly 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.
date-timeFiscalbase-Environment?stringThe 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.
"sandbox""test""live"Fiscalbase-Business?stringThe 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.
uuidFiscalbase-Channel?stringWhich 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.
"api""mcp"Fiscalbase-Agent?stringThe 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.
A page of received documents
application/json- response
object*"list""list"data*array<|||||>next_cursor*|The next page (older); null if there are no more.
prev_cursor*|The previous page (newer); null on the first.
curl -X GET 'https://api.fiscalbase.io/v1/ec/received-documents'{
"object": "list",
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "received_document",
"environment": "sandbox",
"business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
"access_key": "stringstringstringstringstringstringstringstrings",
"number": "string",
"issue_date": "2019-08-24",
"issuer": {
"ruc": "string",
"name": "string",
"trade_name": "string",
"regime": "general",
"special_taxpayer": true
},
"buyer": {
"identification_type": "ruc",
"identification": "string",
"name": "string",
"address": "string",
"email": "string"
},
"authorization": {
"number": "string",
"authorized_at": "2019-08-24T14:15:22Z"
},
"sri_status": "authorized",
"verification": "sri",
"xml_status": "available",
"sources": [
"report"
],
"subtotal": "string",
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "string",
"value": "string",
"additional_discount": "string",
"refund": "string"
}
],
"total": "string",
"payments": [
{
"method": "sin_sistema_financiero",
"amount": "string",
"term": {
"length": 0,
"unit": "days"
}
}
],
"description": "string",
"withholding": {
"object": "document",
"type": "withholding",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"number": "string"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"type": "invoice",
"document": {
"lines": [
{
"code": "string",
"auxiliary_code": "string",
"description": "string",
"unit": "string",
"quantity": "string",
"unit_price": "string",
"discount": "string",
"net": "string",
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "string",
"value": "string"
}
],
"additional_info": [
{
"name": "string",
"value": "string"
}
],
"unsubsidized_price": "string"
}
],
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "string",
"value": "string",
"additional_discount": "string",
"refund": "string"
}
],
"subtotal": "string",
"discount": "string",
"iva": "string",
"ice": "string",
"irbpnr": "string",
"total": "string",
"subsidy": "string",
"tip": "string",
"issue_date": "2019-08-24",
"buyer": {
"identification_type": "ruc",
"identification": "string",
"name": "string",
"address": "string",
"email": "string"
},
"payments": [
{
"method": "sin_sistema_financiero",
"amount": "string",
"term": {
"length": 0,
"unit": "days"
}
}
],
"plate": "string",
"delivery_note_number": "string",
"export": {
"incoterm": "string",
"incoterm_place": "string",
"origin_country": "string",
"loading_port": "string",
"destination_port": "string",
"destination_country": "string",
"acquisition_country": "string",
"subtotal_incoterm": "string",
"international_freight": "string",
"international_insurance": "string",
"customs_costs": "string",
"other_transport_costs": "string"
},
"reimbursement": {
"document_type": "factura",
"total": "string",
"base": "string",
"tax": "string",
"documents": [
{
"supplier": {
"identification_type": "ruc",
"identification": "string"
},
"supplier_type": "persona_natural",
"payment_country": "string",
"document_type": "factura",
"number": "string",
"issue_date": "2019-08-24",
"authorization_number": "string",
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "string",
"value": "string"
}
],
"compensations": [
{
"code": "string",
"rate": "string",
"value": "string"
}
]
}
]
},
"withholdings": [
{
"type": "iva_100",
"value": "string"
}
],
"withheld_iva": "string",
"withheld_renta": "string",
"substitute_delivery_note": {
"origin_address": "string",
"destination_address": "string",
"transport_start": "string",
"transport_end": "string",
"carrier": {
"identification_type": "ruc",
"identification": "string",
"name": "string"
},
"plate": "string",
"destinations": [
{
"reason": "string",
"customs_document": "string",
"destination_establishment": "string",
"route": "string"
}
]
},
"third_party_charges": [
{
"concept": "string",
"amount": "string"
}
],
"negotiable": {
"notification_email": "string"
},
"compensations": [
{
"code": "string",
"rate": "string",
"value": "string"
}
],
"fiscal_machine": {
"brand": "string",
"model": "string",
"serial": "string"
},
"additional_info": [
{
"name": "string",
"value": "string"
}
]
}
}
],
"next_cursor": "string",
"prev_cursor": "string"
}How a business usually issues GET
A profile of your key's business's recent documents in its environment, by type: how many, from which emission points, paid how, with which IVA rates and additional information, to what kind of buyer, with which extras, and the latest documents to copy. Failed documents (`returned`, `not_authorized`) do not count. Use it before drafting a document to write it the way the business usually does.
Export received documents GET
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`.