> ## 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 fee rule

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



## OpenAPI

````yaml /en/openapi/v3-current/matcher.yaml get /v1/fee-rules/{feeRuleId}
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/fee-rules/{feeRuleId}:
    get:
      tags:
        - Configuration Fee Rules
      summary: Get a fee rule
      description: >-
        Use this endpoint to retrieve the details of a specific fee rule by its
        identifier.
      operationId: getFeeRule
      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 fee rule.
          in: path
          name: feeRuleId
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Successfully retrieved fee rule
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeeRuleResponse'
        '400':
          description: Invalid fee rule ID format
          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: Fee rule not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An unexpected error occurred on the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    FeeRuleResponse:
      description: >-
        A fee rule that maps transaction metadata to a fee schedule within a
        reconciliation context
      properties:
        id:
          description: Unique identifier for the fee rule
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        contextId:
          description: Reconciliation context this rule belongs to
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        feeScheduleId:
          description: Fee schedule applied when this rule matches
          example: 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        name:
          description: Display name for the fee rule
          example: BB Right-Side Rule
          type: string
        side:
          description: Which transaction side this rule applies to
          example: RIGHT
          enum:
            - LEFT
            - RIGHT
            - ANY
          type: string
        priority:
          description: >-
            Evaluation priority (lower numbers are evaluated first; LEFT, RIGHT,
            and ANY rules share the same priority space)
          example: 0
          type: integer
        predicates:
          description: Conditions that must all match for this rule to apply
          items:
            $ref: '#/components/schemas/FieldPredicateResponse'
          type: array
        createdAt:
          description: Creation timestamp in RFC 3339 format
          example: '2025-01-15T10:30:00Z'
          format: date-time
          type: string
        updatedAt:
          description: Last update timestamp in RFC 3339 format
          example: '2025-01-15T10:30:00Z'
          format: date-time
          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
    FieldPredicateResponse:
      description: An evaluated condition within a fee rule
      properties:
        field:
          description: Transaction field being evaluated
          example: institution
          type: string
        operator:
          description: Comparison operator
          example: EQUALS
          enum:
            - EQUALS
            - IN
            - EXISTS
          type: string
        value:
          description: Single value being compared
          example: Banco do Brasil
          type: string
        values:
          description: List of values being compared
          items:
            type: string
          type: array
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'

````