Create Sale
Sales
Create Sale
Create a new sale order with items, delivery method, and payment method
POST
Create Sale
Authentication
This endpoint requires authentication. Include the JWT token in the Authorization header.Request Body
array
required
number
required
Subtotal amount (minimum: 0)
string
required
Delivery type. Must be one of:
ENVIO- ShippingRETIRO- Pickup at store
string
required
Payment method. Must be one of:
MERCADOPAGO- MercadoPago payment gatewayEFECTIVO- Cash paymentVIUMI- Viumi paymentTRANSFERENCIA- Bank transferBINANCE- Binance cryptocurrency payment
string
Destination postal code (minimum 4 characters). Required if
tipoEntrega is ENVIO.string
Shipping address. Required if
tipoEntrega is ENVIO.string
Shipping city. Required if
tipoEntrega is ENVIO.string
Shipping province. Required if
tipoEntrega is ENVIO.string
Shipping phone number. Required if
tipoEntrega is ENVIO.string
Recipient’s ID document (DNI). Required for shipping services.
Response
boolean
Indicates if the request was successful
object
The created sale object
number
Sale ID
string
Sale creation date (ISO 8601 timestamp)
number
Total sale amount including shipping
string
Sale status. One of:
PENDIENTE_PAGO, PENDIENTE_APROBACION, APROBADO, ENVIADO, ENTREGADO, RECHAZADO, CANCELADOnumber
Shipping cost
string
Delivery type:
ENVIO or RETIROstring
Payment method selected
number
Customer ID
array
Array of sale line items
string
Error message if the request failed
array
Validation error details (if validation failed)
Example Request
Example Response
Error Responses
Validation Error (400)
Product Not Found or Insufficient Stock (400)
Unauthorized (401)
Notes
- The sale is created with status
PENDIENTE_PAGOby default - Stock is reserved when the sale is created
- Shipping cost is automatically calculated based on the postal code for shipments
- For
RETIRO(pickup), no shipping information is required - The authenticated user must have an associated customer profile