Ir al contenido

API de webhooks y eventos

List an endpoint's deliveries

GET
/v1/webhook-endpoints/{id}/deliveries

Each event sent to this endpoint, from newest to oldest, with each attempt.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

id*string
Formatuuid

Query Parameters

limit?integer

How many per page, from 1 to 100.

Range1 <= value <= 100
Default20
cursor?string

The next_cursor or prev_cursor of a previous response. Without a cursor, the first page.

Lengthlength <= 200
created_at[gte]?string

Only what was created at or after this moment, ISO 8601 with its offset.

Formatdate-time
created_at[lte]?string

Only what was created at or before this moment, ISO 8601 with its offset.

Formatdate-time
updated_at[gte]?string

Only 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.

Formatdate-time
updated_at[lte]?string

Only what last changed at or before this moment, ISO 8601 with its offset.

Formatdate-time
status?string
Value in"pending""succeeded""failed"
type?string

Only 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.

Lengthlength <= 100
resource_id?string

Only those of events about this resource, the id of their data: a document, a series, a stock level …

Formatuuid

Response Body

A page of deliveries

application/json
  1. response
object*"list"
Value in"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.

Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/deliveries'
Example Response
{
  "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"
}

Retrieve a delivery

GET
/v1/webhook-endpoints/{id}/deliveries/{delivery_id}

A delivery with the event it carried and each attempt, from first to last. It only reads: to send it again use POST .../resend.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

id*string
Formatuuid
delivery_id*string
Formatuuid

Response Body

The delivery

application/json
  1. response
id*string
Formatuuid
object*"webhook_delivery"
Value in"webhook_delivery"
endpoint_id*string
Formatuuid
event*
status*string

pending while it is sent or retried, succeeded when your endpoint responded 2xx, failed when the retries ran out.

Value in"pending""succeeded""failed"
attempts*array<>

Each attempt, from first to last.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/deliveries/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "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"
}

Send a delivery again

POST
/v1/webhook-endpoints/{id}/deliveries/{delivery_id}/resend

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.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

id*string
Formatuuid
delivery_id*string
Formatuuid

Header Parameters

idempotency-key?string

Send 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.

Length1 <= length <= 255

Response Body

The new delivery, queued

application/json
  1. response
id*string
Formatuuid
object*"webhook_delivery"
Value in"webhook_delivery"
endpoint_id*string
Formatuuid
event*
status*string

pending while it is sent or retried, succeeded when your endpoint responded 2xx, failed when the retries ran out.

Value in"pending""succeeded""failed"
attempts*array<>

Each attempt, from first to last.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X POST 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08/deliveries/497f6eca-6276-4993-bfeb-53cbbbba6f08/resend'
Example Response
{
  "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"
}

List webhook endpoints

GET
/v1/webhook-endpoints

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.

Authorization

apiKey
headerAuthorizationBearer <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.

Query Parameters

limit?integer

How many per page, from 1 to 100.

Range1 <= value <= 100
Default20
cursor?string

The next_cursor or prev_cursor of a previous response. Without a cursor, the first page.

Lengthlength <= 200
created_at[gte]?string

Only what was created at or after this moment, ISO 8601 with its offset.

Formatdate-time
created_at[lte]?string

Only what was created at or before this moment, ISO 8601 with its offset.

Formatdate-time
updated_at[gte]?string

Only 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.

Formatdate-time
updated_at[lte]?string

Only what last changed at or before this moment, ISO 8601 with its offset.

Formatdate-time

Response Body

The endpoints of your key's environment, from newest to oldest

application/json
  1. response
object*"list"
Value in"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.

Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints'
Example Response
{
  "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"
}

Create a webhook endpoint

POST
/v1/webhook-endpoints

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.

Authorization

apiKey
headerAuthorizationBearer <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.

Header Parameters

idempotency-key?string

Send 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.

Length1 <= length <= 255

Request Body

application/json
  1. body
url*string

HTTPS, 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.

Formaturi
events?array<>
Items1 <= items
Default
[
  "*"
]

Response Body

Created

application/json
  1. response
id*string
Formatuuid
object*"webhook_endpoint"
Value in"webhook_endpoint"
environment*string
Value in"sandbox""test""live"
business_id*string

The business it receives the events of.

Formatuuid
url*string
Formaturi
events*array<>
disabled*boolean
secret_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.

Formatdate-time
failing_since*|

Since when it has been failing: the first failed attempt after its last successful delivery; null if the last delivery succeeded.

Formatdate-time
replay*|null
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
secret*|

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.

Example Request
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"
  ]
}'
Example Response
{
  "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"
}

Retrieve a webhook endpoint

