A (VMS) Vendor Management System using Django and Django REST Framework, that will handle vendor profiles, track purchase orders, and calculate vendor performance metrics.
- Python 3.12.2
- pip 24.0
Clone the project
git clone https://github.com/i-santosh/VMS.git
Go to the project directory
cd VMS
Install Requirements
pip install -r requirements.txt
Make migrations
python manage.py makemigrations
python manage.py migrate
Create superuser
python manage.py createsuperuser --username _your-username_
and it prompt for password
Start the server
python manage.py runserver
POST http://127.0.0.1:8000/api/auth/token/
it will return access and refresh Token, save it any where
Payload | Type |
---|---|
username |
string |
password |
password |
POST http://127.0.0.1:8000/api/auth/token/refresh/
Auth in Headers must contains Bearer _your_refresh_token_
POST http://127.0.0.1:8000/api/vendors/
Payload | Type |
---|---|
name |
string |
vendor_code |
string |
contact_details |
string |
address |
string |
GET http://127.0.0.1:8000/api/vendors/
GET http://127.0.0.1:8000/api/vendors/{vendor_id}/
PUT http://127.0.0.1:8000/api/vendors/{vendor_id}/
Payload | Type |
---|---|
name |
string |
contact_details |
string |
address |
string |
DELETE http://127.0.0.1:8000/api/vendors/{vendor_id}/
GET http://127.0.0.1:8000/api/vendors/{vendor_id}/performance/
POST http://127.0.0.1:8000/api/purchase_orders/
Payload | Type |
---|---|
po_number |
string |
vendor |
string |
order_date |
datetime |
delivery_date |
datetime |
items |
JSON |
quantity |
number |
status |
string |
issue_date |
datetime |
- In
purchase_order
folder, there is a file name demoPOs.py that contains 10 random Purchase orders ,which can be used to create orders rapidly for test.Consider checking vendor_code in demoPOs.py
GET http://127.0.0.1:8000/api/purchase_orders/?vendor_code=_example_vendor_code
GET http://127.0.0.1:8000/api/purchase_orders/{po_id}/
PUT http://127.0.0.1:8000/api/purchase_orders/{po_id}/
Payload | Type |
---|---|
status |
string |
quality_rating |
number |
DELETE http://127.0.0.1:8000/api/purchase_orders/{po_id}/
POST http://127.0.0.1:8000/api/purchase_orders/{po_id}/acknowledge/
Payload | Type |
---|---|
acknowledgment_date |
string |
- The metric updates will be done in real-time when related PO data is modified updated on every time the Purchase Order completed.