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

# Enviar un lote de operaciones de liquidación (NDJSON síncrono)

> Acepta JSON delimitado por saltos de línea (application/x-ndjson); el tipo de medio NDJSON describe solo el formato de transporte de la solicitud, no cómo se persisten las operaciones. Cada línea es una operación, validada y creada a través del mismo pipeline que POST /v1/operations, agrupadas bajo un único batchId generado. El procesamiento es síncrono: la solicitud se recibe por completo y su número de líneas se valida antes de persistir cualquier operación. El número de líneas está limitado (un límite configurado, por defecto 50000); un lote que supera el límite se rechaza de forma atómica con 413 y no se persiste ninguna operación. Dentro de un lote aceptado, una línea inválida se rechaza con un error por línea sin abortar el lote. Opcionalmente idempotente mediante el encabezado Idempotency-Key. Los errores son problem+json según RFC 9457.



## OpenAPI

````yaml es/openapi/v3-current/slc.yaml post /v1/operations/batch
openapi: 3.1.0
info:
  description: >-
    API de Lerian SLC — el rail del lado del participante que conecta la
    institución con la liquidación de tarjetas por neto diferido SLC de Núclea.
    Cubre la admisión y el ciclo de vida de las operaciones de liquidación, las
    posiciones de compensación, el registro de participantes y arreglos, los
    informes generados, la consulta de esquemas XSD integrados, la recuperación
    de transmisión y la conectividad con Núclea, la importación de clave de
    firma BYOK Modelo A y los webhooks con alcance al tenant.
  title: Lerian SLC API
  version: 1.0.0
servers:
  - url: https://slc.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - description: >-
      Ciclo de vida de las operaciones de liquidación — crea, lista, consulta y
      controla las operaciones de tarjeta rastreadas por NUliquid (NUliquid = el
      id de 21 posiciones que Núclea asigna a cada operación aceptada) a través
      de la máquina de estados.
    name: Operations
  - description: >-
      Catálogo de participantes — los adquirentes, subadquirentes, IF Domicílio
      (banco donde el establecimiento recibe sus ventas) y las IF de liquidación
      (instituciones financieras) que participan en la liquidación de tarjetas.
    name: Participants
  - description: >-
      Arreglos de tarjeta (configuraciones de bandeira/esquema, p. ej.
      Visa/Master/Elo) asociados a un participante.
    name: Arrangements
  - description: >-
      Orquestación de transporte regulado hacia Núclea/SILOC (la cámara de
      compensación privada de tarjetas que opera el sistema de liquidación
      SILOC) — despacho, recuperación, retransmisión y prueba de conectividad
      sobre transferencia de archivos gestionada, broker de mensajes y REST.
    name: Connectivity
  - description: >-
      Posiciones de compensación de neteo multilateral — el monto neto que cada
      participante liquida por ciclo STR (STR = sistema de transferencia de
      reservas del Banco Central).
    name: Clearing
  - description: >-
      Aprovisionamiento de clave de firma SaaS BYOK (Bring Your Own Key) —
      importa parámetros y registra el material del certificado ICP-Brasil A1
      del cliente (certificado de servidor de la PKI brasileña, validez de 1
      año) usado para firmar archivos ASLC; la clave privada nunca sale del
      HSM/KMS/Vault del cliente.
    name: SigningKey
  - description: >-
      Admisión y estado de archivos ASLC — envío en modo passthrough y estado de
      procesamiento de los archivos XML oficiales de liquidación de tarjetas de
      Núclea (ASLC = Arquivo do Sistema de Liquidação de Cartões).
    name: Files
  - description: >-
      Introspección de solo lectura de los esquemas XSD ASLC/RSFN (Red del
      Sistema Financiero Nacional) integrados de Núclea usados para validar los
      mensajes salientes y entrantes.
    name: XSD Schemas
  - description: >-
      Informes de liquidación regulatorios, de cumplimiento y operativos, de
      solo lectura.
    name: Reports
  - description: >-
      Suscripciones a webhooks de eventos de negocio salientes y gestión de
      entrega para los consumidores (Midaz, ledgers del cliente, Cabine — todos
      opcionales).
    name: Webhooks
  - description: >-
      Operaciones administrativas — configuración de tiempo de ejecución
      recargable en caliente, inspección/reenvío de la cola de mensajes muertos
      y redespacho del outbox.
    name: Admin
