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

# Retrieve the consultation dashboard

> Returns counts of the consultations accepted between `from` and `to`: the total, the breakdowns by outcome, document type and subject role, the restrictions by protection type, and the rejections by code. `byRegistration` counts the institution records registered in the period.

`pendingBeyondExpected` and `openOperatorCases` count the current backlog and do not depend on `from` and `to`.



## OpenAPI

````yaml /es/openapi/v3-current/src.yaml get /v1/src/dashboard/consultations
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/dashboard/consultations:
    get:
      tags:
        - dashboard
      summary: Retrieve the consultation dashboard
      description: >-
        Returns counts of the consultations accepted between `from` and `to`:
        the total, the breakdowns by outcome, document type and subject role,
        the restrictions by protection type, and the rejections by code.
        `byRegistration` counts the institution records registered in the
        period.


        `pendingBeyondExpected` and `openOperatorCases` count the current
        backlog and do not depend on `from` and `to`.
      operationId: getDashboardSummary
      parameters:
        - description: >-
            Inclusive lower bound on acceptance time (RFC3339 date-time).
            REQUIRED: an absent or unparseable value returns 422 SRC-0002.
          explode: false
          in: query
          name: from
          required: true
          schema:
            description: >-
              Inclusive lower bound on acceptance time (RFC3339 date-time).
              REQUIRED: an absent or unparseable value returns 422 SRC-0002.
            examples:
              - '2026-08-01T00:00:00Z'
            format: date-time
            type: string
        - description: >-
            Inclusive upper bound on acceptance time (RFC3339 date-time).
            REQUIRED: an absent or unparseable value returns 422 SRC-0002;
            earlier than 'from' returns 422 SRC-0002 with a violation on this
            field.
          explode: false
          in: query
          name: to
          required: true
          schema:
            description: >-
              Inclusive upper bound on acceptance time (RFC3339 date-time).
              REQUIRED: an absent or unparseable value returns 422 SRC-0002;
              earlier than 'from' returns 422 SRC-0002 with a violation on this
              field.
            examples:
              - '2026-08-31T23:59:59Z'
            format: date-time
            type: string
        - 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/DashboardSummaryBody'
          description: OK
        '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:dashboard:read
