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

# Register an institution record

> Registers the institution's record for a consultation that completed with an active restriction. Send `kind: exceptional_proceed` with a justification and a circumstance when the institution proceeds despite the restriction. Send `kind: refusal_explanation` with the explanation that the institution gave when it refused.

A consultation holds one record, and a second request returns `409` with code `SRC-0101`. A consultation that did not complete with an active restriction returns `409` with code `SRC-0102`.



## OpenAPI

````yaml /pt/openapi/v3-current/src.yaml post /v1/src/consultations/{id}/institution-record
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/consultations/{id}/institution-record:
    post:
      tags:
        - decision
      summary: Register an institution record
      description: >-
        Registers the institution's record for a consultation that completed
        with an active restriction. Send `kind: exceptional_proceed` with a
        justification and a circumstance when the institution proceeds despite
        the restriction. Send `kind: refusal_explanation` with the explanation
        that the institution gave when it refused.


        A consultation holds one record, and a second request returns `409` with
        code `SRC-0101`. A consultation that did not complete with an active
        restriction returns `409` with code `SRC-0102`.
      operationId: registerInstitutionRecord
      parameters:
        - description: >-
            Consultation identifier (UUID). A malformed identifier returns 422
            SRC-0002 with a field violation on id.
          in: path
          name: id
          required: true
          schema:
            description: >-
              Consultation identifier (UUID). A malformed identifier returns 422
              SRC-0002 with a field violation on id.
            examples:
              - 8f14e45f-ceea-467a-9a36-dedd4bea2543
            type: string
        - description: >-
            Optional correlation id (UUID) propagated through logs/traces and
            into the evidence trail.
          in: header
          name: X-Request-ID
          schema:
            description: >-
              Optional correlation id (UUID) propagated through logs/traces and
              into the evidence trail.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstitutionRecordRequestBody'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstitutionRecordBody'
          description: Created
        '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
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Not Found
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
          description: Conflict
        '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:decision:write
components:
  schemas:
    InstitutionRecordRequestBody:
      additionalProperties: false
      properties:
        circumstance:
          description: >-
            The exceptional circumstance alleged (for instance, a holder
            prevented from removing the protection request). REQUIRED when kind
            is "exceptional_proceed", 1..1000 characters; REFUSED when kind is
            "refusal_explanation".
          maxLength: 1000
          minLength: 1
          type: string
        explanation:
          description: >-
            Content of the explanation given to the interested party. REQUIRED
            when kind is "refusal_explanation", 1..2000 characters; REFUSED when
            kind is "exceptional_proceed".
          maxLength: 2000
          minLength: 1
          type: string
        justification:
          description: >-
            Mandatory justification for proceeding despite the active
            restriction. REQUIRED when kind is "exceptional_proceed", 1..2000
            characters; REFUSED when kind is "refusal_explanation".
          examples:
            - >-
              Holder attested inability to remove the protection; branch manager
              approved under policy X.
          maxLength: 2000
          minLength: 1
          type: string
        kind:
          description: >-
            Which paragraph of art. 2º-A this record answers:
            "exceptional_proceed" (§1º — contracted despite the active
            restriction) or "refusal_explanation" (§2º — refused, and this is
            what the interested party was told). REQUIRED. It decides which
            prose members are mandatory and which are refused.
          enum:
            - exceptional_proceed
            - refusal_explanation
          examples:
            - exceptional_proceed
          type: string
        registeredBy:
          description: >-
            Who filed the record, as an institution-side identity. REQUIRED for
            both kinds, 1..255 characters.
          examples:
            - maria.compliance@bank.example
          maxLength: 255
          minLength: 1
          type: string
      required:
        - kind
        - registeredBy
      type: object
    InstitutionRecordBody:
      additionalProperties: false
      properties:
        circumstance:
          description: >-
            The exceptional circumstance alleged, as filed. Empty on a
            refusal-explanation record.
          type: string
        explanation:
          description: >-
            The explanation given to the interested party, as filed. Empty on an
            exceptional-proceed record.
          type: string
        filedBy:
          examples:
            - m2m:core-banking-integration
          type: string
        justification:
          description: >-
            The mandatory justification, as filed. Empty on a
            refusal-explanation record.
          type: string
        kind:
          description: >-
            Which paragraph of art. 2º-A this record answers:
            "exceptional_proceed" (§1º) or "refusal_explanation" (§2º). It is
            the member that says which prose members carry text.
          examples:
            - exceptional_proceed
          type: string
        registeredAt:
          description: >-
            Registration instant (RFC3339, UTC). The record is immutable, so
            this never changes.
          format: date-time
          type: string
        registeredBy:
          description: Who filed the record (institution-side identity).
          examples:
            - maria.compliance@bank.example
          type: string
      required:
        - kind
        - registeredBy
        - filedBy
        - justification
        - circumstance
        - explanation
        - registeredAt
      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
    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.