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

# Download the CNAB 750 settlement file

> Downloads the settlement file (Febraban CNAB 750 collection return) for the Pix received by ONE recebedor within the requested window. Exactly one of cpf OR cnpj of the recebedor is required: a window with no recebedor would name all of them, and this file aggregates settlement PII. The window selects PAYMENTS, not charges: each Pix is reported in the file of the day on which IT settled, which is the date of its own DATA DO MOVIMENTO, so a second Pix on an already completed charge goes into the file of ITS day, not the day of the first payment. No line carries a movement outside the window, and windows that do not overlap never report the same payment twice. The file is built on demand, with no 'already reported' marker: the same window over the SAME DATA returns the same bytes, in the same order. A past window is not final: a settlement fact delivered late, with an instant inside the window, enters that window's file after the file was already downloaded. Reconcile by downloading the windows again; deduplication across overlapping windows is the client's, by endToEndId. An empty window is a valid file with no detail records (200), not a 404.



## OpenAPI

````yaml /pt/openapi/v3-current/spi-brcode.yaml get /api/v1/brcode/arquivos/liquidacoes
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: BR Code service for QR code generation and decoding (EMV QRCPS-MPM).
  license:
    name: Lerian Studio General License
  title: Lerian SPI — BR Code API
  version: 1.0.0
servers:
  - url: https://spi.sandbox.lerian.net
security: []
tags:
  - description: EMV BR Code payload generation, decoding, validation, info, and lookup.
    name: BRCode
  - description: >-
      Pix charges (Cob/CobV/LoteCobV): create, retrieve by TxID, list, cancel,
      reconcile, and resolve public payloads.
    name: Charges
  - description: >-
      Flow (mandatory order): create cob/cobv → generate QR/payload. A dynamic
      BR Code payload references a charge, so the cob/cobv charge MUST be
      created first; the payload links to it by txid/locator.
    name: charge
paths:
  /api/v1/brcode/arquivos/liquidacoes:
    get:
      tags:
        - Charges
      summary: Download the CNAB 750 settlement file
      description: >-
        Downloads the settlement file (Febraban CNAB 750 collection return) for
        the Pix received by ONE recebedor within the requested window. Exactly
        one of cpf OR cnpj of the recebedor is required: a window with no
        recebedor would name all of them, and this file aggregates settlement
        PII. The window selects PAYMENTS, not charges: each Pix is reported in
        the file of the day on which IT settled, which is the date of its own
        DATA DO MOVIMENTO, so a second Pix on an already completed charge goes
        into the file of ITS day, not the day of the first payment. No line
        carries a movement outside the window, and windows that do not overlap
        never report the same payment twice. The file is built on demand, with
        no 'already reported' marker: the same window over the SAME DATA returns
        the same bytes, in the same order. A past window is not final: a
        settlement fact delivered late, with an instant inside the window,
        enters that window's file after the file was already downloaded.
        Reconcile by downloading the windows again; deduplication across
        overlapping windows is the client's, by endToEndId. An empty window is a
        valid file with no detail records (200), not a 404.
      operationId: downloadLiquidacoes
      parameters:
        - description: Primeiro dia da janela de liquidação (AAAA-MM-DD, inclusive).
          explode: false
          in: query
          name: de
          required: true
          schema:
            description: Primeiro dia da janela de liquidação (AAAA-MM-DD, inclusive).
            format: date
            type: string
        - description: Último dia da janela de liquidação (AAAA-MM-DD, inclusive).
          explode: false
          in: query
          name: ate
          required: true
          schema:
            description: Último dia da janela de liquidação (AAAA-MM-DD, inclusive).
            format: date
            type: string
        - description: >-
            CPF do recebedor cujas liquidações o extrato cobre, 11 dígitos sem
            pontuação. Obrigatório informar cpf OU cnpj (exatamente um).
          explode: false
          in: query
          name: cpf
          schema:
            description: >-
              CPF do recebedor cujas liquidações o extrato cobre, 11 dígitos sem
              pontuação. Obrigatório informar cpf OU cnpj (exatamente um).
            pattern: ^\d{11}$
            type: string
        - description: >-
            CNPJ do recebedor cujas liquidações o extrato cobre, 14 caracteres
            sem pontuação (dígitos ou letras maiúsculas). Obrigatório informar
            cpf OU cnpj (exatamente um).
          explode: false
          in: query
          name: cnpj
          schema:
            description: >-
              CNPJ do recebedor cujas liquidações o extrato cobre, 14 caracteres
              sem pontuação (dígitos ou letras maiúsculas). Obrigatório informar
              cpf OU cnpj (exatamente um).
            pattern: ^[0-9A-Z]{14}$
            type: string
      responses:
        '200':
          content:
            text/plain: {}
          description: Arquivo retorno CNAB 750 (texto plano, 750 posições por linha).
          headers:
            Content-Disposition:
              schema:
                type: string
            Content-Type:
              schema:
                type: string
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        correlationId:
          description: Request-scoped correlation identifier echoing X-Request-ID.
          examples:
            - req-7a3f9c2e
          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.
      required:
        - correlationId
      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
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````