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

# Mark an approved filing as excluded at the regulator

> Records that a Final filing was excluded at the regulator, with who marked it, when, and the reason the person gives (typically the exclusion's receipt). Requires the same 'regulatory-approval' permission AND a person as approval: an application token is refused (403 RPT-0201, or 401 RPT-0158 where M2M inversion is off), because marking undoes what an approval established. If-Match must carry the version the person read (the report's draftVersion): without it the request is refused with 428, and a different version with 409. The reason is trimmed and must then hold 1 to 200 characters on one line (400 RPT-0204 when blank, 400 RPT-0205 when longer, 400 RPT-0208 when it carries a control or invisible character such as a line break or a bidi override). Only a Final can be marked (409 RPT-0206), and only once: a second mark is refused with 409 RPT-0207 naming when and by whom the first was made, and the mark is never undone. An unknown report, or one that is not a regulatory filing, answers 404. A marked report stays Final and keeps its artifact, but it no longer stands as its period's approved filing nor supersedes a generation newer than itself (where the pinned contract approves only the newest generation, filing.approve: newest, it supersedes no report at all, older or newer), so a new original of the period can be generated and approved, and it is never approved again (409 RPT-0207). Marks and approvals of one filing take turns under the same lock. When the whole event was excluded, mark its approved replacements too.



## OpenAPI

````yaml /pt/openapi/v3-current/reporter.yaml post /v1/regulatory/reports/{reportId}/exclusion
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    Reporter generates regulatory, accounting and operational reports from
    templates over your data sources.
  license:
    name: Lerian Studio General License
  title: Reporter API
  version: 4.0.0
servers:
  - url: https://reporter.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: Generated report instances and their lifecycle.
    name: Reports
  - description: Reusable report definitions.
    name: Templates
  - description: Interactive construction of report templates.
    name: Template Builder
  - description: Scheduled report due-date tracking.
    name: Deadlines
  - description: Configured inputs that feed report data.
    name: Data Sources
  - description: Configured file transports that deliver datasets.
    name: File Sources
  - description: Datasets read from file sources and the schedule of their days.
    name: File Datasets
  - description: Aggregated reporting metrics.
    name: Metrics
  - description: Published business event catalog and delivery policies.
    name: Streaming
