curl --request POST \
--url https://api.example.com/api/sales \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": {},
"quantity": 123
}
],
"subtotal": 123,
"tipoEntrega": "<string>",
"medioPago": "<string>",
"cpDestino": "<string>",
"direccionEnvio": "<string>",
"ciudadEnvio": "<string>",
"provinciaEnvio": "<string>",
"telefonoEnvio": "<string>",
"documentoEnvio": "<string>"
}
'{
"success": true,
"data": {
"id": 123,
"fecha": "<string>",
"montoTotal": 123,
"estado": "<string>",
"costoEnvio": 123,
"tipoEntrega": "<string>",
"medioPago": "<string>",
"clienteId": 123,
"lineasVenta": [
{}
]
},
"error": "<string>",
"details": [
{}
]
}Create a new sale order with items, delivery method, and payment method
curl --request POST \
--url https://api.example.com/api/sales \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"id": {},
"quantity": 123
}
],
"subtotal": 123,
"tipoEntrega": "<string>",
"medioPago": "<string>",
"cpDestino": "<string>",
"direccionEnvio": "<string>",
"ciudadEnvio": "<string>",
"provinciaEnvio": "<string>",
"telefonoEnvio": "<string>",
"documentoEnvio": "<string>"
}
'{
"success": true,
"data": {
"id": 123,
"fecha": "<string>",
"montoTotal": 123,
"estado": "<string>",
"costoEnvio": 123,
"tipoEntrega": "<string>",
"medioPago": "<string>",
"clienteId": 123,
"lineasVenta": [
{}
]
},
"error": "<string>",
"details": [
{}
]
}ENVIO - ShippingRETIRO - Pickup at storeMERCADOPAGO - MercadoPago payment gatewayEFECTIVO - Cash paymentVIUMI - Viumi paymentTRANSFERENCIA - Bank transferBINANCE - Binance cryptocurrency paymenttipoEntrega is ENVIO.tipoEntrega is ENVIO.tipoEntrega is ENVIO.tipoEntrega is ENVIO.tipoEntrega is ENVIO.PENDIENTE_PAGO, PENDIENTE_APROBACION, APROBADO, ENVIADO, ENTREGADO, RECHAZADO, CANCELADOENVIO or RETIRO{
"items": [
{
"id": 123,
"quantity": 2
},
{
"id": 456,
"quantity": 1
}
],
"subtotal": 45000,
"tipoEntrega": "ENVIO",
"medioPago": "TRANSFERENCIA",
"cpDestino": "1414",
"direccionEnvio": "Av. Corrientes 1234",
"ciudadEnvio": "Buenos Aires",
"provinciaEnvio": "Capital Federal",
"telefonoEnvio": "+5491112345678",
"documentoEnvio": "12345678"
}
{
"success": true,
"data": {
"id": 789,
"fecha": "2026-03-05T10:30:00.000Z",
"montoTotal": 50000,
"estado": "PENDIENTE_PAGO",
"costoEnvio": 5000,
"tipoEntrega": "ENVIO",
"medioPago": "TRANSFERENCIA",
"clienteId": 42,
"direccionEnvio": "Av. Corrientes 1234",
"ciudadEnvio": "Buenos Aires",
"provinciaEnvio": "Capital Federal",
"cpEnvio": "1414",
"telefonoEnvio": "+5491112345678",
"documentoEnvio": "12345678",
"lineasVenta": [
{
"id": 1,
"productoId": 123,
"cantidad": 2,
"subTotal": 30000
},
{
"id": 2,
"productoId": 456,
"cantidad": 1,
"subTotal": 15000
}
]
}
}
{
"success": false,
"error": "Datos de venta inválidos",
"details": [
{
"code": "invalid_type",
"expected": "number",
"received": "string",
"path": ["subtotal"],
"message": "Expected number, received string"
}
]
}
{
"success": false,
"error": "Producto no encontrado"
}
{
"success": false,
"error": "Stock insuficiente"
}
{
"success": false,
"error": "Unauthorized"
}
PENDIENTE_PAGO by defaultRETIRO (pickup), no shipping information is required