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

# List open items

> Returns a cursor-paginated list of open-item residual ledger entries for a reconciliation context — the carried, partially-filled, and aged obligations the context carries forward across match runs. These are structurally distinct from never-matched (UNMATCHED) transactions. Optionally narrowed by lifecycle status. The listing is readable regardless of context status.



## OpenAPI

````yaml en/openapi/v3-current/matcher.yaml get /v1/matching/contexts/{contextId}/open-items
openapi: 3.1.0
info:
  title: Matcher APIs
  description: >-
    Complete API reference for the Matcher reconciliation engine, providing
    automated transaction matching between Midaz Ledger and external systems.
  version: 4.1.0
  license:
    name: Elastic License 2.0
    url: https://www.elastic.co/licensing/elastic-license
servers:
  - url: https://matcher.sandbox.lerian.net
security: []
paths:
  /v1/matching/contexts/{contextId}/open-items:
    get:
      tags:
        - Matching
      summary: List open items
      description: >-
        Returns a cursor-paginated list of open-item residual ledger entries for
        a reconciliation context — the carried, partially-filled, and aged
        obligations the context carries forward across match runs. These are
        structurally distinct from never-matched (UNMATCHED) transactions.
        Optionally narrowed by lifecycle status. The listing is readable
        regardless of context status.
      operationId: listOpenItems
      parameters:
        - description: Reconciliation context ID
          in: path
          name: contextId
          required: true
          schema:
            description: Reconciliation context ID
            format: uuid
            type: string
        - description: Filter by open-item lifecycle status
          explode: false
          in: query
          name: status
          schema:
            description: Filter by open-item lifecycle status
            enum:
              - OPEN
              - PARTIALLY_CLEARED
              - CLEARED
              - AGED
            type: string
        - description: Maximum number of records to return
          explode: false
          in: query
          name: limit
          schema:
            default: 20
            description: Maximum number of records to return
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - description: Opaque pagination cursor
          explode: false
          in: query
          name: cursor
          schema:
            description: Opaque pagination cursor
            type: string
        - description: >-
            Field to sort by. Defaults to id (stable insertion order). ageDays
            sorts by aging anchor (oldest residuals first when descending)
          explode: false
          in: query
          name: sort_by
          schema:
            description: >-
              Field to sort by. Defaults to id (stable insertion order). ageDays
              sorts by aging anchor (oldest residuals first when descending)
            enum:
              - ageDays
              - runningBalance
              - obligationDate
            type: string
        - description: Sort order
          explode: false
          in: query
          name: sort_order
          schema:
            description: Sort order
            enum:
              - asc
              - desc
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListOpenItemsResponse'
          description: OK
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    ListOpenItemsResponse:
      additionalProperties: false
      properties:
        hasMore:
          examples:
            - true
          type: boolean
        items:
          description: Page of open items
          items:
            $ref: '#/components/schemas/OpenItemResponse'
          maxItems: 200
          type:
            - array
            - 'null'
        limit:
          examples:
            - 20
          format: int64
          maximum: 200
          minimum: 1
          type: integer
        nextCursor:
          examples:
            - eyJpZCI6IjEyMyJ9
          type: string
        prevCursor:
          examples:
            - eyJpZCI6IjEyMiJ9
          type: string
      required:
        - items
        - limit
        - hasMore
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    OpenItemResponse:
      additionalProperties: false
      properties:
        ageDays:
          description: >-
            Whole days the obligation has been open, measured from its aging
            anchor (the obligation business date, or first-seen time as a
            fallback)
          examples:
            - 12
          format: int64
          minimum: 0
          type: integer
        contextId:
          description: Reconciliation context ID this open item belongs to
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        createdAt:
          description: Creation timestamp (RFC 3339)
          examples:
            - '2025-01-15T10:30:00Z'
          type: string
        currency:
          description: ISO 4217 currency code of the open item
          examples:
            - USD
          type: string
        expectedBalance:
          description: >-
            Original outstanding obligation when the item was first opened, as a
            decimal string
          examples:
            - '1000.00'
          type: string
        firstSeenAt:
          description: When this open item was first materialized in the ledger (RFC 3339)
          examples:
            - '2025-01-15T10:30:00Z'
          type: string
        id:
          description: Unique identifier for the open item
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        identityKey:
          description: >-
            Deterministic cross-run identity projection (composite match keys +
            currency) the carry-forward netting resolves on
          examples:
            - invoice=INV-1001|currency=USD
          type: string
        lastActivityAt:
          description: Timestamp of the most recent leg or transition (RFC 3339)
          examples:
            - '2025-01-20T09:00:00Z'
          type: string
        obligationDate:
          description: >-
            Business date of the originating obligation (the aging anchor, RFC
            3339); absent when none was captured
          examples:
            - '2025-01-10T00:00:00Z'
          type: string
        runId:
          description: >-
            Match run that applied the most recent settling leg. Absent for a
            freshly-opened residual that has not yet netted any leg
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        runningBalance:
          description: >-
            Outstanding amount still to be netted, as a decimal string; nets
            down toward zero as settling legs arrive
          examples:
            - '250.00'
          type: string
        status:
          description: >-
            Lifecycle status: OPEN (fresh residual), PARTIALLY_CLEARED (a leg
            netted but a residual remains), CLEARED (netted within tolerance),
            or AGED (exceeded its aging threshold while still open)
          examples:
            - PARTIALLY_CLEARED
          type: string
        transactionId:
          description: >-
            Transaction the open item most recently netted on (the latest
            settling leg). Absent for a freshly-opened residual that has not yet
            netted any leg — drill into the transaction this resolves on
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        updatedAt:
          description: Last update timestamp (RFC 3339)
          examples:
            - '2025-01-20T09:00:00Z'
          type: string
      required:
        - id
        - contextId
        - identityKey
        - currency
        - expectedBalance
        - runningBalance
        - status
        - ageDays
        - firstSeenAt
        - lastActivityAt
        - createdAt
        - updatedAt
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'

````