Skip to main content
GET
/
orders
curl --location 'http://localhost:3000/orders?page=1&pageSize=10&status=PENDING'
{
  "data": [
    {
      "id": 1,
      "customerEmail": "[email protected]",
      "totalAmount": "45.50",
      "status": "PENDING",
      "createdAt": "2026-03-10T10:30:00.000Z"
    },
    {
      "id": 2,
      "customerEmail": "[email protected]",
      "totalAmount": "23.00",
      "status": "PAID",
      "createdAt": "2026-03-10T09:15:00.000Z"
    }
  ],
  "meta": {
    "total": 42,
    "page": 1,
    "pageSize": 10,
    "totalPages": 5
  }
}
Returns a paginated list of all orders, sorted by creation date (newest first). Supports filtering by order status and customer email.

Query Parameters

page
integer
default:"1"
Page number for pagination
pageSize
integer
default:"10"
Number of orders per page
status
string
Filter orders by status. Must be one of: PENDING, PAID, CANCELLED
customerEmail
string
Filter orders by customer email address

Response

data
Order[]
Array of order objects
id
integer
Unique identifier for the order
customerEmail
string
Customer’s email address
totalAmount
decimal
Total order amount (calculated from order items)
status
enum
Order status: PENDING, PAID, or CANCELLED
createdAt
datetime
Timestamp when the order was created
meta
object
Pagination metadata
total
integer
Total number of orders matching the filter criteria
page
integer
Current page number
pageSize
integer
Number of items per page
totalPages
integer
Total number of pages
curl --location 'http://localhost:3000/orders?page=1&pageSize=10&status=PENDING'
{
  "data": [
    {
      "id": 1,
      "customerEmail": "[email protected]",
      "totalAmount": "45.50",
      "status": "PENDING",
      "createdAt": "2026-03-10T10:30:00.000Z"
    },
    {
      "id": 2,
      "customerEmail": "[email protected]",
      "totalAmount": "23.00",
      "status": "PAID",
      "createdAt": "2026-03-10T09:15:00.000Z"
    }
  ],
  "meta": {
    "total": 42,
    "page": 1,
    "pageSize": 10,
    "totalPages": 5
  }
}

Build docs developers (and LLMs) love