Get all orders for the authenticated user
curl --request GET \
--url https://api.example.com/orders[
{
"id": 42,
"userId": 5,
"total": "149.97",
"status": "delivered",
"createdAt": "2026-03-01T10:30:00.000Z",
"updatedAt": "2026-03-04T14:20: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",
"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 cable",
"price": "49.99",
"imageUrl": "https://example.com/images/cable.jpg",
"stock": 100,
"categoryId": 3
}
}
]
},
{
"id": 38,
"userId": 5,
"total": "79.99",
"status": "pending",
"createdAt": "2026-02-28T15:45:00.000Z",
"updatedAt": "2026-02-28T15:45:00.000Z",
"items": [
{
"id": 95,
"orderId": 38,
"productId": 8,
"quantity": 1,
"priceAtPurchase": "79.99",
"product": {
"id": 8,
"name": "Mechanical Keyboard",
"description": "RGB backlit gaming keyboard",
"price": "79.99",
"imageUrl": "https://example.com/images/keyboard.jpg",
"stock": 15,
"categoryId": 3
}
}
]
}
]
Retrieves a list of all orders placed by the authenticated user, ordered by creation date (most recent first). Each order includes its items and associated product details.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 - 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": "delivered",
"createdAt": "2026-03-01T10:30:00.000Z",
"updatedAt": "2026-03-04T14:20: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",
"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 cable",
"price": "49.99",
"imageUrl": "https://example.com/images/cable.jpg",
"stock": 100,
"categoryId": 3
}
}
]
},
{
"id": 38,
"userId": 5,
"total": "79.99",
"status": "pending",
"createdAt": "2026-02-28T15:45:00.000Z",
"updatedAt": "2026-02-28T15:45:00.000Z",
"items": [
{
"id": 95,
"orderId": 38,
"productId": 8,
"quantity": 1,
"priceAtPurchase": "79.99",
"product": {
"id": 8,
"name": "Mechanical Keyboard",
"description": "RGB backlit gaming keyboard",
"price": "79.99",
"imageUrl": "https://example.com/images/keyboard.jpg",
"stock": 15,
"categoryId": 3
}
}
]
}
]
{
"error": "Usuario no autenticado"
}
curl --request GET \
--url https://api.example.com/orders[
{
"id": 42,
"userId": 5,
"total": "149.97",
"status": "delivered",
"createdAt": "2026-03-01T10:30:00.000Z",
"updatedAt": "2026-03-04T14:20: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",
"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 cable",
"price": "49.99",
"imageUrl": "https://example.com/images/cable.jpg",
"stock": 100,
"categoryId": 3
}
}
]
},
{
"id": 38,
"userId": 5,
"total": "79.99",
"status": "pending",
"createdAt": "2026-02-28T15:45:00.000Z",
"updatedAt": "2026-02-28T15:45:00.000Z",
"items": [
{
"id": 95,
"orderId": 38,
"productId": 8,
"quantity": 1,
"priceAtPurchase": "79.99",
"product": {
"id": 8,
"name": "Mechanical Keyboard",
"description": "RGB backlit gaming keyboard",
"price": "79.99",
"imageUrl": "https://example.com/images/keyboard.jpg",
"stock": 15,
"categoryId": 3
}
}
]
}
]