GET
/v1/webhook-endpoints/{id}

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.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

id*string
Formatuuid

Response Body

The endpoint

application/json
  1. response
id*string
Formatuuid
object*"webhook_endpoint"
Value in"webhook_endpoint"
environment*string
Value in"sandbox""test""live"
business_id*string

The business it receives the events of.

Formatuuid
url*string
Formaturi
events*array<>
disabled*boolean
secret_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.

Formatdate-time
failing_since*|

Since when it has been failing: the first failed attempt after its last successful delivery; null if the last delivery succeeded.

Formatdate-time
replay*|null
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "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"
}

Update a webhook endpoint

PATCH
/v1/webhook-endpoints/{id}

A disabled endpoint receives nothing until you enable it again.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
url?string
Formaturi
events?array<>
Items1 <= items
disabled?boolean

Response Body

The endpoint

application/json
  1. response
id*string
Formatuuid
object*"webhook_endpoint"
Value in"webhook_endpoint"
environment*string
Value in"sandbox""test""live"
business_id*string

The business it receives the events of.

Formatuuid
url*string
Formaturi
events*array<>
disabled*boolean
secret_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.

Formatdate-time
failing_since*|

Since when it has been failing: the first failed attempt after its last successful delivery; null if the last delivery succeeded.

Formatdate-time
replay*|null
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -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
}'
Example Response
{
  "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"
}

Delete a webhook endpoint

DELETE
/v1/webhook-endpoints/{id}

Pending deliveries are discarded.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

id*string
Formatuuid

Response Body

Deleted

Example Request
curl -X DELETE 'https://api-sandbox.fiscalbase.io/v1/webhook-endpoints/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
Empty

Rotate the signing secret

POST
/v1/webhook-endpoints/{id}/rotate-secret

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.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

id*string
Formatuuid

Header Parameters

idempotency-key?string

Send 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.

Length1 <= length <= 255

Request Body

application/json
  1. body
expires_in_hours?integer

How 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.

Range0 <= value <= 72
Default24

Response Body

The endpoint with its new secret

application/json
  1. response
id*string
Formatuuid
object*"webhook_endpoint"
Value in"webhook_endpoint"
environment*string
Value in"sandbox""test""live"
business_id*string

The business it receives the events of.

Formatuuid
url*string
Formaturi
events*array<>
disabled*boolean
secret_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.

Formatdate-time
failing_since*|

Since when it has been failing: the first failed attempt after its last successful delivery; null if the last delivery succeeded.

Formatdate-time
replay*|null
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
secret*|

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.

Example Request
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
}'
Example Response
{
  "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"
}

Replay events to an endpoint

POST
/v1/webhook-endpoints/{id}/replay

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.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

id*string
Formatuuid

Header Parameters

idempotency-key?string

Send 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.

Length1 <= length <= 255

Request Body

application/json
  1. body
since*string

Replay 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.

Formatdate
types?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.

Items1 <= items <= 50

Response Body

Started

application/json
  1. response
id*string
Formatuuid
object*"webhook_replay"
Value in"webhook_replay"
status*string
Value in"running""completed""failed"
since*string

What happened on or after this day (Ecuador's calendar) is replayed: received documents issued since, and the other events recorded since.

Formatdate
types*array<string>|

The event types it replays, of those the endpoint hears; null for every one.

event_count*integer

How many events it replays, counted when it started.

queued*integer

How many of them it has queued so far; each is then delivered with the usual retries.

created_at*string
Formatdate-time
finished_at*|
Formatdate-time
Example Request
curl -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"
}'
Example Response
{
  "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"
}

Stream events

GET
/v1/events

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.

Authorization

apiKey
headerAuthorizationBearer <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.

Query Parameters

cursor?string

The 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.

Formatuuid
types?string

Only 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.

Header Parameters

last-event-id?string

The id of the last event received: the stream starts after it. It wins over cursor.

Formatuuid

Response Body

The stream: each event a message with its id and its envelope as data.

response?stringtext/event-stream

id: <event id> and data: {"id", "type", "api_version", "timestamp", "data"} for each event, and : heartbeat comments.

Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/events'
Example Response
"string"

Retrieve an event

GET
/v1/events/{id}

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.

Authorization

apiKey
headerAuthorizationBearer <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.

Path Parameters

id*string
Formatuuid

Response Body

The event

application/json
  1. response
id*string

The event's id, the webhook-id of its deliveries.

Formatuuid
type*string

What 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.

Value in"1"
timestamp*string
Formatdate-time
data*

The resource as its GET answered when the event happened; each type's shape is in the document's webhooks.

Example Request
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/events/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{
  "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"
    }
  }
}