POST
/orders
Create an order
POST /orders
Places an order for the given items and returns the priced order.
Request body
Required.
Content type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
customerId |
string (uuid) | yes | Public ID of the ordering customer. |
items |
object[] | yes | Line items to order — at least one. |
shippingAddress |
Address | yes |
Responses
201 — Created
| Property | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) | yes | Public ID of the order. |
status |
OrderStatus | yes | |
items |
OrderItem[] | yes | The ordered line items. |
subtotal |
number (double) | yes | Sum of all line items in EUR. |
shippingCost |
number (double) | yes | Shipping cost in EUR. |
total |
number (double) | yes | Grand total in EUR — subtotal plus shipping. |
createdAt |
string (date-time) | yes | When the order was placed. |
422 — Validation failed
| Property | Type | Required | Description |
|---|---|---|---|
code |
string | yes | Stable, machine-readable error code — branch on this, not on the message. |
message |
string | yes | Human-readable explanation, intended for logs and debugging. |