paths:
  /v1/operations/batch:
    post:
      tags:
        - Operations
      summary: Enviar un lote de operaciones de liquidación (NDJSON síncrono)
      description: >-
        Acepta JSON delimitado por saltos de línea (application/x-ndjson); el
        tipo de medio NDJSON describe solo el formato de transporte de la
        solicitud, no cómo se persisten las operaciones. Cada línea es una
        operación, validada y creada a través del mismo pipeline que POST
        /v1/operations, agrupadas bajo un único batchId generado. El
        procesamiento es síncrono: la solicitud se recibe por completo y su
        número de líneas se valida antes de persistir cualquier operación. El
        número de líneas está limitado (un límite configurado, por defecto
        50000); un lote que supera el límite se rechaza de forma atómica con 413
        y no se persiste ninguna operación. Dentro de un lote aceptado, una
        línea inválida se rechaza con un error por línea sin abortar el lote.
        Opcionalmente idempotente mediante el encabezado Idempotency-Key. Los
        errores son problem+json según RFC 9457.
      operationId: createOperationsBatch
      parameters:
        - description: Idempotency key for safe retries of the whole batch.
          in: header
          name: Idempotency-Key
          schema:
            type: string
      requestBody:
        content:
          application/x-ndjson:
            schema:
              type: string
        description: >-
          Newline-delimited JSON operations (application/x-ndjson); one
          CreateOperationRequest per line.
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  accepted:
                    description: Count of accepted operations.
                    examples:
                      - 48
                    format: int64
                    type: integer
                  batchId:
                    description: Generated batch id grouping every line of the submission.
                    examples:
                      - 018f8a3e-4b2c-7c1a-9e5d-2f6a1b3c4d5e
                    type: string
                  errors:
                    description: >-
                      Per-line rejection errors (capped at the first
                      batchErrorCap entries).
                    items:
                      $ref: '#/components/schemas/BatchError'
                    type:
                      - array
                      - 'null'
                  errorsTruncated:
                    description: >-
                      True when more rejections occurred than the errors array
                      lists.
                    examples:
                      - true
                    type: boolean
                  meta:
                    $ref: '#/components/schemas/BatchMeta'
                    description: Batch response envelope metadata (requestId + timestamp).
                  rejected:
                    description: Count of rejected lines.
                    examples:
                      - 2
                    format: int64
                    type: integer
                required:
                  - batchId
                  - accepted
                  - rejected
                  - errors
                  - errorsTruncated
                  - meta
                type: object
          description: >-
            Batch accepted; per-line accepted/rejected counts and errors with
            the meta envelope.
        '400':
          content:
            application/problem+json:
              schema:
                additionalProperties: false
                properties:
                  code:
                    description: >-
                      Stable, machine-readable domain error code scoped to the
                      emitting service (format: <SERVICE>-NNNN).
                    examples:
                      - ERR-0001
                    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
                type: object
          description: Malformed batch request.
        '401':
          content:
            application/problem+json:
              schema:
                additionalProperties: false
                properties:
                  code:
                    description: >-
                      Stable, machine-readable domain error code scoped to the
                      emitting service (format: <SERVICE>-NNNN).
                    examples:
                      - ERR-0001
                    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
                type: object
          description: Authentication required.
        '403':
          content:
            application/problem+json:
              schema:
                additionalProperties: false
                properties:
                  code:
                    description: >-
                      Stable, machine-readable domain error code scoped to the
                      emitting service (format: <SERVICE>-NNNN).
                    examples:
                      - ERR-0001
                    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
                type: object
          description: Forbidden (operations:write scope required).
        '413':
          content:
            application/problem+json:
              schema:
                additionalProperties: false
                properties:
                  code:
                    description: >-
                      Stable, machine-readable domain error code scoped to the
                      emitting service (format: <SERVICE>-NNNN).
                    examples:
                      - ERR-0001
                    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
                type: object
          description: Batch exceeds the maximum number of lines.
        '500':
          content:
            application/problem+json:
              schema:
                additionalProperties: false
                properties:
                  code:
                    description: >-
                      Stable, machine-readable domain error code scoped to the
                      emitting service (format: <SERVICE>-NNNN).
                    examples:
                      - ERR-0001
                    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
                type: object
          description: Internal error (scrubbed).
      security:
        - BearerAuth: []
components:
  schemas:
    BatchError:
      additionalProperties: false
      properties:
        code:
          description: Coded error identifier for the rejection.
          examples:
            - SLC-0104
          type: string
        details:
          additionalProperties: {}
          description: >-
            Structured context for the rejection (e.g. the existing operationId
            of a duplicate).
          type: object
        externalId:
          description: >-
            Best-effort external id of the rejected line (empty when the line
            could not be parsed that far).
          examples:
            - acq-ext-2026-06-0002
          type: string
        line:
          description: 1-based source line number of the rejected NDJSON line.
          examples:
            - 42
          format: int64
          type: integer
        message:
          description: Static, controlled human-readable rejection message.
          examples:
            - external id already used by another operation
          type: string
      required:
        - line
        - externalId
        - code
        - message
      type: object
    BatchMeta:
      additionalProperties: false
      properties:
        requestId:
          description: Client request id echoed back from the X-Request-Id header.
          examples:
            - req-2026-06-15-abc123
          type: string
        timestamp:
          description: Response generation timestamp (RFC3339).
          examples:
            - '2026-06-15T10:50:00Z'
          type: string
      required:
        - requestId
        - timestamp
      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
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````