paths:
  /v1/regulatory/reports/{reportId}/exclusion:
    post:
      tags:
        - Regulatory Reports
      summary: Mark an approved filing as excluded at the regulator
      description: >-
        Records that a Final filing was excluded at the regulator, with who
        marked it, when, and the reason the person gives (typically the
        exclusion's receipt). Requires the same 'regulatory-approval' permission
        AND a person as approval: an application token is refused (403 RPT-0201,
        or 401 RPT-0158 where M2M inversion is off), because marking undoes what
        an approval established. If-Match must carry the version the person read
        (the report's draftVersion): without it the request is refused with 428,
        and a different version with 409. The reason is trimmed and must then
        hold 1 to 200 characters on one line (400 RPT-0204 when blank, 400
        RPT-0205 when longer, 400 RPT-0208 when it carries a control or
        invisible character such as a line break or a bidi override). Only a
        Final can be marked (409 RPT-0206), and only once: a second mark is
        refused with 409 RPT-0207 naming when and by whom the first was made,
        and the mark is never undone. An unknown report, or one that is not a
        regulatory filing, answers 404. A marked report stays Final and keeps
        its artifact, but it no longer stands as its period's approved filing
        nor supersedes a generation newer than itself (where the pinned contract
        approves only the newest generation, filing.approve: newest, it
        supersedes no report at all, older or newer), so a new original of the
        period can be generated and approved, and it is never approved again
        (409 RPT-0207). Marks and approvals of one filing take turns under the
        same lock. When the whole event was excluded, mark its approved
        replacements too.
      operationId: markRegulatoryReportExcluded
      parameters:
        - description: Report identifier.
          example: 00000000-0000-0000-0000-000000000001
          in: path
          name: reportId
          required: true
          schema:
            description: Report identifier.
            type: string
        - description: >-
            Version of the Final report the caller read and is marking, from its
            draftVersion. Required.
          example: '"3"'
          in: header
          name: If-Match
          schema:
            description: >-
              Version of the Final report the caller read and is marking, from
              its draftVersion. Required.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarkRegulatoryReportExcludedHumaInputBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Report'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Not Found
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Conflict
        '413':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Request Entity Too Large
        '428':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Precondition Required
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
components:
  schemas:
    MarkRegulatoryReportExcludedHumaInputBody:
      additionalProperties: false
      properties:
        reason:
          description: >-
            Why the filing is marked excluded, typically the receipt of the
            exclusion the regulator accepted. Trimmed, then 1 to 200 characters.
          examples:
            - Excluded by evtExclusao receipt 1234567890123456789
          type: string
      required:
        - reason
      type: object
    Report:
      properties:
        allInstitutions:
          description: >-
            The caller chose every institution, so the report read every
            institution's rows unscoped.
          examples:
            - false
          type: boolean
        approvedAt:
          description: When the report was approved, when it was.
          examples:
            - '2026-03-12T10:00:00Z'
          format: date-time
          type: string
        approvedBy:
          description: >-
            Who approved it, as the Access Manager subject identifier the bearer
            token named. Absent until approval; never blank on a Final, because
            an approval whose actor the request did not identify is refused.
          examples:
            - 9c1d7e34-2b6a-4f81-90a3-5e7f8d0a1b2c
          type: string
        completedAt:
          description: Time when report generation completed, when available.
          examples:
            - '2026-01-31T15:04:05Z'
          format: date-time
          type:
            - string
            - 'null'
        correctedAt:
          description: When the draft was last corrected, when it was.
          examples:
            - '2026-03-12T09:40:00Z'
          format: date-time
          type: string
        correctedBy:
          description: >-
            Who last corrected it, as the Access Manager subject identifier the
            bearer token named. Absent until the first correction; never blank
            on a report that has one, because a correction whose actor the
            request did not identify is refused.
          examples:
            - 3f9a1c2e-0f5b-4d9a-9b8e-1a2b3c4d5e6f
          type: string
        createdAt:
          description: Time when the report was created.
          examples:
            - '2026-01-31T15:00:00Z'
          format: date-time
          type: string
        datasetReads:
          description: >-
            File dataset days the report read, one per dataset and day, by data
            source name then day: the revision read and the contract version it
            was accepted under; noDelivery marks a day read as declared without
            delivery. Present wherever the report is read, the list endpoint
            included. Written while the report is generated, before its final
            status (with the draft, on a filing); absent until then and on a
            report that read no file dataset.
          items:
            $ref: '#/components/schemas/DatasetRead'
          type:
            - array
            - 'null'
        deletedAt:
          description: Time when the report was soft-deleted, when applicable.
          examples:
            - '2026-02-01T09:00:00Z'
          format: date-time
          type:
            - string
            - 'null'
        documentId:
          description: Curated document this report generates.
          examples:
            - br.bcb.cadoc-4010
          type: string
        documentVersion:
          description: Pinned version of the document it was generated against.
          examples:
            - 1.0.0
          type: string
        draftVersion:
          description: >-
            Version of the draft; a correction or an approval must present the
            one it read.
          examples:
            - 3
          format: int64
          type: integer
        excludedAt:
          description: >-
            When a person marked this Final filing as excluded at the regulator,
            when one did. A marked report stays Final, but it no longer stands
            as its filing period's approved filing nor supersedes a generation
            newer than itself, so a new original of the period can be generated
            and approved. The mark is never undone.
          examples:
            - '2026-03-20T14:00:00Z'
          format: date-time
          type: string
        excludedBy:
          description: >-
            Who marked it excluded, as the Access Manager subject identifier the
            bearer token named. Absent until the mark; never blank on a marked
            report.
          examples:
            - 9c1d7e34-2b6a-4f81-90a3-5e7f8d0a1b2c
          type: string
        excludedReason:
          description: >-
            Why it was marked excluded, as the person who marked it wrote it,
            typically the receipt of the exclusion the regulator accepted.
            Absent until the mark.
          examples:
            - Exclusion receipt 1.2.202603.0000000000123
          type: string
        filingPeriod:
          description: >-
            The filing period this generation is for, as the pinned contract's
            filing.period spells it: name=value of each period parameter in name
            order, joined by &, or * when the contract declares the document has
            no period (one filing for the document and the institution). Two
            generations of the same document for the same declarant CNPJ with
            the same filingPeriod and remittance are the same filing, whichever
            subscription generated them. Absent on an operational report and on
            a filing generated before the period was recorded.
          examples:
            - dataBase=2026-09
          type: string
        filters:
          additionalProperties:
            additionalProperties:
              additionalProperties:
                $ref: '#/components/schemas/FilterCondition'
              type: object
            type: object
          description: Filter conditions grouped by data source, table, and field.
          examples:
            - accounts:
                account:
                  status:
                    eq:
                      - ACTIVE
          type: object
        generatedIds:
          description: >-
            Values the engine generated into the document's generated fields
            when the draft was made, each unique across the tenant's reports. A
            correction re-renders the same values; a new generation draws new
            ones. Present wherever the report is read, the list endpoint
            included; absent when the document generates nothing.
          items:
            $ref: '#/components/schemas/GeneratedID'
          type:
            - array
            - 'null'
        id:
          description: Stable report identifier.
          examples:
            - 00000000-0000-0000-0000-000000000001
          type: string
        institution:
          $ref: '#/components/schemas/InstitutionSnapshot'
          description: >-
            The institution the report read for, frozen when it was requested:
            its scope is the part applied to the tables the report reads. Absent
            on a report that read for no institution.
        metadata:
          additionalProperties: {}
          description: Additional report metadata keyed by attribute name.
          examples:
            - source: ledger
              tenant: sandbox
          type: object
        openGaps:
          description: >-
            What a regulatory Draft still cannot fill, computed on read from the
            same stored state the approval refusal reads, each field flagged
            required or not. Present when a Draft is read by id; absent on a
            Final, on a non-regulatory report, and in the list endpoint, which
            does not compute it. Absent means unknown, an empty list means
            nothing is missing, and only a required gap refuses an approval.
          items:
            $ref: '#/components/schemas/Gap'
          type: array
        parameters:
          additionalProperties:
            type: string
          description: Generation parameters recorded with the report, when supplied.
          examples:
            - dataBase: 2026-08
          type: object
        provenance:
          $ref: '#/components/schemas/Provenance'
          description: >-
            Everything this report was made of, frozen — what answers, months
            later, why it says what it says.
        remittance:
          description: >-
            original or replacement, as the pinned contract's filing.remittance
            reads the generation's parameters. Absent when the contract declares
            no remittance.
          examples:
            - original
          type: string
        republishedReads:
          description: >-
            Marks the manager appended when a source the filing read showed
            another state of a read key than the last one known: the version and
            digest it showed, or noRows. Only grows, in the order the marks were
            made. A mark says the source published another state of what the
            filing read, never that the file would change, and an approval is
            never refused because of one. Absent when no read was marked.
          items:
            $ref: '#/components/schemas/RepublishedRead'
          type:
            - array
            - 'null'
        revisedReads:
          description: >-
            Days the report read that received a newer accepted revision
            afterwards, one entry per day and newer revision, in the order they
            were marked; the report shows the data of the revision in
            datasetReads. Absent when no day it read was revised.
          items:
            $ref: '#/components/schemas/RevisedRead'
          type:
            - array
            - 'null'
        sourceReads:
          description: >-
            Versioned database reads the filing made, one per read key: for each
            mapping query that declares sourceVersion, the version its table
            showed for the query's filters and the institution scope, or noRows
            when no row was visible. Present wherever the report is read, the
            list endpoint included. Written with the draft; absent until then,
            on a filing whose mapping declares no version and on an operational
            report.
          items:
            $ref: '#/components/schemas/SourceRead'
          type:
            - array
            - 'null'
        status:
          description: Current report generation status.
          examples:
            - Processing
          type: string
        subscriptionId:
          description: >-
            Subscription this report files under; present only on the regulatory
            flow.
          type: string
        supersededBy:
          description: >-
            The newest Draft or Final of the same declarant (document and
            institution CNPJ, across subscriptions), filing period and
            remittance created after this report, which therefore stands in its
            place. A Final marked excluded at the regulator counts only as a
            generation: it still supersedes the reports created before it, but
            none created after it, and a newer generation stands before it.
            Where the pinned contract approves only the newest generation
            (filing.approve: newest), it is instead the newest generation that
            refuses this draft's approval: a report still Processing, a Draft,
            or a Final not marked excluded; a Final marked excluded supersedes
            nothing there. Computed on read for regulatory filings that are not
            Final; absent when nothing supersedes the report, on a Final, on a
            filing without a recorded period and on an operational report.
          examples:
            - 00000000-0000-0000-0000-000000000003
          type: string
        templateDescription:
          description: Description copied from the template when the report was created.
          examples:
            - Monthly accounting report
          type: string
        templateId:
          description: Template snapshot source identifier.
          examples:
            - 00000000-0000-0000-0000-000000000002
          type: string
        templateOutputFormat:
          description: Output format selected for the generated report.
          examples:
            - pdf
          type: string
        updatedAt:
          description: Time when the report was last updated.
          examples:
            - '2026-01-31T15:04:05Z'
          format: date-time
          type: string
      type: object
    Detail:
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          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
          examples:
            - - location: body.templateId
                message: expected string to match 'uuid' format
                value: not-a-uuid
          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
    DatasetRead:
      additionalProperties: false
      properties:
        configName:
          description: Name of the dataset's data source configuration.
          examples:
            - orders
          type: string
        contractVersion:
          description: Contract version that revision was accepted under.
          examples:
            - 2
          format: int64
          type: integer
        datasetId:
          description: File dataset the report read.
          examples:
            - 00000000-0000-0000-0000-000000000004
          type: string
        noDelivery:
          description: The report read the day as declared without delivery.
          examples:
            - true
          type: boolean
        referenceDate:
          description: Day the report read, as yyyy-MM-dd.
          examples:
            - '2026-03-02'
          type: string
        revision:
          description: Revision of the day the report read.
          examples:
            - 1
          format: int64
          type: integer
      required:
        - datasetId
        - configName
        - referenceDate
        - revision
        - contractVersion
      type: object
    FilterCondition:
      properties:
        between:
          description: Inclusive lower and upper bounds for a range match.
          examples:
            - - 100
              - 1000
          items: {}
          type:
            - array
            - 'null'
        eq:
          description: Values matched for equality; multiple values are combined with OR.
          examples:
            - - active
              - pending
          items: {}
          type:
            - array
            - 'null'
        gt:
          description: Single lower-bound value that the field must exceed.
          examples:
            - - 100
          items: {}
          type:
            - array
            - 'null'
        gte:
          description: Single inclusive lower-bound value for the field.
          examples:
            - - '2025-06-01'
          items: {}
          type:
            - array
            - 'null'
        in:
          description: Values for which the field may match any member of the list.
          examples:
            - - active
              - pending
              - suspended
          items: {}
          type:
            - array
            - 'null'
        isNull:
          description: >-
            Matches records where the field holds no value (NULL, or absent in a
            document). Carries no values and is not combined with other
            operators on the same field.
          examples:
            - true
          type: boolean
        lt:
          description: Single upper-bound value that the field must remain below.
          examples:
            - - 1000
          items: {}
          type:
            - array
            - 'null'
        lte:
          description: Single inclusive upper-bound value for the field.
          examples:
            - - '2025-06-30'
          items: {}
          type:
            - array
            - 'null'
        nin:
          description: Values excluded from matching records.
          examples:
            - - deleted
              - archived
          items: {}
          type:
            - array
            - 'null'
        notNull:
          description: Matches records where the field holds a value. Carries no values.
          examples:
            - true
          type: boolean
        notStartsWith:
          description: Text prefixes excluded from matching records. Text columns only.
          examples:
            - - '7'
              - '8'
          items: {}
          type:
            - array
            - 'null'
        startsWith:
          description: >-
            Text prefixes the field may begin with; any one of them matches.
            Text columns only.
          examples:
            - - '1'
              - '2'
          items: {}
          type:
            - array
            - 'null'
      type: object
    GeneratedID:
      additionalProperties: false
      properties:
        field:
          description: The generated field, as dataset.field.
          examples:
            - header.eventId
          type: string
        value:
          description: The value written into it.
          examples:
            - '000123456789012345'
          type: string
      required:
        - field
        - value
      type: object
    InstitutionSnapshot:
      additionalProperties: false
      properties:
        cnpj:
          description: CNPJ of the institution when the report was requested.
          examples:
            - 12ABC34501DE35
          type: string
        id:
          description: Identifier of the institution the report reads for.
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        name:
          description: Name of the institution when the report was requested.
          examples:
            - Banco Exemplo S.A.
          type: string
        scope:
          additionalProperties:
            $ref: '#/components/schemas/DataSourceScope'
          description: >-
            The part of the institution's scope the report applied: each data
            source and table it reads, keyed as the template maps them.
          type: object
      required:
        - id
        - name
        - cnpj
        - scope
      type: object
    Gap:
      additionalProperties: false
      properties:
        field:
          description: Position in the contract the draft cannot fill, as "dataset.field".
          examples:
            - saldos_cosif.valor
          type: string
        list:
          description: >-
            True when the position is a list of values the client fills in the
            mapping and has not filled yet: the set has no row, so no correction
            closes it; filling the list and generating again does. Absent
            otherwise.
          examples:
            - true
          type: boolean
        reason:
          description: What the person completing the draft is told about this position.
          examples:
            - a consulta mapeada não devolve esta coluna
          type: string
        required:
          description: >-
            True when the document requires this position, which is what stops
            the draft being approved or downloaded.
          type: boolean
        rows:
          description: >-
            True when the position is a whole set the client fills in the
            mapping row by row and has written no row of yet; field is then the
            set's name alone. The set has no row, so no correction closes it;
            writing its rows and generating again does. Absent otherwise.
          examples:
            - true
          type: boolean
      required:
        - field
        - reason
        - required
      type: object
    Provenance:
      additionalProperties: false
      description: >-
        Everything a report was made of, frozen at generation. Exactly one
        origin is present: `catalog` for a filing produced from a curated
        regulatory document, `template` for one produced from a template whose
        category makes it regulatory. A record carrying both, or neither, does
        not exist — it is refused before it is stored.
      oneOf:
        - required:
            - catalog
        - required:
            - template
      properties:
        artifactChecksum:
          description: SHA-256 of the artifact, hex.
          examples:
            - e3b0c44298fc1c149afbf4c8996fb924...
          type: string
        artifactEmptyAllowed:
          description: >-
            True when the artifact is empty (zero bytes) and the contract it was
            generated under declares an empty artifact acceptable; its checksum
            is then the SHA-256 of zero bytes and artifactSizeBytes is omitted.
            Absent otherwise.
          examples:
            - true
          type: boolean
        artifactSizeBytes:
          description: >-
            Size of the stored artifact in bytes. Omitted when zero, which only
            a declared empty artifact has (artifactEmptyAllowed).
          examples:
            - 20480
          format: int64
          type: integer
        catalog:
          $ref: '#/components/schemas/CatalogOrigin'
        generatedAt:
          format: date-time
          type: string
        parameters:
          additionalProperties:
            type: string
          description: Generation parameters as supplied.
          examples:
            - dataBase: 2026-03
          type: object
        template:
          $ref: '#/components/schemas/TemplateOrigin'
      required:
        - generatedAt
      type: object
    RepublishedRead:
      additionalProperties: false
      properties:
        currentDigest:
          description: >-
            Digest the source showed. Absent with noRows or when the query
            declares no digest.
          examples:
            - cd34
          type: string
        currentVersion:
          description: Version the source showed, as text. Absent with noRows.
          examples:
            - '4'
          type: string
        key:
          description: Read key, in sourceReads, of the read this mark is about.
          examples:
            - 9f2c0a6b1e3d4c5f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f
          type: string
        noRows:
          description: The source showed no row for the read's filters and scope.
          examples:
            - true
          type: boolean
        seenAt:
          description: When the manager saw that state, in UTC, to the millisecond.
          examples:
            - '2027-01-09T08:20:00.123Z'
          format: date-time
          type: string
      required:
        - key
        - seenAt
      type: object
    RevisedRead:
      additionalProperties: false
      properties:
        currentRevision:
          description: Newest accepted revision of the day.
          examples:
            - 2
          format: int64
          type: integer
        datasetId:
          description: File dataset whose day was revised.
          examples:
            - 00000000-0000-0000-0000-000000000004
          type: string
        referenceDate:
          description: Revised day, as yyyy-MM-dd.
          examples:
            - '2026-03-02'
          type: string
        revisedAt:
          description: When the newer revision was accepted.
          examples:
            - '2026-03-03T09:00:00Z'
          format: date-time
          type: string
      required:
        - datasetId
        - referenceDate
        - currentRevision
        - revisedAt
      type: object
    SourceRead:
      additionalProperties: false
      properties:
        dataSource:
          description: Data source configuration the read went to.
          examples:
            - source_db
          type: string
        digest:
          description: >-
            Value of the declared digest column, as text. Absent with noRows or
            when the query declares no digest.
          examples:
            - ab12
          type: string
        key:
          description: >-
            Read key: an opaque identifier of the read within the filing, as 64
            hex characters; a mark names its read by it.
          examples:
            - 9f2c0a6b1e3d4c5f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c7d6e5f
          type: string
        noRows:
          description: No row was visible for the read's filters and scope.
          examples:
            - true
          type: boolean
        table:
          description: Table the read went to, as the mapping names it.
          examples:
            - public__positions_current
          type: string
        version:
          description: >-
            Value of the declared version column on the rows read, as text with
            the source's digits. Absent with noRows.
          examples:
            - '3'
          type: string
      required:
        - key
        - dataSource
        - table
      type: object
    ErrorDetail:
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          examples:
            - body.templateId
          type: string
        message:
          description: Error message text
          examples:
            - expected string to match 'uuid' format
          type: string
        value:
          description: The value at the given location
          examples:
            - not-a-uuid
      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
    DataSourceScope:
      additionalProperties: false
      properties:
        tables:
          additionalProperties:
            $ref: '#/components/schemas/TableScope'
          description: >-
            The tables of the data source the institution reads, keyed by table
            name; empty when it owns the whole data source.
          type: object
        whole:
          description: The institution owns every table of the data source.
          examples:
            - false
          type: boolean
      required:
        - whole
        - tables
      type: object
    CatalogOrigin:
      additionalProperties: false
      properties:
        bindingOrigin:
          description: >-
            Whether the report was generated from the catalog's reference
            binding, from that reference with additional sources the client
            added, or from a binding the client made.
          enum:
            - reference
            - referenceWithAdditions
            - customized
          examples:
            - reference
          type: string
        bindingVersion:
          description: Version of the binding the report was generated from.
          examples:
            - 3
          format: int64
          type: integer
        documentId:
          description: Curated document this report files.
          examples:
            - br.bcb.cadoc-4010
          type: string
        documentVersion:
          description: Catalog version of the document in force when it was generated.
          examples:
            - 1.0.0
          type: string
        institution:
          $ref: '#/components/schemas/InstitutionSnapshot'
          description: >-
            Institution the filing declares for, as frozen when it was
            requested. Absent on a filing generated before filings named an
            institution.
        subscriptionId:
          type: string
      required:
        - documentId
        - documentVersion
        - subscriptionId
        - bindingVersion
      type: object
    TemplateOrigin:
      additionalProperties: false
      properties:
        category:
          description: Template category, which is what makes the filing regulatory.
          examples:
            - cadoc4010
          type: string
        revision:
          description: Revision of the template the report was generated from.
          examples:
            - 4
          format: int64
          type: integer
        revisionChecksum:
          description: SHA-256 of the template revision used.
          examples:
            - 9f2c...
          type: string
        templateId:
          description: Template this report was generated from.
          examples:
            - 7c1e2f40-77d1-4a8a-9d0f-6b0e2c4a1111
          type: string
      required:
        - templateId
        - category
        - revision
        - revisionChecksum
      type: object
    TableScope:
      additionalProperties: false
      properties:
        conditions:
          additionalProperties:
            $ref: '#/components/schemas/FilterCondition'
          description: >-
            Conditions a row must meet to belong to the institution, keyed by
            field, in the report filter vocabulary; at least one is eq or in,
            and the others may narrow with any operator. Empty on a shared
            table.
          examples:
            - organization_id:
                eq:
                  - 00000000-0000-0000-0000-000000000000
          type: object
        shared:
          description: The table is reference data every institution reads whole.
          examples:
            - false
          type: boolean
      required:
        - shared
        - conditions
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

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