Skip to main content
POST
/
registers
/
{registerId}
/
closings
Trigger a closing
curl --request POST \
  --url https://api.openfiskal.com/v1/registers/{registerId}/closings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "daily"
}
'
{
  "id": "cls_01HXYZ",
  "object": "<string>",
  "register_id": "<string>",
  "type": "daily",
  "state": "pending",
  "period": {
    "from": "2023-11-07T05:31:56Z",
    "to": "2023-11-07T05:31:56Z"
  },
  "summary": {
    "operation_count": 123,
    "total_gross": 123,
    "total_tax": 123,
    "total_by_payment_method": {},
    "by_operation_type": {
      "sales": {
        "count": 123,
        "total_gross": 123
      },
      "refunds": {
        "count": 123,
        "total_gross": 123
      },
      "voids": {
        "count": 123
      },
      "cash_movements": {
        "cash_in_total": 123,
        "cash_out_total": 123
      }
    },
    "tax_breakdown": [
      {
        "rate": "<string>",
        "category": "<string>",
        "taxable_amount": 123,
        "tax_amount": 123
      }
    ]
  },
  "fiscal": {
    "regime": "<string>",
    "z_number": 42,
    "tse_serial": "abc123def456",
    "signature": "aSDinaTvuI8gbWludGxpZnk=",
    "transaction_counter": 123,
    "dsfinvk_export_id": "<string>"
  },
  "created_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "links": {
    "pdf": "<string>"
  }
}

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.

Idempotency-Key
string<uuid>

Unique key to make the request idempotent. If a request with this key was already processed, the original response is returned without re-executing the operation. Strongly recommended on all start and complete actions — these are fiscal events and must not be duplicated.

Path Parameters

registerId
string
required

Body

application/json
type
enum<string>
default:daily
Available options:
daily,
shift,
monthly,
annual

Response

Closing created

id
string
Example:

"cls_01HXYZ"

object
string
Allowed value: "closing"
register_id
string
type
enum<string>
Available options:
daily,
shift,
monthly,
annual
state
enum<string>
Available options:
pending,
completed,
transmitted,
failed
period
object
summary
object
fiscal
object

Jurisdiction-specific closing data. Discriminated by regime.

created_at
string<date-time>
completed_at
string<date-time> | null