This is a REST API for an E-commerce service built for fun and learning with Django, DRF, PostgreSQL and Docker.
METHOD | ROUTE | FUNCTIONALITY | ACCESS |
---|---|---|---|
POST | /user/signup/ |
Register new user | All users |
POST | /user/login/ |
login user | All users |
GET | /user/ |
Get user details | All users |
POST | /user/send-sms/{phone_number} |
Check if submitted phone number is a valid phone number and sent OTP. | All users |
POST | /user/verify-phone/{otp} |
Check if submitted phone number and OTP matches and verify the user. | All users |
GET | /user/address/ |
List and Retrieve user addresses | All users |
GET | /user/address/{id}/ |
Retrieve user address | All users |
POST | /account-confirm-email/{key} |
confirm email with key sent | All users |
GET | /resend-email/ |
send key to an email | All users |
GET | /products/ |
Get all products | All users |
GET | /products/{id}/ |
Get a specific product | All users |
PUT | /products/{id}/ |
update a specific product | All users |
PATCH | /products/{id}/ |
partial update for a specific product | All users |
DELETE | /products/{id}/ |
delete a specific product | All users |
GET | /products/categories |
Get all product categories | All users |
GET | /products/categories/{id}/ |
Get all product of specific category | All users |
GET | /orders/ |
Get all orders | All users |
POST | /orders/ |
Place an order | All users |
GET | /order/{order_id}/ |
Retrieve an order | Superuser |
PUT | /orders/{order_id}/ |
Update an order | All users |
PATCH | /orders/{order_id}/ |
Partial update an order | All users |
DELETE | /orders/{order_id}/ |
Delete/Remove an order | All users |
GET | /orders/{id}/order-items/ |
Get all items in a specific order | All users |
POST | /orders/{id}/order-items/ |
Add items to a specific order | All users |
GET | /orders/{id}/order-items/{id}/ |
Get a specific item in a specific order | All users |
PUT | /orders/{id}/order-items/{id}/ |
Update a specific item in a specific order | All users |
PATCH | /orders/{id}/order-items/{id}/ |
Partial update a specific item in a specific order | All users |
DELETE | /orders/{id}/order-items/{id}/ |
Remove a specific item in a specific order | All users |
GET | /docs/ |
View API documentation | All users |