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

# Get match run results

> Use this endpoint to retrieve all match groups from a specific matching run. Each group contains matched transaction pairs and confidence scores. The response uses cursor-based pagination.



## OpenAPI

````yaml /pt/openapi/v3-current/matcher.yaml get /v1/matching/runs/{runId}/groups
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/matching/runs/{runId}/groups:
    get:
      tags:
        - Matching
      summary: Get match run results
      description: >-
        Use this endpoint to retrieve all match groups from a specific matching
        run. Each group contains matched transaction pairs and confidence
        scores. The response uses cursor-based pagination.
      operationId: getMatchRunGroups
      parameters:
        - description: A unique identifier for tracing the request across services.
          in: header
          name: X-Request-Id
          schema:
            type: string
        - description: Run ID
          in: path
          name: runId
          required: true
          schema:
            description: Run ID
            format: uuid
            type: string
        - description: Context ID
          explode: false
          in: query
          name: contextId
          required: true
          schema:
            description: Context ID the run belongs to
            format: uuid
            type: string
        - description: The maximum number of items to include in the response.
          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 cursor value for retrieving the next page of results.
          explode: false
          in: query
          name: cursor
          schema:
            description: Opaque pagination cursor
            type: string
        - description: The order used to sort the results.
          explode: false
          in: query
          name: sort_order
          schema:
            description: Sort order
            enum:
              - asc
              - desc
            type: string
        - description: The field used to sort the results.
          explode: false
          in: query
          name: sort_by
          schema:
            description: Sort field
            enum:
              - id
              - created_at
              - status
            type: string
        - description: >-
            Filter by match-group lifecycle status. Applied server-side so the
            filter is honest across all pages, not just the loaded one.
          explode: false
          in: query
          name: status
          schema:
            description: >-
              Filter by match-group lifecycle status. Applied server-side so the
              filter is honest across all pages, not just the loaded one.
            enum:
              - PROPOSED
              - CONFIRMED
              - REJECTED
              - REVOKED
            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/ListMatchGroupsResponse'
        '400':
          description: The request contains invalid parameters or payload.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                400-invalid-pagination-parameters:
                  $ref: >-
                    #/components/examples/400-invalid-pagination-parameters--get-v1-matching-runs-runid-groups
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            You do not have permission to access this resource, or the context
            is not active.
          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
                mtch-0012-context-is-not-active:
                  $ref: '#/components/examples/mtch-0012-context-is-not-active'
        '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:
    ListMatchGroupsResponse:
      additionalProperties: false
      properties:
        hasMore:
          examples:
            - true
          type: boolean
        items:
          description: Page of match groups
          items:
            $ref: '#/components/schemas/MatchGroupResponse'
          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
        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
    MatchGroupResponse:
      additionalProperties: false
      properties:
        confidence:
          description: >-
            Match confidence score from 0 (lowest) to 100 (exact); manual
            matches are 100
          examples:
            - 85
          format: int64
          maximum: 100
          minimum: 0
          type: integer
        confirmedAt:
          description: When the group was confirmed (RFC 3339); present only once confirmed
          examples:
            - '2025-01-15T10:35:00Z'
          type: string
        contextId:
          description: Reconciliation context ID this group belongs to
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        createdAt:
          description: Creation timestamp (RFC 3339)
          examples:
            - '2025-01-15T10:30:00Z'
          type: string
        id:
          description: Unique identifier for the group
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        items:
          description: Transaction allocations that make up this match group
          items:
            $ref: '#/components/schemas/MatchItemResponse'
          maxItems: 500
          type:
            - array
            - 'null'
        reasonCodes:
          description: >-
            Rationale reason codes attached to this group's member transactions
            (e.g. FX_RATE_VARIANCE, FEE_VARIANCE, AGED_BREAK, OVER_SETTLED),
            resolved by joining member exceptions. Absent for a clean match with
            no recorded rationale
          examples:
            - - FX_RATE_VARIANCE
          items:
            type: string
          maxItems: 32
          type:
            - array
            - 'null'
        rejectedReason:
          description: >-
            Reason the group was rejected; present only when the status is
            REJECTED
          examples:
            - amounts do not match within tolerance
          type: string
        ruleId:
          description: Identifier of the rule used for matching; null for manual matches
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        runId:
          description: Identifier of the match run that created this group
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        status:
          description: >-
            Current status of the group: PROPOSED (awaiting review), CONFIRMED
            (accepted), REJECTED (a proposed group discarded before
            confirmation), or REVOKED (a confirmed group whose confirmation was
            later undone by an unmatch; the original confirmation timestamp is
            kept for audit)
          enum:
            - PROPOSED
            - CONFIRMED
            - REJECTED
            - REVOKED
          examples:
            - PROPOSED
          type: string
        updatedAt:
          description: Last update timestamp (RFC 3339)
          examples:
            - '2025-01-15T10:30:00Z'
          type: string
      required:
        - id
        - contextId
        - runId
        - confidence
        - status
        - items
        - 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
    MatchItemResponse:
      additionalProperties: false
      properties:
        allocatedAmount:
          description: >-
            Amount allocated to this match, as a decimal string in the allocated
            currency's minor-unit precision
          examples:
            - '1000.00'
          type: string
        allocatedCurrency:
          description: ISO 4217 currency code of the allocated amount
          examples:
            - USD
          type: string
        allowPartial:
          description: Whether partial allocation of the transaction is permitted
          examples:
            - false
          type: boolean
        createdAt:
          description: Creation timestamp (RFC 3339)
          examples:
            - '2025-01-15T10:30:00Z'
          type: string
        expectedAmount:
          description: Amount expected for a full match, as a decimal string
          examples:
            - '1000.00'
          type: string
        id:
          description: Unique identifier for the item
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        matchGroupId:
          description: Identifier of the match group this item belongs to
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        side:
          description: >-
            Reconciliation side of the item's source: LEFT or RIGHT. Resolved
            from the transaction's source; absent when the source side could not
            be resolved
          enum:
            - LEFT
            - RIGHT
          examples:
            - LEFT
          type: string
        sourceId:
          description: >-
            Identifier of the reconciliation source the item's transaction
            belongs to; absent when unresolved
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        sourceName:
          description: >-
            Human-readable name of the reconciliation source; absent when
            unresolved
          examples:
            - Bank statement
          type: string
        transactionId:
          description: Identifier of the transaction being matched
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        updatedAt:
          description: Last update timestamp (RFC 3339)
          examples:
            - '2025-01-15T10:30:00Z'
          type: string
      required:
        - id
        - matchGroupId
        - transactionId
        - allocatedAmount
        - allocatedCurrency
        - expectedAmount
        - allowPartial
        - createdAt
        - updatedAt
      type: object
  examples:
    400-invalid-pagination-parameters--get-v1-matching-runs-runid-groups:
      summary: Invalid pagination parameters
      value:
        title: Bad Request
        status: 400
        detail: >-
          The pagination cursor could not be decoded; omit it to start from the
          first page, or use the exact cursor value returned by a previous
          response
    mtch-0012-context-is-not-active:
      summary: Context is not active
      value:
        type: https://errors.lerian.studio/v1/MTCH-0012
        title: Forbidden
        status: 403
        detail: context is not active
        code: MTCH-0012
    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
    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.