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

# Resolve an exception

> Resolves a single exception with a resolution and optional reason. Mirrors the bulk-resolve auth and validation but acts on exactly one exception addressed by path. Returns the updated exception.



## OpenAPI

````yaml /pt/openapi/v3-current/matcher.yaml post /v1/exceptions/{exceptionId}/resolve
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/{exceptionId}/resolve:
    post:
      tags:
        - Exception
      summary: Resolve an exception
      description: >-
        Resolves a single exception with a resolution and optional reason.
        Mirrors the bulk-resolve auth and validation but acts on exactly one
        exception addressed by path. Returns the updated exception.
      operationId: resolveException
      parameters:
        - description: Exception ID (UUID)
          in: path
          name: exceptionId
          required: true
          schema:
            description: Exception ID (UUID)
            examples:
              - 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolveExceptionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionResponse'
          description: OK
        '400':
          description: The request contains invalid parameters or payload.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                400-resolution-is-required-for-bulk-resolve:
                  $ref: >-
                    #/components/examples/400-resolution-is-required-for-bulk-resolve
        '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-0501-exception-not-found:
                  $ref: '#/components/examples/mtch-0501-exception-not-found'
        '422':
          description: The request was well-formed but contains semantic errors.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                mtch-0503-exception-cannot-transition-in-current-state:
                  $ref: >-
                    #/components/examples/mtch-0503-exception-cannot-transition-in-current-state
                422-validation-failed:
                  $ref: '#/components/examples/422-validation-failed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    ResolveExceptionRequest:
      additionalProperties: false
      properties:
        reason:
          description: Optional reason for the resolution
          examples:
            - Variance within tolerance
          maxLength: 1000
          type: string
        resolution:
          description: Resolution type applied
          examples:
            - ACCEPTED
          maxLength: 255
          minLength: 1
          type: string
      required:
        - resolution
      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
    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
    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
    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
  examples:
    400-resolution-is-required-for-bulk-resolve:
      summary: Resolution is required for bulk resolve
      value:
        type: https://errors.lerian.studio/v1/MTCH-0001
        title: Bad Request
        status: 400
        detail: A resolution is required to resolve this exception.
        code: MTCH-0001
    mtch-0501-exception-not-found:
      summary: Exception not found
      value:
        type: https://errors.lerian.studio/v1/MTCH-0501
        title: Not Found
        status: 404
        detail: No exception matches this id. Check the exception id and try again.
        code: MTCH-0501
    mtch-0503-exception-cannot-transition-in-current-state:
      summary: Exception cannot transition in current state
      value:
        type: https://errors.lerian.studio/v1/MTCH-0503
        title: Unprocessable Entity
        status: 422
        detail: >-
          This exception's current status does not allow the requested assign or
          resolve action; nothing was changed. Reload the exception to see its
          current status, then retry a valid action.
        code: MTCH-0503
    422-validation-failed:
      summary: Validation failed
      value:
        title: Unprocessable Entity
        status: 422
        detail: validation failed
  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
    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.