orders
Cancel an order
Changed onCancels an order if it has not yet been started (status must be 'pending').
The userId query parameter is required (e.g., ?userId=user123). If userId is missing or does not match the userId of the order, the request will be rejected.
delete/orders/{orderId}
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/{orderId}
- Authnone declared
Path parameters
orderIdstring required
ID of the order
Query parameters
userIdstring required
ID of the user requesting the cancellation (required)
Response
Order cancelled successfully
Example response
{
"items": [
{
"burgerId": "burger-1",
"quantity": 1,
"extraToppingIds": [
"topping-1",
"topping-2"
]
}
]
}Changes
- info
added the optional property
to the response with the status
- info
- warning
removed the optional property
from the response with the status
- warning