Skip to content

Latest commit

 

History

History
39 lines (31 loc) · 908 Bytes

README.md

File metadata and controls

39 lines (31 loc) · 908 Bytes

PizzaAPI

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.

end points list:

  • 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