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

# Ignore a transaction

> Use this endpoint to mark a transaction as "Do Not Match" with a required reason. Only UNMATCHED transactions can be ignored.



## OpenAPI

````yaml /en/openapi/v3-current/matcher.yaml post /v1/imports/contexts/{contextId}/transactions/{transactionId}/ignore
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/imports/contexts/{contextId}/transactions/{transactionId}/ignore:
    post:
      tags:
        - Ingestion
      summary: Ignore a transaction
      description: >-
        Use this endpoint to mark a transaction as "Do Not Match" with a
        required reason. Only UNMATCHED transactions can be ignored.
      operationId: ignoreTransaction
      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
            format: uuid
        - description: The unique identifier of the transaction.
          in: path
          name: transactionId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/XIdempotencyKey'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IgnoreTransactionRequest'
        description: Ignore transaction request
        required: true
      responses:
        '200':
          description: >-
            Indicates that the request was successful and the response contains
            the expected data.


            The response includes the `X-Idempotency-Replayed` header.


            If the value is false, the request was just processed. If the value
            is true, the response is a replay of a previously processed request.


            See [Retries and idempotency](/en/reference/retries-idempotency) for
            more details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IgnoreTransactionResponse'
          headers:
            X-Idempotency-Replayed:
              $ref: '#/components/headers/XIdempotencyReplayed'
        '400':
          description: The request contains invalid parameters or payload.
          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: The requested resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Transaction already matched/ignored or idempotency conflict
          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:
  parameters:
    XIdempotencyKey:
      name: X-Idempotency-Key
      in: header
      required: false
      description: >-
        Optional idempotency key for safe retries. Also accepts
        `Idempotency-Key` as an alternative header name. If the same key is sent
        again and the original request was already processed, the cached
        response is returned with `X-Idempotency-Replayed: true`.


        See [Retries and idempotency](/en/reference/retries-idempotency) for
        details.
      schema:
        type: string
  schemas:
    IgnoreTransactionRequest:
      description: Ignore transaction request
      properties:
        reason:
          description: Reason for ignoring the transaction
          example: Duplicate entry - already processed manually
          type: string
      required:
        - reason
      type: object
    IgnoreTransactionResponse:
      description: Ignore transaction response
      properties:
        amount:
          description: Transaction amount as string
          example: '1000.50'
          type: string
        contextId:
          description: Context ID this transaction 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
        currency:
          description: Currency code
          example: BRL
          type: string
        date:
          description: Transaction date in RFC3339 format
          example: '2025-01-15T00:00:00.000Z'
          type: string
        description:
          description: Description of the transaction
          example: Wire transfer from ABC Corp
          type: string
        externalId:
          description: External identifier from the source system
          example: TXN-12345
          type: string
        extractionStatus:
          description: Extraction status
          enum:
            - PENDING
            - EXTRACTED
            - FAILED
          example: EXTRACTED
          type: string
        id:
          description: Unique identifier for the transaction
          example: 019c96a0-10ce-75fc-a273-dc799079a99c
          type: string
        jobId:
          description: Job ID that ingested this transaction
          example: 019c96a0-10ce-75fc-a273-dc799079a99c
          type: string
        sourceId:
          description: Source ID this transaction belongs to
          example: 019c96a0-108c-7a74-8e31-3789daffe1ed
          type: string
        status:
          description: Current matching status
          enum:
            - PENDING
            - MATCHED
            - UNMATCHED
          example: PENDING
          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
  headers:
    XIdempotencyReplayed:
      description: >-
        Indicates whether this response was served from the idempotency cache.
        When `true`, the response is a replay of the original request with the
        same idempotency key.


        See [Retries and idempotency](/en/reference/retries-idempotency) for
        details.
      schema:
        type: boolean
      example: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'

````