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

# Crear una operación de liquidación

> Envía una única operación de liquidación para su admisión. Idempotente mediante el encabezado Idempotency-Key. La presencia/el tipo de los campos se valida contra el esquema (422); los fallos de reglas de negocio devuelven problem+json con código 400/409/422.



## OpenAPI

````yaml es/openapi/v3-current/slc.yaml post /v1/operations
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:
    post:
      tags:
        - Operations
      summary: Crear una operación de liquidación
      description: >-
        Envía una única operación de liquidación para su admisión. Idempotente
        mediante el encabezado Idempotency-Key. La presencia/el tipo de los
        campos se valida contra el esquema (422); los fallos de reglas de
        negocio devuelven problem+json con código 400/409/422.
      operationId: createOperation
      parameters:
        - description: >-
            Idempotency key for safe retries; a replay returns the stored
            response.
          in: header
          name: Idempotency-Key
          schema:
            description: >-
              Idempotency key for safe retries; a replay returns the stored
              response.
            type: string
        - description: Optional client request id echoed back in meta.requestId.
          in: header
          name: X-Request-Id
          schema:
            description: Optional client request id echoed back in meta.requestId.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOperationRequest'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateOperationResponse'
          description: Accepted
        '501':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: >-
            Not Implemented: this capability is not part of this deployment.
            Operations are registered unconditionally so the published contract
            is identical across deploy shapes; when the capability behind one
            did not compose here (authentication disabled, no database, no
            outbound transport, or the feature switched off) it answers this
            coded SLC-0012 problem. It is definitive for this deployment:
            retrying does not help, and the `detail` is deliberately scrubbed
            (any status >= 500 is).
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    CreateOperationRequest:
      additionalProperties: false
      properties:
        arrangementCode:
          description: Payment arrangement (arranjo) code.
          examples:
            - '0245'
          type: string
        authorizationCode:
          description: Card authorization code.
          examples:
            - A1B2C3
          type: string
        brandCode:
          description: 'Card brand code (catalog: Visa/Master/Elo).'
          examples:
            - VISA
          type: string
        creditorIspb:
          description: Creditor (acquirer) ISPB, 8 digits.
          examples:
            - '29011780'
          type: string
        currency:
          description: ISO 4217 currency code.
          examples:
            - BRL
          type: string
        domicileIfIspb:
          description: Domicile FI ISPB (bank where the merchant receives funds), 8 digits.
          examples:
            - '60701190'
          type: string
        dueDate:
          description: Settlement due date, date-only (YYYY-MM-DD).
          examples:
            - '2026-06-15'
          type: string
        establishmentCode:
          description: Merchant establishment (EC) code.
          examples:
            - EC-000123
          type: string
        externalId:
          description: >-
            Client-side unique identifier for the operation (idempotent external
            reference).
          examples:
            - acq-ext-2026-06-0001
          type: string
        installmentNumber:
          description: This installment's sequence number.
          examples:
            - 1
          format: int32
          type: integer
        installments:
          description: Total number of installments.
          examples:
            - 3
          format: int32
          type: integer
        intakeMode:
          description: Intake mode; defaults to api_jsonl when omitted.
          examples:
            - api_jsonl
          type: string
        metadata:
          additionalProperties: {}
          description: Free-form client metadata attached to the operation.
          type: object
        operationType:
          description: Operation type driving the settlement flow.
          examples:
            - CREDIT
          type: string
        originalOperationId:
          description: Id (UUID) of the operation a CANCELLATION targets.
          examples:
            - 018f8a3e-4b2c-7c1a-9e5d-2f6a1b3c4d5e
          type: string
        participantId:
          description: Participant id (UUID) that owns this operation.
          examples:
            - 018f8a3e-4b2c-7c1a-9e5d-2f6a1b3c4d5e
          type: string
        participantRole:
          description: Participant role in the settlement.
          examples:
            - ACQUIRER
          type: string
        pvCode:
          description: Merchant (PontoVenda) code.
          examples:
            - PV-000123
          type: string
        pvDocument:
          description: >-
            Merchant CPF/CNPJ document (regulated PII; never logged in the
            clear).
          examples:
            - '12345678000195'
          type: string
        pvName:
          description: Merchant (PontoVenda) legal/trade name.
          examples:
            - Loja Exemplo LTDA
          type: string
        pvPersonType:
          description: Merchant person type (natural or legal).
          examples:
            - J
          type: string
        reasonCategory:
          description: >-
            Numeric MotvCanc cancellation reason ('1'..'4'); required for
            operationType=CANCELLATION.
          examples:
            - '4'
          type: string
        settlementIfIspb:
          description: Settlement FI ISPB (moves reserves at the STR), 8 digits; optional.
          examples:
            - '60746948'
          type: string
        transactionDate:
          description: Business transaction date, date-only (YYYY-MM-DD).
          examples:
            - '2026-06-15'
          type: string
        value:
          description: Operation amount in minor units (centavos).
          examples:
            - 150000
          format: int64
          type: integer
      required:
        - externalId
        - operationType
        - creditorIspb
        - domicileIfIspb
        - value
        - installments
        - dueDate
        - transactionDate
        - participantId
        - participantRole
      type: object
    CreateOperationResponse:
      additionalProperties: false
      properties:
        externalId:
          description: Echoed client-side external identifier.
          examples:
            - acq-ext-2026-06-0001
          type: string
        id:
          description: Created operation id (UUID).
          examples:
            - 018f8a3e-4b2c-7c1a-9e5d-2f6a1b3c4d5e
          type: string
        meta:
          $ref: '#/components/schemas/CreateOperationMeta'
          description: Response envelope metadata (requestId + timestamp).
        state:
          description: Initial lifecycle state of the created operation.
          examples:
            - CREATED
          type: string
      required:
        - id
        - state
        - externalId
        - meta
      type: object
    Detail:
      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
    CreateOperationMeta:
      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

````