Orders
List Orders
Get all orders for the authenticated user
GET
List Orders
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.
Authentication
This endpoint requires authentication. Include a valid JWT token in the Authorization header.Response
Returns an array of order objects.Unique identifier for the order
ID of the user who placed the order
Total amount for the order (decimal as string)
Current status of the orderPossible values:
pending- Order has been created but not yet processedshipped- Order has been shippeddelivered- Order has been deliveredcancelled- Order has been cancelled
ISO 8601 timestamp when the order was created
ISO 8601 timestamp when the order was last updated
Array of order items
Unique identifier for the order item
ID of the parent order
ID of the product
Quantity of the product ordered
Price of the product at the time of purchase (decimal as string)
Product details
Product ID
Product name
Product description
Current price of the product (decimal as string)
URL to the product image
Current stock level
ID of the product’s category
Error Responses
401 Unauthorized
Returned when the authentication token is missing or invalid.List Orders