Path parameters

  • id string Required

    The CUID of the order to update

application/json

Body Required

  • status string Required

    The new status of the order (e.g., 'Processing', 'Shipped', 'Delivered', 'Cancelled')

Responses

  • 200 application/json

    Order updated 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

  • 400 application/json

    Bad Request (e.g., invalid status value)

    Hide response attribute Show response attribute object
    • message string Required

      A message describing the error

  • 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

PUT /orders/{id}
curl \
 --request PUT 'https://referspecs-backend.onrender.com/api/v1/orders/{id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"status":"Shipped"}'
Request examples
{
  "status": "Shipped"
}
Response examples (200)
{
  "id": "string",
  "userId": "string",
  "status": "New",
  "createdAt": "2025-05-04T09:42:00Z",
  "stripePaymentIntentId": "string"
}
Response examples (400)
{
  "message": "Order not found"
}
Response examples (401)
{
  "message": "Order not found"
}
Response examples (404)
{
  "message": "Order not found"
}
Response examples (500)
{
  "message": "Order not found"
}