> ## 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 a match rule

> Use this endpoint to retrieve the details of a specific match rule by its identifier.



## OpenAPI

````yaml /en/openapi/v3-current/matcher.yaml get /v1/contexts/{contextId}/rules/{ruleId}
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: v2.1.1
  license:
    name: Elastic License 2.0
    url: https://www.elastic.co/licensing/elastic-license
servers:
  - url: https://matcher.sandbox.lerian.net
security: []
paths:
  /v1/contexts/{contextId}/rules/{ruleId}:
    get:
      tags:
        - Configuration Match Rules
      summary: Get a match rule
      description: >-
        Use this endpoint to retrieve the details of a specific match rule by
        its identifier.
      operationId: getMatchRule
      parameters:
        - description: A unique identifier for tracing the request across services.
          in: header
          name: X-Request-Id
          schema:
            type: string
        - description: The unique identifier of the reconciliation context.
          in: path
          name: contextId
          required: true
          schema:
            type: string
        - description: The unique identifier of the match rule.
          in: path
          name: ruleId
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved match rule
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MatchRuleResponse'
        '400':
          description: Invalid rule ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The request lacks valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have permission to access this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Match rule not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    MatchRuleResponse:
      description: Matching rule within a reconciliation context
      properties:
        config:
          additionalProperties: {}
          description: Rule configuration
          type: object
        contextId:
          description: Context ID this rule belongs to
          example: 019c96a0-10a0-72d2-9fb0-2b7de8093182
          type: string
        createdAt:
          description: Creation timestamp in RFC3339 format
          example: '2025-01-15T10:30:00.000Z'
          type: string
        id:
          description: Unique identifier for the rule
          example: 019c96a0-1071-7a0d-9916-a831221de252
          type: string
        priority:
          description: Execution priority (lower = higher priority)
          example: 1
          maximum: 1000
          minimum: 1
          type: integer
        type:
          description: Type of matching rule
          enum:
            - EXACT
            - TOLERANCE
            - DATE_LAG
          example: EXACT
          type: string
        updatedAt:
          description: Last update timestamp in RFC3339 format
          example: '2025-01-15T10:30:00.000Z'
          type: string
      type: object
    ErrorResponse:
      description: Standard error response returned by all API endpoints
      type: object
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: HTTP status code as a string.
          example: '404'
        title:
          type: string
          description: Error type identifier.
          example: not_found
        message:
          type: string
          description: Human-readable error message with details.
          example: context not found
        error:
          type: string
          description: Deprecated. Error message for backward compatibility.
          deprecated: true
        details:
          description: Additional error context as key-value pairs
          additionalProperties: {}
          type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'

````