Skip to main content
POST
/
registers
/
{registerId}
/
fiscal-units
/
replace
Replace the active fiscal unit
curl --request POST \
  --url https://api.openfiskal.com/v1/registers/{registerId}/fiscal-units/replace \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "TSE hardware end-of-life",
  "issue_register_credential": false
}
'
{
  "object": "<string>",
  "old_binding": {
    "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"
  },
  "new_binding": {
    "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"
  },
  "register": {
    "label": "Kasse 1",
    "jurisdiction": "IT",
    "serial_number": "<string>",
    "metadata": {},
    "id": "reg_01HXYZ",
    "object": "<string>",
    "location_id": "<string>",
    "state": "active",
    "active_fiscal_unit": {
      "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"
    },
    "fiscal_state": "pending",
    "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"
    },
    "created_at": "2023-11-07T05:31:56Z"
  },
  "register_api_key": "<string>",
  "credential_issued": true
}

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

registerId
string
required

Body

application/json
reason
string

Human-readable reason for the replacement

Example:

"TSE hardware end-of-life"

issue_register_credential
boolean
default:false

If true, a register-scoped API key is issued for the new binding.

Response

Fiscal unit replaced

Atomic replacement of a fiscal unit. The old binding is decommissioned and a new one provisioned in a single call.

object
string
Allowed value: "fiscal_unit_replacement"
old_binding
object

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.

new_binding
object

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.

register
object
register_api_key
string | null

Register-scoped API key for the new binding. null if issue_register_credential was not requested.

credential_issued
boolean