API de retenciones
A withholding receipt ("comprobante de retención") records what you, as the buyer, withhold of renta, IVA or ISD from a supplier's documents. Give the supplier and, in support_documents, each document withheld from (usually the supplier's invoice: its number, date, access key, tax_support, subtotal, total, taxes and payments) with its withholdings. POST /v1/ec/withholding-suggestions builds that entry from the invoice's access key, with the renta code and IVA percent that apply; GET /v1/ec/catalogs/renta_withholdings, iva_withholdings and tax_support explain the codes.
Issuing numbers the document, stores it and queues it to be signed and sent to the SRI, all at once: the issue date is today in Ecuador. The status then advances on its own (pending, submitted, then authorized, returned or not_authorized): the SRI's decision arrives on the event stream (GET /v1/events) and as a webhook, and retrieving the document shows it. A refused document says why in sri_messages, each with its remedy. Check the body first with POST /v1/ec/withholdings/preview, which spends no number, and pass its preview_id to issue exactly what was previewed. The Idempotency-Key header is required (422 idempotency_key_required without it): a retry with the same key and body answers the first response, status included, without numbering another document.
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.
preview_id?stringThe preview_id of POST /v1/ec/withholdings/preview for this same body: if the body isn't the one previewed, or the preview is from an earlier day, nothing is issued and the answer is 409 preview_mismatch.
^[0-9a-f]{64}$idempotency-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 <= 255Fiscalbase-Emission-Point?stringThe emission point (GET /v1/ec/emission-points) the documents this call issues are numbered at, when their body names no establishment or emission_point. One the business lacks in the call's environment is 422 emission_point_not_found. It beats the key's default emission point.
uuidapplication/json- body
The issue date is always today in Ecuador: documents are transmitted when issued.
supplier*|||supplier_type?stringNatural person or company (tipoSujetoRetenido), required if the supplier has a foreign identification.
"persona_natural""sociedad"related_party?booleanWhether the supplier is a related party (parteRel).
falsesupport_documents*array<>The supplier's documents that support the withholding.
1 <= itemsfiscal_machine?The fiscal machine the document is issued from (annex 13). Only when one issues it.
additional_info?array<>Your fields on the PDF.
Free fields the PDF prints (campoAdicional), such as a purchase order or a delivery address: each a name and a value of up to 300 characters, no name repeated. A document holds 15 in all, and Fiscalbase writes some of them after yours: Email, the counterparty's email, on every document but a delivery note (a consumidor_final buyer's is the fixed address); Gran Contribuyente, the business's resolution when it declared one, on invoices, purchase settlements and credit and debit notes (annex 24); and RUC Proveedor, the RUC of Fiscalbase as the invoicing system's provider (annex 26), on every document. So an invoice takes 13 of yours, 12 from a gran contribuyente, and a delivery note 14. One of those names in yours is additional_info_reserved_name, and a list that doesn't fit beside them, additional_info_overflow, which says how many fit.
[]establishment?stringThe establishment whose series numbers it, such as 001. Without it, the first active series of the document type.
^\d{3}$emission_point?stringThe emission point of that establishment, such as 001. Without it, the first active one.
^\d{3}$metadata?Up to 20 pairs of your own, such as your order id, returned as sent and never interpreted; lists filter by them (metadata[key]=value).
{}deliver_to?Where the buyer gets the document. It is kept with the request, a held sale's too, and an authorized document's email goes to email as well as to the addresses the document names.
simulate?Only with a sandbox key (422 in test and live, where the SRI decides): the outcome the simulator gives this revision, to rehearse how your system handles each one. Without it, it is authorized.
Accepted and numbered; a repeat with the same Idempotency-Key answers the same
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*"withholding"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}/…).
"withholding"issue_date*stringdatefiscal_period*stringsupplier*supplier_type*|"persona_natural""sociedad"nullrelated_party*boolean|nullsupport_documents*array<>renta*stringiva*stringisd*stringtotal*stringfiscal_machine*|nulladditional_info*array<>created_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/withholdings' \
-H 'idempotency-key: string' \
-H 'Content-Type: application/json' \
-d '{
"supplier": {
"identification_type": "ruc",
"identification": "1792233445001",
"name": "TRANSPORTES ANDES CÍA. LTDA.",
"email": "cobros@andes.ec"
},
"support_documents": [
{
"document_type": "factura",
"number": "001-001-000118802",
"issue_date": "2026-09-25",
"authorization_number": "2509202601179223344500110010010001188021234567811",
"tax_support": "01",
"subtotal": "771.00",
"total": "886.65",
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "771.00",
"value": "115.65"
}
],
"withholdings": [
{
"tax": "renta",
"code": "312",
"base": "771.00"
},
{
"tax": "iva",
"rate": "iva_30",
"base": "115.65"
}
],
"payments": [
{
"method": "otros_sistema_financiero"
}
]
}
]
}'{
"id": "01a21860-2f62-7273-838c-70bcd6ff1c6f",
"object": "document",
"type": "withholding",
"country": "ec",
"currency": "USD",
"environment": "sandbox",
"status": "pending",
"status_transitions": {
"pending": "2026-11-26T15:01:30.648Z"
},
"business_id": "01a21860-2f4b-74a8-b38b-5696fbe88fa9",
"number": "001-001-000000001",
"access_key": "2611202607179214673900110010010000000013235442519",
"authorization": null,
"sri_messages": [],
"metadata": {},
"channel": "api",
"import_id": null,
"verification": null,
"listing": null,
"issued_at": "2026-11-26T15:01:26.494Z",
"delivery_status": null,
"emails": [],
"portal_views": 0,
"portal_last_viewed_at": null,
"isd": "0.00",
"iva": "34.70",
"renta": "15.42",
"total": "50.12",
"supplier": {
"name": "TRANSPORTES ANDES CÍA. LTDA.",
"email": "cobros@andes.ec",
"address": null,
"identification": "1792233445001",
"identification_type": "ruc"
},
"issue_date": "2026-11-26",
"fiscal_period": "2026-11",
"related_party": false,
"supplier_type": null,
"fiscal_machine": null,
"additional_info": [],
"support_documents": [
{
"taxes": [
{
"base": "771.00",
"rate": "iva_15",
"type": "iva",
"value": "115.65"
}
],
"total": "886.65",
"number": "001-001-000118802",
"payments": [
{
"term": null,
"amount": "886.65",
"method": "otros_sistema_financiero"
}
],
"subtotal": "771.00",
"issue_date": "2026-09-25",
"tax_support": "01",
"withholdings": [
{
"tax": "renta",
"base": "771.00",
"code": "312",
"value": "15.42",
"percent": "2",
"dividends": null,
"banana_boxes": null
},
{
"tax": "iva",
"base": "115.65",
"rate": "iva_30",
"value": "34.70",
"percent": "30",
"dividends": null,
"banana_boxes": null
}
],
"document_type": "factura",
"reimbursement": null,
"accounting_date": null,
"foreign_payment": null,
"authorization_number": "2509202601179223344500110010010001188021234567811"
}
],
"created_at": "2026-11-26T15:01:26.494Z",
"updated_at": "2026-11-26T15:01:26.494Z"
}Checks the body of POST /v1/ec/withholdings and computes the document as it would be issued today, without numbering, storing or sending anything. What is wrong with the body is refused with 422, as issuing would refuse it; what would stop issuing it right now (no plan, certificate or numbering, a business not live yet, the month's quota used up) comes back in warnings. Pass its preview_id to POST /v1/ec/withholdings?preview_id=… to issue exactly this body.
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.
Fiscalbase-Emission-Point?stringThe emission point (GET /v1/ec/emission-points) the documents this call issues are numbered at, when their body names no establishment or emission_point. One the business lacks in the call's environment is 422 emission_point_not_found. It beats the key's default emission point.
uuidapplication/json- body
The issue date is always today in Ecuador: documents are transmitted when issued.
supplier*|||supplier_type?stringNatural person or company (tipoSujetoRetenido), required if the supplier has a foreign identification.
"persona_natural""sociedad"related_party?booleanWhether the supplier is a related party (parteRel).
falsesupport_documents*array<>The supplier's documents that support the withholding.
1 <= itemsfiscal_machine?The fiscal machine the document is issued from (annex 13). Only when one issues it.
additional_info?array<>Your fields on the PDF.
Free fields the PDF prints (campoAdicional), such as a purchase order or a delivery address: each a name and a value of up to 300 characters, no name repeated. A document holds 15 in all, and Fiscalbase writes some of them after yours: Email, the counterparty's email, on every document but a delivery note (a consumidor_final buyer's is the fixed address); Gran Contribuyente, the business's resolution when it declared one, on invoices, purchase settlements and credit and debit notes (annex 24); and RUC Proveedor, the RUC of Fiscalbase as the invoicing system's provider (annex 26), on every document. So an invoice takes 13 of yours, 12 from a gran contribuyente, and a delivery note 14. One of those names in yours is additional_info_reserved_name, and a list that doesn't fit beside them, additional_info_overflow, which says how many fit.
[]establishment?stringThe establishment whose series numbers it, such as 001. Without it, the first active series of the document type.
^\d{3}$emission_point?stringThe emission point of that establishment, such as 001. Without it, the first active one.
^\d{3}$metadata?Up to 20 pairs of your own, such as your order id, returned as sent and never interpreted; lists filter by them (metadata[key]=value).
{}deliver_to?Where the buyer gets the document. It is kept with the request, a held sale's too, and an authorized document's email goes to email as well as to the addresses the document names.
simulate?Only with a sandbox key (422 in test and live, where the SRI decides): the outcome the simulator gives this revision, to rehearse how your system handles each one. Without it, it is authorized.
The document as it would be issued
application/json- response
object*"document_preview""document_preview"type*"withholding""withholding"preview_id*stringWhat this preview vouches for: the body, its type and today's date, hashed. Send it as preview_id when issuing to make sure the document issued is the one previewed.
64 <= length <= 64environment*string"sandbox""test""live"business_id*stringThe business that would issue it.
uuidissue_date*stringToday in Ecuador: the date it would carry.
datecurrency*stringThe ISO 4217 code of its amounts' currency.
total*|What it would total; null on a delivery note, which has no amounts.
tax_total*|The IVA it would charge; null on a withholding and a delivery note.
warnings*array<>What would stop issuing it right now, though the body is fine. Empty when it can be issued.
document*The document as it would be calculated: the same fields an issued one carries after its envelope.
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/withholdings/preview' \
-H 'Content-Type: application/json' \
-d '{
"supplier": {
"identification_type": "ruc",
"identification": "1792233445001",
"name": "TRANSPORTES ANDES CÍA. LTDA.",
"email": "cobros@andes.ec"
},
"support_documents": [
{
"document_type": "factura",
"number": "001-001-000118802",
"issue_date": "2026-09-25",
"authorization_number": "2509202601179223344500110010010001188021234567811",
"tax_support": "01",
"subtotal": "771.00",
"total": "886.65",
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "771.00",
"value": "115.65"
}
],
"withholdings": [
{
"tax": "renta",
"code": "312",
"base": "771.00"
},
{
"tax": "iva",
"rate": "iva_30",
"base": "115.65"
}
],
"payments": [
{
"method": "otros_sistema_financiero"
}
]
}
]
}'{
"object": "document_preview",
"type": "withholding",
"preview_id": "4ff4e7af2d4b1833b7b7e9375c6919ad56d6d949e01646178446815073f88baa",
"environment": "sandbox",
"business_id": "01a21860-7646-7946-9364-303b309d2e8a",
"issue_date": "2026-11-26",
"currency": "USD",
"total": "50.12",
"tax_total": null,
"warnings": [],
"document": {
"issue_date": "2026-11-26",
"fiscal_period": "2026-11",
"supplier": {
"identification_type": "ruc",
"identification": "1792233445001",
"name": "TRANSPORTES ANDES CÍA. LTDA.",
"address": null,
"email": "cobros@andes.ec"
},
"supplier_type": null,
"related_party": false,
"support_documents": [
{
"document_type": "factura",
"number": "001-001-000118802",
"issue_date": "2026-09-25",
"authorization_number": "2509202601179223344500110010010001188021234567811",
"accounting_date": null,
"tax_support": "01",
"foreign_payment": null,
"subtotal": "771.00",
"total": "886.65",
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "771.00",
"value": "115.65"
}
],
"withholdings": [
{
"tax": "renta",
"code": "312",
"percent": "2",
"base": "771.00",
"value": "15.42",
"dividends": null,
"banana_boxes": null
},
{
"tax": "iva",
"rate": "iva_30",
"percent": "30",
"base": "115.65",
"value": "34.70",
"dividends": null,
"banana_boxes": null
}
],
"reimbursement": null,
"payments": [
{
"method": "otros_sistema_financiero",
"amount": "886.65",
"term": null
}
]
}
],
"renta": "15.42",
"iva": "34.70",
"isd": "0.00",
"total": "50.12",
"fiscal_machine": null,
"additional_info": []
}
}Only for a returned or not_authorized document. The SRI receives the correction with the same number and the same access key: the document keeps both, gains a revision and goes back to pending. 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 <= 255application/json- body
The corrected document. Its number, access key and issue date do not change.
supplier*|||supplier_type?stringNatural person or company (tipoSujetoRetenido), required if the supplier has a foreign identification.
"persona_natural""sociedad"related_party?booleanWhether the supplier is a related party (parteRel).
falsesupport_documents*array<>The supplier's documents that support the withholding.
1 <= itemsfiscal_machine?The fiscal machine the document is issued from (annex 13). Only when one issues it.
additional_info?array<>Your fields on the PDF.
Free fields the PDF prints (campoAdicional), such as a purchase order or a delivery address: each a name and a value of up to 300 characters, no name repeated. A document holds 15 in all, and Fiscalbase writes some of them after yours: Email, the counterparty's email, on every document but a delivery note (a consumidor_final buyer's is the fixed address); Gran Contribuyente, the business's resolution when it declared one, on invoices, purchase settlements and credit and debit notes (annex 24); and RUC Proveedor, the RUC of Fiscalbase as the invoicing system's provider (annex 26), on every document. So an invoice takes 13 of yours, 12 from a gran contribuyente, and a delivery note 14. One of those names in yours is additional_info_reserved_name, and a list that doesn't fit beside them, additional_info_overflow, which says how many fit.
[]metadata?Up to 20 pairs of your own, such as your order id, returned as sent and never interpreted; lists filter by them (metadata[key]=value).
{}deliver_to?Where the buyer gets the document. It is kept with the request, a held sale's too, and an authorized document's email goes to email as well as to the addresses the document names.
simulate?Only with a sandbox key (422 in test and live, where the SRI decides): the outcome the simulator gives this revision, to rehearse how your system handles each one. Without it, it is authorized.
Accepted 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*"withholding"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}/…).
"withholding"issue_date*stringdatefiscal_period*stringsupplier*supplier_type*|"persona_natural""sociedad"nullrelated_party*boolean|nullsupport_documents*array<>renta*stringiva*stringisd*stringtotal*stringfiscal_machine*|nulladditional_info*array<>created_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/withholdings/497f6eca-6276-4993-bfeb-53cbbbba6f08/resubmit' \
-H 'idempotency-key: string' \
-H 'Content-Type: application/json' \
-d '{
"supplier": {
"identification_type": "ruc",
"identification": "1792233445001",
"name": "TRANSPORTES ANDES CÍA. LTDA.",
"email": "cobros@andes.ec"
},
"support_documents": [
{
"document_type": "factura",
"number": "001-001-000118802",
"issue_date": "2026-09-25",
"authorization_number": "2509202601179223344500110010010001188021234567811",
"tax_support": "01",
"subtotal": "771.00",
"total": "886.65",
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "771.00",
"value": "115.65"
}
],
"withholdings": [
{
"tax": "renta",
"code": "312",
"base": "771.00"
},
{
"tax": "iva",
"rate": "iva_30",
"base": "115.65"
}
],
"payments": [
{
"method": "otros_sistema_financiero"
}
]
}
]
}'{
"id": "01a21860-2f62-7273-838c-70bcd6ff1c6f",
"object": "document",
"type": "withholding",
"country": "ec",
"currency": "USD",
"environment": "sandbox",
"status": "pending",
"status_transitions": {
"pending": "2026-11-26T15:01:30.648Z"
},
"business_id": "01a21860-2f4b-74a8-b38b-5696fbe88fa9",
"number": "001-001-000000001",
"access_key": "2611202607179214673900110010010000000013235442519",
"authorization": null,
"sri_messages": [],
"metadata": {},
"channel": "api",
"import_id": null,
"verification": null,
"listing": null,
"issued_at": "2026-11-26T15:01:26.494Z",
"delivery_status": null,
"emails": [],
"portal_views": 0,
"portal_last_viewed_at": null,
"isd": "0.00",
"iva": "34.70",
"renta": "15.42",
"total": "50.12",
"supplier": {
"name": "TRANSPORTES ANDES CÍA. LTDA.",
"email": "cobros@andes.ec",
"address": null,
"identification": "1792233445001",
"identification_type": "ruc"
},
"issue_date": "2026-11-26",
"fiscal_period": "2026-11",
"related_party": false,
"supplier_type": null,
"fiscal_machine": null,
"additional_info": [],
"support_documents": [
{
"taxes": [
{
"base": "771.00",
"rate": "iva_15",
"type": "iva",
"value": "115.65"
}
],
"total": "886.65",
"number": "001-001-000118802",
"payments": [
{
"term": null,
"amount": "886.65",
"method": "otros_sistema_financiero"
}
],
"subtotal": "771.00",
"issue_date": "2026-09-25",
"tax_support": "01",
"withholdings": [
{
"tax": "renta",
"base": "771.00",
"code": "312",
"value": "15.42",
"percent": "2",
"dividends": null,
"banana_boxes": null
},
{
"tax": "iva",
"base": "115.65",
"rate": "iva_30",
"value": "34.70",
"percent": "30",
"dividends": null,
"banana_boxes": null
}
],
"document_type": "factura",
"reimbursement": null,
"accounting_date": null,
"foreign_payment": null,
"authorization_number": "2509202601179223344500110010010001188021234567811"
}
],
"created_at": "2026-11-26T15:01:26.494Z",
"updated_at": "2026-11-26T15:01:26.494Z"
}Reads a supplier's invoice, by its access key, as one of your received documents (received_document_id) or as you state it with its issuer's identification (supplier_identification, required with invoice), and suggests what to withhold from it: the renta code for what was bought and the IVA percent for who sold it (asking the SRI about the supplier), at the percents in force on the withholding's date. It answers the withholding's support_documents entry, ready to send to POST /v1/ec/withholdings. It only suggests and stores nothing.
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.
application/json- body
access_key?stringThe supplier's invoice, by its access key: it is read from the SRI as GET /v1/ec/sri/invoices/{access_key} reads it; in sandbox, from the SRI simulator, which holds the Sandbox business's received invoices.
^\d{49}$received_document_id?stringThe supplier's invoice, as one of your key's business's received documents (GET /v1/ec/received-documents/{id}): it is read from what was kept, without asking the SRI again, so it works after the SRI stops answering for it. It needs its XML (xml_status available).
uuidinvoice?The supplier's invoice as it was issued, when it can't be looked up by its access key: when the SRI no longer answers for it, or in sandbox for one the Sandbox business didn't receive.
supplier_identification?stringRequired with invoice, beside it at the top level of the request: the RUC or cedula of whoever issued the invoice, whom the SRI is asked about (sandbox knows 1790012345001 without asking). Whether they are a special taxpayer, their regime and whether they are a natural person decide the percents, so nothing is suggested without it. With access_key the invoice names its issuer.
kind*stringWhat was bought, which decides the renta code and the IVA percent: goods (renta 312, IVA 30 %, or 10 % from a special taxpayer), services (renta 3440, "other withholdings at 3 %", for a service no specific code covers: labour, advertising, transport and rent have their own in GET /v1/ec/catalogs/renta_withholdings; IVA 70 %, or 20 % from a special taxpayer) or professional_services (fees: renta 303 and IVA 100 % from a natural person, renta 303A and the services IVA from a company). A RIMPE emprendedor supplier is withheld renta 343 (1 %) whatever was bought. A supplier abroad is not suggested for: its payment takes a non-resident code (500 to 525) with foreign_payment.
"goods""services""professional_services"issue_date?stringThe day the withholding will be issued, whose percents apply. Today in Ecuador by default, which is when POST /v1/ec/withholdings issues it.
dateThe suggestion
application/json- response
object*"withholding_suggestion""withholding_suggestion"issue_date*stringdatecurrency*stringThe ISO 4217 code of its amounts' currency.
supplier*Who issued the invoice, for the withholding's supplier, to which you add the supplier's email.
supplier_facts*What the SRI records of the supplier and the percents above rest on, as GET /v1/ec/taxpayers/{identification} says it.
issued_to_you*|Whether the invoice names your key's business as its buyer, which a withholding on it needs; null when it was stated in invoice.
support_documents*array<>The withholding's support_documents, ready to send to POST /v1/ec/withholdings: the invoice and what to withhold from it. Review tax_support (01 when the invoice charged IVA, 02 when it didn't) and the rows before issuing.
withholdings*array<>The rows suggested, with the percent in force and what each comes to.
total_withheld*stringWhat the rows withhold in all.
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/withholding-suggestions' \
-H 'Content-Type: application/json' \
-d '{
"invoice": {
"number": "002-001-000045821",
"issue_date": "2026-10-01",
"subtotal": "1.00",
"total": "1.15",
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "1.00",
"value": "0.15"
}
],
"payments": [
{
"method": "otros_sistema_financiero"
}
]
},
"supplier_identification": "1794048079001",
"kind": "goods"
}'{
"object": "withholding_suggestion",
"issue_date": "2026-11-26",
"currency": "USD",
"supplier": {
"identification_type": "ruc",
"identification": "1794048079001",
"name": "ROBLES VERA MARIA JOSE"
},
"supplier_facts": {
"special_taxpayer": false,
"regime": "general",
"natural_person": false,
"stale": false
},
"issued_to_you": null,
"support_documents": [
{
"document_type": "factura",
"number": "002-001-000045821",
"issue_date": "2026-10-01",
"tax_support": "01",
"subtotal": "1.00",
"total": "1.15",
"taxes": [
{
"type": "iva",
"rate": "iva_15",
"base": "1.00",
"value": "0.15"
}
],
"withholdings": [
{
"tax": "renta",
"code": "312",
"base": "1.00"
},
{
"tax": "iva",
"rate": "iva_30",
"base": "0.15"
}
],
"payments": [
{
"method": "otros_sistema_financiero"
}
]
}
],
"withholdings": [
{
"tax": "renta",
"code": "312",
"rate": null,
"concept": "Transferencia de bienes muebles de naturaleza corporal",
"base": "1.00",
"percent": "2",
"value": "0.02"
},
{
"tax": "iva",
"code": null,
"rate": "iva_30",
"concept": null,
"base": "0.15",
"percent": "30",
"value": "0.05"
}
],
"total_withheld": "0.07"
}