Skip to main content
PATCH
/
orders
/
:id
/
status
curl --location --request PATCH 'http://localhost:3000/orders/1/status' \
--header 'Content-Type: application/json' \
--data '{
  "status": "PAID"
}'
{
  "id": 1,
  "customerEmail": "[email protected]",
  "totalAmount": "45.50",
  "status": "PAID",
  "createdAt": "2026-03-10T10:30:00.000Z"
}
Updates the status of an order. This endpoint is typically used to mark orders as paid or cancelled.

Path Parameters

id
integer
required
Unique identifier of the order to update

Request Body

status
enum
required
New status for the order. Must be one of:
  • PENDING - Order awaiting payment
  • PAID - Payment confirmed
  • CANCELLED - Order cancelled
Validation: Must be a valid OrderStatus enum value

Response

id
integer
Unique identifier for the order
customerEmail
string
Customer’s email address
totalAmount
decimal
Total order amount
status
enum
Updated order status
createdAt
datetime
Timestamp when the order was created
curl --location --request PATCH 'http://localhost:3000/orders/1/status' \
--header 'Content-Type: application/json' \
--data '{
  "status": "PAID"
}'
{
  "id": 1,
  "customerEmail": "[email protected]",
  "totalAmount": "45.50",
  "status": "PAID",
  "createdAt": "2026-03-10T10:30:00.000Z"
}

Build docs developers (and LLMs) love