> ## 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 ingestion job status

> Use this endpoint to retrieve the status and details of a specific ingestion job by its identifier. The response includes progress metrics and error information.



## OpenAPI

````yaml /pt/openapi/v3-current/matcher.yaml get /v1/imports/contexts/{contextId}/jobs/{jobId}
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/imports/contexts/{contextId}/jobs/{jobId}:
    get:
      tags:
        - Ingestion
      summary: Get ingestion job status
      description: >-
        Use this endpoint to retrieve the status and details of a specific
        ingestion job by its identifier. The response includes progress metrics
        and error information.
      operationId: getIngestionJob
      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:
            description: Context ID
            format: uuid
            type: string
        - description: Job ID
          in: path
          name: jobId
          required: true
          schema:
            description: Job ID
            format: uuid
            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/JobResponse'
        '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'
                mtch-0306-job-not-found:
                  $ref: '#/components/examples/mtch-0306-job-not-found'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    JobResponse:
      additionalProperties: false
      properties:
        completedAt:
          description: When the job completed (RFC 3339); null until completed
          examples:
            - '2025-01-15T10:35:00Z'
          format: date-time
          type: string
        completedWithErrors:
          description: >-
            True when the job COMPLETED but at least one row failed —
            distinguishes a partially-failed import from a clean one
          examples:
            - true
          type: boolean
        contextId:
          description: Reconciliation context this job belongs to
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        createdAt:
          description: Creation timestamp (RFC 3339)
          examples:
            - '2025-01-15T10:30:00Z'
          format: date-time
          type: string
        diagnosis:
          description: >-
            Safe one-line diagnosis of anything the parser found worth reporting
            about the file (dialect mismatch, degraded settlement re-join,
            zero-detail file), the rate-policy message for policy-FAILED jobs,
            or a generic safe message for other FAILED jobs. Present on
            COMPLETED jobs too, including ones with zero failed rows; empty when
            there is nothing to report — internal error detail is never surfaced
            here
          examples:
            - >-
              file appears semicolon-delimited but the source declares comma;
              declare delimiter semicolon in the source dialect
          type: string
        droppedDuplicateReason:
          description: >-
            Display-only explanation of why droppedDuplicateRows rows were kept
            out of the import: names the source's duplicate key as the identity
            that collided, says the repeats were attached as exceptions to the
            rows they repeated when the job flagged any (repeats of one row
            share one exception, so the queue holds one item per repeated row),
            and names the repeats that raised nothing when fewer were flagged
            than dropped, so the count does not read as silent data loss and the
            customer is sent to the configuration that decides it. Empty unless
            droppedDuplicateRows > 0
          examples:
            - >-
              Rows repeated the duplicate key this source deduplicates on and
              were kept out of the import. This source flags duplicates, so each
              repeat whose original was found was attached to that original as a
              duplicate exception in the exceptions queue. Repeats of the same
              original share one exception, so the queue holds one item per
              repeated row, not one per repeat. The rest found no imported row
              to attach to (another import of this source may still have been in
              progress), so no exception was raised for them and they are not in
              the queue: re-upload those rows once every import of this source
              has finished. If unexpected, review the source's duplicate key and
              the fields it names (a coarse or truncated mapping collapses
              distinct rows onto one key).
          type: string
        droppedDuplicateRows:
          description: >-
            Number of rows kept out of the import as duplicates (rows repeating
            the source's duplicate key within the upload or already persisted);
            see flaggedDuplicateRows for how many were also raised as exceptions
          examples:
            - 60
          format: int64
          minimum: 0
          type: integer
        failedRows:
          description: Number of rows that failed parsing or normalization
          examples:
            - 5
          format: int64
          minimum: 0
          type: integer
        failureRatePercent:
          description: >-
            Percentage of rows that failed, ceiling-rounded so any failure
            registers as at least 1%; 0 when no rows failed
          examples:
            - 100
          format: int64
          maximum: 100
          minimum: 0
          type: integer
        fileName:
          description: Original uploaded file name
          examples:
            - transactions_2024.csv
          type: string
        flaggedDuplicateRows:
          description: >-
            Number of dropped duplicate ROWS raised as DUPLICATE_TRANSACTION
            exceptions on the transaction they repeated, under the
            FLAG_AS_EXCEPTION duplicate policy — the default (subset of
            droppedDuplicateRows). Not a queue-item count: repeats of the same
            transaction share one exception, which carries how many times it was
            repeated
          examples:
            - 15
          format: int64
          minimum: 0
          type: integer
        id:
          description: Unique identifier for the job
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        persistedRows:
          description: >-
            Number of transactions actually persisted by this job (additive
            diagnostics field; see also droppedDuplicateRows)
          examples:
            - 940
          format: int64
          minimum: 0
          type: integer
        reviewRows:
          description: >-
            Number of rows imported with status PENDING_REVIEW under the
            blank_external_id=NEEDS_REVIEW source policy — successful imports
            awaiting operator review, never counted as failures
          examples:
            - 9
          format: int64
          minimum: 0
          type: integer
        sourceId:
          description: Source this job ingests data into
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          format: uuid
          type: string
        startedAt:
          description: When the job started (RFC 3339); null for QUEUED jobs
          examples:
            - '2025-01-15T10:30:00Z'
          format: date-time
          type: string
        status:
          description: >-
            Job lifecycle status: QUEUED (awaiting a worker), PROCESSING
            (parsing/normalizing rows), COMPLETED (finished), FAILED (aborted
            wholesale)
          enum:
            - QUEUED
            - PROCESSING
            - COMPLETED
            - FAILED
          examples:
            - PROCESSING
          type: string
        totalRows:
          description: Total number of data rows detected in the file
          examples:
            - 1000
          format: int64
          minimum: 0
          type: integer
      required:
        - id
        - contextId
        - sourceId
        - status
        - persistedRows
        - droppedDuplicateRows
        - flaggedDuplicateRows
        - reviewRows
        - completedWithErrors
        - failureRatePercent
        - createdAt
      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
    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
  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
  examples:
    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
    mtch-0306-job-not-found:
      summary: Job not found
      value:
        type: https://errors.lerian.studio/v1/MTCH-0306
        title: Not Found
        status: 404
        detail: The ingestion job could not be found. Check the job id and try again.
        code: MTCH-0306
  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.