Get details of a specific order
cURL
curl --request GET \ --url https://api.example.com/orders/:id
{ "id": 42, "userId": 5, "total": "149.97", "status": "shipped", "createdAt": "2026-03-01T10:30:00.000Z", "updatedAt": "2026-03-03T09:15:00.000Z", "items": [ { "id": 101, "orderId": 42, "productId": 15, "quantity": 2, "priceAtPurchase": "49.99", "product": { "id": 15, "name": "Wireless Headphones", "description": "High-quality Bluetooth headphones with noise cancellation", "price": "54.99", "imageUrl": "https://example.com/images/headphones.jpg", "stock": 25, "categoryId": 3 } }, { "id": 102, "orderId": 42, "productId": 23, "quantity": 1, "priceAtPurchase": "49.99", "product": { "id": 23, "name": "USB-C Cable", "description": "Fast charging USB-C cable, 6ft length", "price": "49.99", "imageUrl": "https://example.com/images/cable.jpg", "stock": 100, "categoryId": 3 } } ] }
Authorization: Bearer <your-token>
pending
shipped
delivered
cancelled
{ "error": "Usuario no autenticado" }
{ "error": "Orden no encontrada" }