API de documentos
A single list of the six types, from newest to oldest, with the same filters as each type plus type. Each document carries its type.
apiKeyAuthorizationBearer <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 <= 200status?|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_identification?stringThe identification of the document's buyer or supplier; on a delivery note, that of the carrier or of any of its recipients.
counterparty_name?stringWith a counterparty_identification that is a passport or a foreign identification (exterior), which the SRI doesn't keep unique, only the documents that name it with this name, ignoring case, accents, spaces and punctuation: one of the customers GET /v1/ec/contacts lists with that identification. A RUC or cedula is one customer whatever the name, so it matches none of theirs.
1 <= length <= 300establishment_id?|array<>Only those numbered at these establishments (GET /v1/ec/establishments); repeat it for several.
emission_point_id?|array<>Only those numbered at these emission points (GET /v1/ec/emission-points); repeat it for several.
q?stringSearches 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.
1 <= length <= 100issue_date[gte]?stringdateissue_date[lte]?stringdatereceivable?stringOnly invoices whose receivable is in this state: open (still owed) or collected.
"open""collected"overdue?stringtrue: only invoices still owed whose due date has passed. false: only those still owed that are not due yet.
"true""false"next_due_date[lte]?stringOnly invoices still owed whose next due date is this day or earlier.
datecreated_at[gte]?stringdate-timecreated_at[lte]?stringdate-timeupdated_at[gte]?stringdate-timeupdated_at[lte]?stringdate-timeinclude?"total_count"total_count adds where the page sits among the documents the filters select: total_count and offset. Leave it out when you only page.
"total_count"type?|array<>Only these types, by their object; repeat it for several (type=invoice&type=credit_note). Without it, all of them.
metadata?Only those whose metadata has exactly these pairs, for example metadata[order_id]=5812345678901. Up to 20; all must match.
A page of 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.
total_count?integerWith include=total_count: how many documents match the filters, across all pages.
offset?integerWith include=total_count: how many documents match the filters and come before the first one on this page, from newest to oldest: the page shows offset + 1 to offset + data.length of total_count. 0 on the first page.
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/documents'{
"object": "list",
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"country": "ec",
"currency": "string",
"environment": "sandbox",
"status": "pending",
"status_transitions": {
"pending": "2019-08-24T14:15:22Z",
"submitted": "2019-08-24T14:15:22Z",
"authorized": "2019-08-24T14:15:22Z",
"returned": "2019-08-24T14:15:22Z",
"not_authorized": "2019-08-24T14:15:22Z",
"annulled": "2019-08-24T14:15:22Z"
},
"business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
"number": "string",
"access_key": "stringstringstringstringstringstringstringstrings",
"authorization": {
"number": "string",
"authorized_at": "2019-08-24T14:15:22Z"
},
"sri_messages": [
{
"code": "string",
"message": "string",
"detail": "string",
"type": "error",
"cause": "string",
"remedy": "string"
}
],
"metadata": {
"property1": "string",
"property2": "string"
},
"issued_at": "2019-08-24T14:15:22Z",
"delivery_status": "sent",
"emails": [
{
"to": "string",
"status": "sent",
"sent_at": "2019-08-24T14:15:22Z",
"delivered_at": "2019-08-24T14:15:22Z",
"opened_at": "2019-08-24T14:15:22Z",
"bounced_at": "2019-08-24T14:15:22Z",
"complained_at": "2019-08-24T14:15:22Z",
"bounce_type": "permanent"
}
],
"portal_views": 0,
"portal_last_viewed_at": "2019-08-24T14:15:22Z",
"channel": "api",
"import_id": "13230382-dadc-41f2-963d-e123bd5c0585",
"verification": "sri",
"listing": {
"import_id": "13230382-dadc-41f2-963d-e123bd5c0585",
"file": "string",
"entry": "string",
"sha256": "stringstringstringstringstringstringstringstringstringstringstri",
"line": 1,
"authorized_at": "2019-08-24T14:15:22Z"
},
"object": "document",
"type": "invoice",
"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"
}
],
"credit_balance": "string",
"receivable": {
"object": "receivable",
"state": "open",
"currency": "string",
"amount": "string",
"collected": "string",
"withheld": "string",
"credited": "string",
"balance": "string",
"next_due_date": "2019-08-24",
"overdue_days": 0,
"collect_later": true,
"installments": [
{
"amount": "string",
"due_date": "2019-08-24",
"balance": "string"
}
],
"closed_on": "2019-08-24"
},
"quote_id": "3c071a1d-db86-46a7-9dc8-72ba3fbca992",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string",
"prev_cursor": "string",
"total_count": 0,
"offset": 0
}The document with this id, whatever its type: its type says which. For whoever only has the id, such as a link to the console.
apiKeyAuthorizationBearer <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*stringuuidThe document
application/json- response
id*stringuuidcountry*"ec"The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.
"ec"currency*stringThe currency of the amounts, as its ISO 4217 code. New currencies may appear.
^[A-Z]{3}$environment*string"sandbox""test""live"status*string"pending""submitted""authorized""returned""not_authorized""annulled"status_transitions*When the document last reached each status.
business_id*stringuuidnumber*stringaccess_key*string49 <= length <= 49authorization*|nullsri_messages*array<>The messages of the SRI's latest response, each with its cause and what to do. A returned or not_authorized document says here why.
metadata*issued_at*|When it was issued, with date and time. On a document issued here it is the moment Fiscalbase accepted and numbered it, which sets its issue date (always today in Ecuador). SRI documents carry only the date, so on an imported one (channel imported) it is the time the SRI authorized it, and null if nothing dates it.
date-timedelivery_status*|How the emails of the current revision are doing, the heaviest outcome wins: complained (marked the email as spam) over bounced (bounced) over opened (opened it) over delivered (reached the mailbox) over sent (the email provider accepted it, no news yet). null if no email was sent. The email provider reports it; without its notices it stays at sent.
"sent""delivered""opened""bounced""complained"nullemails*array<>The emails sent with the document's current revision, one per recipient and per send, from first to last. Empty if none was sent.
portal_views*integerHow many times its recipient opened the document in the portal, signing in with their code or with the link in the email. Downloads of the PDF and the XML do not count. 0 if it was never opened.
portal_last_viewed_at*|The last time it was opened in the portal; null if never.
date-timechannel*stringHow it arrived: api if your system issued it with a key, or an agent did for the person who connected it, console if someone issued it on the platform, imported if it came in an import from another system. It is recorded at issue and does not change.
"api""console""imported"import_id*|The import that brought it; null if it was issued here.
uuidverification*|Imported documents only, how we know it is authorized, from most to least certain: sri if the SRI confirmed it at import; listed if its key appears in an SRI listing you uploaded (the Facturador report or the issued-documents one from the SRI's online portal); signature if its file carries the authorization, which nobody signs; unconfirmed if it only has the issuer's signature and nothing shows that the SRI authorized it. unconfirmed documents do not appear in the portal until you upload the listing. Except for sri, the SRI no longer remembered it (or it was imported in sandbox) and its annulment cannot be detected. null if it was issued here.
"sri""listed""signature""unconfirmed"nulllisting*|With verification listed, the listing that shows it authorized and where it came from. Any listing of keys counts, so which one it was is recorded. null otherwise.
object*"document""document"type*"invoice"The family: invoice, credit_note, debit_note, withholding, delivery_note or purchase_settlement. Every other operation on the document is under its path (/v1/ec/invoices/{id}/…).
"invoice"lines*array<>taxes*array<||>subtotal*stringdiscount*stringiva*stringice*stringirbpnr*stringtotal*stringsubsidy*string|nulltip*stringissue_date*stringdatebuyer*payments*array<>plate*string|nulldelivery_note_number*string|nullexport*|nullreimbursement*|nullwithholdings*array<>withheld_iva*string|nullwithheld_renta*string|nullsubstitute_delivery_note*|nullthird_party_charges*array<>negotiable*|nullcompensations*array<>Solidarity compensation of 2 % of the IVA (2016), only on imported documents that carry it.
fiscal_machine*|nulladditional_info*array<>credit_balance*|Invoices only. What can still be credited: the total minus that of the credit notes that modify it and still stand (authorized or still on their way to the SRI; not the returned, not authorized or annulled ones). It never goes below zero. POST /v1/ec/credit-notes rejects a note that exceeds it. null for an invoice issued to consumidor_final, which takes no credit note (NAC-DGERCGC25-00000014, art. 3).
receivable*|Invoices only. What it is still owed, when it was issued on credit (a payment with a term) or with collect_later. null for an invoice paid at once, for one issued to consumidor_final, who is nobody to collect from, and for imported ones.
quote_id*|Invoices only. The quote it was issued from (POST /v1/ec/quotes/{id}/convert), whole at GET /v1/ec/quotes/{id}; null for one issued otherwise.
uuidcreated_at*stringdate-timeupdated_at*stringdate-timecurl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08'{
"id": "01a21860-2ded-7d4a-aa7a-a3c78d93bde8",
"object": "document",
"type": "invoice",
"country": "ec",
"currency": "USD",
"environment": "sandbox",
"status": "pending",
"status_transitions": {
"pending": "2026-11-26T15:01:30.276Z"
},
"business_id": "01a21860-2da6-7794-836d-46af5e2362e9",
"number": "001-001-000000001",
"access_key": "2611202601179214673900110010010000000013224023710",
"authorization": null,
"sri_messages": [],
"metadata": {},
"channel": "api",
"import_id": null,
"verification": null,
"listing": null,
"issued_at": "2026-11-26T15:01:26.120Z",
"delivery_status": null,
"emails": [],
"portal_views": 0,
"portal_last_viewed_at": null,
"ice": "0.00",
"iva": "36.00",
"tip": "0.00",
"buyer": {
"name": "FERRETERÍA EL SOL S.A.",
"email": "compras@elsol.ec",
"address": "Av. 10 de Agosto N21-44, Quito",
"identification": "1790012345001",
"identification_type": "ruc"
},
"lines": [
{
"net": "240.00",
"code": "SKU-1",
"unit": null,
"taxes": [
{
"base": "240.00",
"rate": "iva_15",
"type": "iva",
"value": "36.00"
}
],
"discount": "0.00",
"quantity": "2",
"unit_price": "120",
"description": "Taladro percutor",
"auxiliary_code": null,
"additional_info": [],
"unsubsidized_price": null
},
{
"net": "9.00",
"code": "SKU-1",
"unit": null,
"taxes": [
{
"base": "9.00",
"rate": "iva_0",
"type": "iva",
"value": "0.00"
}
],
"discount": "0.00",
"quantity": "2",
"unit_price": "4.5",
"description": "Guantes",
"auxiliary_code": null,
"additional_info": [],
"unsubsidized_price": null
}
],
"plate": null,
"taxes": [
{
"base": "240.00",
"rate": "iva_15",
"type": "iva",
"value": "36.00",
"refund": null,
"additional_discount": null
},
{
"base": "9.00",
"rate": "iva_0",
"type": "iva",
"value": "0.00",
"refund": null,
"additional_discount": null
}
],
"total": "285.00",
"export": null,
"irbpnr": "0.00",
"subsidy": null,
"discount": "0.00",
"payments": [
{
"term": {
"unit": "days",
"length": 30
},
"amount": "285.00",
"method": "tarjeta_credito"
}
],
"subtotal": "249.00",
"issue_date": "2026-11-26",
"negotiable": null,
"withheld_iva": null,
"withholdings": [],
"compensations": [],
"reimbursement": null,
"fiscal_machine": null,
"withheld_renta": null,
"additional_info": [
{
"name": "Orden de compra",
"value": "OC-1041"
}
],
"third_party_charges": [],
"delivery_note_number": null,
"substitute_delivery_note": null,
"created_at": "2026-11-26T15:01:26.120Z",
"updated_at": "2026-11-26T15:01:26.120Z",
"credit_balance": "285.00",
"receivable": {
"object": "receivable",
"state": "open",
"currency": "USD",
"amount": "285.00",
"collected": "0.00",
"withheld": "0.00",
"credited": "0.00",
"balance": "285.00",
"next_due_date": "2026-12-26",
"overdue_days": 0,
"collect_later": false,
"installments": [
{
"amount": "285.00",
"due_date": "2026-12-26",
"balance": "285.00"
}
],
"closed_on": null
},
"quote_id": null
}Every step it went through, from newest to oldest: accepted, signed, received, authorized or returned, the PDF generated, each email sent and each correction. These are the document's own steps, not the events webhooks deliver (GET /v1/events).
apiKeyAuthorizationBearer <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*stringuuidlimit?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 <= 200created_at[gte]?stringOnly what was created at or after this moment, ISO 8601 with its offset.
date-timecreated_at[lte]?stringOnly what was created at or before this moment, ISO 8601 with its offset.
date-timeupdated_at[gte]?stringOnly what last 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-timeupdated_at[lte]?stringOnly what last changed at or before this moment, ISO 8601 with its offset.
date-timeA page of the timeline
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-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/timeline'{
"object": "list",
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "timeline_entry",
"document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
"type": "string",
"revision": 0,
"data": {
"property1": null,
"property2": null
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string",
"prev_cursor": "string"
}Only records an annulment you already made in the SRI's online portal; it does not request it from the SRI. The document goes to annulled, keeps its files, leaves your customer's portal and <type>.annulled is sent to your webhooks. Only for an authorized one, and never for one issued to a consumidor_final buyer, which the SRI does not annul.
apiKeyAuthorizationBearer <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*stringuuididempotency-key?stringSend the same key to retry safely: a repeat of the same request answers what the first answered, without doing it again. Keys are scoped to the business the call acts for and its environment; the same key with another request is 409 idempotency_key_reused.
1 <= length <= 255application/json- body
annulled_on*stringThe date the SRI annulled it, as it appears in the SRI's online portal. Not before the issue date and not in the future.
datereason?stringWhy it was annulled, for your records.
1 <= length <= 300Annulled
application/json- response
id*stringuuidcountry*"ec"The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.
"ec"currency*stringThe currency of the amounts, as its ISO 4217 code. New currencies may appear.
^[A-Z]{3}$environment*string"sandbox""test""live"status*string"pending""submitted""authorized""returned""not_authorized""annulled"status_transitions*When the document last reached each status.
business_id*stringuuidnumber*stringaccess_key*string49 <= length <= 49authorization*|nullsri_messages*array<>The messages of the SRI's latest response, each with its cause and what to do. A returned or not_authorized document says here why.
metadata*issued_at*|When it was issued, with date and time. On a document issued here it is the moment Fiscalbase accepted and numbered it, which sets its issue date (always today in Ecuador). SRI documents carry only the date, so on an imported one (channel imported) it is the time the SRI authorized it, and null if nothing dates it.
date-timedelivery_status*|How the emails of the current revision are doing, the heaviest outcome wins: complained (marked the email as spam) over bounced (bounced) over opened (opened it) over delivered (reached the mailbox) over sent (the email provider accepted it, no news yet). null if no email was sent. The email provider reports it; without its notices it stays at sent.
"sent""delivered""opened""bounced""complained"nullemails*array<>The emails sent with the document's current revision, one per recipient and per send, from first to last. Empty if none was sent.
portal_views*integerHow many times its recipient opened the document in the portal, signing in with their code or with the link in the email. Downloads of the PDF and the XML do not count. 0 if it was never opened.
portal_last_viewed_at*|The last time it was opened in the portal; null if never.
date-timechannel*stringHow it arrived: api if your system issued it with a key, or an agent did for the person who connected it, console if someone issued it on the platform, imported if it came in an import from another system. It is recorded at issue and does not change.
"api""console""imported"import_id*|The import that brought it; null if it was issued here.
uuidverification*|Imported documents only, how we know it is authorized, from most to least certain: sri if the SRI confirmed it at import; listed if its key appears in an SRI listing you uploaded (the Facturador report or the issued-documents one from the SRI's online portal); signature if its file carries the authorization, which nobody signs; unconfirmed if it only has the issuer's signature and nothing shows that the SRI authorized it. unconfirmed documents do not appear in the portal until you upload the listing. Except for sri, the SRI no longer remembered it (or it was imported in sandbox) and its annulment cannot be detected. null if it was issued here.
"sri""listed""signature""unconfirmed"nulllisting*|With verification listed, the listing that shows it authorized and where it came from. Any listing of keys counts, so which one it was is recorded. null otherwise.
object*"document""document"type*"invoice"The family: invoice, credit_note, debit_note, withholding, delivery_note or purchase_settlement. Every other operation on the document is under its path (/v1/ec/invoices/{id}/…).
"invoice"lines*array<>taxes*array<||>subtotal*stringdiscount*stringiva*stringice*stringirbpnr*stringtotal*stringsubsidy*string|nulltip*stringissue_date*stringdatebuyer*payments*array<>plate*string|nulldelivery_note_number*string|nullexport*|nullreimbursement*|nullwithholdings*array<>withheld_iva*string|nullwithheld_renta*string|nullsubstitute_delivery_note*|nullthird_party_charges*array<>negotiable*|nullcompensations*array<>Solidarity compensation of 2 % of the IVA (2016), only on imported documents that carry it.
fiscal_machine*|nulladditional_info*array<>credit_balance*|Invoices only. What can still be credited: the total minus that of the credit notes that modify it and still stand (authorized or still on their way to the SRI; not the returned, not authorized or annulled ones). It never goes below zero. POST /v1/ec/credit-notes rejects a note that exceeds it. null for an invoice issued to consumidor_final, which takes no credit note (NAC-DGERCGC25-00000014, art. 3).
receivable*|Invoices only. What it is still owed, when it was issued on credit (a payment with a term) or with collect_later. null for an invoice paid at once, for one issued to consumidor_final, who is nobody to collect from, and for imported ones.
quote_id*|Invoices only. The quote it was issued from (POST /v1/ec/quotes/{id}/convert), whole at GET /v1/ec/quotes/{id}; null for one issued otherwise.
uuidcreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/annul' \
-H 'Content-Type: application/json' \
-d '{
"annulled_on": "2026-11-26",
"reason": "Precio equivocado"
}'{
"id": "01a21860-3dd8-7d46-8297-b94e42715da0",
"object": "document",
"type": "invoice",
"country": "ec",
"currency": "USD",
"environment": "sandbox",
"status": "annulled",
"status_transitions": {
"pending": "2026-11-26T15:01:34.351Z",
"annulled": "2026-11-26T15:01:34.365Z"
},
"business_id": "01a21860-3da0-7cc7-aa37-09107902c5ea",
"number": "001-001-000000001",
"access_key": "2611202601179214673900110010010000000018758237718",
"authorization": null,
"sri_messages": [],
"metadata": {},
"channel": "api",
"import_id": null,
"verification": null,
"listing": null,
"issued_at": "2026-11-26T15:01:30.197Z",
"delivery_status": null,
"emails": [],
"portal_views": 0,
"portal_last_viewed_at": null,
"ice": "0.00",
"iva": "36.00",
"tip": "0.00",
"buyer": {
"name": "FERRETERÍA EL SOL S.A.",
"email": "compras@elsol.ec",
"address": "Av. 10 de Agosto N21-44, Quito",
"identification": "1790012345001",
"identification_type": "ruc"
},
"lines": [
{
"net": "240.00",
"code": "SKU-1",
"unit": null,
"taxes": [
{
"base": "240.00",
"rate": "iva_15",
"type": "iva",
"value": "36.00"
}
],
"discount": "0.00",
"quantity": "2",
"unit_price": "120",
"description": "Taladro percutor",
"auxiliary_code": null,
"additional_info": [],
"unsubsidized_price": null
},
{
"net": "9.00",
"code": "SKU-1",
"unit": null,
"taxes": [
{
"base": "9.00",
"rate": "iva_0",
"type": "iva",
"value": "0.00"
}
],
"discount": "0.00",
"quantity": "2",
"unit_price": "4.5",
"description": "Guantes",
"auxiliary_code": null,
"additional_info": [],
"unsubsidized_price": null
}
],
"plate": null,
"taxes": [
{
"base": "240.00",
"rate": "iva_15",
"type": "iva",
"value": "36.00",
"refund": null,
"additional_discount": null
},
{
"base": "9.00",
"rate": "iva_0",
"type": "iva",
"value": "0.00",
"refund": null,
"additional_discount": null
}
],
"total": "285.00",
"export": null,
"irbpnr": "0.00",
"subsidy": null,
"discount": "0.00",
"payments": [
{
"term": {
"unit": "days",
"length": 30
},
"amount": "285.00",
"method": "tarjeta_credito"
}
],
"subtotal": "249.00",
"issue_date": "2026-11-26",
"negotiable": null,
"withheld_iva": null,
"withholdings": [],
"compensations": [],
"reimbursement": null,
"fiscal_machine": null,
"withheld_renta": null,
"additional_info": [
{
"name": "Orden de compra",
"value": "OC-1041"
}
],
"third_party_charges": [],
"delivery_note_number": null,
"substitute_delivery_note": null,
"created_at": "2026-11-26T15:01:30.197Z",
"updated_at": "2026-11-26T15:01:34.365Z",
"credit_balance": "285.00",
"receivable": {
"object": "receivable",
"state": "void",
"currency": "USD",
"amount": "285.00",
"collected": "0.00",
"withheld": "0.00",
"credited": "0.00",
"balance": "285.00",
"next_due_date": null,
"overdue_days": 0,
"collect_later": false,
"installments": [
{
"amount": "285.00",
"due_date": "2026-12-26",
"balance": "285.00"
}
],
"closed_on": "2026-11-26"
},
"quote_id": null
}Only for a returned document with error 45, SECUENCIAL REGISTRADO: another document of the RUC already has that number at the SRI. It takes the next number in its series with a new access key, keeps its content and its issue date, gains a revision and goes back to pending. In sandbox and test this happens on its own; in live never, because that number belongs to an authorized document that Fiscalbase does not know about. It requires an Idempotency-Key.
apiKeyAuthorizationBearer <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*stringuuididempotency-key*stringRequired. Without it a retry could number another document or reach the SRI again. A retry with the same key and body answers the first answer instead; the same key with another body is 409 idempotency_key_reused.
1 <= length <= 255Renumbered and sent again
application/json- response
id*stringuuidcountry*"ec"The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.
"ec"currency*stringThe currency of the amounts, as its ISO 4217 code. New currencies may appear.
^[A-Z]{3}$environment*string"sandbox""test""live"status*string"pending""submitted""authorized""returned""not_authorized""annulled"status_transitions*When the document last reached each status.
business_id*stringuuidnumber*stringaccess_key*string49 <= length <= 49authorization*|nullsri_messages*array<>The messages of the SRI's latest response, each with its cause and what to do. A returned or not_authorized document says here why.
metadata*issued_at*|When it was issued, with date and time. On a document issued here it is the moment Fiscalbase accepted and numbered it, which sets its issue date (always today in Ecuador). SRI documents carry only the date, so on an imported one (channel imported) it is the time the SRI authorized it, and null if nothing dates it.
date-timedelivery_status*|How the emails of the current revision are doing, the heaviest outcome wins: complained (marked the email as spam) over bounced (bounced) over opened (opened it) over delivered (reached the mailbox) over sent (the email provider accepted it, no news yet). null if no email was sent. The email provider reports it; without its notices it stays at sent.
"sent""delivered""opened""bounced""complained"nullemails*array<>The emails sent with the document's current revision, one per recipient and per send, from first to last. Empty if none was sent.
portal_views*integerHow many times its recipient opened the document in the portal, signing in with their code or with the link in the email. Downloads of the PDF and the XML do not count. 0 if it was never opened.
portal_last_viewed_at*|The last time it was opened in the portal; null if never.
date-timechannel*stringHow it arrived: api if your system issued it with a key, or an agent did for the person who connected it, console if someone issued it on the platform, imported if it came in an import from another system. It is recorded at issue and does not change.
"api""console""imported"import_id*|The import that brought it; null if it was issued here.
uuidverification*|Imported documents only, how we know it is authorized, from most to least certain: sri if the SRI confirmed it at import; listed if its key appears in an SRI listing you uploaded (the Facturador report or the issued-documents one from the SRI's online portal); signature if its file carries the authorization, which nobody signs; unconfirmed if it only has the issuer's signature and nothing shows that the SRI authorized it. unconfirmed documents do not appear in the portal until you upload the listing. Except for sri, the SRI no longer remembered it (or it was imported in sandbox) and its annulment cannot be detected. null if it was issued here.
"sri""listed""signature""unconfirmed"nulllisting*|With verification listed, the listing that shows it authorized and where it came from. Any listing of keys counts, so which one it was is recorded. null otherwise.
object*"document""document"type*"invoice"The family: invoice, credit_note, debit_note, withholding, delivery_note or purchase_settlement. Every other operation on the document is under its path (/v1/ec/invoices/{id}/…).
"invoice"lines*array<>taxes*array<||>subtotal*stringdiscount*stringiva*stringice*stringirbpnr*stringtotal*stringsubsidy*string|nulltip*stringissue_date*stringdatebuyer*payments*array<>plate*string|nulldelivery_note_number*string|nullexport*|nullreimbursement*|nullwithholdings*array<>withheld_iva*string|nullwithheld_renta*string|nullsubstitute_delivery_note*|nullthird_party_charges*array<>negotiable*|nullcompensations*array<>Solidarity compensation of 2 % of the IVA (2016), only on imported documents that carry it.
fiscal_machine*|nulladditional_info*array<>credit_balance*|Invoices only. What can still be credited: the total minus that of the credit notes that modify it and still stand (authorized or still on their way to the SRI; not the returned, not authorized or annulled ones). It never goes below zero. POST /v1/ec/credit-notes rejects a note that exceeds it. null for an invoice issued to consumidor_final, which takes no credit note (NAC-DGERCGC25-00000014, art. 3).
receivable*|Invoices only. What it is still owed, when it was issued on credit (a payment with a term) or with collect_later. null for an invoice paid at once, for one issued to consumidor_final, who is nobody to collect from, and for imported ones.
quote_id*|Invoices only. The quote it was issued from (POST /v1/ec/quotes/{id}/convert), whole at GET /v1/ec/quotes/{id}; null for one issued otherwise.
uuidcreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/renumber' \
-H 'idempotency-key: string'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"country": "ec",
"currency": "string",
"environment": "sandbox",
"status": "pending",
"status_transitions": {
"pending": "2019-08-24T14:15:22Z",
"submitted": "2019-08-24T14:15:22Z",
"authorized": "2019-08-24T14:15:22Z",
"returned": "2019-08-24T14:15:22Z",
"not_authorized": "2019-08-24T14:15:22Z",
"annulled": "2019-08-24T14:15:22Z"
},
"business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
"number": "string",
"access_key": "stringstringstringstringstringstringstringstrings",
"authorization": {
"number": "string",
"authorized_at": "2019-08-24T14:15:22Z"
},
"sri_messages": [
{
"code": "string",
"message": "string",
"detail": "string",
"type": "error",
"cause": "string",
"remedy": "string"
}
],
"metadata": {
"property1": "string",
"property2": "string"
},
"issued_at": "2019-08-24T14:15:22Z",
"delivery_status": "sent",
"emails": [
{
"to": "string",
"status": "sent",
"sent_at": "2019-08-24T14:15:22Z",
"delivered_at": "2019-08-24T14:15:22Z",
"opened_at": "2019-08-24T14:15:22Z",
"bounced_at": "2019-08-24T14:15:22Z",
"complained_at": "2019-08-24T14:15:22Z",
"bounce_type": "permanent"
}
],
"portal_views": 0,
"portal_last_viewed_at": "2019-08-24T14:15:22Z",
"channel": "api",
"import_id": "13230382-dadc-41f2-963d-e123bd5c0585",
"verification": "sri",
"listing": {
"import_id": "13230382-dadc-41f2-963d-e123bd5c0585",
"file": "string",
"entry": "string",
"sha256": "stringstringstringstringstringstringstringstringstringstringstri",
"line": 1,
"authorized_at": "2019-08-24T14:15:22Z"
},
"object": "document",
"type": "invoice",
"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"
}
],
"credit_balance": "string",
"receivable": {
"object": "receivable",
"state": "open",
"currency": "string",
"amount": "string",
"collected": "string",
"withheld": "string",
"credited": "string",
"balance": "string",
"next_due_date": "2019-08-24",
"overdue_days": 0,
"collect_later": true,
"installments": [
{
"amount": "string",
"due_date": "2019-08-24",
"balance": "string"
}
],
"closed_on": "2019-08-24"
},
"quote_id": "3c071a1d-db86-46a7-9dc8-72ba3fbca992",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}Asks the SRI right now whether it has decided on a submitted document, without waiting for the next scheduled check; the answer arrives through the usual flow (the status changes and the webhook is sent). A pending document is already being signed or sent, and one the SRI has already decided has nothing to ask: both come back as they are, with nothing queued. Each document is checked at most once every 10 seconds: repeating it sooner answers 429 with Retry-After, and the SRI receives a single question however many times it is pressed.
apiKeyAuthorizationBearer <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*stringuuididempotency-key?stringSend the same key to retry safely: a repeat of the same request answers what the first answered, without doing it again. Keys are scoped to the business the call acts for and its environment; the same key with another request is 409 idempotency_key_reused.
1 <= length <= 255Nothing to check (it is pending or the SRI has already decided): the document, as it is
application/json- response
id*stringuuidcountry*"ec"The country, as its lowercase ISO 3166-1 alpha-2 code, the same as in the path (/v1/ec/…). New countries may appear.
"ec"currency*stringThe currency of the amounts, as its ISO 4217 code. New currencies may appear.
^[A-Z]{3}$environment*string"sandbox""test""live"status*string"pending""submitted""authorized""returned""not_authorized""annulled"status_transitions*When the document last reached each status.
business_id*stringuuidnumber*stringaccess_key*string49 <= length <= 49authorization*|nullsri_messages*array<>The messages of the SRI's latest response, each with its cause and what to do. A returned or not_authorized document says here why.
metadata*issued_at*|When it was issued, with date and time. On a document issued here it is the moment Fiscalbase accepted and numbered it, which sets its issue date (always today in Ecuador). SRI documents carry only the date, so on an imported one (channel imported) it is the time the SRI authorized it, and null if nothing dates it.
date-timedelivery_status*|How the emails of the current revision are doing, the heaviest outcome wins: complained (marked the email as spam) over bounced (bounced) over opened (opened it) over delivered (reached the mailbox) over sent (the email provider accepted it, no news yet). null if no email was sent. The email provider reports it; without its notices it stays at sent.
"sent""delivered""opened""bounced""complained"nullemails*array<>The emails sent with the document's current revision, one per recipient and per send, from first to last. Empty if none was sent.
portal_views*integerHow many times its recipient opened the document in the portal, signing in with their code or with the link in the email. Downloads of the PDF and the XML do not count. 0 if it was never opened.
portal_last_viewed_at*|The last time it was opened in the portal; null if never.
date-timechannel*stringHow it arrived: api if your system issued it with a key, or an agent did for the person who connected it, console if someone issued it on the platform, imported if it came in an import from another system. It is recorded at issue and does not change.
"api""console""imported"import_id*|The import that brought it; null if it was issued here.
uuidverification*|Imported documents only, how we know it is authorized, from most to least certain: sri if the SRI confirmed it at import; listed if its key appears in an SRI listing you uploaded (the Facturador report or the issued-documents one from the SRI's online portal); signature if its file carries the authorization, which nobody signs; unconfirmed if it only has the issuer's signature and nothing shows that the SRI authorized it. unconfirmed documents do not appear in the portal until you upload the listing. Except for sri, the SRI no longer remembered it (or it was imported in sandbox) and its annulment cannot be detected. null if it was issued here.
"sri""listed""signature""unconfirmed"nulllisting*|With verification listed, the listing that shows it authorized and where it came from. Any listing of keys counts, so which one it was is recorded. null otherwise.
object*"document""document"type*"invoice"The family: invoice, credit_note, debit_note, withholding, delivery_note or purchase_settlement. Every other operation on the document is under its path (/v1/ec/invoices/{id}/…).
"invoice"lines*array<>taxes*array<||>subtotal*stringdiscount*stringiva*stringice*stringirbpnr*stringtotal*stringsubsidy*string|nulltip*stringissue_date*stringdatebuyer*payments*array<>plate*string|nulldelivery_note_number*string|nullexport*|nullreimbursement*|nullwithholdings*array<>withheld_iva*string|nullwithheld_renta*string|nullsubstitute_delivery_note*|nullthird_party_charges*array<>negotiable*|nullcompensations*array<>Solidarity compensation of 2 % of the IVA (2016), only on imported documents that carry it.
fiscal_machine*|nulladditional_info*array<>credit_balance*|Invoices only. What can still be credited: the total minus that of the credit notes that modify it and still stand (authorized or still on their way to the SRI; not the returned, not authorized or annulled ones). It never goes below zero. POST /v1/ec/credit-notes rejects a note that exceeds it. null for an invoice issued to consumidor_final, which takes no credit note (NAC-DGERCGC25-00000014, art. 3).
receivable*|Invoices only. What it is still owed, when it was issued on credit (a payment with a term) or with collect_later. null for an invoice paid at once, for one issued to consumidor_final, who is nobody to collect from, and for imported ones.
quote_id*|Invoices only. The quote it was issued from (POST /v1/ec/quotes/{id}/convert), whole at GET /v1/ec/quotes/{id}; null for one issued otherwise.
uuidcreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/refresh-status'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"country": "ec",
"currency": "string",
"environment": "sandbox",
"status": "pending",
"status_transitions": {
"pending": "2019-08-24T14:15:22Z",
"submitted": "2019-08-24T14:15:22Z",
"authorized": "2019-08-24T14:15:22Z",
"returned": "2019-08-24T14:15:22Z",
"not_authorized": "2019-08-24T14:15:22Z",
"annulled": "2019-08-24T14:15:22Z"
},
"business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
"number": "string",
"access_key": "stringstringstringstringstringstringstringstrings",
"authorization": {
"number": "string",
"authorized_at": "2019-08-24T14:15:22Z"
},
"sri_messages": [
{
"code": "string",
"message": "string",
"detail": "string",
"type": "error",
"cause": "string",
"remedy": "string"
}
],
"metadata": {
"property1": "string",
"property2": "string"
},
"issued_at": "2019-08-24T14:15:22Z",
"delivery_status": "sent",
"emails": [
{
"to": "string",
"status": "sent",
"sent_at": "2019-08-24T14:15:22Z",
"delivered_at": "2019-08-24T14:15:22Z",
"opened_at": "2019-08-24T14:15:22Z",
"bounced_at": "2019-08-24T14:15:22Z",
"complained_at": "2019-08-24T14:15:22Z",
"bounce_type": "permanent"
}
],
"portal_views": 0,
"portal_last_viewed_at": "2019-08-24T14:15:22Z",
"channel": "api",
"import_id": "13230382-dadc-41f2-963d-e123bd5c0585",
"verification": "sri",
"listing": {
"import_id": "13230382-dadc-41f2-963d-e123bd5c0585",
"file": "string",
"entry": "string",
"sha256": "stringstringstringstringstringstringstringstringstringstringstri",
"line": 1,
"authorized_at": "2019-08-24T14:15:22Z"
},
"object": "document",
"type": "invoice",
"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"
}
],
"credit_balance": "string",
"receivable": {
"object": "receivable",
"state": "open",
"currency": "string",
"amount": "string",
"collected": "string",
"withheld": "string",
"credited": "string",
"balance": "string",
"next_due_date": "2019-08-24",
"overdue_days": 0,
"collect_later": true,
"installments": [
{
"amount": "string",
"due_date": "2019-08-24",
"balance": "string"
}
],
"closed_on": "2019-08-24"
},
"quote_id": "3c071a1d-db86-46a7-9dc8-72ba3fbca992",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}Queues an email with the PDF and the authorized XML. In every environment the document is already sent on its own when it is authorized, to its recipient; this send is for resending it, to its recipient or to the addresses you give.
apiKeyAuthorizationBearer <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*stringuuididempotency-key?stringSend the same key to retry safely: a repeat of the same request answers what the first answered, without doing it again. Keys are scoped to the business the call acts for and its environment; the same key with another request is 409 idempotency_key_reused.
1 <= length <= 255application/json- body
to?array<>Who to send it to. If you omit it, it goes to the recipients the document names. In Sandbox nothing is emailed: the timeline records an email_skipped per address instead.
1 <= items <= 10Queued
application/json- response
object*"email""email"document_id*stringuuidto*array<string>curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/email' \
-H 'Content-Type: application/json' \
-d '{
"to": [
"dev@example.com"
]
}'{
"object": "email",
"document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
"to": [
"string"
]
}The document as a shop's receipt, for a thermal printer: everything the PDF prints, with its labels and in its order, laid out for a roll of the width and columns asked. Each line's price is before IVA, the access key prints as the digits of its number of authorization, and there is no barcode. It answers as soon as the document is numbered, without waiting for the SRI, and the SRI's time then prints once it has authorized it. A document the SRI returned or did not authorize is 409 document_not_authorized. Two things the tax law sets are kept: a purchase settlement prints two copies, for the supplier to sign, and a Sandbox document says it has no tax validity while a live one does not. text is the receipt a console shows, escpos the bytes a thermal printer takes (code page 850, one cut per copy), and pdf the roll itself, for a browser's print dialog.
apiKeyAuthorizationBearer <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*stringuuidwidth?stringThe roll's width in millimetres: 80, 48 characters a line by default (or 42, see columns), or 58, at 32. It fixes the PDF's page width.
"80""58""80"columns?stringHow many characters a line holds: 48 on an 80 mm roll, 42 on the same printer set to it, 32 on a 58 mm one, which width chooses when this is left out. A width it can't have is 422.
"32""42""48"format?stringtext: the ticket as plain text, one line as printed and each copy after a form feed, which the console's ticket shows. escpos: the same lines as ESC/POS bytes on code page 850, for a thermal printer, each copy cut. pdf: the same lines as a PDF the width of the roll and as long as its lines, which the browser's print dialog prints.
"text""text""escpos""pdf"cashier?stringThe first name of whoever sold it, for "Atendido por". Left out when a key issued it and nobody did.
length <= 40received?stringThe cash the buyer handed over, for "Recibido" and "Cambio": it prints only when it covers what is paid in cash, and never on a delivery note.
^\d{1,10}(?<cents>\.\d{1,2})?$The ticket, as text, ESC/POS bytes or a PDF
response?filebinarycurl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/ticket'"string"The SRI autorizacion with the signed document inside, the same as the download from the SRI portal.
apiKeyAuthorizationBearer <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*stringuuidThe file
response?fileapplication/xmlbinarycurl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/xml'"string"The printed representation, on A4. In sandbox and test it carries a watermark: it has no tax validity.
apiKeyAuthorizationBearer <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*stringuuidThe file
response?fileapplication/pdfbinarycurl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/pdf'"string"Whether the SRI is slow to receive or decide your documents in the key's environment right now, so a client deciding whether to wait or retry knows. Read from your own documents in one pass; the SRI is never asked.
apiKeyAuthorizationBearer <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.
The SRI's state
application/json- response
object*"sri_status""sri_status"environment*string"sandbox""test""live"status*stringslow when one of your documents has waited more than 5 minutes for the SRI to receive it or more than 10 for its decision; ok otherwise. Judged by your own documents in the environment, not by asking the SRI.
"ok""slow"waiting_reception*integerYour documents the SRI hasn't received yet (pending).
waiting_decision*integerYour documents the SRI received and hasn't decided yet (submitted).
oldest_waiting_since*|When the document that has waited longest started waiting; null when none waits.
date-timecurl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/sri/status'{
"object": "sri_status",
"environment": "sandbox",
"status": "ok",
"waiting_reception": 0,
"waiting_decision": 0,
"oldest_waiting_since": "2019-08-24T14:15:22Z"
}The live sales of your key's business refused at the month's quota (402 plan_quota_reached, with their held_document_id) that still wait, and those that failed once there was room, newest first. Nothing is charged above a plan: a held sale issues by itself, oldest first, once there is room, after the business moves to a plan with more documents or when the quota starts again on the first of the month.
apiKeyAuthorizationBearer <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 <= 200created_at[gte]?stringOnly what was created at or after this moment, ISO 8601 with its offset.
date-timecreated_at[lte]?stringOnly what was created at or before this moment, ISO 8601 with its offset.
date-timeupdated_at[gte]?stringOnly what last 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-timeupdated_at[lte]?stringOnly what last changed at or before this moment, ISO 8601 with its offset.
date-timeThe held sales
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-sandbox.fiscalbase.io/v1/ec/held-documents'{
"object": "list",
"data": [
{
"object": "held_document",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
"environment": "live",
"type": "invoice",
"status": "held",
"channel": "api",
"request": {
"property1": null,
"property2": null
},
"document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
"failure": {
"code": "string",
"message": "string",
"params": {
"property1": "string",
"property2": "string"
}
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string",
"prev_cursor": "string"
}One held sale of your key's business in whatever state it is in. Unlike the list, which keeps to those that wait or failed, it also answers one that issued, with the document_id it became, or was discarded.
apiKeyAuthorizationBearer <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*stringuuidThe held sale
application/json- response
object*"held_document""held_document"id*stringuuidbusiness_id*stringuuidenvironment*"live"Always live: a sale is held only where the plan's quota counts.
"live"type*stringThe document it issues as: invoice, credit_note…
"invoice""credit_note""debit_note""withholding""delivery_note""purchase_settlement"status*stringheld: waiting for room in the month's quota; issued: it became document_id; discarded: someone discarded it; failed: once there was room, issuing it was refused for another reason, which failure names.
"held""issued""discarded""failed"channel*string"api""console"request*The request as it was sent: it issues as it is, dated the day it issues.
document_id*|uuidfailure*|Why issuing it was refused, when it failed.
created_at*stringdate-timeupdated_at*stringdate-timecurl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/held-documents/497f6eca-6276-4993-bfeb-53cbbbba6f08'{
"object": "held_document",
"id": "01a21860-2f2f-7a3d-8ebd-f21705bc6501",
"business_id": "01a21860-2f05-786e-a3a6-c88f8d0d6269",
"environment": "live",
"type": "invoice",
"status": "held",
"channel": "api",
"request": {
"buyer": {
"name": "FERRETERÍA EL SOL S.A.",
"email": "compras@elsol.ec",
"address": "Av. 10 de Agosto N21-44, Quito",
"identification": "1790012345001",
"identification_type": "ruc"
},
"lines": [
{
"code": "SKU-1",
"taxes": [
{
"rate": "iva_15",
"type": "iva"
}
],
"discount": "0",
"quantity": "2",
"unit_price": "120.00",
"description": "Taladro percutor",
"additional_info": []
},
{
"code": "SKU-1",
"taxes": [
{
"rate": "iva_0",
"type": "iva"
}
],
"discount": "0",
"quantity": "2",
"unit_price": "4.50",
"description": "Guantes",
"additional_info": []
}
],
"metadata": {},
"payments": [
{
"term": {
"unit": "days",
"length": 30
},
"method": "tarjeta_credito"
}
],
"establishment": "001",
"emission_point": "001",
"additional_info": [
{
"name": "Orden de compra",
"value": "OC-1041"
}
]
},
"document_id": null,
"failure": null,
"created_at": "2026-11-26T15:01:26.446Z",
"updated_at": "2026-11-26T15:01:26.446Z"
}Discards a sale that waits or failed: it never issues. Retrying its request with the same Idempotency-Key holds it again, or issues it when there is room.
apiKeyAuthorizationBearer <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*stringuuididempotency-key?stringSend the same key to retry safely: a repeat of the same request answers what the first answered, without doing it again. Keys are scoped to the business the call acts for and its environment; the same key with another request is 409 idempotency_key_reused.
1 <= length <= 255Discarded
application/json- response
object*"held_document""held_document"id*stringuuidbusiness_id*stringuuidenvironment*"live"Always live: a sale is held only where the plan's quota counts.
"live"type*stringThe document it issues as: invoice, credit_note…
"invoice""credit_note""debit_note""withholding""delivery_note""purchase_settlement"status*stringheld: waiting for room in the month's quota; issued: it became document_id; discarded: someone discarded it; failed: once there was room, issuing it was refused for another reason, which failure names.
"held""issued""discarded""failed"channel*string"api""console"request*The request as it was sent: it issues as it is, dated the day it issues.
document_id*|uuidfailure*|Why issuing it was refused, when it failed.
created_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/held-documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/discard'{
"object": "held_document",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
"environment": "live",
"type": "invoice",
"status": "held",
"channel": "api",
"request": {
"property1": null,
"property2": null
},
"document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
"failure": {
"code": "string",
"message": "string",
"params": {
"property1": "string",
"property2": "string"
}
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}