Custom Integration: API Reference
This is the endpoint reference for the FiscoBridge POS API, used by Custom Integrations to fiscalize invoices directly from your own software. For error responses and tax authority error codes, see API Errors and Error Codes.
Base URL and Authentication
Authenticate every request with the X-Api-Key header, using the Client ID and Client Secret from your Custom Integration (see Managing API Keys):
Each API key is bound to one certificate — invoices are signed with that certificate automatically. You cannot select a different certificate per request; to fiscalize for another company, create a Custom Integration (and key) for its certificate.
A missing, malformed, or revoked key — or a key whose certificate has been revoked — returns 401 Unauthorized.
Endpoints
Method | Endpoint | Purpose |
|---|---|---|
|
| Create (fiscalize) an invoice |
|
| Refund an invoice (full or partial) |
|
| Cancel a signed invoice |
|
| Issue a fiscal copy |
|
| List invoices (paged) |
|
| Get one invoice |
|
| Get the receipt journal + QR code |
|
| Aggregated totals for a date range |
|
| SDC status and current tax rates for your certificate |
|
| Organization name, tax ID, environment, verification URLs |
|
| Current tax authority attention/warning messages |
Creating an Invoice
POST /api/invoices with a JSON body wrapping an invoiceRequest:
invoiceRequest fields
Field | Type | Required | Notes |
|---|---|---|---|
| enum | yes | See enums below. Use |
| enum | yes |
|
| array | yes | At least one payment; the sum should equal the items total |
| array | yes | At least one line item |
| string | no | Max 50 characters |
| string | no | Buyer's tax ID, printed on the receipt (max ~20 characters) |
| string | no | Only valid together with |
| ISO 8601 datetime | no | Defaults to the signing time |
| string | no | Required by the tax authority for refunds/copies of a previous document (max 50) |
| ISO 8601 datetime | no | The SDC datetime of the referenced document |
| string | no | Echoed back in the response (max 32). Not an idempotency key — retrying a request creates a new fiscal invoice |
payment[] fields
Field | Type | Notes |
|---|---|---|
| decimal | Max 2 decimal places |
| enum | See enums |
items[] fields
Field | Type | Notes |
|---|---|---|
| string | Max 2048 characters |
| decimal | 0.001 – 99,999,999,999.9999 |
| decimal | Max 2 decimal places |
| decimal | Max 2 decimal places, non-negative for sales |
| array of letters | Tax label(s) for the line — must match labels defined for your certificate's country (letters are auto-uppercased). Get the valid set from |
| string | Optional GTIN/EAN, 8–14 digits |
Success response
verificationUrl— the public tax authority verification link (this is what the receipt QR code points to)verificationQRCode— the QR code as a base64-encoded GIF image, ready to print on the receipt (at least 42×42 mm)journal— the plain-text fiscal receipttotalAmountis negative for refunds and cancellations
Note:
verificationQRCodeandjournalare returned on create/refund/cancel/copy and by the journal endpoint — they are not included inGETinvoice lookups. Store them, or re-fetch via/api/invoices/{invoiceNumber}/journal.
Refund, Cancel, Copy
All three mint a new fiscal document referencing the original, and are only allowed for invoices with status Signed:
POST /api/invoices/{invoiceNumber}/cancel— full reversal; the original's status becomesCancelledPOST /api/invoices/{invoiceNumber}/refund— optional body{ "items": [...], "payment": [...] }for a partial refund; omit the body (or send{}) for a full refund. The original's status becomesRefundedPOST /api/invoices/{invoiceNumber}/copy— issues a fiscal copy (invoiceType: Copy), no body
Each returns the same signed-invoice response shape as create.
Listing and Reading Invoices
GET /api/invoices supports query parameters: status, from, to, sourceFilter (pos or integration), page (default 1), pageSize (default 50), plus taxpayerId, locationId, certificateId filters. Results are newest-first and include invoiceNumber, invoiceCounter, sdcDateTime, totalAmount, invoiceType, transactionType, status, verificationUrl, externalInvoiceId, and source.
GET /api/invoices/daily-report?fromDate=...&toDate=... returns per-type invoice counts and total sale/refund amounts. The range must be at most 62 days, and invoiceType/transactionType filters are accepted. Cancelled invoices are excluded.
GET /api/invoices/{invoiceNumber}/journal re-fetches { "journal": "...", "verificationQRCode": "..." } for a signed invoice from the tax authority's verification page. This calls an external service and can occasionally be slow or return empty fields — retry later if so.
Status and Tax Rates
GET /api/status returns the SDC status for your key's certificate, including the authoritative list of valid tax labels and rates — always read them from here rather than hardcoding, since rates can change. GET /api/status/environment-parameters returns your organization details and environment URLs; GET /api/status/attention returns any current tax authority notices.
Rate Limits and Quotas
180 requests per minute per IP — exceeding it returns 429 Too Many Requests
Your plan's monthly invoice allowance applies — exceeding it returns 402 Payment Required (see Invoice Limits and Usage)
Conventions and Gotchas
JSON property names are camelCase; dates are ISO 8601 and returned in UTC
Enum fields accept either the name (
"Cash") or the number (1) on input; responses return enum names as stringsrequestIdis not an idempotency key — implement your own duplicate protection before retrying a createAmounts with more than 2 decimal places are rejected by the tax authority (error code 2804)
Any
invoiceNumberorcertificateIdyou send in a create request body is ignored — the fiscal number is assigned by the tax authority and the certificate comes from your API keyUse
invoiceType: "Training"for end-to-end testing — training receipts are marked "NOT A FISCAL INVOICE" (but still count toward your monthly allowance)
Enums
invoiceType
Value | Name | Meaning |
|---|---|---|
0 |
| Standard fiscal invoice |
1 |
| Not a fiscal invoice — quote/pre-billing |
2 |
| Fiscal copy of a previous document |
3 |
| Test invoice, marked "NOT A FISCAL INVOICE" |
4 |
| Advance payment |
transactionType
Value | Name |
|---|---|
0 |
|
1 |
|
paymentType
Value | Name |
|---|---|
0 |
|
1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
status (in invoice lookups)
Value | Name |
|---|---|
0 |
|
1 |
|
2 |
|
Next Steps
API errors and error codes — HTTP statuses, error shapes, and all tax authority validation codes
Custom Integration — Creating the integration and managing API keys
Invoice types and transaction types — Which combinations are valid and when to use each