Path parameters

  • id string Required

    The CUID of the order to retrieve

Responses

  • 200 application/json

    Order details retrieved successfully

    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

    • items array[object] Required
      Hide items attributes Show items attributes object
      • id string Required

        Unique identifier for the order item (CUID)

      • orderId string Required

        CUID of the order this item belongs to

      • productId string Required

        CUID of the product

      • quantity integer(int32) Required
      • price number(double) Required

        Price per unit at the time of order

  • 401 application/json

    Unauthorized

    Hide response attribute Show response attribute object
    • message string Required

      A message describing the error

  • 404 application/json

    Order not found

    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/{id}
curl \
 --request GET 'https://referspecs-backend.onrender.com/api/v1/orders/{id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "id": "string",
  "userId": "string",
  "status": "New",
  "createdAt": "2025-05-04T09:42:00Z",
  "stripePaymentIntentId": "string",
  "items": [
    {
      "id": "string",
      "orderId": "string",
      "productId": "string",
      "quantity": 42,
      "price": 42.0
    }
  ]
}
Response examples (401)
{
  "message": "Order not found"
}
Response examples (404)
{
  "message": "Order not found"
}
Response examples (500)
{
  "message": "Order not found"
}