GET /orders

Retrieves a list of orders. Currently returns all orders. (Future implementation may filter based on user role/ID).

Responses

  • 200 application/json

    A list of orders (basic details)

    Hide response attributes Show response attributes object
    • id string Required

      Unique identifier for the order (CUID)

    • userId string Required

      CUID of the user who placed the order

    • status string Required

      Current status of the order (e.g., 'New', 'Processing', 'Shipped')

      Default value is New.

    • createdAt string(date-time) Required

      Timestamp when the order was created

    • stripePaymentIntentId string | null

      Associated Stripe Payment Intent ID

  • 401 application/json

    Unauthorized

    Hide response attribute Show response attribute object
    • message string Required

      A message describing the error

  • 500 application/json

    Internal Server Error

    Hide response attribute Show response attribute object
    • message string Required

      A message describing the error

GET /orders
curl \
 --request GET 'http://localhost:3000/api/v1/orders' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
[
  {
    "id": "string",
    "userId": "string",
    "status": "New",
    "createdAt": "2025-05-04T09:42:00Z",
    "stripePaymentIntentId": "string"
  }
]
Response examples (401)
{
  "message": "Order not found"
}
Response examples (500)
{
  "message": "Order not found"
}