Skip to main content
POST
/
api
/
v1
/
sales
curl --request POST \
  --url https://api.lapyme.com.ar/api/v1/sales \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '
{
  "voucher_type": 90,
  "point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
  "invoice_date": "2026-04-18",
  "due_date": "2026-04-18",
  "currency": "PES",
  "is_full_amount_pending": true,
  "items": [
    {
      "name": "Technical service",
      "product_type": "service",
      "quantity": 1,
      "unit_price": 10000,
      "tax_rate_id": 5
    }
  ]
}
'
{
  "request_id": "req_sale_commit_1",
  "data": {
    "sale": {
      "sale_id": "cf19b3ae-4c08-48be-b9d7-e6f2f5baf609",
      "customer_id": null,
      "voucher_type": "90",
      "point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
      "invoice_number": 84,
      "formatted_invoice_number": "PRES-00001-00000084",
      "invoice_status": "not_required",
      "invoice_date": "2026-04-18",
      "due_date": "2026-04-18",
      "currency": "PES",
      "subtotal": 8264,
      "tax_amount": 1736,
      "total": 10000,
      "exempt_amount": 0,
      "non_taxed_amount": 0,
      "tributes_amount": 0,
      "discount_amount": 0,
      "balance": 10000,
      "created_at": "2026-04-18T12:00:00.000Z"
    },
    "normalized_sale": {
      "customer_id": null,
      "customer_tax_category_override": null,
      "voucher_type": 90,
      "point_of_sale_id": "550e8400-e29b-41d4-a716-446655440002",
      "register_id": null,
      "operator_id": null,
      "invoice_date": "2026-04-18",
      "due_date": "2026-04-18",
      "service_from": null,
      "service_to": null,
      "currency": "PES",
      "exchange_rate": null,
      "same_currency_payment": false,
      "notes": null,
      "subtotal": 8264,
      "tax_amount": 1736,
      "total": 10000,
      "exempt_amount": 0,
      "non_taxed_amount": 0,
      "tributes_amount": 0,
      "national_perception_amount": 0,
      "gross_income_perception_amount": 0,
      "gross_income_tax_breakdown": [],
      "municipal_perception_amount": 0,
      "internal_tribute_amount": 0,
      "uncategorized_vat_perception_amount": 0,
      "other_tribute_amount": 0,
      "discount_type": null,
      "discount_value": null,
      "discount_amount": 0,
      "balance": 10000,
      "is_full_amount_pending": false,
      "items": [
        {
          "product_id": null,
          "product_name": null,
          "sku": null,
          "warehouse_id": null,
          "name": "Technical service",
          "product_type": "service",
          "quantity": 1,
          "unit_price": 10000,
          "unit_cost": null,
          "tax_rate_id": 5,
          "is_exempt": false,
          "discount": null,
          "notes": null,
          "account_id": null,
          "cost_center1_id": null,
          "cost_center2_id": null,
          "cost_center3_id": null
        }
      ],
      "payment_methods": []
    },
    "projected_effects": {
      "inventory": {
        "will_affect_stock": false,
        "warehouse_ids": [],
        "product_line_count": 0,
        "total_quantity": 0
      },
      "accounting": {
        "will_create_sale_entry": true,
        "will_create_payment_entry": false
      },
      "fiscal": {
        "invoice_status": "not_required"
      },
      "payments": {
        "will_create_payments": false,
        "payment_method_count": 0,
        "total_amount": 0,
        "pending_amount": 10000
      }
    },
    "idempotent_replay": false
  },
  "warnings": []
}

Authorizations

Authorization
string
header
required

Incluí tu API key en el header Authorization con el prefijo Bearer.

Headers

Idempotency-Key
string
required

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

X-Request-Id
string

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

Body

application/json
voucher_type
integer
required
Required range: 1 <= x <= 95
point_of_sale_id
string<uuid>
required
invoice_date
string<date>
required
currency
enum<string>
required
Available options:
PES,
DOL
items
object[]
required
Minimum array length: 1
customer_id
string<uuid>
customer_tax_category_override
string
register_id
string<uuid>
operator_id
string<uuid>
due_date
string<date>
service_from
string<date>
service_to
string<date>
exchange_rate
number
same_currency_payment
boolean
notes
string
discount_type
enum<string>
Available options:
percentage,
amount
discount_value
number
Required range: x >= 0
discount_amount
integer
Required range: x >= 0
subtotal
integer
Required range: x >= 0
tax_amount
integer
Required range: x >= 0
total
integer
Required range: x >= 0
exempt_amount
integer
Required range: x >= 0
non_taxed_amount
integer
Required range: x >= 0
tributes_amount
integer
Required range: x >= 0
national_perception_amount
integer
Required range: x >= 0
gross_income_perception_amount
integer
Required range: x >= 0
gross_income_tax_breakdown
object[]
municipal_perception_amount
integer
Required range: x >= 0
internal_tribute_amount
integer
Required range: x >= 0
uncategorized_vat_perception_amount
integer
Required range: x >= 0
other_tribute_amount
integer
Required range: x >= 0
payment_methods
object[]
is_full_amount_pending
boolean

Response

Venta creada exitosamente

request_id
string
required
data
object
required
warnings
object[]
required