> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lapyme.com.ar/llms.txt
> Use this file to discover all available pages before exploring further.

# Crear una transferencia de fondos

> Mueve un importe entero en centavos entre dos saldos PES visibles y devuelve el hecho confirmado con sus dos efectos contables. La operación es atómica, permite saldo negativo y exige Idempotency-Key.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/funds-transfers
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/funds-transfers:
    post:
      tags:
        - API
      summary: Crear una transferencia de fondos
      description: >-
        Mueve un importe entero en centavos entre dos saldos PES visibles y
        devuelve el hecho confirmado con sus dos efectos contables. La operación
        es atómica, permite saldo negativo y exige Idempotency-Key.
      operationId: createApiFundsTransfer
      parameters:
        - name: Idempotency-Key
          in: header
          description: Clave estable para deduplicar reintentos de la misma operación.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiFundsTransferCreateRequest'
      responses:
        '201':
          description: Transferencia creada o reproducida idempotentemente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiFundsTransferDetailResponse'
        '400':
          description: Solicitud o Idempotency-Key inválidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Solicitud o Idempotency-Key inválidos
                      retryable: false
                      details: []
        '401':
          description: API key faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: API key faltante o inválida
                      retryable: false
                      details: []
        '403':
          description: Scope treasury:write faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Scope treasury:write faltante
                      retryable: false
                      details: []
        '404':
          description: Saldo inexistente, oculto o de otra organización
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Saldo inexistente, oculto o de otra organización
                      retryable: false
                      details: []
        '409':
          description: Conflicto de idempotencia o estado del saldo o cuenta vinculada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: >-
                        Conflicto de idempotencia o estado del saldo o cuenta
                        vinculada
                      retryable: false
                      details: []
        '422':
          description: Moneda no soportada, fecha futura o configuración contable faltante
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: >-
                        Moneda no soportada, fecha futura o configuración
                        contable faltante
                      retryable: false
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Error interno del servidor
                      retryable: false
                      details: []
        '503':
          description: Falla transitoria; el cliente puede reintentar
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_error_1
                    error:
                      type: invalid_request_error
                      code: INVALID_REQUEST
                      message: Falla transitoria; el cliente puede reintentar
                      retryable: false
                      details: []
components:
  schemas:
    ApiFundsTransferCreateRequest:
      type: object
      properties:
        source:
          $ref: '#/components/schemas/ApiSharedObject16a22cc706'
        destination:
          $ref: '#/components/schemas/ApiSharedObject16a22cc706'
        amount:
          type: integer
          exclusiveMinimum: 0
        occurred_on:
          type: string
          format: date
        reference:
          anyOf:
            - type: string
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - source
        - destination
        - amount
        - occurred_on
      additionalProperties: false
    ApiFundsTransferDetailResponse:
      type: object
      properties:
        request_id:
          type: string
        data:
          type: object
          properties:
            object:
              type: string
              const: funds_transfer
            id:
              type: string
              format: uuid
            source:
              $ref: '#/components/schemas/ApiSharedObject16a22cc706'
            destination:
              $ref: '#/components/schemas/ApiSharedObject16a22cc706'
            amount:
              type: integer
              exclusiveMinimum: 0
            currency:
              type: string
              const: PES
            occurred_on:
              type: string
              format: date
            reference:
              anyOf:
                - type: string
                - type: 'null'
            description:
              anyOf:
                - type: string
                - type: 'null'
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
            accounting_effects:
              type: array
              items:
                - $ref: '#/components/schemas/ApiSharedObject077b9678d0'
                - $ref: '#/components/schemas/ApiSharedObject077b9678d0'
          required:
            - object
            - id
            - source
            - destination
            - amount
            - currency
            - occurred_on
            - reference
            - description
            - created_at
            - updated_at
            - accounting_effects
          additionalProperties: false
      required:
        - request_id
        - data
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObjectc671832641'
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedObject16a22cc706:
      type: object
      properties:
        balance_type:
          $ref: '#/components/schemas/ApiSharedEnum53162db3eb'
        balance_id:
          type: string
          format: uuid
      required:
        - balance_type
        - balance_id
      additionalProperties: false
    ApiSharedObjectc671832641:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
      required:
        - code
        - message
      additionalProperties: false
    ApiSharedEnum53162db3eb:
      type: string
      enum:
        - bank_account
        - register
        - safe
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````