> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openfiskal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get operation

> Returns a single operation. The response is a discriminated union on `type`: goods movement (sale / return / exchange) or session lifecycle (session_open / session_cash_adjustment / session_close).



## OpenAPI

````yaml /api-reference/openapi.yaml get /operations/{operationId}
openapi: 3.0.0
info:
  title: OpenFiskal fiscalization API
  description: >-
    OpenFiskal exposes a server-to-server fiscalization API for merchant
    onboarding,

    register setup, and operation handling.


    The `v1` contract uses server-issued resource versions and conditional

    writes through `If-Match` for safe concurrent mutation handling.
  version: 1.1.0
  contact: {}
  license:
    name: Proprietary
servers:
  - url: https://api.openfiskal.com/v1
    description: Production
  - url: https://sandbox.api.openfiskal.com/v1
    description: Sandbox
security: []
tags:
  - name: Merchants
    description: Create and manage merchant merchants.
  - name: Locations
    description: Create and manage merchant locations.
  - name: Registers
    description: Create and manage registers or terminals.
  - name: Operations
    description: Start, update, complete, cancel, list, and read operations.
paths:
  /operations/{operationId}:
    get:
      tags:
        - Operations
      summary: Get operation
      description: >-
        Returns a single operation. The response is a discriminated union on
        `type`: goods movement (sale / return / exchange) or session lifecycle
        (session_open / session_cash_adjustment / session_close).
      operationId: OperationsController_get
      parameters:
        - name: X-OpenFiskal-Merchant
          in: header
          description: Merchant identifier returned by the merchants resource.
          required: true
          schema:
            type: string
        - name: operationId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Operation returned
          content:
            application/json:
              schema:
                oneOf:
                  - title: SaleOperation
                    allOf:
                      - $ref: '#/components/schemas/SaleOperation'
                  - title: ReturnOperation
                    allOf:
                      - $ref: '#/components/schemas/ReturnOperation'
                  - title: ExchangeOperation
                    allOf:
                      - $ref: '#/components/schemas/ExchangeOperation'
                  - title: SessionOpenOperation
                    allOf:
                      - $ref: '#/components/schemas/SessionOpenOperation'
                  - title: SessionCashAdjustmentOperation
                    allOf:
                      - $ref: '#/components/schemas/SessionCashAdjustmentOperation'
                  - title: SessionCashCountOperation
                    allOf:
                      - $ref: '#/components/schemas/SessionCashCountOperation'
                  - title: SessionCloseOperation
                    allOf:
                      - $ref: '#/components/schemas/SessionCloseOperation'
                discriminator:
                  propertyName: type
                  mapping:
                    sale:
                      $ref: '#/components/schemas/SaleOperation'
                    return:
                      $ref: '#/components/schemas/ReturnOperation'
                    exchange:
                      $ref: '#/components/schemas/ExchangeOperation'
                    session_open:
                      $ref: '#/components/schemas/SessionOpenOperation'
                    session_cash_adjustment:
                      $ref: '#/components/schemas/SessionCashAdjustmentOperation'
                    session_cash_count:
                      $ref: '#/components/schemas/SessionCashCountOperation'
                    session_close:
                      $ref: '#/components/schemas/SessionCloseOperation'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: unauthorized
                  value:
                    code: unauthorized
                    message: Authentication failed.
                    retryable: false
        '403':
          description: >-
            Authenticated caller is not allowed to access the requested tenant,
            country, or merchant.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: forbidden
                  value:
                    code: forbidden
                    message: The authenticated caller cannot access this resource.
                    retryable: false
        '404':
          description: Operation not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
              examples:
                default:
                  summary: not_found
                  value:
                    code: not_found
                    message: The requested resource does not exist.
                    retryable: false
      security:
        - BearerAuth: []
