The web API for pizza delivery system
Existing user roles
- super admins
- admins
- store staff
- kitchen staff
- delivery staff
- customers
npm i
npm start
npm test
Super admins can create admin staff, store staff, kitchen staff and delivery staff
End point method: post
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/users/register
Customers can self register with the customer role
End point method: post
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/users/customer/register
Any user should be able to signin
End point method: post
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/users/signin
Admins should be able to add products
End point method: post
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/products
Customers should be able to create orders
End point method: post
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/orders
The below represents allowed state changes for each roles
-
Store Staff: cancel, picked_from_store
-
Kitchen Staff: preparing, ready_to_pick_up
-
Delivery Staff: delivered
End point method: put
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/orders/:id
Can use this endpoint by passing order id as a path parameter
End point method: get
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/orders/:id
Can use this endpoint by passing customer id as a path parameter
End point method: get
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/orders/history/:customerId
Can use this endpoint by passing "customer" as role
End point method: get
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/users/:role
Can use this endpoint by passing date as a ISO string Eg: 2023-08-28T11:49:54.022+00:00
End point method: get
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/orders/all/:date
Can use this endpoint by passing customer id as a path parameter
End point method: get
Url: https://837a9t46ig.execute-api.us-east-1.amazonaws.com/dev/orders/history/:customerId