Mutate an open sale — add or remove line items, update quantities, apply discounts, attach customer data.
Not a fiscal event. No signature is generated. Mutations are free
and reversible until complete is called.
Only available for sales in open state.
Platform API key sent as Authorization: Bearer ofk_platform_....
Platform integrators also pass OpenFiskal-Organization: org_xxx
to act on behalf of a merchant.
Merchant organization ID. Required for platform integrators acting on behalf of a specific merchant. Omit when using an organization-scoped API key directly.
Mutable fields on an open sale. All fields are optional.
Replaces the current line item list
Order-level discounts (coupons, automatic promotions). Replaces the current cart discount list. OpenFiskal allocates these across line items proportionally and stores the per-line allocations.
Sale updated
Shared fields present on every operation regardless of type.
"op_01HXYZ"
"operation"sale The POS lifecycle state of the operation. Transitions are
one-directional and enforced server-side — invalid transitions
return 409 Conflict.
open — operation in progress, mutations allowedcompleted — POS finalized the operation (payment collected)cancelled — POS cancelled before completion| From | Event | To |
|---|---|---|
open | POST .../complete | completed |
open | POST .../cancel | cancelled |
open, completed, cancelled Monotonically increasing, register-scoped sequence number
Jurisdiction-specific fiscal output attached to every operation.
Discriminated by regime — each variant carries typed fields for its
fiscal security device and signing protocol.
The fiscalization state of the operation, tracked independently from the operation state.
pending — fiscalization not yet attempted or in progresssucceeded — fiscal device recorded the event, fiscal data availablefailed — fiscalization failed (device unreachable, transmission error)The POS should check fiscal.state before printing — only print
fiscal data on the receipt when it is succeeded.
pending, succeeded, failed Links to related operations. The audit chain between operations lives here
at the envelope level — not inside the type-specific data block — because
any operation type can reference any other.
Timestamp of the fiscal start event