Create a new order from the user’s cart
curl --request POST \
--url https://api.example.com/orders{
"id": 42,
"userId": 5,
"total": "149.97",
"status": "pending",
"createdAt": "2026-03-06T10:30:00.000Z",
"updatedAt": "2026-03-06T10:30:00.000Z"
}
Creates a new order by converting all items in the authenticated user’s cart into an order. This endpoint:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GioTaipe/E-commerce/llms.txt
Use this file to discover all available pages before exploring further.
Authorization: Bearer <your-token>
pending.Possible values:pending - Order has been created but not yet processedshipped - Order has been shippeddelivered - Order has been deliveredcancelled - Order has been cancelled{
"id": 42,
"userId": 5,
"total": "149.97",
"status": "pending",
"createdAt": "2026-03-06T10:30:00.000Z",
"updatedAt": "2026-03-06T10:30:00.000Z"
}
{
"error": "El carrito está vacío"
}
{
"error": "Stock insuficiente para el producto \"Wireless Headphones\""
}
{
"error": "Usuario no autenticado"
}
curl --request POST \
--url https://api.example.com/orders{
"id": 42,
"userId": 5,
"total": "149.97",
"status": "pending",
"createdAt": "2026-03-06T10:30:00.000Z",
"updatedAt": "2026-03-06T10:30:00.000Z"
}