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

POST

/api/invoices

Create (fiscalize) an invoice

POST

/api/invoices/{invoiceNumber}/refund

Refund an invoice (full or partial)

POST

/api/invoices/{invoiceNumber}/cancel

Cancel a signed invoice

POST

/api/invoices/{invoiceNumber}/copy

Issue a fiscal copy

GET

/api/invoices

List invoices (paged)

GET

/api/invoices/{invoiceNumber}

Get one invoice

GET

/api/invoices/{invoiceNumber}/journal

Get the receipt journal + QR code

GET

/api/invoices/daily-report

Aggregated totals for a date range

GET

/api/status

SDC status and current tax rates for your certificate

GET

/api/status/environment-parameters

Organization name, tax ID, environment, verification URLs

GET

/api/status/attention

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

invoiceType

enum

yes

See enums below. Use Training while testing

transactionType

enum

yes

Sale or Refund

payment

array

yes

At least one payment; the sum should equal the items total

items

array

yes

At least one line item

cashier

string

no

Max 50 characters

buyerId

string

no

Buyer's tax ID, printed on the receipt (max ~20 characters)

buyerCostCenterId

string

no

Only valid together with buyerId (max 50)

dateAndTimeOfIssue

ISO 8601 datetime

no

Defaults to the signing time

referentDocumentNumber

string

no

Required by the tax authority for refunds/copies of a previous document (max 50)

referentDocumentDT

ISO 8601 datetime

no

The SDC datetime of the referenced document

requestId

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

amount

decimal

Max 2 decimal places

paymentType

enum

See enums

items[] fields

Field

Type

Notes

name

string

Max 2048 characters

quantity

decimal

0.001 – 99,999,999,999.9999

unitPrice

decimal

Max 2 decimal places

totalAmount

decimal

Max 2 decimal places, non-negative for sales

labels

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 GET /api/status

gtin

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 receipt

  • totalAmount is negative for refunds and cancellations

Note: verificationQRCode and journal are returned on create/refund/cancel/copy and by the journal endpoint — they are not included in GET invoice 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 becomes Cancelled

  • POST /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 becomes Refunded

  • POST /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 strings

  • requestId is not an idempotency key — implement your own duplicate protection before retrying a create

  • Amounts with more than 2 decimal places are rejected by the tax authority (error code 2804)

  • Any invoiceNumber or certificateId you send in a create request body is ignored — the fiscal number is assigned by the tax authority and the certificate comes from your API key

  • Use 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

Normal

Standard fiscal invoice

1

Proforma

Not a fiscal invoice — quote/pre-billing

2

Copy

Fiscal copy of a previous document

3

Training

Test invoice, marked "NOT A FISCAL INVOICE"

4

Advance

Advance payment

transactionType

Value

Name

0

Sale

1

Refund

paymentType

Value

Name

0

Other

1

Cash

2

Card

3

Check

4

WireTransfer

5

Voucher

6

MobileMoney

status (in invoice lookups)

Value

Name

0

Signed

1

Cancelled

2

Refunded

Next Steps

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.