API de webhooks y eventos
Each event sent to this endpoint, from newest to oldest, with each attempt.
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-timestatus?string"pending""succeeded""failed"type?stringOnly those of this event type, one of invoice.authorized, invoice.returned, invoice.not_authorized, invoice.annulled, credit_note.authorized, credit_note.returned, credit_note.not_authorized, credit_note.annulled, debit_note.authorized, debit_note.returned, debit_note.not_authorized, debit_note.annulled, withholding.authorized, withholding.returned, withholding.not_authorized, withholding.annulled, delivery_note.authorized, delivery_note.returned, delivery_note.not_authorized, delivery_note.annulled, purchase_settlement.authorized, purchase_settlement.returned, purchase_settlement.not_authorized, purchase_settlement.annulled, import.completed, import.failed, received_document.created, received_document.updated, series.created, series.gap_detected, series.duplicate_detected, series.collision_detected, series.gap_settled, series.updated, stock_level.fell_low, stock_level.ran_out, business.issuing_changed, contact.email_bounced, collection.recorded, collection.voided, invoice.withholding_applied, invoice.withholding_removed, invoice.collected, invoice.fell_overdue, held_document.issued, held_document.failed, quote.created, quote.updated, quote.sent, quote.accepted, quote.expired, quote.converted, quote.deleted: an unknown one is 422 webhook_event_unknown, as on the endpoint itself.
length <= 100resource_id?stringOnly those of events about this resource, the id of their data: a document, a series, a stock level …
uuidA page of deliveries
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/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/deliveries'{
"object": "list",
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "webhook_delivery",
"endpoint_id": "e9ce0d4f-d433-423d-9497-4c000544106c",
"event": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"type": "string",
"data": {
"property1": null,
"property2": null
},
"created_at": "2019-08-24T14:15:22Z"
},
"status": "pending",
"attempts": [
{
"at": "2019-08-24T14:15:22Z",
"status_code": 0,
"error": "string",
"duration_ms": 0
}
],
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string",
"prev_cursor": "string"
}A delivery with the event it carried and each attempt, from first to last. It only reads: to send it again use POST .../resend.
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*stringuuiddelivery_id*stringuuidThe delivery
application/json- response
id*stringuuidobject*"webhook_delivery""webhook_delivery"endpoint_id*stringuuidevent*status*stringpending while it is sent or retried, succeeded when your endpoint responded 2xx, failed when the retries ran out.
"pending""succeeded""failed"attempts*array<>Each attempt, from first to last.
created_at*stringdate-timeupdated_at*stringdate-timecurl -X GET 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/deliveries/497f6eca-6276-4993-bfeb-53cbbbba6f08'{
"id": "01a21860-7e4b-7f33-a382-3db936c411c8",
"object": "webhook_delivery",
"endpoint_id": "01a21860-7e43-7810-b8c8-f3e3ff133f4e",
"event": {
"id": "01a21860-7e4a-7539-9ba1-9382b74ab104",
"type": "invoice.authorized",
"data": {
"id": "47481aa2-2c2a-4b4b-b3bc-925f8e962569",
"type": "invoice",
"object": "document",
"status": "x"
},
"created_at": "2026-11-26T15:01:46.697Z"
},
"status": "pending",
"attempts": [],
"created_at": "2026-11-26T15:01:46.697Z",
"updated_at": "2026-11-26T15:01:46.697Z"
}Sends the same event again, as a new delivery; the previous one stays in the log. It carries the same webhook-id, so if you already processed it you can discard it as a duplicate.
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*stringuuiddelivery_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 <= 255The new delivery, queued
application/json- response
id*stringuuidobject*"webhook_delivery""webhook_delivery"endpoint_id*stringuuidevent*status*stringpending while it is sent or retried, succeeded when your endpoint responded 2xx, failed when the retries ran out.
"pending""succeeded""failed"attempts*array<>Each attempt, from first to last.
created_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/deliveries/497f6eca-6276-4993-bfeb-53cbbbba6f08/resend'{
"id": "01a21860-7e61-7aef-8ea3-1993efd72f84",
"object": "webhook_delivery",
"endpoint_id": "01a21860-7e43-7810-b8c8-f3e3ff133f4e",
"event": {
"id": "01a21860-7e4a-7539-9ba1-9382b74ab104",
"type": "invoice.authorized",
"data": {
"id": "47481aa2-2c2a-4b4b-b3bc-925f8e962569",
"type": "invoice",
"object": "document",
"status": "x"
},
"created_at": "2026-11-26T15:01:46.697Z"
},
"status": "pending",
"attempts": [],
"created_at": "2026-11-26T15:01:46.721Z",
"updated_at": "2026-11-26T15:01:46.721Z"
}Your key's business's endpoints in its environment, each with since when it has been failing, if it is. It never includes the signing secret: it is only shown when you create or rotate it.
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 endpoints of your key's environment, from newest to oldest
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/webhook-endpoints'{
"object": "list",
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "webhook_endpoint",
"environment": "sandbox",
"business_id": "f59fcbb7-848d-4242-af07-a8bb7e3ab37c",
"url": "http://example.com",
"events": [
"*"
],
"disabled": true,
"secret_hint": "string",
"previous_secret_expires_at": "2019-08-24T14:15:22Z",
"failing_since": "2019-08-24T14:15:22Z",
"replay": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "webhook_replay",
"status": "running",
"since": "2019-08-24",
"types": [
"string"
],
"event_count": 0,
"queued": 0,
"created_at": "2019-08-24T14:15:22Z",
"finished_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"
}Receives the events of your key's business in its environment by POST, and no other business's, signed according to Standard Webhooks, with retries spaced over about three days. Made by an agent, it answers without its secret: the person it acts for rotates the secret in the console to get one.
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.
idempotency-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
url*stringHTTPS, at a public address, in every environment: deliveries leave from Fiscalbase, so localhost or a private network would never reach your machine. To receive them while you develop, use a tunnel with a public URL.
urievents?array<>1 <= items[
"*"
]Created
application/json- response
id*stringuuidobject*"webhook_endpoint""webhook_endpoint"environment*string"sandbox""test""live"business_id*stringThe business it receives the events of.
uuidurl*stringurievents*array<>disabled*booleansecret_hint*|The signing secret, masked: whsec_ and its last 4 characters, to recognize it in a list. The full secret is only shown when you create the endpoint or rotate it. Null on endpoints created before the hint was stored: only a rotation fills it in, because the sealed secret can only be opened by the process that signs.
previous_secret_expires_at*|After rotating the secret, until when the previous one also signs deliveries; null if there is no previous one in effect.
date-timefailing_since*|Since when it has been failing: the first failed attempt after its last successful delivery; null if the last delivery succeeded.
date-timereplay*|nullcreated_at*stringdate-timeupdated_at*stringdate-timesecret*|The whsec_… signing secret, shown only in this response. With it you verify each delivery using any Standard Webhooks library. null when the response repeats an earlier request with the same Idempotency-Key, and when an agent made the endpoint, since a secret never reaches a model: rotate the secret to get a new one, which for an agent's endpoint the person does in the console, in Ajustes, Webhooks.
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://erp.example/hooks",
"events": [
"invoice.annulled"
]
}'{
"id": "01a21860-3db8-7d97-9fc2-ce5ff4dcc6ee",
"object": "webhook_endpoint",
"environment": "sandbox",
"business_id": "01a21860-3da0-7cc7-aa37-09107902c5ea",
"url": "https://erp.example/hooks",
"events": [
"invoice.annulled"
],
"disabled": false,
"secret_hint": "whsec_…urmd",
"previous_secret_expires_at": null,
"failing_since": null,
"replay": null,
"created_at": "2026-11-26T15:01:30.172Z",
"updated_at": "2026-11-26T15:01:30.172Z",
"secret": "whsec_cMG6l+Z+9s9DEe88AyxD5iHSxtleurmd"
}The endpoint, with since when it has been failing, if it is. It never includes the signing secret: it is only shown when you create or rotate it.
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 endpoint
application/json- response
id*stringuuidobject*"webhook_endpoint""webhook_endpoint"environment*string"sandbox""test""live"business_id*stringThe business it receives the events of.
uuidurl*stringurievents*array<>disabled*booleansecret_hint*|The signing secret, masked: whsec_ and its last 4 characters, to recognize it in a list. The full secret is only shown when you create the endpoint or rotate it. Null on endpoints created before the hint was stored: only a rotation fills it in, because the sealed secret can only be opened by the process that signs.
previous_secret_expires_at*|After rotating the secret, until when the previous one also signs deliveries; null if there is no previous one in effect.
date-timefailing_since*|Since when it has been failing: the first failed attempt after its last successful delivery; null if the last delivery succeeded.
date-timereplay*|nullcreated_at*stringdate-timeupdated_at*stringdate-timecurl -X GET 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08'{
"id": "01a21860-7c7d-7dde-9f48-7544b9d82a05",
"object": "webhook_endpoint",
"environment": "sandbox",
"business_id": "01a21860-7c6a-7db7-8e49-ec8018335284",
"url": "https://erp.example/hooks",
"events": [
"*"
],
"disabled": false,
"secret_hint": "whsec_…bdZV",
"previous_secret_expires_at": null,
"failing_since": null,
"replay": null,
"created_at": "2026-11-26T15:01:46.239Z",
"updated_at": "2026-11-26T15:01:46.239Z"
}A disabled endpoint receives nothing until you enable it again.
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*stringuuidapplication/json- body
url?stringurievents?array<>1 <= itemsdisabled?booleanThe endpoint
application/json- response
id*stringuuidobject*"webhook_endpoint""webhook_endpoint"environment*string"sandbox""test""live"business_id*stringThe business it receives the events of.
uuidurl*stringurievents*array<>disabled*booleansecret_hint*|The signing secret, masked: whsec_ and its last 4 characters, to recognize it in a list. The full secret is only shown when you create the endpoint or rotate it. Null on endpoints created before the hint was stored: only a rotation fills it in, because the sealed secret can only be opened by the process that signs.
previous_secret_expires_at*|After rotating the secret, until when the previous one also signs deliveries; null if there is no previous one in effect.
date-timefailing_since*|Since when it has been failing: the first failed attempt after its last successful delivery; null if the last delivery succeeded.
date-timereplay*|nullcreated_at*stringdate-timeupdated_at*stringdate-timecurl -X PATCH 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-H 'Content-Type: application/json' \
-d '{
"events": [
"invoice.authorized",
"credit_note.returned"
],
"disabled": true
}'{
"id": "01a21860-7d72-7a79-8c22-b3402212fd67",
"object": "webhook_endpoint",
"environment": "sandbox",
"business_id": "01a21860-7d58-77e7-997d-a5333bf7b4c8",
"url": "https://erp.example/hooks",
"events": [
"invoice.authorized",
"credit_note.returned"
],
"disabled": true,
"secret_hint": "whsec_…suN7",
"previous_secret_expires_at": null,
"failing_since": null,
"replay": null,
"created_at": "2026-11-26T15:01:46.484Z",
"updated_at": "2026-11-26T15:01:50.659Z"
}Pending deliveries are 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*stringuuidDeleted
curl -X DELETE 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08'Creates a new secret, shown only in this response. While the overlap lasts, each delivery carries two signatures, one per secret, so you can switch yours without missing any.
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
expires_in_hours?integerHow many hours the previous secret keeps signing alongside the new one, from 0 to 72. With 0 it stops being valid immediately: use it if it leaked.
0 <= value <= 7224The endpoint with its new secret
application/json- response
id*stringuuidobject*"webhook_endpoint""webhook_endpoint"environment*string"sandbox""test""live"business_id*stringThe business it receives the events of.
uuidurl*stringurievents*array<>disabled*booleansecret_hint*|The signing secret, masked: whsec_ and its last 4 characters, to recognize it in a list. The full secret is only shown when you create the endpoint or rotate it. Null on endpoints created before the hint was stored: only a rotation fills it in, because the sealed secret can only be opened by the process that signs.
previous_secret_expires_at*|After rotating the secret, until when the previous one also signs deliveries; null if there is no previous one in effect.
date-timefailing_since*|Since when it has been failing: the first failed attempt after its last successful delivery; null if the last delivery succeeded.
date-timereplay*|nullcreated_at*stringdate-timeupdated_at*stringdate-timesecret*|The whsec_… signing secret, shown only in this response. With it you verify each delivery using any Standard Webhooks library. null when the response repeats an earlier request with the same Idempotency-Key, and when an agent made the endpoint, since a secret never reaches a model: rotate the secret to get a new one, which for an agent's endpoint the person does in the console, in Ajustes, Webhooks.
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate-secret' \
-H 'Content-Type: application/json' \
-d '{
"expires_in_hours": 1
}'{
"id": "01a21860-7f84-700b-9def-70106a953a7a",
"object": "webhook_endpoint",
"environment": "sandbox",
"business_id": "01a21860-7f75-72a2-b35d-0512f0f34890",
"url": "https://erp.example/hooks",
"events": [
"*"
],
"disabled": false,
"secret_hint": "whsec_…AUiE",
"previous_secret_expires_at": "2026-11-26T16:01:51.178Z",
"failing_since": null,
"replay": null,
"created_at": "2026-11-26T15:01:47.013Z",
"updated_at": "2026-11-26T15:01:51.181Z",
"secret": "whsec_+LCuXvhCVD66YlQ0P/ouPRPrexKOAUiE"
}Delivers again what the endpoint's business and environment told since since, of the types types names (every type the endpoint hears without it), each delivery's payload saying replay: true. Received documents come first, every one issued since that day however long ago, as received_document.created with the id derived from its access key; then every other event recorded since that day, in the order it happened, under its own id. Events are kept 90 days, so nothing older than that is replayed but received documents. A receiver that deduplicates by webhook-id sees an event delivered live and again as one. It runs in the background, one per endpoint at a time; the endpoint's replay shows its progress. Answers 202 with the replay.
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
since*stringReplay what happened on or after this day (Ecuador's calendar), up to today: the received documents issued since, and the other events recorded since, which are kept 90 days.
datetypes?array<string>Only these event types (invoice.authorized, received_document.created…), of those the endpoint hears. Without it, every type it hears. A type the endpoint doesn't hear replays nothing; an unknown one is 422 webhook_event_unknown.
1 <= items <= 50Started
application/json- response
id*stringuuidobject*"webhook_replay""webhook_replay"status*string"running""completed""failed"since*stringWhat happened on or after this day (Ecuador's calendar) is replayed: received documents issued since, and the other events recorded since.
datetypes*array<string>|The event types it replays, of those the endpoint hears; null for every one.
event_count*integerHow many events it replays, counted when it started.
queued*integerHow many of them it has queued so far; each is then delivered with the usual retries.
created_at*stringdate-timefinished_at*|date-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/replay' \
-H 'Content-Type: application/json' \
-d '{
"since": "2026-11-26"
}'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "webhook_replay",
"status": "running",
"since": "2019-08-24",
"types": [
"string"
],
"event_count": 0,
"queued": 0,
"created_at": "2019-08-24T14:15:22Z",
"finished_at": "2019-08-24T14:15:22Z"
}Your key's business's events in its environment, as server-sent events, from the moment it opens: the same events, in the same envelope, as the webhooks POST, except that the agent a person connected hears only the events whose data the person reads through that resource's own GET, with their role and their establishments (id, type, api_version, timestamp, data, the resource as its GET answers it; every type and its data is in the document's webhooks). Each event is one message whose data is that JSON and whose id is the event's; they come in the order they were stored. A read_only key opens it too.
Resume with Last-Event-ID, which an EventSource sends by itself when it reconnects, or with cursor: the events after that one are sent first, from those kept (90 days), then the new ones. A stream opened without either starts after the business's newest event, whose id it sends first with no message, so a client that hears nothing still resumes from there. A comment line every 18 seconds keeps it open; after about 90 seconds it ends, with retry: 1000, and the client opens it again from its last event. A key holds at most 5 open at once: one more is 429 event_streams_exhausted with Retry-After.
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.
cursor?stringThe id of an event to start after, for a client that can't send Last-Event-ID: the cursor the stream's messages carry as their id.
uuidtypes?stringOnly these event types, separated by commas, such as invoice.authorized,invoice.returned; every type when left out. One of invoice.authorized, invoice.returned, invoice.not_authorized, invoice.annulled, credit_note.authorized, credit_note.returned, credit_note.not_authorized, credit_note.annulled, debit_note.authorized, debit_note.returned, debit_note.not_authorized, debit_note.annulled, withholding.authorized, withholding.returned, withholding.not_authorized, withholding.annulled, delivery_note.authorized, delivery_note.returned, delivery_note.not_authorized, delivery_note.annulled, purchase_settlement.authorized, purchase_settlement.returned, purchase_settlement.not_authorized, purchase_settlement.annulled, import.completed, import.failed, received_document.created, received_document.updated, series.created, series.gap_detected, series.duplicate_detected, series.collision_detected, series.gap_settled, series.updated, stock_level.fell_low, stock_level.ran_out, business.issuing_changed, contact.email_bounced, collection.recorded, collection.voided, invoice.withholding_applied, invoice.withholding_removed, invoice.collected, invoice.fell_overdue, held_document.issued, held_document.failed, quote.created, quote.updated, quote.sent, quote.accepted, quote.expired, quote.converted, quote.deleted. A test key can't ask for a received document's events (422 event_not_in_test): test keeps no received documents.
last-event-id?stringThe id of the last event received: the stream starts after it. It wins over cursor.
uuidThe stream: each event a message with its id and its envelope as data.
response?stringtext/event-streamid: <event id> and data: {"id", "type", "api_version", "timestamp", "data"} for each event, and : heartbeat comments.
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/events'"string"One event of your key's business in its environment, in the envelope its webhook delivery and the stream carried: for a receiver that lost a delivery, or wants to check one it got against what was sent. The agent a person connected reads only an event whose data the person reads through that resource's own GET; any other is 404 event_not_found. Events are kept 90 days.
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 event
application/json- response
id*stringThe event's id, the webhook-id of its deliveries.
uuidtype*stringWhat happened, one of the types of the document's webhooks.
api_version*"1"The version of the API the envelope and its data are written in. /v1 only adds to them; a change that breaks a receiver would come under another version.
"1"timestamp*stringdate-timedata*The resource as its GET answered when the event happened; each type's shape is in the document's webhooks.
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/events/497f6eca-6276-4993-bfeb-53cbbbba6f08'{
"id": "01a21860-6a2c-7413-8d0a-4893cde23f9f",
"type": "quote.sent",
"api_version": "1",
"timestamp": "2026-11-26T15:01:41.547Z",
"data": {
"id": "01a21860-6785-7b0c-8854-7b87cf25fe47",
"total": "285.00",
"number": "PRO-000001",
"object": "quote",
"status": "draft",
"country": "ec",
"invoice": null,
"sent_to": null,
"currency": "USD",
"document": {
"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"
}
],
"quantity": "2",
"unit_price": "120.00",
"description": "Taladro percutor"
},
{
"code": "SKU-1",
"taxes": [
{
"rate": "iva_0",
"type": "iva"
}
],
"quantity": "2",
"unit_price": "4.50",
"description": "Guantes"
}
],
"payments": [
{
"term": {
"unit": "days",
"length": 30
},
"method": "tarjeta_credito"
}
],
"additional_info": [
{
"name": "Orden de compra",
"value": "OC-1041"
}
]
},
"metadata": {},
"pdf_ready": false,
"created_at": "2026-11-26T15:01:40.868Z",
"issue_date": "2026-11-26",
"updated_at": "2026-11-26T15:01:40.868Z",
"business_id": "01a21860-66d5-7966-b23f-f23170b3c8df",
"calculation": {
"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
},
"environment": "sandbox",
"valid_until": "2026-11-26",
"counterparty": {
"name": "FERRETERÍA EL SOL S.A.",
"identification": "1790012345001"
},
"establishment": null,
"status_transitions": {
"draft": "2026-11-26T15:01:40.868Z"
}
}
}Reference data
What the SRI publishes: a taxpayer by their RUC or `cedula` number, and its code tables, with what each code means and, for its messages, what to do.
Account
Who is calling: the key's environment and permission, its organization and the business it acts for, with what its plan covers and how much of the month is used.