POST
/orders
curl \
--request POST 'http://localhost:3000/api/v1/orders' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"items":[{"price":19.99,"quantity":2,"productId":"clv3x..."},{"price":45.5,"quantity":1,"productId":"clv4y..."}]}'
Request example
{
"items": [
{
"price": 19.99,
"quantity": 2,
"productId": "clv3x..."
},
{
"price": 45.5,
"quantity": 1,
"productId": "clv4y..."
}
]
}
Response examples (201)
{
"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 (400)
{
"message": "Order not found"
}
Response examples (401)
{
"message": "Order not found"
}
Response examples (500)
{
"message": "Order not found"
}