Retrieve a received document
One of your received documents, as stored. To read an invoice from the SRI without storing it, GET /v1/ec/sri/invoices/{access_key}.
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.
id*stringuuidFiscalbase-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.
The received document
application/json- response
id*stringuuidobject*"received_document""received_document"environment*string"sandbox""live"business_id*stringuuidaccess_key*string49 <= length <= 49number*stringissue_date*stringdateissuer*Who issued it: your supplier, or your customer for a withholding.
buyer*|Whom it is addressed to, as the document names them; null until the XML is here.
authorization*|nullsri_status*stringWhat the SRI last said: authorized, annulment_pending (its issuer asked to annul it and the receiver hasn't accepted; still valid) or annulled.
"authorized""annulment_pending""annulled"verification*stringHow much it is proven, as for imports: sri, listed (an SRI report names it), signature (an AUTORIZADO wrapper) or unconfirmed (only its issuer's signature).
"sri""listed""signature""unconfirmed"xml_status*stringavailable; pending while the SRI is asked; missing when the SRI didn't give it in reach (only its issuer can send it); out_of_window when a report named it past the SRI's 60 days.
"available""pending""missing""out_of_window"sources*array<>Every way it arrived: key, report, xml, email.
subtotal*string|nulltaxes*array<||>total*string|nullpayments*array<>description*|The description of its first line.
withholding*|The withholding your business issued over it: the latest authorized one that names it among its support documents. Null while none does, or once that one is annulled.
created_at*stringdate-timeupdated_at*stringdate-timetype*"invoice"The family, as the issuing API names it.
"invoice"document*|The invoice read from its XML, in the shape the issuing API returns it; null until the XML is here.
curl -X GET 'https://api.fiscalbase.io/v1/ec/received-documents/497f6eca-6276-4993-bfeb-53cbbbba6f08'{
"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"
}
]
}
}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`.
Download a received document's XML GET
The SRI `autorizacion` with the signed document inside, as stored. `409` when its XML never arrived (listed only by a report, or out of the SRI's window).