You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Littlelemon API Project is the final assignment for the APIs Course part of the Meta BackEnd Developer Professional Certificate on Coursera.
The API endpoints for this project provide the functionality to create, edit and delete users, roles for each user, such as Customer, Delivery Crew or Manager, menu items, categories for menu items, shopping cart, and orders. Every API endpoint has authorization and permissions constraints as well as throttling, pagination, and filtering.
Returns all orders with order items created by this user or assigned to the delivery crew.
/api/orders
GET
Manager
Returns all orders
/api/orders
POST
Customer
Creates a new order item for the current user. Gets current cart items from the cart endpoints and adds those items to the order items table. Then deletes all items from the cart for this user.
/api/orders/{orderId}
GET
Customer
Returns all items for this order id if the order belongs to the current user
/api/orders/{orderId}
PUT,PATCH
Delivery crew, Manager
Update the order. Manager can use it to assign delivery crew. Delivery crew can use it to update the delivery status.
/api/orders/{orderId}
DELETE
Manager
Deletes this order
Filtering, searching and ordering
Filtering, searching, and ordering are supported for Menu-items and Order management endpoints.
Example:
Using endpoint api/menu-items?from_price=5&to_price=10&ordering=price, get menu items whose price is from 5 to 10, and the results are ordered by price.
Pagination adn throttling
Pagination and throttling are supported for Menu-items and Order management endpoints. These two functionalities supported by the Django REST Framework