orders
Create a new order
Changed onPlaces a new order with burgers (requires userId). French fries are included as a side for every burger order.
Limitations:
- Maximum 5 active orders per user
- Maximum 50 burgers total per order
post/orders
Request
- Base URL<BURGER_API_HOST>/api (relative, and the document was published on a file host, not at the API’s origin)
- URL<BURGER_API_HOST>/api/orders
- Authnone declared
Request body
Example request
{
"userId": "user123",
"nickname": "John",
"items": [
{
"burgerId": "burger-1",
"quantity": 1,
"extraToppingIds": [
"topping-1",
"topping-2"
]
}
]
}Response
Order created successfully
Example response
{
"items": [
{
"burgerId": "burger-1",
"quantity": 1,
"extraToppingIds": [
"topping-1",
"topping-2"
]
}
]
}Changes
- info
added the new optional request property
- info
added the optional property
to the response with the status
- info
- warning
removed the request property
- warning
removed the optional property
from the response with the status
- warning