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

# List operator cases

> Lists operator cases, newest first, one page at a time. Without `status`, it lists the open cases. `status=closed` lists the closed cases, and `status=all` lists both. You can filter by `leg`: `budget_exhausted`, `orphan_response`, `invalid_outbound` or `credential_operation`.

No operation closes a `budget_exhausted` case.



## OpenAPI

````yaml /pt/openapi/v3-current/src.yaml get /v1/src/operator/cases
openapi: 3.1.0
info:
  description: >-
    API for Lerian SRC, which sends your institution's restriction consultations
    to BACEN's BC Protege+ and keeps the evidence of each consultation.
  title: Lerian SRC API
  version: 1.0.0
servers:
  - url: https://api.example.com
    description: Replace the example host with your deployment's address.
security:
  - m2m: []
tags:
  - description: >-
      Asynchronous restriction consultations (accept → pending →
      completed/failed).
    name: consultation
  - description: >-
      Client-decision records (exceptional proceed, refusal explanation) —
      single-purpose, write-once.
    name: decision
  - description: Regulatory evidence trail — search, reconstruction, chained correction.
    name: evidence
  - description: Aggregated numeric view per institution.
    name: dashboard
  - description: Status of the institution's regulatory credential.
    name: credential
  - description: >-
      Operator cases — the backlog `openOperatorCases` counts, and the act that
      closes one.
    name: operator
paths:
  /v1/src/operator/cases:
    get:
      tags:
        - operator
      summary: List operator cases
      description: >-
        Lists operator cases, newest first, one page at a time. Without
        `status`, it lists the open cases. `status=closed` lists the closed
        cases, and `status=all` lists both. You can filter by `leg`:
        `budget_exhausted`, `orphan_response`, `invalid_outbound` or
        `credential_operation`.


        No operation closes a `budget_exhausted` case.
      operationId: listOperatorCases
      parameters:
        - description: >-
            Filter by leg: budget_exhausted | orphan_response | invalid_outbound
            | credential_operation. An unknown value returns 422 SRC-0002 — a
            typo and an empty backlog are different answers. Absent, all four
            legs are listed.
          explode: false
          in: query
          name: leg
          schema:
            description: >-
              Filter by leg: budget_exhausted | orphan_response |
              invalid_outbound | credential_operation. An unknown value returns
              422 SRC-0002 — a typo and an empty backlog are different answers.
              Absent, all four legs are listed.
            examples:
              - orphan_response
            type: string
        - description: >-
            Which part of the backlog to list: open | closed | all. Absent means
            open. closed returns the cases that have left the queue, with
            resolvedAt and resolvedBy; it never contains a budget_exhausted
            case. An unknown value returns 422 SRC-0002.
          explode: false
          in: query
          name: status
          schema:
            description: >-
              Which part of the backlog to list: open | closed | all. Absent
              means open. closed returns the cases that have left the queue,
              with resolvedAt and resolvedBy; it never contains a
              budget_exhausted case. An unknown value returns 422 SRC-0002.
            examples:
              - closed
            type: string
        - description: >-
            Opaque pagination cursor from a previous page. A cursor this service
            did not issue returns 400 SRC-0001.
          explode: false
          in: query
          name: cursor
          schema:
            description: >-
              Opaque pagination cursor from a previous page. A cursor this
              service did not issue returns 400 SRC-0001.
            type: string
        - description: Page size (1..200).
          explode: false
          in: query
          name: limit
          schema:
            default: 50
            description: Page size (1..200).
            examples:
              - 50
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - description: Optional correlation id (UUID) propagated through logs/traces.
          in: header
          name: X-Request-ID
          schema:
            description: Optional correlation id (UUID) propagated through logs/traces.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperatorCaseListBody'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Forbidden
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Unprocessable Entity
        '429':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Too Many Requests
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Internal Server Error
      security:
        - m2m:
            - src:operator:read
