API de cobros
What was collected for one invoice, from newest to oldest, the voided ones among them with when and why.
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 collections
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/collections'{
"object": "list",
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "collection",
"business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
"environment": "sandbox",
"document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
"status": "recorded",
"amount": "string",
"currency": "string",
"collected_on": "2019-08-24",
"method": "cash",
"reference": "string",
"note": "string",
"recorded_by": {
"type": "person",
"id": "string",
"name": "string"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"voided_at": "2019-08-24T14:15:22Z",
"voided_by": {
"type": "person",
"id": "string",
"name": "string"
},
"void_reason": "string"
}
],
"next_cursor": "string",
"prev_cursor": "string"
}Records money you received for an invoice that is owed (receivable not null): it lowers the invoice's balance, and collection.recorded is sent to your webhooks, then invoice.collected when nothing is left. Fiscalbase moves no money and nothing is sent to the SRI: this is your own record. A collection never exceeds what is owed. A mistake is voided, never edited. Requires an Idempotency-Key: a retry without one would record the money twice.
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 record the money twice. 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
amount*stringWhat was received, above zero and at most the invoice's receivable.balance.
^\d+(\.\d{1,2})?$collected_on?stringThe day the money came in, from the invoice's issue date to today in Ecuador. Today by default.
datemethod*stringHow it was paid: cash, transfer, deposit, cheque, card or other.
"cash""transfer""deposit""cheque""card""other"reference?stringThe transfer's, deposit's or cheque's number.
1 <= length <= 100note?string1 <= length <= 300Recorded
application/json- response
id*stringuuidobject*"collection""collection"business_id*stringuuidenvironment*string"sandbox""test""live"document_id*stringThe invoice it pays.
uuidstatus*stringrecorded counts against the invoice's balance; voided no longer does.
"recorded""voided"amount*stringWhat was received.
currency*stringThe currency of the amounts, as its ISO 4217 code. New currencies may appear.
^[A-Z]{3}$collected_on*stringThe day the money came in.
datemethod*stringHow it was paid: cash, transfer, deposit, cheque, card or other. Yours to state, and never sent to the SRI: the invoice's payments already told it how the sale would be paid.
"cash""transfer""deposit""cheque""card""other"reference*|The transfer's, deposit's or cheque's number.
note*string|nullrecorded_by*created_at*stringdate-timeupdated_at*stringdate-timevoided_at*|date-timevoided_by*void_reason*string|nullreceivable*What the invoice is owed after this.
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/collections' \
-H 'idempotency-key: string' \
-H 'Content-Type: application/json' \
-d '{
"amount": "1.00",
"method": "cash"
}'{
"id": "01a21860-672c-7058-be9a-185b682129ea",
"object": "collection",
"business_id": "01a21860-66d5-7966-b23f-f23170b3c8df",
"environment": "sandbox",
"document_id": "01a21860-671b-7591-939e-a45a1bc9a0fb",
"status": "recorded",
"amount": "1.00",
"currency": "USD",
"collected_on": "2026-11-26",
"method": "cash",
"reference": null,
"note": null,
"recorded_by": {
"type": "api_key",
"id": "01a21860-66e3-7701-929d-14614b70ea56",
"name": "fb_sandbox_WQCC"
},
"created_at": "2026-11-26T15:01:40.777Z",
"updated_at": "2026-11-26T15:01:40.777Z",
"voided_at": null,
"voided_by": null,
"void_reason": null,
"receivable": {
"object": "receivable",
"state": "open",
"currency": "USD",
"amount": "285.00",
"collected": "1.00",
"withheld": "0.00",
"credited": "0.00",
"balance": "284.00",
"next_due_date": "2026-12-26",
"overdue_days": 0,
"collect_later": false,
"installments": [
{
"amount": "285.00",
"due_date": "2026-12-26",
"balance": "284.00"
}
],
"closed_on": null
}
}What was collected across the business's invoices in your key's environment, newest first, the voided ones among them: for a system that books its income from Fiscalbase. collected_on[gte] and collected_on[lte] bound the days the money came in, status keeps the recorded or the voided ones; each one's invoice is document_id. A person reads those of the invoices they read.
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-timecollected_on[gte]?stringThe first day the money came in.
datecollected_on[lte]?stringThe last day the money came in.
datestatus?stringOnly the recorded ones, or only the voided ones.
"recorded""voided"A page of collections
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/collections'{
"object": "list",
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "collection",
"business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
"environment": "sandbox",
"document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
"status": "recorded",
"amount": "string",
"currency": "string",
"collected_on": "2019-08-24",
"method": "cash",
"reference": "string",
"note": "string",
"recorded_by": {
"type": "person",
"id": "string",
"name": "string"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"voided_at": "2019-08-24T14:15:22Z",
"voided_by": {
"type": "person",
"id": "string",
"name": "string"
},
"void_reason": "string"
}
],
"next_cursor": "string",
"prev_cursor": "string"
}The withholdings the buyer issued over one invoice that were applied to what it is owed, the removed ones among them, newest first, a list paged like every other. A withholding is a received document: it arrives through POST /v1/ec/imports, and is applied by itself when it names the invoice's number, comes from its buyer and carries its date.
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 withholdings
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/applied-withholdings'{
"object": "list",
"data": [
{
"object": "applied_withholding",
"document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6",
"received_document_id": "253690c7-3be0-404b-af50-84adc42eab06",
"number": "string",
"issue_date": "2019-08-24",
"issuer": {
"ruc": "string",
"name": "string"
},
"status": "applied",
"renta": "string",
"iva": "string",
"total": "string",
"currency": "string",
"applied_by": {
"type": "person",
"id": "string",
"name": "string"
},
"applied_at": "2019-08-24T14:15:22Z",
"removed_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string",
"prev_cursor": "string"
}Applies a withholding you received to an invoice because it is that invoice's, whatever number it names: for one the match on arrival left out, such as a number the buyer mistyped, or one removed before. It lowers the balance by the renta and the IVA it withheld, and invoice.withholding_applied is sent to your webhooks.
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
received_document_id*stringThe withholding, a received document of the same business (GET /v1/ec/received-documents?type=withholding).
uuidApplied
application/json- response
object*"applied_withholding""applied_withholding"document_id*stringThe invoice it lowers.
uuidreceived_document_id*stringThe withholding, a received document (GET /v1/ec/received-documents/{id}).
uuidnumber*stringissue_date*stringdateissuer*status*stringapplied lowers the invoice's balance; removed no longer does: a person said it does not belong, or its issuer annulled it.
"applied""removed"renta*stringThe renta it withheld over this invoice.
iva*stringThe IVA it withheld over this invoice.
total*stringBoth together: what it lowers the balance by.
currency*stringThe currency of the amounts, as its ISO 4217 code. New currencies may appear.
^[A-Z]{3}$applied_by*system when it was matched as it arrived (the invoice's number, its buyer and its date), person or api_key when someone applied it; who, by id and name, is not kept.
applied_at*stringdate-timeremoved_at*|date-timecreated_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/applied-withholdings' \
-H 'Content-Type: application/json' \
-d '{
"received_document_id": "01a21860-875f-75cb-9786-879a78dde554"
}'{
"object": "applied_withholding",
"document_id": "01a21860-8720-7eea-a90e-20e8ee9a63d0",
"received_document_id": "01a21860-875f-75cb-9786-879a78dde554",
"number": "001-001-000000001",
"issue_date": "2026-11-26",
"issuer": {
"ruc": "1790012345001",
"name": "COMERCIAL RIVERA S.A."
},
"status": "applied",
"renta": "15.42",
"iva": "34.70",
"total": "50.12",
"currency": "USD",
"applied_by": {
"type": "api_key",
"id": null,
"name": null
},
"applied_at": "2026-11-26T15:01:49.032Z",
"removed_at": null,
"created_at": "2026-11-26T15:01:49.032Z",
"updated_at": "2026-11-26T15:01:49.032Z"
}Says a withholding does not belong to this invoice: the balance goes back up by what it withheld, it stays listed as removed, and it is not applied by itself again. invoice.withholding_removed is sent to your webhooks.
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*stringuuidreceived_document_id*stringuuidRemoved
curl -X DELETE 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/applied-withholdings/497f6eca-6276-4993-bfeb-53cbbbba6f08'Takes back a collection recorded by mistake, with why: it stops counting against the invoice's balance, stays in the list as voided, and collection.voided is sent to your webhooks. To correct an amount, void it and record another.
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*stringuuidcollection_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
reason*stringWhy it is voided: it stays with the collection.
1 <= length <= 300Voided
application/json- response
id*stringuuidobject*"collection""collection"business_id*stringuuidenvironment*string"sandbox""test""live"document_id*stringThe invoice it pays.
uuidstatus*stringrecorded counts against the invoice's balance; voided no longer does.
"recorded""voided"amount*stringWhat was received.
currency*stringThe currency of the amounts, as its ISO 4217 code. New currencies may appear.
^[A-Z]{3}$collected_on*stringThe day the money came in.
datemethod*stringHow it was paid: cash, transfer, deposit, cheque, card or other. Yours to state, and never sent to the SRI: the invoice's payments already told it how the sale would be paid.
"cash""transfer""deposit""cheque""card""other"reference*|The transfer's, deposit's or cheque's number.
note*string|nullrecorded_by*created_at*stringdate-timeupdated_at*stringdate-timevoided_at*|date-timevoided_by*void_reason*string|nullreceivable*What the invoice is owed after this.
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/collections/497f6eca-6276-4993-bfeb-53cbbbba6f08/void' \
-H 'Content-Type: application/json' \
-d '{
"reason": "El cheque rebotó"
}'{
"id": "01a21860-6f3d-7410-982d-ba01249de5c4",
"object": "collection",
"business_id": "01a21860-6f15-7030-91a1-ce0d2f5531d1",
"environment": "sandbox",
"document_id": "01a21860-6f22-7d64-9998-eff526c9e87e",
"status": "voided",
"amount": "142.50",
"currency": "USD",
"collected_on": "2026-11-26",
"method": "transfer",
"reference": null,
"note": null,
"recorded_by": {
"type": "api_key",
"id": "01a21860-6f19-7d2b-b10e-40b5898d3d73",
"name": "fb_sandbox_dZik"
},
"created_at": "2026-11-26T15:01:42.842Z",
"updated_at": "2026-11-26T15:01:47.015Z",
"voided_at": "2026-11-26T15:01:47.015Z",
"voided_by": {
"type": "api_key",
"id": "01a21860-6f19-7d2b-b10e-40b5898d3d73",
"name": "fb_sandbox_dZik"
},
"void_reason": "El cheque rebotó",
"receivable": {
"object": "receivable",
"state": "open",
"currency": "USD",
"amount": "285.00",
"collected": "142.50",
"withheld": "0.00",
"credited": "0.00",
"balance": "142.50",
"next_due_date": "2026-12-26",
"overdue_days": 0,
"collect_later": false,
"installments": [
{
"amount": "285.00",
"due_date": "2026-12-26",
"balance": "142.50"
}
],
"closed_on": null
}
}Products
What you sell, kept on purpose: each product's price, barcode, codes, taxes and photo, so a sale copies them into its line, and the categories that group them.
Inventory
What each establishment holds of the products that track their stock, moved by every sale, return and annulment, and by what you count and adjust, each change traced in its movements.