Stream 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 (id, type, 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 since: 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.
since?stringThe id of an event to start after, for a client that can't send Last-Event-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.gap_detected, series.duplicate_detected, series.collision_detected, series.gap_settled, series.updated, business.issuing_updated. 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 since.
uuidFiscalbase-Environment?stringThe environment the call acts in. Required with a person's session; a key's own environment is the one that counts, so a key may leave it out, and naming another is 422 environment_mismatch.
"sandbox""test""live"Fiscalbase-Business?stringThe business the call acts for. With a person's session, the one the call is about (without it, a call about one business is 422 business_required and a list covers every business of the organization); a key acts for its own, so naming another is 422 business_mismatch.
uuidFiscalbase-Channel?stringWhich of Fiscalbase's own integrations a key's call comes from, recorded as the channel of the documents it issues: a record, not a permission. Without it, api. A person's call is always console.
"api""mcp"Fiscalbase-Agent?stringThe AI agent a key's call comes from, as its client names itself (the MCP server sets it); recorded with the request and shown in the console's request log.
The stream: each event a message with its id and its envelope as data.
response?stringtext/event-streamid: <event id> and data: {"id", "type", "timestamp", "data"} for each event, and : heartbeat comments.
curl -X GET 'https://api.fiscalbase.io/v1/events'"string"The nightly check found numbers missing from a series, perhaps sales nobody brought in Webhook
Anterior
Your business's plan and usage for the month GET
The plan and usage of your key's business, as each live business has its own: the month's authorized `live` documents and where they stand against the plan's monthly quota. Nothing is charged above a plan: once `quota.reached` is true, a `live` document is refused with `402 plan_limit` (`plan_quota_reached`) before it is numbered, and kept to issue once the business moves to a bigger plan. A `sandbox` business answers its month's `sandbox` documents, with no quota.