> ## 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 exceptions

> Use this endpoint to retrieve all exceptions. You can filter the results by status, severity, assigned user, external system, and date range. The response uses cursor-based pagination.



## OpenAPI

````yaml /pt/openapi/v3-current/matcher.yaml get /v1/exceptions
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: 6.1.0
  license:
    name: Lerian Studio General License
servers:
  - url: https://matcher.sandbox.lerian.net
security: []
paths:
  /v1/exceptions:
    get:
      tags:
        - Exception
      summary: List exceptions
      description: >-
        Use this endpoint to retrieve all exceptions. You can filter the results
        by status, severity, assigned user, external system, and date range. The
        response uses cursor-based pagination.
      operationId: listExceptions
      parameters:
        - description: A unique identifier for tracing the request across services.
          in: header
          name: X-Request-Id
          schema:
            type: string
        - description: >-
            Filter by reconciliation context ID (UUID, verified against the
            tenant; 404 when unknown)
          explode: false
          in: query
          name: contextId
          schema:
            description: >-
              Filter by reconciliation context ID (UUID, verified against the
              tenant; 404 when unknown)
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
        - description: >-
            Filter to the exceptions a specific match run surfaced (UUID). Each
            exception records the LATEST run that touched it, so this returns
            the breaks that run produced. Legacy rows written before run
            linkage, and ingestion-minted duplicate-transaction breaks, carry no
            run id and never match. Absent leaves the listing unfiltered by run.
          explode: false
          in: query
          name: run_id
          schema:
            description: >-
              Filter to the exceptions a specific match run surfaced (UUID).
              Each exception records the LATEST run that touched it, so this
              returns the breaks that run produced. Legacy rows written before
              run linkage, and ingestion-minted duplicate-transaction breaks,
              carry no run id and never match. Absent leaves the listing
              unfiltered by run.
            examples:
              - 550e8400-e29b-41d4-a716-446655440002
            format: uuid
            type: string
        - description: Filter by status
          explode: false
          in: query
          name: status
          schema:
            description: Filter by status
            enum:
              - OPEN
              - ASSIGNED
              - PENDING_RESOLUTION
              - RESOLVED
            type: string
        - description: Filter by severity
          explode: false
          in: query
          name: severity
          schema:
            description: Filter by severity
            enum:
              - LOW
              - MEDIUM
              - HIGH
              - CRITICAL
            type: string
        - description: Filter by exception reason
          explode: false
          in: query
          name: reason
          schema:
            description: Filter by exception reason
            enum:
              - UNMATCHED
              - FX_RATE_UNAVAILABLE
              - MISSING_BASE_AMOUNT
              - MISSING_BASE_CURRENCY
              - SPLIT_INCOMPLETE
              - VALIDATION_FAILED
              - SOURCE_MISMATCH
              - DUPLICATE_TRANSACTION
              - FEE_VARIANCE
              - FEE_DATA_MISSING
              - FEE_CURRENCY_MISMATCH
              - FX_RATE_VARIANCE
              - AGED_BREAK
              - OVER_SETTLED
            type: string
        - description: Filter by assigned user
          explode: false
          in: query
          name: assigned_to
          schema:
            description: Filter by assigned user
            examples:
              - user@example.com
            type: string
        - description: Filter by external system
          explode: false
          in: query
          name: external_system
          schema:
            description: Filter by external system
            examples:
              - JIRA
            type: string
        - description: >-
            Free-text search across transaction id, reason, and external issue
            id (case-insensitive substring match)
          explode: false
          in: query
          name: search
          schema:
            description: >-
              Free-text search across transaction id, reason, and external issue
              id (case-insensitive substring match)
            examples:
              - 550e8400
            type: string
        - description: Filter from date (RFC3339)
          explode: false
          in: query
          name: date_from
          schema:
            description: >-
              Filter from date, inclusive lower bound. Accepts an RFC 3339
              timestamp or a bare date (YYYY-MM-DD); a bare date is taken at
              00:00:00 UTC
            examples:
              - '2025-01-01T00:00:00Z'
            type: string
        - description: Filter to date (RFC3339)
          explode: false
          in: query
          name: date_to
          schema:
            description: >-
              Filter to date, inclusive upper bound. Accepts an RFC 3339
              timestamp or a bare date (YYYY-MM-DD); a bare date covers the
              whole day through 23:59:59.999999999 UTC
            examples:
              - '2025-01-31T23:59:59Z'
            type: string
        - description: >-
            Filter to exceptions at least this many days old (by created_at).
            Surfaces aged open-item breaks. 0 (default) disables the filter.
            Sort by created_at ascending to order oldest-first.
          explode: false
          in: query
          name: min_age_days
          schema:
            description: >-
              Filter to exceptions at least this many days old (by created_at).
              Surfaces aged open-item breaks. 0 (default) disables the filter.
              Sort by created_at ascending to order oldest-first.
            examples:
              - 30
            format: int64
            maximum: 3650
            minimum: 0
            type: integer
        - description: The cursor value for retrieving the next page of results.
          explode: false
          in: query
          name: cursor
          schema:
            description: Cursor for pagination (opaque)
            type: string
        - description: Number of items per page
          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: The field used to sort the results.
          explode: false
          in: query
          name: sort_by
          schema:
            description: >-
              Sort by field. When both sort_by and sort_order are omitted,
              results use the default queue ordering: status ASC (OPEN,
              ASSIGNED, PENDING_RESOLUTION, RESOLVED), then created_at DESC,
              then id DESC. Cursors are bound to the ordering that minted them;
              switching sort parameters mid-pagination returns 400.
            enum:
              - id
              - created_at
              - updated_at
              - severity
              - status
            type: string
        - description: The order used to sort the results.
          explode: false
          in: query
          name: sort_order
          schema:
            description: >-
              Sort order (engages the explicit single-column sort, by id when
              sort_by is omitted)
            enum:
              - asc
              - desc
            type: string
      responses:
        '200':
          description: >-
            Indicates that the request was successful and the response contains
            the expected data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListExceptionsResponse'
        '400':
          description: The request contains invalid parameters or payload.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                400-invalid-filter-parameters:
                  $ref: '#/components/examples/400-invalid-filter-parameters'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: The requested resource was not found.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                mtch-0005-context-not-found:
                  $ref: '#/components/examples/mtch-0005-context-not-found'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    ListExceptionsResponse:
      additionalProperties: false
      properties:
        hasMore:
          examples:
            - true
          type: boolean
        items:
          description: Page of exceptions (max 200 per page)
          items:
            $ref: '#/components/schemas/ExceptionResponse'
          maxItems: 200
          type:
            - array
            - 'null'
        limit:
          examples:
            - 20
          format: int64
          maximum: 200
          minimum: 1
          type: integer
        nextCursor:
          examples:
            - eyJpZCI6IjEyMyJ9
          type: string
        openTotal:
          description: >-
            Non-terminal exceptions (OPEN, ASSIGNED, PENDING_RESOLUTION)
            matching the filter
          examples:
            - 412
          format: int64
          type: integer
        overdueTotal:
          description: Non-terminal exceptions past their due date matching the filter
          examples:
            - 38
          format: int64
          type: integer
        prevCursor:
          examples:
            - eyJpZCI6IjEyMiJ9
          type: string
        resolvedTotal:
          description: Resolved exceptions matching the filter
          examples:
            - 118
          format: int64
          type: integer
        total:
          description: Total exceptions matching the filter (full set, not the page)
          examples:
            - 530
          format: int64
          type: integer
      required:
        - items
        - total
        - openTotal
        - overdueTotal
        - resolvedTotal
        - 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
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    ExceptionResponse:
      additionalProperties: false
      properties:
        amount:
          description: >-
            Enrichment: the exception transaction's amount as a decimal string
            in the transaction's currency. Present on list rows and get-by-id
            when the transaction still exists.
          examples:
            - '1250.50'
          type: string
        assignedTo:
          description: User the exception is currently assigned to
          examples:
            - user@example.com
          type: string
        contextId:
          description: >-
            Enrichment: id of the reconciliation context the exception's source
            belongs to (UUID). Present on list rows and get-by-id when the
            transaction and source still exist; powers the global triage queue's
            context attribution.
          examples:
            - 550e8400-e29b-41d4-a716-446655440004
          type: string
        createdAt:
          description: Creation timestamp as an RFC 3339 timestamp
          examples:
            - '2025-01-15T10:30:00Z'
          type: string
        currency:
          description: >-
            Enrichment: ISO 4217 currency code of the exception transaction's
            amount. Present on list rows and get-by-id when the transaction
            still exists.
          examples:
            - USD
          type: string
        dueAt:
          description: Resolution due date as an RFC 3339 timestamp
          examples:
            - '2025-01-20T10:30:00Z'
          type: string
        externalIssueId:
          description: Issue identifier in the external system, when dispatched
          examples:
            - RECON-1234
          type: string
        externalSystem:
          description: External system the exception was dispatched to, when applicable
          examples:
            - JIRA
          type: string
        id:
          description: Unique identifier for the exception (UUID)
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        reason:
          description: Reason the exception was originally raised
          examples:
            - Amount mismatch detected
          type: string
        resolutionNotes:
          description: Free-text notes captured when the exception was resolved
          examples:
            - Resolved via force match
          type: string
        resolutionReason:
          description: Reason code recorded for the resolution
          examples:
            - BUSINESS_DECISION
          type: string
        resolutionType:
          description: >-
            How the exception was resolved: FORCE_MATCH (override match),
            ADJUST_ENTRY (monetary correction), MANUAL_MATCH (the manual match
            that paired it), AUTO_CONSUME (closed automatically when a run
            settled its transaction against a carried open item), AUTO_MATCH
            (closed automatically when a run matched its transaction, for a
            break whose reason only said its counterpart was missing or
            unusable: UNMATCHED, FX_RATE_UNAVAILABLE, MISSING_BASE_AMOUNT,
            MISSING_BASE_CURRENCY or SPLIT_INCOMPLETE) or UNMATCH_WITHDRAWN
            (withdrawn by an un-match: the match that raised it, or the match
            that resolved it, was undone)
          enum:
            - FORCE_MATCH
            - ADJUST_ENTRY
            - MANUAL_MATCH
            - AUTO_CONSUME
            - AUTO_MATCH
            - UNMATCH_WITHDRAWN
          examples:
            - FORCE_MATCH
          type: string
        resolvedAt:
          description: >-
            When the exception was resolved, as an RFC 3339 timestamp. Present
            only for RESOLVED exceptions.
          examples:
            - '2025-01-15T12:00:00Z'
          type: string
        resolvedBy:
          description: >-
            Principal that resolved the exception (JWT sub, or 'system' for
            automated callback resolutions). Empty until resolved or when the
            resolving path is un-attributed.
          examples:
            - user@example.com
          type: string
        runId:
          description: >-
            Identifier of the match run that LATEST surfaced this exception
            (UUID). Refreshed on every re-run that re-surfaces the break, so it
            names the most recent run that touched it; powers the run-precise
            jump from a run to its exceptions. Absent for legacy rows written
            before run linkage and for ingestion-minted duplicate-transaction
            breaks (not produced by a match run).
          examples:
            - 550e8400-e29b-41d4-a716-446655440002
          type: string
        settlement:
          $ref: '#/components/schemas/ExceptionSettlementResponse'
          description: >-
            Settlement figures for a fee break (expected vs credited and the
            signed difference), derived from the live fee-variance snapshot
            recorded for the exception's transaction. Present on get-by-id only,
            and only when the snapshot and the transaction amount are both
            available in the same currency.
        severity:
          description: >-
            Severity level: LOW and MEDIUM are informational, HIGH needs prompt
            review, CRITICAL requires immediate action
          enum:
            - LOW
            - MEDIUM
            - HIGH
            - CRITICAL
          examples:
            - HIGH
          type: string
        sourceId:
          description: >-
            Enrichment: id of the reconciliation source the exception
            transaction belongs to (UUID). Present on list rows and get-by-id
            when the transaction still exists.
          examples:
            - 550e8400-e29b-41d4-a716-446655440003
          type: string
        sourceName:
          description: >-
            Enrichment: display name of the reconciliation source. Present on
            get-by-id when the transaction and its source still exist.
          examples:
            - Bank feed
          type: string
        status:
          description: >-
            Lifecycle status: OPEN (unhandled), ASSIGNED (owned by a user),
            PENDING_RESOLUTION (a resolution is in flight), RESOLVED (closed
            out)
          enum:
            - OPEN
            - ASSIGNED
            - PENDING_RESOLUTION
            - RESOLVED
          examples:
            - OPEN
          type: string
        transactionDate:
          description: >-
            Enrichment: the exception transaction's value date as an RFC 3339
            timestamp. Present on list rows and get-by-id when the transaction
            still exists.
          examples:
            - '2025-01-14T00:00:00Z'
          type: string
        transactionId:
          description: Identifier of the transaction this exception was raised for (UUID)
          examples:
            - 550e8400-e29b-41d4-a716-446655440001
          type: string
        updatedAt:
          description: Last update timestamp as an RFC 3339 timestamp
          examples:
            - '2025-01-15T10:30:00Z'
          type: string
      required:
        - id
        - transactionId
        - severity
        - status
        - 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
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
    RateLimitErrorResponse:
      description: >-
        Flat body that the rate limiter returns. `code` is the HTTP status as a
        number.
      type: object
      required:
        - code
        - title
        - message
      properties:
        code:
          type: integer
          description: HTTP status code.
          example: 429
        title:
          type: string
          description: Error type.
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message.
          example: rate limit exceeded
    ExceptionSettlementResponse:
      additionalProperties: false
      properties:
        credited:
          description: >-
            Amount actually credited (the transaction amount), as a decimal
            string
          examples:
            - '95.00'
          type: string
        currency:
          description: >-
            ISO 4217 currency code of the settlement amounts (the transaction's
            currency)
          examples:
            - BRL
          type: string
        difference:
          description: >-
            Signed difference credited minus expected, as a decimal string;
            negative when the credit fell short
          examples:
            - '-2.00'
          type: string
        expected:
          description: >-
            Amount the transaction should have credited under the expected fee,
            as a decimal string
          examples:
            - '97.00'
          type: string
      required:
        - expected
        - credited
        - difference
        - currency
      type: object
  examples:
    400-invalid-filter-parameters:
      summary: Invalid filter parameters
      value:
        type: https://errors.lerian.studio/v1/MTCH-0001
        title: Bad Request
        status: 400
        detail: >-
          The date range or a text filter (assigned_to, external_system, or
          search) is invalid. Correct the filter value and try again.
        code: MTCH-0001
    mtch-0005-context-not-found:
      summary: Context not found
      value:
        type: https://errors.lerian.studio/v1/MTCH-0005
        title: Not Found
        status: 404
        detail: >-
          No reconciliation context matches this id; check the context id and
          try again.
        code: MTCH-0005
  responses:
    Unauthorized:
      description: The request lacks valid authentication credentials.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          examples:
            MissingToken:
              summary: Missing token
              value:
                type: https://errors.lerian.studio/v1/AUT-0006
                title: Token Missing
                status: 401
                detail: >-
                  A valid token must be provided in the request header. Please
                  include a token and try again.
                code: AUT-0006
            InvalidToken:
              summary: Invalid token
              value:
                type: https://errors.lerian.studio/v1/AUT-0007
                title: Invalid Token
                status: 401
                detail: >-
                  The provided token is expired, invalid or malformed. Please
                  provide a valid token and try again.
                code: AUT-0007
    Forbidden:
      description: You do not have permission to access this resource.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          examples:
            TenantClaimRequired:
              summary: Tenant claim missing
              value:
                type: https://errors.lerian.studio/v1/MTCH-0004
                title: Forbidden
                status: 403
                detail: tenant claim required
                code: MTCH-0004
            PermissionDenied:
              summary: Permission denied
              value:
                type: https://errors.lerian.studio/v1/AUT-1020
                title: Permission Denied
                status: 403
                detail: >-
                  the credential is not allowed to perform contexts:read on this
                  request
                code: AUT-1020
    ValidationFailed:
      description: >-
        The request failed validation. The `errors` list names each value that
        failed.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          example:
            title: Unprocessable Entity
            status: 422
            detail: validation failed
            errors:
              - message: expected required property name to be present
                location: body
    TooManyRequests:
      description: >-
        The request exceeded the rate limit. Wait the number of seconds in
        `Retry-After`, then retry.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
        X-RateLimit-Limit:
          $ref: '#/components/headers/XRateLimitLimit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/XRateLimitRemaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/XRateLimitReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorResponse'
          example:
            code: 429
            title: rate_limit_exceeded
            message: rate limit exceeded
    InternalServerError:
      description: An unexpected error occurred on the server.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Detail'
          example:
            type: https://errors.lerian.studio/v1/MTCH-0002
            title: Internal Server Error
            status: 500
            detail: internal error
            code: MTCH-0002
        text/plain:
          schema:
            type: string
          example: Internal Server Error
  headers:
    RetryAfter:
      description: Seconds to wait before you retry.
      schema:
        type: integer
        example: 30
    XRateLimitLimit:
      description: Requests allowed in the current window.
      schema:
        type: integer
        example: 100
    XRateLimitRemaining:
      description: Requests left in the current window. Always `0` on a `429`.
      schema:
        type: integer
        example: 0
    XRateLimitReset:
      description: Unix time, in seconds, when the current window resets.
      schema:
        type: integer
        example: 1767225600
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.