API Specification Doc
Version Date Author Description
1.0 28-04-2021 Abhijith M Initial draft
1. ADMIN:
1. Admin Login:
Admin have a username and password
Method URL
POST admin_login
Request
Parameter Name Description Type & Length
User Name Admin have a username String
Password Admin have a password Password
Response
Parameter Name Description Type & Length
200 “Successfully Login to Admin panel ”
501 {“error”:”Username and password invalid}
2. Admin Panel:
This is the page for the Admin to view and the data of the website.
Method URL
GET admin_panel
Response
Parameter Name Description Type & Length
200 ’Success’. Enter to
admin_Panel
PRODUCTS
Here Admin can manage Products
Method URL
GET admin_panel/products
Response
Parameter Name Description
200 OK
1. Add Products
Here Admin can add products.
Method URL
GET admin_panel/products/add_product
Request
Parameter Name Description Type & Length
Category Category of the product String
Product name Name of the product string
Price Price of the product int
Quantity Quantity of the product int
Product Image Image of the product image
Response
Parameter Name Description
200 ’Success’.
2. Edit Products
Here Admin can add products.
Method URL
PUT admin_panel/products/edit_products/id
Request
Parameter Name Description Type & Length
Category Category of the product String
Product name Name of the product string
Price Price of the product int
Quantity Quantity of the product int
Product Image Image of the product image
Response
Parameter Name Description
200 ’Success’.
3. Delete Products
Here Admin can delete products.
Method URL
DELETE admin_panel/products/delete_products/id
Response
Parameter Name Description
200 OK
USERS
Admin can view and manage user information.
1. View Users
Admin can view all details about the user.
Method URL
GET admin_panel/user_management
Response
Parameter Name Description Type & Length
Name Name of the user String
Username User name of the user string
Address The address of the user string
Email User email email
Phone No. User phone number int
2. Edit Users
Admin can edit details about the user..
Method URL
PUT admin_panel/user_management/edit_user/user_id
Request
Parameter Name Description Type & Length
Name Name of the user String
Username User name of the user string
Address The address of the user string
Email User email email
Response
Parameter Name Description
200 ’Success’.
3. Delete Users
Admin can delete users .
Method URL
DELETE admin_panel/user_management/delete_user/user_id
Response
Parameter Name Description
200 OK
ORDERS
Here Admin can manage Products
Method URL
GET admin_panel/orders
Response
Parameter Name Description
200 OK
1. View Orders
Admin can edit and update orders.
Method URL
PUT admin_panel/orders/edit_orders/order_id
Request
Parameter Name Description Type & Length
username Username of the user String
Address Address of the user string
Product name Name of product string
category Category of product string
Quantity Quantity of the product int
price Price of the product int
Response
Parameter Name Description
200 ’Success’.
2. Edit Orders
Admin can edit and update orders.
Method URL
PUT admin_panel/orders/edit_orders/order_id
Request
Parameter Name Description Type & Length
username Username of the user String
Address Address of the user string
Product name Name of product string
category Category of product string
Quantity Quantity of the product int
price Price of the product int
Response
Parameter Name Description
200 ’Success’.
3. Delete Orders
Admin can delete the orders.
Method URL
DELETE admin_panel/products/delete_orders/orders_id
Response
Parameter Name Description
200 OK
ADMIN LOGOUT:
Admin can logout from the admin panel..
Method URL
GET admin_logout
Response
Parameter Name Description
200 OK
2.LANDING PAGE:
1. Loading Lead Page:
Here users can view loading page
Method URL
GET http://127.0.0.1:8000/
Response
Parameter Name Description Type & Length
200 OK
2. User:
1. User Sign Up:
Here User can register details and create login .
Method URL
POST /user_registration
Request
Parameter Name Description Type & Length
Name Name of the user String
Username User name of the user string
Address The address of the user string
Email User email email
Phone No. User phone number int
Password User can add password password
Response
Parameter Name Description Type & Length
200 ’Success’.
2. User Login:
Here users can sign in with registered username and password.
Method URL
POST /user_signin
Request
Parameter Name Description Type & Length
Username User have a username string
Password User have a password password
Response
Parameter Name Description Type & Length
200 ’Success’.
3. Add Cart:
Here User can add products to the cart
Method URL
GET add_cart
Response
Parameter Name Description Type & Length
200 OK
4. View :
users can view product details.
Method URL
GET view
Response
Parameter Name Description Type & Length
200 OK
5. Buy now:
Here users can view loading page
Method URL
GET cart
Response
Parameter Name Description Type & Length
200 OK
Check Out:
1.Load check-out:
User can load checkout page
Method URL
GET checkout
Response
Parameter Name Description Type & Length
200 OK
2. check-out:
User can load checkout products
Method URL
GET checkout
Request:
Parameter Name Description Type & Length
Name Name of the user string
Address Address of the user string
Email Email of the user email
Phone No. Phone number of the user int
Response
Parameter Name Description Type & Length
200 OK
3. User Dashboard:
2. Account Details:
Here user can Edit account details
Method URL
POST /user/user_account
Request
Parameter Name Description Type & Length
Name Name of the user String
Username User name of the user string
Address The address of the user string
Email User email email
Phone No. User phone number int
Password Password for authentication password
Response
Parameter Name Description Type & Length
200 ’Success’.
USER LOGOUT:
Users can log out from the webpage..
Method URL
GET /user/user_logout
Response
Parameter Name Description
200 OK