Skip to content

damansh/Online-Restaurant-Order-Placement-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Online Restaurant Order Placement API (Hosted on AWS)

A basic restaurant REST API that allows customers to order items from a menu and allows a restaurant to update their menu and view orders. The API is hosted on AWS Elastic Beanstalk here: http://daman-rbc-restaurant-api.us-east-1.elasticbeanstalk.com

The REST API uses AWS DynamoDB, AWS S3, and Flask:

  • DynamoDB: Created two tables that store menu and order information
  • S3: Holds the images corresponding to an item on the menu
  • Flask: Web framework used to develop the REST API in Python

Routes

Endpoint POST PUT GET DELETE
/menu - Restaurant:
- Add a new item and image to the menu
- Modify an existing item in the menu
- Response indicates whether the item was successfully added to the database
- Required keys in request (as form-data): item, cost, and file (image)
Restaurant and Customer:
- Get all available menu items or search for a specific item from the menu
- Returns the item, cost, and image of the item from the menu
- Optional key in request (as form-data): item (item that you want to search for on the menu)
Restaurant:
- Delete an item from the menu
- Response indicates whether the item was successfully removed from the database
- Required key in request (as form-data): item (item you wish to delete)
/menu/status - Restaurant:
- Mark an item on the menu as 'available' or 'not available'
- Response indicates whether the status of the item was successfully updated
- Required keys in request (as form-data): item, status
- -
/order Customer:
- Place a new order based on items available on the menu
- Returns the order_id, ordered_items, and final_price
- Required keys (as form-data): food (as an array, formatted as "food_name,quantity")
- Restaurant and Customer:
- (Restaurant) Get all orders or get the order details of a specific order
- (Customer) Get the order details of a specific order
- Returns the order ID, ordered items, final cost, and the status of the order
- Optional key in request (as form-data): order-id (generated when an order was created)
Restaurant and Customer:
- Delete an order if an order status is still "received"
- Response indicates whether an order was successfully deleted
- Required key in request (as form-data): order-id (generated when an order was created)
/order/status - Restaurant:
- Update the status of a customer's order.
- Valid statuses include: received, in progress, and ready
- Response indicates whether the status of the order was successfully updated
- -

About

Restaurant API developed using AWS DynamoDB, AWS S3, and Flask

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages