Programmatic access to documents, rules, tenants, and webhooks. All endpoints are scoped by API key and tenant.
curl -X POST https://api.fiscalflow.io/v1/documents \
-H "Authorization: Bearer ff_live_••••••••" \
-H "Content-Type: multipart/form-data" \
-F "file=@invoice.xml" \
-F "type=invoice_xml" \
-F "period=2026-Q2"All requests require a Bearer token in the Authorization header.
Authorization: Bearer ff_live_xxx| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/documents | Upload a fiscal document (XML or PDF). |
| GET | /v1/documents | List documents with filters. |
| GET | /v1/documents/{id} | Retrieve a document with reconciliation results. |
| PATCH | /v1/documents/{id} | Update document metadata or status. |
| DELETE | /v1/documents/{id} | Delete a document. |
| GET | /v1/rules | List rules in the engine. |
| POST | /v1/rules | Create a custom reconciliation rule. |
| POST | /v1/rules/{id}/run | Run a rule against a dataset. |
| GET | /v1/tenants | Admin: list tenants. |
| POST | /v1/webhooks | Register a webhook endpoint. |
Receive events when documents finish processing.
{
"id": "evt_8a72f",
"type": "document.processed",
"data": {
"document_id": "d-1001",
"status": "processed",
"rules_passed": 98,
"rules_failed": 2
},
"tenant_id": "t-001",
"created_at": "2026-04-30T09:21:00Z"
}Standard HTTP codes with structured error bodies.
| 400 | Validation error |
| 401 | Missing or invalid API key |
| 403 | Tenant scope mismatch |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |