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

# Upload a CNAB 750 remessa

> Uploads a remessa of the file channel (ANEXO VI, CNAB 750) as multipart/form-data in the field `file`, and processes it synchronously: the response arrives once every record was judged. 201 carries the batch and its counts; the result per record is in the batch read and in the retorno. 422 when the request carries no file, when the file is unreadable, when the same remessa was already sent (the detail names the original batch), or when the whole file is refused (the detail names the batch whose retorno explains the refusal). 413 above 5 MB. 403 when the caller cannot be identified for the ownership attestation.



## OpenAPI

````yaml /es/openapi/v3-current/spi-brcode.yaml post /api/v1/brcode/arquivos
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://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
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:
    post:
      tags:
        - Charges
      summary: Upload a CNAB 750 remessa
      description: >-
        Uploads a remessa of the file channel (ANEXO VI, CNAB 750) as
        multipart/form-data in the field `file`, and processes it synchronously:
        the response arrives once every record was judged. 201 carries the batch
        and its counts; the result per record is in the batch read and in the
        retorno. 422 when the request carries no file, when the file is
        unreadable, when the same remessa was already sent (the detail names the
        original batch), or when the whole file is refused (the detail names the
        batch whose retorno explains the refusal). 413 above 5 MB. 403 when the
        caller cannot be identified for the ownership attestation.
      operationId: uploadFileBatch
      requestBody:
        content:
          multipart/form-data:
            encoding:
              file:
                contentType: text/plain
            schema:
              properties:
                file:
                  contentEncoding: binary
                  contentMediaType: application/octet-stream
                  description: >-
                    Arquivo remessa CNAB 750 (texto plano, 750 posições por
                    linha), até 5 MB.
                  format: binary
                  type: string
              required:
                - file
              type: object
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileBatchAcceptedDTO'
          description: Created
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Forbidden
        '413':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Request Entity Too Large
        '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:
    FileBatchAcceptedDTO:
      additionalProperties: false
      properties:
        acceptedLines:
          description: Registros aceitos.
          format: int64
          type: integer
        id:
          description: Identificador do lote (UUID).
          format: uuid
          type: string
        rejectedLines:
          description: Registros recusados; o motivo de cada um está no retorno.
          format: int64
          type: integer
        status:
          description: >-
            Situação do lote: PROCESSED (as linhas foram julgadas) ou REJECTED
            (o arquivo inteiro foi recusado).
          examples:
            - PROCESSED
          type: string
        totalLines:
          description: >-
            Registros DETALHE que o arquivo continha (Header e Trailer
            excluídos).
          format: int64
          type: integer
      required:
        - id
        - status
        - totalLines
        - acceptedLines
        - rejectedLines
      type: object
    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

````

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