components:
  schemas:
    DashboardSummaryBody:
      additionalProperties: false
      properties:
        byDocumentType:
          $ref: '#/components/schemas/DashboardDocumentTypeBody'
          description: Breakdown by consulted document type.
        byOutcome:
          $ref: '#/components/schemas/DashboardOutcomeBody'
          description: >-
            Breakdown by outcome. These four partition consultations.status:
            their sum equals total.
        byRegistration:
          $ref: '#/components/schemas/DashboardRegistrationBody'
          description: >-
            Institution records registered in the period, counted by
            registration time. They are not outcomes: do not add them to `total`
            or `byOutcome`.
        bySubjectRole:
          $ref: '#/components/schemas/DashboardSubjectRoleBody'
          description: >-
            Breakdown by the role the consulted document plays. These four
            PARTITION total, as byDocumentType does: their sum equals total on a
            quiesced period.
        companyLinkage:
          $ref: '#/components/schemas/DashboardCompanyLinkageBody'
          description: >-
            Counts over the company consultations accepted in the period: how
            many have linked holder or representative consultations, how many
            have none, and the outcome of the linked ones. The period applies to
            the company consultations only, so these numbers do not reconcile
            with `bySubjectRole.holder` and `bySubjectRole.representative`.
        from:
          description: Inclusive lower bound of the window these numbers were counted over.
          format: date-time
          type: string
        openOperatorCases:
          description: >-
            Open operator cases now, in the four legs: `budget_exhausted`,
            `orphan_response`, `invalid_outbound` and `credential_operation`. It
            does not depend on `from` and `to`. `GET /v1/src/operator/cases`
            lists them.
          examples:
            - 1
          format: int64
          type: integer
        pendingBeyondExpected:
          description: >-
            Consultations that are pending now for longer than the
            `src.pending.alert_threshold` runtime setting. It does not depend on
            `from` and `to`, so it is not a subset of `byOutcome.pending` and
            can be larger.
          examples:
            - 3
          format: int64
          type: integer
        rejectionsByCode:
          additionalProperties:
            format: int64
            type: integer
          description: >-
            Rejections of the period by rejection code, as received. Each key is
            a BACEN error code, except `SRC-OUTBOUND-INVALID`: Lerian SRC
            refused to send a message that did not conform to BACEN's
            specification.
          type: object
        restrictionsByProtectionType:
          additionalProperties:
            format: int64
            type: integer
          description: >-
            Active-restriction verdicts of the period by protection type. A
            consultation restricted on two types counts twice, so this map does
            not sum to `byOutcome.withRestriction`. A configured protection type
            with no restriction in the period shows `0`.
          type: object
        to:
          description: Inclusive upper bound of the window these numbers were counted over.
          format: date-time
          type: string
        total:
          description: >-
            Consultations accepted in the period. A request refused before
            acceptance creates no consultation, so this total and the breakdowns
            do not count it.
          examples:
            - 1240
          format: int64
          type: integer
      required:
        - from
        - to
        - total
        - byOutcome
        - byRegistration
        - byDocumentType
        - bySubjectRole
        - companyLinkage
        - restrictionsByProtectionType
        - rejectionsByCode
        - pendingBeyondExpected
        - openOperatorCases
      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
    DashboardDocumentTypeBody:
      additionalProperties: false
      properties:
        cnpj:
          description: Consultations of the period whose consulted document is a CNPJ.
          examples:
            - 238
          format: int64
          type: integer
        cpf:
          description: Consultations of the period whose consulted document is a CPF.
          examples:
            - 1002
          format: int64
          type: integer
      required:
        - cpf
        - cnpj
      type: object
    DashboardOutcomeBody:
      additionalProperties: false
      properties:
        pending:
          description: >-
            Accepted and not yet concluded. A NORMAL state — BACEN publishes no
            SLA for the answer.
          examples:
            - 9
          format: int64
          type: integer
        technicallyRejected:
          description: >-
            Concluded as `failed`. To see which rejections came from BACEN and
            which from Lerian SRC, read `rejectionsByCode`.
          examples:
            - 14
          format: int64
          type: integer
        withRestriction:
          description: Completed with at least one ACTIVE restriction.
          examples:
            - 37
          format: int64
          type: integer
        withoutRestriction:
          description: 'Completed fully permitted: no restricted verdict.'
          examples:
            - 1180
          format: int64
          type: integer
      required:
        - withRestriction
        - withoutRestriction
        - technicallyRejected
        - pending
      type: object
    DashboardRegistrationBody:
      additionalProperties: false
      properties:
        documentedExceptions:
          description: >-
            Refusal-explanation records registered in the period, at most one
            per consultation.
          examples:
            - 4
          format: int64
          type: integer
        proceededDespiteRestriction:
          description: >-
            Exceptional-proceed records registered in the period, at most one
            per consultation.
          examples:
            - 2
          format: int64
          type: integer
      required:
        - documentedExceptions
        - proceededDespiteRestriction
      type: object
    DashboardSubjectRoleBody:
      additionalProperties: false
      properties:
        company:
          description: >-
            Legal entities consulted as such — the consultations holders and
            representatives link to.
          examples:
            - 238
          format: int64
          type: integer
        holder:
          description: >-
            Natural persons consulted AS HOLDERS of a legal entity, each linked
            to a company consultation.
          examples:
            - 104
          format: int64
          type: integer
        individual:
          description: Natural persons consulted on their own account.
          examples:
            - 812
          format: int64
          type: integer
        representative:
          description: >-
            Natural persons consulted AS REPRESENTATIVES of a legal entity, each
            linked to a company consultation.
          examples:
            - 86
          format: int64
          type: integer
      required:
        - individual
        - company
        - holder
        - representative
      type: object
    DashboardCompanyLinkageBody:
      additionalProperties: false
      properties:
        companiesConsulted:
          description: >-
            Company consultations ACCEPTED in the period — the population the
            other four fields are about. Equals bySubjectRole.company for the
            same period on a quiesced system.
          examples:
            - 238
          format: int64
          type: integer
        companiesWithLinkedSubjects:
          description: >-
            Of those, the ones at least one consultation links to as its
            company.
          examples:
            - 171
          format: int64
          type: integer
        companiesWithoutLinkedSubjects:
          description: >-
            Of those, the ones that no consultation links to as its company. It
            does not say how many holders or representatives a company has.
          examples:
            - 67
          format: int64
          type: integer
        linkedSubjectsTotal:
          description: >-
            Consultations linked to any company of the population, whatever
            their OWN acceptance instant — a CPF accepted after the window
            closed still counts for a CNPJ accepted inside it. This is why these
            numbers do not reconcile against bySubjectRole.holder +
            bySubjectRole.representative of the same period.
          examples:
            - 190
          format: int64
          type: integer
        linkedSubjectsWithActiveRestriction:
          description: >-
            Of those, the ones completed with at least one verdict whose
            `permitted` is false. A linked consultation that is still pending or
            failed is not counted. This number does not change the verdict or
            the status of any company consultation.
          examples:
            - 12
          format: int64
          type: integer
      required:
        - companiesConsulted
        - companiesWithLinkedSubjects
        - companiesWithoutLinkedSubjects
        - linkedSubjectsTotal
        - linkedSubjectsWithActiveRestriction
      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
  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.