API Reference
FiscalAPI is a RESTful API that accepts JSON request bodies and returns JSON responses. All endpoints are versioned under /v1/.
Base URL
https://api.fiscalapi.com
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /health | No | Health check |
GET | /version | No | API version information |
POST | /v1/accounts | No | Create account |
POST | /v1/locations | Yes | Create location |
GET | /v1/locations | Yes | List locations |
GET | /v1/locations/{id} | Yes | Get location |
PATCH | /v1/locations/{id} | Yes | Update location |
DELETE | /v1/locations/{id} | Yes | Delete location |
POST | /v1/transactions | Yes | Create transaction |
GET | /v1/transactions | Yes | List transactions |
GET | /v1/transactions/{id} | Yes | Get transaction |
POST | /v1/transactions/{id}/cancel | Yes | Cancel transaction |
POST | /v1/certificates | Yes | Upload certificate |
GET | /v1/certificates | Yes | List certificates |
DELETE | /v1/certificates/{id} | Yes | Delete certificate |
POST | /v1/webhooks | Yes | Create webhook |
GET | /v1/webhooks | Yes | List webhooks |
GET | /v1/webhooks/{id} | Yes | Get webhook |
PATCH | /v1/webhooks/{id} | Yes | Update webhook |
DELETE | /v1/webhooks/{id} | Yes | Delete webhook |
POST | /v1/webhooks/{id}/rotate-secret | Yes | Rotate webhook secret |
GET | /v1/retry-queue | Yes | List retry queue entries |
GET | /v1/retry-queue/stats | Yes | Retry queue stats |
POST | /v1/admin/process-pending | Yes | Trigger batch processing |
GET | /v1/admin/batch-stats | Yes | Batch statistics |
Request format
All POST and PATCH requests must include:
Content-Type: application/json
Response format
All responses return JSON with appropriate HTTP status codes:
| Code | Meaning |
|---|---|
200 | Success |
201 | Resource created |
204 | Success, no content (e.g., delete) |
400 | Validation error |
401 | Authentication failed |
403 | Forbidden (inactive account or live mode not enabled) |
404 | Resource not found |
207 | Multi-Status (partial success in batch operations) |
409 | Conflict (duplicate resource or non-cancellable transaction) |
500 | Internal server error |
Pagination
List endpoints support pagination with limit and offset query parameters:
| Parameter | Default | Max | Description |
|---|---|---|---|
limit | 20 | 100 | Items per page |
offset | 0 | 10000 | Number of items to skip |
Paginated responses include metadata:
{
"data": [...],
"total": 42,
"limit": 20,
"offset": 0
}
Error format
All errors return a JSON object with an error field:
{
"error": "human-readable error message"
}
See the Error handling guide for details.