Basic API for order managment. Allows a user to place an order containing a list of pizzas id, see an existing order giving its id, cancel an order, and more.
-
GET /pizza returns the list of all available pizzas
-
GET /pizza/<pizza_id> returns a specific pizza including its toppings.
-
POST /order places an order.
required body:
{
"pizzas": [],
"takeaway": true,
"payment_type": "",
"customer_id": 0,
"note": "",
"delivery_address": {
"street": "",
"city": "",
"country": "",
"zipcode": ""
}
}
-
GET /order/<order_id> returns information about the given order
-
PUT /order/cancel/<order_id> cancels the given order. (sets the status to 'Cancelled')
-
GET /order/deliverytime/<order_id> returns information about the given order including the time left before delivery