v1

latestOpenAPI 3.0.32026-07-1712816.3 KB
orders

Cancel an order

Cancels 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}

Path parameters

orderIdstring required

ID of the order

Query parameters

userIdstring required

ID of the user requesting the cancellation (required)

Response

Order cancelled successfully

idstring required
createdAtstring date-time required
estimatedCompletionAtstring date-time required
completedAtstring date-time

ISO date string for when the order was completed (undefined until completed)

nicknamestring

Optional nickname for the order

totalPricenumber float required
status'pending' | 'in-preparation' | 'ready' | 'completed' | 'cancelled' required
  • pending: Order has been created but not yet started - in-preparation: Order is being prepared - ready: Order is ready for pickup - completed: Order has been picked up - cancelled: Order has been cancelled

Example response

{
  "items": [
    {
      "burgerId": "burger-1",
      "quantity": 1,
      "extraToppingIds": [
        "topping-1",
        "topping-2"
      ]
    }
  ]
}