components:
  schemas:
    SaleOperation:
      type: object
      properties:
        id:
          type: string
        merchant_id:
          type: string
        location_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        register_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        session_id:
          type: string
          nullable: true
          description: >-
            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.
        source:
          type: string
          enum:
            - POS
            - ONLINE
        status:
          type: string
          enum:
            - open
            - completed
            - voided
        currency:
          type: string
          description: ISO 4217 currency code.
          example: EUR
        external_id:
          type: string
          description: Merchant or POS identifier for the upstream order.
          nullable: true
        resource_version:
          type: number
          description: >-
            Current server-issued version for the operation, starting at 1.
            Returned as `ETag` header.
        fiscal_information:
          nullable: true
          description: >-
            The Fiskaly signature attached to this Operation, when one exists.
            Null until the operation has been signed.
          oneOf:
            - title: FiscalInformationKassenSichV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationKassenSichV'
            - title: FiscalInformationRKSV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRKSV'
            - title: FiscalInformationRT
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRT'
          discriminator:
            propertyName: regime
            mapping:
              KassenSichV:
                $ref: '#/components/schemas/FiscalInformationKassenSichV'
              RKSV:
                $ref: '#/components/schemas/FiscalInformationRKSV'
              RT:
                $ref: '#/components/schemas/FiscalInformationRT'
        completed_at:
          type: string
          format: date-time
          nullable: true
        voided_at:
          type: string
          format: date-time
          nullable: true
        void_reason:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        note:
          type: string
          nullable: true
          description: Merchant free-text note for the goods-movement event.
        pretax_amount:
          type: string
        tax_amount:
          type: string
        tip_amount:
          type: string
        total_amount:
          type: string
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/LineItem'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        type:
          type: string
          enum:
            - sale
          example: sale
        cart_level_discounts:
          description: >-
            Cart-level (order-level) discounts applied across the SALE. Empty
            array when none. Surfaced separately from line items so consumers do
            not need to back-derive from totals.
          type: array
          items:
            $ref: '#/components/schemas/CartLevelDiscount'
      required:
        - id
        - merchant_id
        - source
        - status
        - currency
        - resource_version
        - created_at
        - updated_at
        - pretax_amount
        - tax_amount
        - tip_amount
        - total_amount
        - line_items
        - payments
        - type
        - cart_level_discounts
    ReturnOperation:
      type: object
      properties:
        id:
          type: string
        merchant_id:
          type: string
        location_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        register_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        session_id:
          type: string
          nullable: true
          description: >-
            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.
        source:
          type: string
          enum:
            - POS
            - ONLINE
        status:
          type: string
          enum:
            - open
            - completed
            - voided
        currency:
          type: string
          description: ISO 4217 currency code.
          example: EUR
        external_id:
          type: string
          description: Merchant or POS identifier for the upstream order.
          nullable: true
        resource_version:
          type: number
          description: >-
            Current server-issued version for the operation, starting at 1.
            Returned as `ETag` header.
        fiscal_information:
          nullable: true
          description: >-
            The Fiskaly signature attached to this Operation, when one exists.
            Null until the operation has been signed.
          oneOf:
            - title: FiscalInformationKassenSichV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationKassenSichV'
            - title: FiscalInformationRKSV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRKSV'
            - title: FiscalInformationRT
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRT'
          discriminator:
            propertyName: regime
            mapping:
              KassenSichV:
                $ref: '#/components/schemas/FiscalInformationKassenSichV'
              RKSV:
                $ref: '#/components/schemas/FiscalInformationRKSV'
              RT:
                $ref: '#/components/schemas/FiscalInformationRT'
        completed_at:
          type: string
          format: date-time
          nullable: true
        voided_at:
          type: string
          format: date-time
          nullable: true
        void_reason:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        note:
          type: string
          nullable: true
          description: Merchant free-text note for the goods-movement event.
        pretax_amount:
          type: string
        tax_amount:
          type: string
        tip_amount:
          type: string
        total_amount:
          type: string
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/LineItem'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        type:
          type: string
          enum:
            - return
          example: return
        related_operation_id:
          type: string
          nullable: true
          description: Set when the return references an OpenFiskal operation.
        external_related_operation:
          nullable: true
          description: >-
            Set when the return references a sale that lives outside OpenFiskal
            (e.g. legacy platform).
          allOf:
            - $ref: '#/components/schemas/ExternalRelatedOperation'
      required:
        - id
        - merchant_id
        - source
        - status
        - currency
        - resource_version
        - created_at
        - updated_at
        - pretax_amount
        - tax_amount
        - tip_amount
        - total_amount
        - line_items
        - payments
        - type
    ExchangeOperation:
      type: object
      properties:
        id:
          type: string
        merchant_id:
          type: string
        location_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        register_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        session_id:
          type: string
          nullable: true
          description: >-
            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.
        source:
          type: string
          enum:
            - POS
            - ONLINE
        status:
          type: string
          enum:
            - open
            - completed
            - voided
        currency:
          type: string
          description: ISO 4217 currency code.
          example: EUR
        external_id:
          type: string
          description: Merchant or POS identifier for the upstream order.
          nullable: true
        resource_version:
          type: number
          description: >-
            Current server-issued version for the operation, starting at 1.
            Returned as `ETag` header.
        fiscal_information:
          nullable: true
          description: >-
            The Fiskaly signature attached to this Operation, when one exists.
            Null until the operation has been signed.
          oneOf:
            - title: FiscalInformationKassenSichV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationKassenSichV'
            - title: FiscalInformationRKSV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRKSV'
            - title: FiscalInformationRT
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRT'
          discriminator:
            propertyName: regime
            mapping:
              KassenSichV:
                $ref: '#/components/schemas/FiscalInformationKassenSichV'
              RKSV:
                $ref: '#/components/schemas/FiscalInformationRKSV'
              RT:
                $ref: '#/components/schemas/FiscalInformationRT'
        completed_at:
          type: string
          format: date-time
          nullable: true
        voided_at:
          type: string
          format: date-time
          nullable: true
        void_reason:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        note:
          type: string
          nullable: true
          description: Merchant free-text note for the goods-movement event.
        pretax_amount:
          type: string
        tax_amount:
          type: string
        tip_amount:
          type: string
        total_amount:
          type: string
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/LineItem'
        payments:
          type: array
          items:
            $ref: '#/components/schemas/Payment'
        type:
          type: string
          enum:
            - exchange
          example: exchange
        related_operation_id:
          type: string
          nullable: true
          description: Set when the exchange references an OpenFiskal operation.
        external_related_operation:
          nullable: true
          description: >-
            Set when the exchange references a sale that lives outside
            OpenFiskal (e.g. legacy platform).
          allOf:
            - $ref: '#/components/schemas/ExternalRelatedOperation'
      required:
        - id
        - merchant_id
        - source
        - status
        - currency
        - resource_version
        - created_at
        - updated_at
        - pretax_amount
        - tax_amount
        - tip_amount
        - total_amount
        - line_items
        - payments
        - type
    SessionOpenOperation:
      type: object
      properties:
        id:
          type: string
        merchant_id:
          type: string
        location_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        register_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        session_id:
          type: string
          nullable: true
          description: >-
            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.
        source:
          type: string
          enum:
            - POS
            - ONLINE
        status:
          type: string
          enum:
            - open
            - completed
            - voided
        currency:
          type: string
          description: ISO 4217 currency code.
          example: EUR
        external_id:
          type: string
          description: Merchant or POS identifier for the upstream order.
          nullable: true
        resource_version:
          type: number
          description: >-
            Current server-issued version for the operation, starting at 1.
            Returned as `ETag` header.
        fiscal_information:
          nullable: true
          description: >-
            The Fiskaly signature attached to this Operation, when one exists.
            Null until the operation has been signed.
          oneOf:
            - title: FiscalInformationKassenSichV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationKassenSichV'
            - title: FiscalInformationRKSV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRKSV'
            - title: FiscalInformationRT
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRT'
          discriminator:
            propertyName: regime
            mapping:
              KassenSichV:
                $ref: '#/components/schemas/FiscalInformationKassenSichV'
              RKSV:
                $ref: '#/components/schemas/FiscalInformationRKSV'
              RT:
                $ref: '#/components/schemas/FiscalInformationRT'
        completed_at:
          type: string
          format: date-time
          nullable: true
        voided_at:
          type: string
          format: date-time
          nullable: true
        void_reason:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        type:
          type: string
          enum:
            - session_open
          example: session_open
        opening_balance_amount:
          type: string
          description: Opening cash balance as a decimal string.
        opening_note:
          type: string
          nullable: true
      required:
        - id
        - merchant_id
        - source
        - status
        - currency
        - resource_version
        - created_at
        - updated_at
        - type
        - opening_balance_amount
    SessionCashAdjustmentOperation:
      type: object
      properties:
        id:
          type: string
        merchant_id:
          type: string
        location_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        register_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        session_id:
          type: string
          nullable: true
          description: >-
            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.
        source:
          type: string
          enum:
            - POS
            - ONLINE
        status:
          type: string
          enum:
            - open
            - completed
            - voided
        currency:
          type: string
          description: ISO 4217 currency code.
          example: EUR
        external_id:
          type: string
          description: Merchant or POS identifier for the upstream order.
          nullable: true
        resource_version:
          type: number
          description: >-
            Current server-issued version for the operation, starting at 1.
            Returned as `ETag` header.
        fiscal_information:
          nullable: true
          description: >-
            The Fiskaly signature attached to this Operation, when one exists.
            Null until the operation has been signed.
          oneOf:
            - title: FiscalInformationKassenSichV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationKassenSichV'
            - title: FiscalInformationRKSV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRKSV'
            - title: FiscalInformationRT
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRT'
          discriminator:
            propertyName: regime
            mapping:
              KassenSichV:
                $ref: '#/components/schemas/FiscalInformationKassenSichV'
              RKSV:
                $ref: '#/components/schemas/FiscalInformationRKSV'
              RT:
                $ref: '#/components/schemas/FiscalInformationRT'
        completed_at:
          type: string
          format: date-time
          nullable: true
        voided_at:
          type: string
          format: date-time
          nullable: true
        void_reason:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        type:
          type: string
          enum:
            - session_cash_adjustment
          example: session_cash_adjustment
        cash_amount:
          type: string
          description: Signed cash adjustment as a decimal string. Negative = cash out.
        note:
          type: string
          nullable: true
          description: Merchant free-text note for the cash adjustment.
      required:
        - id
        - merchant_id
        - source
        - status
        - currency
        - resource_version
        - created_at
        - updated_at
        - type
        - cash_amount
    SessionCashCountOperation:
      type: object
      properties:
        id:
          type: string
        merchant_id:
          type: string
        location_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        register_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        session_id:
          type: string
          nullable: true
          description: >-
            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.
        source:
          type: string
          enum:
            - POS
            - ONLINE
        status:
          type: string
          enum:
            - open
            - completed
            - voided
        currency:
          type: string
          description: ISO 4217 currency code.
          example: EUR
        external_id:
          type: string
          description: Merchant or POS identifier for the upstream order.
          nullable: true
        resource_version:
          type: number
          description: >-
            Current server-issued version for the operation, starting at 1.
            Returned as `ETag` header.
        fiscal_information:
          nullable: true
          description: >-
            The Fiskaly signature attached to this Operation, when one exists.
            Null until the operation has been signed.
          oneOf:
            - title: FiscalInformationKassenSichV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationKassenSichV'
            - title: FiscalInformationRKSV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRKSV'
            - title: FiscalInformationRT
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRT'
          discriminator:
            propertyName: regime
            mapping:
              KassenSichV:
                $ref: '#/components/schemas/FiscalInformationKassenSichV'
              RKSV:
                $ref: '#/components/schemas/FiscalInformationRKSV'
              RT:
                $ref: '#/components/schemas/FiscalInformationRT'
        completed_at:
          type: string
          format: date-time
          nullable: true
        voided_at:
          type: string
          format: date-time
          nullable: true
        void_reason:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        type:
          type: string
          enum:
            - session_cash_count
          example: session_cash_count
        counted_closing_amount:
          type: string
          description: >-
            Merchant-counted closing cash balance as a decimal string. Captured
            BEFORE any closing pull/add.
        expected_closing_amount:
          type: string
          description: >-
            System-calculated expected drawer balance at count time, derived
            from the session opening balance plus cash payments and adjustments.
            Decimal string.
        closing_cashcount_diff:
          type: string
          description: >-
            Signed difference between counted and expected (`counted -
            expected`). Positive = drawer over, negative = drawer short, zero =
            on the dot. Decimal string. Fiscally attested.
        discrepancy_note:
          type: string
          nullable: true
      required:
        - id
        - merchant_id
        - source
        - status
        - currency
        - resource_version
        - created_at
        - updated_at
        - type
        - counted_closing_amount
        - expected_closing_amount
        - closing_cashcount_diff
    SessionCloseOperation:
      type: object
      properties:
        id:
          type: string
        merchant_id:
          type: string
        location_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        register_id:
          type: string
          nullable: true
          description: 'Only set for source: POS.'
        session_id:
          type: string
          nullable: true
          description: >-
            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.
        source:
          type: string
          enum:
            - POS
            - ONLINE
        status:
          type: string
          enum:
            - open
            - completed
            - voided
        currency:
          type: string
          description: ISO 4217 currency code.
          example: EUR
        external_id:
          type: string
          description: Merchant or POS identifier for the upstream order.
          nullable: true
        resource_version:
          type: number
          description: >-
            Current server-issued version for the operation, starting at 1.
            Returned as `ETag` header.
        fiscal_information:
          nullable: true
          description: >-
            The Fiskaly signature attached to this Operation, when one exists.
            Null until the operation has been signed.
          oneOf:
            - title: FiscalInformationKassenSichV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationKassenSichV'
            - title: FiscalInformationRKSV
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRKSV'
            - title: FiscalInformationRT
              allOf:
                - $ref: '#/components/schemas/FiscalInformationRT'
          discriminator:
            propertyName: regime
            mapping:
              KassenSichV:
                $ref: '#/components/schemas/FiscalInformationKassenSichV'
              RKSV:
                $ref: '#/components/schemas/FiscalInformationRKSV'
              RT:
                $ref: '#/components/schemas/FiscalInformationRT'
        completed_at:
          type: string
          format: date-time
          nullable: true
        voided_at:
          type: string
          format: date-time
          nullable: true
        void_reason:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        type:
          type: string
          enum:
            - session_close
          example: session_close
        closing_adjustment_amount:
          type: string
          nullable: true
          description: >-
            Optional signed cash adjustment performed at close (negative = pull,
            positive = add). Null if no cash was moved at close. The counted
            closing balance and discrepancy note live on the preceding
            SESSION_CASH_COUNT response — SESSION_CLOSE only carries the
            optional pull.
          example: '-50.00'
        closing_adjustment_note:
          type: string
          nullable: true
          description: Optional explanation for the closing pull/add.
      required:
        - id
        - merchant_id
        - source
        - status
        - currency
        - resource_version
        - created_at
        - updated_at
        - type
    ErrorDto:
      type: object
      properties:
        code:
          type: string
          description: Stable machine-readable error code.
          example: invalid_request
        message:
          type: string
          description: Human-readable explanation of the error.
        retryable:
          type: boolean
          description: Whether retrying the request is safe.
        details:
          type: object
          description: Additional structured context for the error.
          additionalProperties: true
      required:
        - code
        - message
        - retryable
    FiscalInformationKassenSichV:
      type: object
      properties:
        regime:
          type: string
          enum:
            - KassenSichV
        document_number:
          type: string
        document_type:
          type: string
        tss_serial_number:
          type: string
        pos_client_serial_number:
          type: string
        signature_algorithm:
          type: string
        time_format:
          type: string
        start_event:
          $ref: '#/components/schemas/FiscalInformationKassenSichVStartEvent'
        end_event:
          $ref: '#/components/schemas/FiscalInformationKassenSichVEndEvent'
        verification:
          $ref: '#/components/schemas/FiscalInformationKassenSichVVerification'
      required:
        - regime
        - document_number
        - document_type
        - tss_serial_number
        - pos_client_serial_number
        - signature_algorithm
        - time_format
        - start_event
        - end_event
        - verification
    FiscalInformationRKSV:
      type: object
      properties:
        regime:
          type: string
          enum:
            - RKSV
        document_number:
          type: string
        document_type:
          type: string
        transmitted_at:
          type: string
          format: date-time
          nullable: true
        cashbox_id:
          type: string
        certificate_serial:
          type: string
        signature:
          $ref: '#/components/schemas/FiscalInformationRKSVSignature'
        verification:
          $ref: '#/components/schemas/FiscalInformationRKSVVerification'
      required:
        - regime
        - document_number
        - document_type
        - cashbox_id
        - signature
        - verification
    FiscalInformationRT:
      type: object
      properties:
        regime:
          type: string
          enum:
            - RT
        document_number:
          type: string
        document_type:
          type: string
        transmitted_at:
          type: string
          format: date-time
          nullable: true
        rt_serial:
          type: string
        rt_firmware:
          type: string
        progressive_number:
          type: number
        daily_closing_number:
          type: number
        lottery_code:
          type: string
          nullable: true
        signature:
          $ref: '#/components/schemas/FiscalInformationRTSignature'
      required:
        - regime
        - document_number
        - document_type
        - rt_serial
        - rt_firmware
        - progressive_number
        - daily_closing_number
        - signature
    LineItem:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - item
            - gift_card
          default: item
          description: >-
            Line item classification. `gift_card` = multi-purpose voucher
            (Mehrzweckgutschein).
        title:
          type: string
        quantity:
          type: number
        unit_price:
          type: string
        total_amount:
          type: string
        sku_identifier:
          type: string
          example: TSHIRT-BLUE-M
          description: >-
            Identifies a unique number used to maintain and manage the item,
            product, or merchandise category in the company's systems. Example:
            A Tshirt has one sku for each size + color combination.
        gift_card_id:
          type: string
          nullable: true
          description: Gift card identifier. Only present when type is "gift_card".
        taxes:
          type: array
          items:
            $ref: '#/components/schemas/LineItemTax'
      required:
        - id
        - type
        - title
        - quantity
        - unit_price
        - total_amount
        - sku_identifier
        - taxes
    Payment:
      type: object
      properties:
        id:
          type: string
        payment_id:
          type: string
          description: Merchant or PSP identifier for the payment.
        method:
          type: string
        amount:
          type: string
        currency:
          type: string
        status:
          type: string
          enum:
            - captured
            - refunded
          description: >-
            Direction of money movement: `captured` for money-in (SALE legs,
            EXCHANGE legs with amount > 0), `refunded` for money-out (RETURN
            legs, EXCHANGE legs with amount < 0). Zero-amount EXCHANGE legs
            accept either.
        processor:
          type: string
          nullable: true
        card_brand:
          type: string
          nullable: true
        processor_reference:
          type: string
          nullable: true
        processed_at:
          type: string
          format: date-time
          nullable: true
        gift_card_id:
          type: string
          nullable: true
          description: Gift card identifier. Only present when method is "gift_card".
      required:
        - id
        - payment_id
        - method
        - amount
        - currency
        - status
    CartLevelDiscount:
      type: object
      properties:
        id:
          type: string
        description:
          type: string
          nullable: true
          description: Free-text label for the discount (e.g. promo code, campaign name).
        amount:
          type: string
          description: Discount amount as a positive decimal string.
      required:
        - id
        - amount
    ExternalRelatedOperation:
      type: object
      properties:
        description:
          type: string
          description: >-
            Free-text description identifying the external sale being
            returned/exchanged against.
        external_operation_id:
          type: string
          description: >-
            The integrator-side identifier of the original sale in the external
            system.
      required:
        - description
        - external_operation_id
    FiscalInformationKassenSichVStartEvent:
      type: object
      properties:
        signed_at:
          type: string
          format: date-time
      required:
        - signed_at
    FiscalInformationKassenSichVEndEvent:
      type: object
      properties:
        signed_at:
          type: string
          format: date-time
        transaction_counter:
          type: number
        signature:
          type: string
        public_key:
          type: string
        process_type:
          type: string
        process_data:
          type: string
      required:
        - signed_at
        - transaction_counter
        - signature
        - public_key
        - process_type
        - process_data
    FiscalInformationKassenSichVVerification:
      type: object
      properties:
        qr_data:
          type: string
      required:
        - qr_data
    FiscalInformationRKSVSignature:
      type: object
      properties:
        signed_at:
          type: string
          format: date-time
        transaction_counter:
          type: number
        turnover_counter:
          type: string
          description: Running turnover counter as a decimal string.
        signature:
          type: string
        certificate_serial:
          type: string
      required:
        - signed_at
        - transaction_counter
        - turnover_counter
        - signature
        - certificate_serial
    FiscalInformationRKSVVerification:
      type: object
      properties:
        qr_data:
          type: string
      required:
        - qr_data
    FiscalInformationRTSignature:
      type: object
      properties:
        signed_at:
          type: string
          format: date-time
        signature:
          type: string
      required:
        - signed_at
        - signature
    LineItemTax:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        rate:
          type: string
          description: Tax rate as a decimal string (e.g. "0.19").
        tax_amount:
          type: string
          description: Tax amount as a decimal string.
      required:
        - id
        - name
        - rate
        - tax_amount
  securitySchemes:
    BearerAuth:
      scheme: bearer
      bearerFormat: API key
      type: http

````