Skip to main content
POST
/
registers
/
{registerId}
/
fiscal-units
Create a fiscal unit
curl --request POST \
  --url https://api.openfiskal.com/v1/registers/{registerId}/fiscal-units \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "issue_register_credential": false
}
'
{
  "object": "<string>",
  "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"
  },
  "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": "ofk_reg_live_...",
  "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
issue_register_credential
boolean
default:false

If true, a register-scoped API key is issued and returned in the response. Only needed for device-direct integrations.

Response

Fiscal unit created

Response to fiscal unit creation. Always includes the full binding object. register_api_key is only present if issue_register_credential: true was requested.

object
string
Allowed value: "fiscal_unit_response"
fiscal_unit
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. Returned once only — store immediately and push to the device over a secure channel. null if issue_register_credential was not requested.

Example:

"ofk_reg_live_..."

credential_issued
boolean

Whether a register credential was issued in this response