API Specification Document Sample
API Specification Document Sample
1. ADMIN:
1. Admin Login:
Admin have a username and password
Method URL
POST admin_login
Request
Parameter Name Description Type & Length
Response
Parameter Name Description Type & Length
2. Admin Panel:
This is the page for the Admin to view and the data of the website.
Method URL
GET admin_panel
Response
PRODUCTS
Here Admin can manage Products
Method URL
GET admin_panel/products
Response
200 OK
1. Add Products
Method URL
GET admin_panel/products/add_product
Request
Parameter Name Description Type & Length
Response
200 ’Success’.
2. Edit Products
PUT admin_panel/products/edit_products/id
Request
Parameter Name Description Type & Length
Response
200 ’Success’.
3. Delete Products
Method URL
DELETE admin_panel/products/delete_products/id
Response
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
2. Edit Users
PUT admin_panel/user_management/edit_user/user_id
Request
Parameter Name Description Type & Length
Response
200 ’Success’.
3. Delete Users
Method URL
DELETE admin_panel/user_management/delete_user/user_id
Response
ORDERS
Here Admin can manage Products
Method URL
GET admin_panel/orders
Response
200 OK
1. View Orders
Method URL
PUT admin_panel/orders/edit_orders/order_id
Request
Parameter Name Description Type & Length
username Username of the user String
Response
200 ’Success’.
2. Edit Orders
Method URL
PUT admin_panel/orders/edit_orders/order_id
Request
Parameter Name Description Type & Length
Response
200 ’Success’.
3. Delete Orders
Method URL
DELETE admin_panel/products/delete_orders/orders_id
Response
200 OK
ADMIN LOGOUT:
Admin can logout from the admin panel..
Method URL
GET admin_logout
Response
200 OK
2.LANDING PAGE:
Method URL
GET http://127.0.0.1:8000/
Response
200 OK
2. User:
POST /user_registration
Request
Parameter Name Description Type & Length
Response
200 ’Success’.
2. User Login:
POST /user_signin
Request
Parameter Name Description Type & Length
Response
200 ’Success’.
3. Add Cart:
Here User can add products to the cart
Method URL
GET add_cart
Response
200 OK
4. View :
users can view product details.
Method URL
GET view
Response
200 OK
5. Buy now:
Here users can view loading page
Method URL
GET cart
Response
200 OK
Check Out:
1.Load check-out:
User can load checkout page
Method URL
GET checkout
Response
200 OK
2. check-out:
User can load checkout products
Method URL
GET checkout
Request:
Response
200 OK
3. User Dashboard:
2. Account Details:
Method URL
POST /user/user_account
Request
Parameter Name Description Type & Length
Response
200 ’Success’.
USER LOGOUT:
Method URL
GET /user/user_logout
Response
200 OK