Skip to main content
POST
/
fiscal-units
/
{fiscalUnitId}
/
recover
Recover a fiscal unit from error state
curl --request POST \
  --url https://api.openfiskal.com/v1/fiscal-units/{fiscalUnitId}/recover \
  --header 'Authorization: Bearer <token>'
{
  "id": "fu_01HXYZ",
  "object": "<string>",
  "register_id": "reg_01HXYZ",
  "state": "provisioning",
  "jurisdiction": "IT",
  "fiscal_registration": {
    "regime": "<string>",
    "tse_serial": "abc123def456",
    "client_id": "Kasse 1",
    "signature_algorithm": "ecdsa-plain-SHA384",
    "time_format": "utcTime",
    "registered_at": "2023-11-07T05:31:56Z"
  },
  "reason": "TSE hardware end-of-life",
  "replaces": "fu_00HXYZ",
  "replaced_by": "fu_02HXYZ",
  "provisioned_at": "2023-11-07T05:31:56Z",
  "decommissioned_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Platform API key sent as Authorization: Bearer ofk_platform_.... Platform integrators also pass OpenFiskal-Organization: org_xxx to act on behalf of a merchant.

Headers

OpenFiskal-Organization
string

Merchant organization ID. Required for platform integrators acting on behalf of a specific merchant. Omit when using an organization-scoped API key directly.

Path Parameters

fiscalUnitId
string
required

Response

Fiscal unit recovered

A FiscalUnit represents the link between a register and a fiscal compliance capability. A register can have one active fiscal unit at a time, with a full history of past fiscal units.

id
string
Example:

"fu_01HXYZ"

object
string
Allowed value: "fiscal_unit"
register_id
string
Example:

"reg_01HXYZ"

state
enum<string>
  • provisioning: Fiscal device is being initialized
  • active: Ready to sign operations — the only state that accepts fiscal events
  • error: Fiscal device failure (recoverable via /recover)
  • decommissioned: Permanently retired (terminal)
Available options:
provisioning,
active,
error,
decommissioned
jurisdiction
enum<string>
Available options:
IT,
DE,
AT
fiscal_registration
object

Jurisdiction-specific registration details. null while in provisioning state, populated once the fiscal device is initialized. Discriminated by regime.

reason
string | null

Human-readable reason for the current state. Present on error (failure reason) and decommissioned (retirement reason).

Example:

"TSE hardware end-of-life"

replaces
string | null

ID of the previous binding this one replaced, if any

Example:

"fu_00HXYZ"

replaced_by
string | null

ID of the binding that replaced this one, if any

Example:

"fu_02HXYZ"

provisioned_at
string<date-time> | null

When the fiscal device was successfully initialized

decommissioned_at
string<date-time> | null

When the binding was decommissioned

created_at
string<date-time>