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

# Upload an evidence file to a dispute

> Streams an evidence file (pdf, png, jpeg, or csv) to tenant-scoped object storage and records the resulting object key on the dispute as a new evidence item. The comment arrives as a query parameter and the file bytes as the request body. The tenant is resolved from the JWT and the dispute from the path — never from the body. Fails closed (503) when object storage is not configured; rejects oversize bodies (413) and unsupported content types (415).



## OpenAPI

````yaml en/openapi/v3-current/matcher.yaml post /v1/disputes/{disputeId}/evidence/upload
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: 4.1.0
  license:
    name: Elastic License 2.0
    url: https://www.elastic.co/licensing/elastic-license
servers:
  - url: https://matcher.sandbox.lerian.net
security: []
paths:
  /v1/disputes/{disputeId}/evidence/upload:
    post:
      tags:
        - Exception
      summary: Upload an evidence file to a dispute
      description: >-
        Streams an evidence file (pdf, png, jpeg, or csv) to tenant-scoped
        object storage and records the resulting object key on the dispute as a
        new evidence item. The comment arrives as a query parameter and the file
        bytes as the request body. The tenant is resolved from the JWT and the
        dispute from the path — never from the body. Fails closed (503) when
        object storage is not configured; rejects oversize bodies (413) and
        unsupported content types (415).
      operationId: uploadEvidence
      parameters:
        - description: Dispute ID (UUID)
          in: path
          name: disputeId
          required: true
          schema:
            description: Dispute ID (UUID)
            examples:
              - 550e8400-e29b-41d4-a716-446655440001
            format: uuid
            type: string
        - description: Comment describing the uploaded evidence
          explode: false
          in: query
          name: comment
          schema:
            description: Comment describing the uploaded evidence
            examples:
              - Bank statement showing correct amount
            maxLength: 1000
            minLength: 1
            type: string
        - description: >-
            Evidence media type: application/pdf, image/png, image/jpeg, or
            text/csv
          in: header
          name: Content-Type
          schema:
            description: >-
              Evidence media type: application/pdf, image/png, image/jpeg, or
              text/csv
            examples:
              - application/pdf
            type: string
      requestBody:
        content:
          application/octet-stream:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DisputeResponse'
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    DisputeResponse:
      description: Dispute details
      properties:
        category:
          description: Category of the dispute
          enum:
            - BANK_FEE_ERROR
            - UNRECOGNIZED_CHARGE
            - DUPLICATE_TRANSACTION
            - OTHER
          example: BANK_FEE_ERROR
          type: string
        createdAt:
          description: Creation timestamp in RFC3339 format
          example: '2025-01-15T10:30:00.000Z'
          type: string
        description:
          description: Description of the dispute
          example: Transaction amount differs from expected
          type: string
        evidence:
          description: Evidence submitted for this dispute
          items:
            $ref: '#/components/schemas/EvidenceResponse'
          type: array
        exceptionId:
          description: Exception ID this dispute is for
          example: 019c96a0-10d2-7134-ba5f-664142ee7052
          type: string
        id:
          description: Unique identifier for the dispute
          example: 019c96a0-10d2-7193-8841-0d7347efd09a
          type: string
        openedBy:
          description: User who opened the dispute
          example: user@example.com
          type: string
        reopenReason:
          description: Reason for reopening if reopened
          example: New evidence discovered
          type: string
        resolution:
          description: Resolution description when closed
          example: Counterparty confirmed error
          type: string
        state:
          description: Current state
          enum:
            - DRAFT
            - OPEN
            - PENDING_EVIDENCE
            - WON
            - LOST
          example: OPEN
          type: string
        updatedAt:
          description: Last update timestamp in RFC3339 format
          example: '2025-01-15T10:30:00.000Z'
          type: string
      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
      type: object
    EvidenceResponse:
      description: Evidence details
      properties:
        comment:
          description: Comment describing the evidence
          example: Bank statement attached
          type: string
        disputeId:
          description: Dispute ID this evidence belongs to
          example: 019c96a0-10d2-7193-8841-0d7347efd09a
          type: string
        fileUrl:
          description: URL to evidence file
          example: https://storage.example.com/evidence/doc123.pdf
          type: string
        id:
          description: Unique identifier for the evidence
          example: 019c96a0-0c0d-7915-84b9-e497bfee9916
          type: string
        submittedAt:
          description: When the evidence was submitted in RFC3339 format
          example: '2025-01-15T10:30:00.000Z'
          type: string
        submittedBy:
          description: User who submitted the evidence
          example: user@example.com
          type: string
      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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'

````