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

# Submit a batch of settlement operations (streaming NDJSON)

> Accepts newline-delimited JSON (application/x-ndjson). Each line is one operation, validated and created through the same pipeline as POST /v1/operations, grouped under one generated batchId. Processing is synchronous and streamed line by line; one bad line is rejected with a per-line error without aborting the batch. The line count is capped by a configured maximum; exceeding it returns 413. Optionally idempotent via the Idempotency-Key header.



## OpenAPI

````yaml en/openapi/v3-current/slc.yaml post /v1/operations/batch
openapi: 3.0.3
info:
  title: Lerian SLC API
  description: >-
    API for Lerian SLC — the participant-side rail that connects the institution
    to Núclea's SLC deferred-net card settlement. It covers settlement-operation
    intake and lifecycle, clearing positions, the participant and arrangement
    registry, transmission recovery and connectivity to Núclea, BYOK Model-A
    signing-key import, and tenant-scoped webhooks.
  version: v1.0.0
servers:
  - url: https://slc.sandbox.lerian.net
security: []
tags:
  - name: Admin
    description: Tenant configuration and dead-letter administration.
  - name: Clearing
    description: Deferred-net clearing positions for the settlement institution.
  - name: Connectivity
    description: >-
      Transmission recovery drains, retransmission, and connectivity probes to
      Núclea.
  - name: Operations
    description: Settlement operation intake, lifecycle, and state history.
  - name: Participants
    description: Participant registry for the tenant.
  - name: Arrangements
    description: Card and scheme arrangements per participant.
  - name: SigningKey
    description: BYOK Model-A signing-key import for message signing.
  - name: Webhooks
    description: Tenant-scoped webhook subscriptions, deliveries, and replay.
paths:
  /v1/operations/batch:
    post:
      tags:
        - Operations
      summary: Submit a batch of settlement operations (streaming NDJSON)
      description: >-
        Accepts newline-delimited JSON (application/x-ndjson). Each line is one
        operation, validated and created through the same pipeline as POST
        /v1/operations, grouped under one generated batchId. Processing is
        synchronous and streamed line by line; one bad line is rejected with a
        per-line error without aborting the batch. The line count is capped by a
        configured maximum; exceeding it returns 413. Optionally idempotent via
        the Idempotency-Key header.
      operationId: createOperationsBatch
      parameters:
        - description: Idempotency key for safe retries of the whole batch
          in: header
          name: Idempotency-Key
          schema:
            type: string
      requestBody:
        content:
          text/plain:
            schema:
              type: string
        description: Newline-delimited JSON operations (application/x-ndjson)
        required: true
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http.BatchResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http.ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http.ErrorResponse'
        '413':
          description: Request Entity Too Large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    http.BatchResponse:
      properties:
        accepted:
          type: integer
        batchId:
          type: string
        errors:
          items:
            $ref: '#/components/schemas/http.BatchError'
          type: array
        errorsTruncated:
          type: boolean
        meta:
          $ref: '#/components/schemas/http.BatchMeta'
        rejected:
          type: integer
      type: object
    http.ErrorResponse:
      properties:
        code:
          type: string
        details:
          additionalProperties: {}
          type: object
        message:
          type: string
        title:
          type: string
      type: object
    http.BatchError:
      properties:
        code:
          type: string
        details:
          additionalProperties: {}
          type: object
        externalId:
          type: string
        line:
          type: integer
        message:
          type: string
      type: object
    http.BatchMeta:
      properties:
        requestId:
          type: string
        timestamp:
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      description: 'Bearer token authentication (format: "Bearer {token}")'
      in: header
      name: Authorization
      type: apiKey

````