> ## 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 context setup progress

> Returns configured-resource counts, last-run state, and activation readiness for a context in a single aggregate, so clients derive wizard/checklist state from one request.



## OpenAPI

````yaml /pt/openapi/v3-current/matcher.yaml get /v1/contexts/{contextId}/setup-progress
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/contexts/{contextId}/setup-progress:
    get:
      tags:
        - Configuration
      summary: Get context setup progress
      description: >-
        Returns configured-resource counts, last-run state, and activation
        readiness for a context in a single aggregate, so clients derive
        wizard/checklist state from one request.
      operationId: getSetupProgress
      parameters:
        - description: Context ID
          in: path
          name: contextId
          required: true
          schema:
            description: Context ID
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetupProgressResponse'
          description: OK
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: The requested resource was not found.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
              examples:
                mtch-0110-context-not-found:
                  $ref: '#/components/examples/mtch-0110-context-not-found'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    SetupProgressResponse:
      additionalProperties: false
      properties:
        contextId:
          description: Identifier of the context this progress report describes.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        fieldMaps:
          $ref: '#/components/schemas/SetupProgressFieldMapsResponse'
          description: Field-map coverage across the context's sources.
        lastRun:
          $ref: '#/components/schemas/SetupProgressLastRunResponse'
          description: Most recent match run; null when the context has never run.
        matchRules:
          $ref: '#/components/schemas/SetupProgressMatchRulesResponse'
          description: Match-rule count for the context.
        next:
          $ref: '#/components/schemas/SetupProgressNextResponse'
          description: >-
            Deterministic next setup action derived from readiness; null when
            the context is ready.
        readiness:
          $ref: '#/components/schemas/SetupProgressReadinessResponse'
          description: Activation readiness summary.
        schedules:
          $ref: '#/components/schemas/SetupProgressSchedulesResponse'
          description: Schedule count for the context.
        sources:
          $ref: '#/components/schemas/SetupProgressSourcesResponse'
          description: Source counts split by matching side.
        status:
          description: >-
            Current context lifecycle status. DRAFT is being configured; ACTIVE
            runs; PAUSED is suspended; ARCHIVED is retired.
          enum:
            - DRAFT
            - ACTIVE
            - PAUSED
            - ARCHIVED
          examples:
            - DRAFT
          type: string
      required:
        - contextId
        - status
        - sources
        - fieldMaps
        - matchRules
        - schedules
        - lastRun
        - readiness
        - next
      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
    SetupProgressFieldMapsResponse:
      additionalProperties: false
      properties:
        mappedSources:
          description: Number of sources that have a field map configured.
          examples:
            - 2
          format: int64
          type: integer
      required:
        - mappedSources
      type: object
    SetupProgressLastRunResponse:
      additionalProperties: false
      properties:
        completedAt:
          description: >-
            Completion timestamp in RFC 3339 format; omitted while the run is in
            flight.
          examples:
            - '2025-01-15T10:30:00Z'
          type: string
        id:
          description: Identifier of the match run.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        status:
          description: Status of the latest match run.
          examples:
            - COMPLETED
          type: string
      required:
        - id
        - status
      type:
        - object
        - 'null'
    SetupProgressMatchRulesResponse:
      additionalProperties: false
      properties:
        total:
          description: Total number of match rules in the context.
          examples:
            - 3
          format: int64
          type: integer
      required:
        - total
      type: object
    SetupProgressNextResponse:
      additionalProperties: false
      properties:
        forSource:
          $ref: '#/components/schemas/SetupProgressSourceRef'
          description: >-
            Source the action targets; set only for the source-mapping action,
            naming the unmapped source.
        method:
          description: HTTP method of the create endpoint.
          examples:
            - POST
          type: string
        operationId:
          description: OpenAPI operationId of the create endpoint to call.
          examples:
            - createSource
          type: string
        path:
          description: Path template of the create endpoint.
          examples:
            - /v1/contexts/{contextId}/sources
          type: string
        requiredFields:
          description: >-
            Names of the fields the create request requires; the caller supplies
            the values.
          examples:
            - - name
              - type
              - side
          items:
            type: string
          type:
            - array
            - 'null'
        requirementId:
          description: Public activation-requirement identifier this action satisfies.
          enum:
            - context.activation.requirement.left-source
            - context.activation.requirement.right-source
            - context.activation.requirement.source-mapping
            - context.activation.requirement.match-rule
            - context.activation.requirement.fee-rule
          examples:
            - context.activation.requirement.left-source
          type: string
      required:
        - requirementId
        - operationId
        - method
        - path
        - requiredFields
      type:
        - object
        - 'null'
    SetupProgressReadinessResponse:
      additionalProperties: false
      properties:
        missing:
          description: >-
            Stable identifiers of missing activation requirements; empty when
            ready.
          examples:
            - - context.activation.requirement.left-source
              - context.activation.requirement.match-rule
          items:
            enum:
              - context.activation.requirement.left-source
              - context.activation.requirement.right-source
              - context.activation.requirement.source-mapping
              - context.activation.requirement.match-rule
              - context.activation.requirement.fee-rule
              - context.activation.requirement.unknown
            type: string
          type:
            - array
            - 'null'
        ready:
          description: True when the context satisfies every activation requirement.
          examples:
            - true
          type: boolean
      required:
        - ready
        - missing
      type: object
    SetupProgressSchedulesResponse:
      additionalProperties: false
      properties:
        total:
          description: Total number of schedules in the context.
          examples:
            - 1
          format: int64
          type: integer
      required:
        - total
      type: object
    SetupProgressSourcesResponse:
      additionalProperties: false
      properties:
        left:
          description: Number of LEFT-side sources.
          examples:
            - 1
          format: int64
          type: integer
        right:
          description: Number of RIGHT-side sources.
          examples:
            - 1
          format: int64
          type: integer
        total:
          description: Total number of sources in the context.
          examples:
            - 2
          format: int64
          type: integer
      required:
        - total
        - left
        - right
      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
    SetupProgressSourceRef:
      additionalProperties: false
      properties:
        id:
          description: Identifier of the referenced source.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        name:
          description: Human-readable name of the referenced source.
          examples:
            - Bank statement
          type: string
      required:
        - id
        - name
      type: object
  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
    Forbidden:
      description: You do not have permission to access this resource.
      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
            PermissionDenied:
              summary: Permission denied
              value:
                type: https://errors.lerian.studio/v1/AUT-1020
                title: Permission Denied
                status: 403
                detail: >-
                  the credential is not allowed to perform contexts:read on this
                  request
                code: AUT-1020
    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-0110-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
  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.