Skip to main content
PATCH
/
operations
/
{operationId}
/
void
Void operation
curl --request PATCH \
  --url https://api.openfiskal.com/v1/operations/{operationId}/void \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'If-Match: <if-match>' \
  --header 'X-OpenFiskal-Merchant: <x-openfiskal-merchant>' \
  --data '
{
  "reason": "customer_abandoned_checkout"
}
'
{
  "id": "<string>",
  "merchant_id": "<string>",
  "source": "POS",
  "status": "open",
  "currency": "EUR",
  "resource_version": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "pretax_amount": "<string>",
  "tax_amount": "<string>",
  "tip_amount": "<string>",
  "total_amount": "<string>",
  "line_items": [
    {
      "id": "<string>",
      "title": "<string>",
      "quantity": 123,
      "unit_price": "<string>",
      "total_amount": "<string>",
      "taxes": [
        {
          "id": "<string>",
          "name": "<string>",
          "rate": "<string>",
          "tax_amount": "<string>"
        }
      ]
    }
  ],
  "payments": [
    {
      "id": "<string>",
      "payment_id": "<string>",
      "method": "<string>",
      "amount": "<string>",
      "currency": "<string>",
      "status": "pending",
      "processor": "<string>",
      "card_brand": "<string>",
      "processor_reference": "<string>",
      "processed_at": "2023-11-07T05:31:56Z"
    }
  ],
  "type": "sale",
  "location_id": "<string>",
  "register_id": "<string>",
  "session_id": "<string>",
  "external_id": "<string>",
  "fiscal_information": {
    "regime": "KassenSichV",
    "document_number": "<string>",
    "document_type": "<string>",
    "tss_serial_number": "<string>",
    "pos_client_serial_number": "<string>",
    "signature_algorithm": "<string>",
    "time_format": "<string>",
    "start_event": {
      "signed_at": "2023-11-07T05:31:56Z"
    },
    "end_event": {
      "signed_at": "2023-11-07T05:31:56Z",
      "transaction_counter": 123,
      "signature": "<string>",
      "public_key": "<string>",
      "process_type": "<string>",
      "process_data": "<string>"
    },
    "verification": {
      "qr_data": "<string>"
    }
  },
  "completed_at": "2023-11-07T05:31:56Z",
  "voided_at": "2023-11-07T05:31:56Z",
  "void_reason": "<string>",
  "note": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://dev.openfiskal.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-OpenFiskal-Merchant
string
required

Merchant identifier returned by the merchants resource.

If-Match
string
required

Latest operation ETag returned by OpenFiskal. Replace it after every successful mutation.

Idempotency-Key
string
required

Unique key per endpoint, merchant, and tenant. Retained for at least 24 hours.

Path Parameters

operationId
string
required

Body

application/json
reason
enum<string>
required

Reason for voiding the operation

Available options:
void_before_completion,
customer_abandoned_checkout,
operator_cancelled,
payment_failed
Example:

"customer_abandoned_checkout"

Response

Operation voided

id
string
required
merchant_id
string
required
source
enum<string>
required
Available options:
POS,
ONLINE
status
enum<string>
required
Available options:
open,
completed,
voided
currency
string
required

ISO 4217 currency code.

Example:

"EUR"

resource_version
number
required

Current server-issued version for the operation, starting at 1. Returned as ETag header.

created_at
string<date-time>
required
updated_at
string<date-time>
required
pretax_amount
string
required
tax_amount
string
required
tip_amount
string
required
total_amount
string
required
line_items
object[]
required
payments
object[]
required
type
enum<string>
required
Available options:
sale
Example:

"sale"

location_id
string | null

Only set for source: POS.

register_id
string | null

Only set for source: POS.

session_id
string | null

The RegisterSession this Operation is bound to. Set on every POS Operation; null for ONLINE goods-movement (no register, hence no session). On session-event variants this is the session being opened, adjusted, or closed; on goods-movement variants it is the session the operation was rung up during.

external_id
string | null

Merchant or POS identifier for the upstream order.

fiscal_information
FiscalInformationKassenSichV · object

The Fiskaly signature attached to this Operation, when one exists. Null until the operation has been signed.

completed_at
string<date-time> | null
voided_at
string<date-time> | null
void_reason
string | null
note
string | null

Merchant free-text note for the goods-movement event.