components:
  schemas:
    OperatorCaseListBody:
      additionalProperties: false
      properties:
        items:
          description: The page's operator cases, newest-opened first.
          items:
            $ref: '#/components/schemas/OperatorCaseBody'
          type:
            - array
            - 'null'
        limit:
          description: Effective page size this request was served with.
          examples:
            - 50
          format: int64
          type: integer
        nextCursor:
          description: >-
            Opaque cursor for the following page; null when this page is the
            last one.
          type:
            - string
            - 'null'
      required:
        - items
        - limit
        - nextCursor
      type: object
    ProblemDetails:
      additionalProperties: false
      properties:
        code:
          type: string
        correlationId:
          examples:
            - req-7a3f9c2e
          type: string
        detail:
          examples:
            - check digits are invalid for the declared documentType
          type: string
        details:
          additionalProperties: {}
          type: object
        instance:
          examples:
            - /v1/src/consultations
          type: string
        status:
          examples:
            - 400
          format: int64
          type: integer
        title:
          examples:
            - Bad Request
          type: string
        traceId:
          examples:
            - a1b2c3d4
          type: string
        type:
          type: string
        violations:
          items:
            $ref: '#/components/schemas/Violation'
          type:
            - array
            - 'null'
      required:
        - type
        - title
        - status
        - detail
        - instance
        - traceId
        - correlationId
        - violations
      type: object
    OperatorCaseBody:
      additionalProperties: false
      properties:
        caseId:
          description: >-
            The case identifier. It is unique only together with `leg`, so each
            closure route names its leg in the path.
          examples:
            - 8f14e45f-ceea-467a-9a36-dedd4bea2543
          type: string
        closable:
          description: >-
            Whether an operator can close this case. It is false for
            `budget_exhausted`.
          type: boolean
        consultationId:
          description: >-
            The consultation this case belongs to; null when the case belongs to
            none — which is what an orphan_response and a credential_operation
            each are. Follow it with GET /v1/src/consultations/{id}.
          type:
            - string
            - 'null'
        leg:
          description: >-
            Which leg of the backlog this case is: budget_exhausted |
            orphan_response | invalid_outbound | credential_operation. Closure
            route per leg: orphan_response -> POST
            /v1/src/operator/orphan-responses/{caseId}/closure; invalid_outbound
            -> POST /v1/src/operator/invalid-dispatches/{caseId}/closure;
            credential_operation -> POST
            /v1/src/operator/credential-operations/{caseId}/closure;
            budget_exhausted -> none, see closable.
          examples:
            - orphan_response
          type: string
        openedAt:
          description: >-
            When the case opened (UTC). The listing is ordered and paged on this
            value, newest first.
          format: date-time
          type: string
        resolvedAt:
          description: When the case left the queue (UTC); null while it is open.
          format: date-time
          type:
            - string
            - 'null'
        resolvedBy:
          description: >-
            The operator who closed the case; null when no person did — an
            unclaimed inbound resolved as matched was closed by the correlation,
            and an open case has nobody to name.
          type:
            - string
            - 'null'
        status:
          description: >-
            Whether this case is still in the queue: open | closed. It is not
            the same as `closable`, which says whether the leg accepts a
            closure.
          examples:
            - closed
          type: string
        summary:
          $ref: '#/components/schemas/OperatorCaseSummaryBody'
          description: >-
            The detail this leg publishes. It is a UNION: each leg fills its own
            members and omits the rest.
      required:
        - leg
        - caseId
        - openedAt
        - closable
        - status
        - resolvedAt
        - resolvedBy
        - consultationId
        - summary
      type: object
    Violation:
      additionalProperties: false
      properties:
        code:
          type: string
        field:
          examples:
            - document
          type: string
        reason:
          examples:
            - check digits are invalid for the declared documentType
          type: string
      required:
        - field
        - reason
      type: object
    OperatorCaseSummaryBody:
      additionalProperties: false
      properties:
        attempts:
          description: >-
            How many times the automatic loop presented the message before the
            retry budget ran out. Leg: budget_exhausted.
          examples:
            - 5
          format: int64
          type: integer
        budgetExhaustedAt:
          description: >-
            When the retry budget ran out (UTC) — the stamp the rail wrote once,
            NOT the sort key openedAt. Leg: budget_exhausted.
          format: date-time
          type: string
        error:
          description: >-
            Why it failed, redacted on the same terms as a consultation's
            rejection message. Legs: invalid_outbound, credential_operation.
          type: string
        kind:
          description: 'Leg: credential_operation.'
          examples:
            - rotation
          type: string
        mqMessageId:
          description: >-
            The IBM MQ message identifier (MQMD MsgId, 48 lowercase hex
            characters) the queue manager stamped on the unclaimed inbound frame
            — the identity to quote to BACEN about this frame. Absent when the
            channel carried no MQ descriptor. Leg: orphan_response.
          examples:
            - 414d5120514d31202020202020202020a1b2c3d4e5f60718
          type: string
        mqPutAt:
          description: >-
            When the sender's queue manager accepted the unclaimed inbound frame
            (MQMD put date and time, UTC), as distinct from receivedAt, when
            this deployment kept it. Absent when the channel carried no MQ
            descriptor. Leg: orphan_response.
          format: date-time
          type: string
        nuopClaimed:
          description: >-
            The operation number the unclaimed inbound message CLAIMS — a value
            from the received envelope, not one this deployment minted. The
            thread an operator follows with BACEN. Leg: orphan_response.
          type: string
        receivedAt:
          description: >-
            When the unclaimed inbound message arrived (UTC). Leg:
            orphan_response.
          format: date-time
          type: string
        requestedBy:
          description: 'Leg: credential_operation.'
          type: string
      type: object
  securitySchemes:
    m2m:
      flows:
        clientCredentials:
          scopes:
            src:consultation:read: Read/list consultations
            src:consultation:write: Create restriction consultations
            src:credential:read: Read regulatory-credential status
            src:dashboard:read: Read the aggregated numeric dashboard
            src:decision:write: >-
              File the institution's record against a consultation — exceptional
              proceed (§1º) or refusal explanation (§2º)
            src:evidence:correct: Append a chained correction to an evidence trail
            src:evidence:read: Search and reconstruct the evidence trail
            src:operator:close: >-
              Close an open operator case so it leaves the openOperatorCases
              backlog
            src:operator:read: List the operator cases
          tokenUrl: https://access-manager.example.com/oauth2/token
      type: oauth2

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.