API

Registra una venta y devuelve sus efectos fiscales, de stock, pagos y contabilidad. Enviá Lapyme-Version: 2026-08-20 para usar el contrato estricto: total es obligatorio, unit_price es neto para comprobantes A y final para comprobantes a consumidor final, y los importes derivados se calculan una sola vez. Omitir el header conserva los campos históricos, total opcional y la configuración de precios con IVA de la organización, de forma deprecada. Ambos contratos calculan el IVA una sola vez. Idempotency-Key solo protege reintentos; si necesitás guardar una referencia externa visible, enviá integration_source e integration_id en el cuerpo.

post/api/v1/sales

Request

  • Base URL
    https://api.lapyme.com.ar
  • URL
    https://api.lapyme.com.ar/api/v1/sales
  • Auth
    HTTP bearer

Headers

Lapyme-Version'2026-08-20'

Versión fechada del contrato de creación de ventas. Usá 2026-08-20 en integraciones nuevas. Omitirla conserva el contrato de entrada histórico deprecado; ambos contratos calculan el IVA una sola vez.

Idempotency-Keystring required

Clave única para evitar duplicados al reintentar la misma creación de venta.

X-Request-Idstring

ID opcional de la solicitud para trazabilidad. Si se omite, el servidor genera uno.

Request body

customer_idstring uuid
customer_tax_category_overridestring
point_of_sale_idstring uuid required
register_idstring uuid
operator_idstring uuid
integration_sourcestring

Fuente de integracion externa para buscar/conciliar la venta. Debe enviarse junto con integrationId.

integration_idstring

ID de referencia externa visible en la venta. Debe enviarse junto con integrationSource; no se deriva del header Idempotency-Key.

invoice_datestring date required
due_datestring date

Obligatoria para FCE (201, 206, 211); debe ser igual o posterior a invoiceDate y a la fecha actual en Argentina.

transfer_type'SCA' | 'ADC'

Obligatorio para FCE (201, 206, 211). Seleccioná explícitamente SCA o ADC; no hay valor predeterminado.

service_fromstring date
service_tostring date
currency'ARS' | 'USD' required
exchange_ratenumber
same_currency_paymentboolean
notesstring
discount_type'percentage' | 'amount'
discount_valuenumber
totalinteger required

Total final esperado en centavos. La API lo compara con el total canónico antes de crear la venta o cualquier efecto durable.

national_perception_amountinteger
gross_income_perception_amountinteger
municipal_perception_amountinteger
internal_tribute_amountinteger
uncategorized_vat_perception_amountinteger
other_tribute_amountinteger
is_full_amount_pendingboolean

Response

Venta creada exitosamente

request_idstring required

Changes

    • breaking

      for the header request parameter Idempotency-Key, the minLength was increased from 0 to 1

    • breaking

      for the header request parameter X-Request-Id, the minLength was increased from 0 to 1

    • breaking

      the request property became required

    • breaking

      removed the enum value DOL of the request property

    • breaking

      removed the enum value PES of the request property

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the request property's minLength was increased from 0 to 1

    • breaking

      the // request property's minLength was increased from 0 to 1

    • warning

      for the header request parameter Idempotency-Key, the maxLength was set to 255

    • warning

      for the header request parameter X-Request-Id, the maxLength was set to 255

    • warning

      the request property's maxLength was set to 120

    • warning

      the request property's maxLength was set to 255

    • warning

      the request property's maxLength was set to 120

    • warning

      the // request property's maxLength was set to 255

    • warning

      the // request property's maxLength was set to 1000

    • warning

      the request property's maxLength was set to 1000

    • warning

      the // request property's maxLength was set to 100

    • warning

      the // request property's maxLength was set to 100

    • warning

      the // request property's maxLength was set to 100

    • warning

      the // request property's maxLength was set to 100

    • warning

      the // request property's maxLength was set to 255

    • warning

      the // request property's maxLength was set to 255

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added the new optional header request parameter Lapyme-Version

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new ARS enum value to the request property

    • info

      added the new USD enum value to the request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status