API for E-commerce website using Django Rest Framework, hosting postgres database on supabase.
The authentication in project used Djoser third party package. Djoser is a library that provides a set of Django Rest Framework views to handle basic actions such as registration, login, logout, password reset and account activation. Gmail is used for email settings
POST /auth/users/
Body | Type | Description |
---|---|---|
api_key |
string |
Required. username , email , password , re_password optional, first_name , last_name |
POST /auth/token/login/
Body | Type | Description |
---|---|---|
api_key |
string |
Required. email , password |
POST /auth/users/reset_password/
Headers | Description |
---|---|
Authorization Token |
Required. email , it will used the email to reset the password |
POST /auth/users/reset_password_confirm/
Headers | Description |
---|---|
Authorization Token |
Required. uid , token , new_password , re_new_password |
GET /auth/users/
Headers | Description |
---|---|
Authorization Token |
nothing |
PATCH /auth/users/
Headers | Description |
---|---|
Authorization Token |
Body --> data want to update |
POST /auth/users/activation/
Body | Description |
---|---|
Token , uid |
nothing |
This app contains the CRUD operations for products and categories. We can filter the product with product_title
or product_brand
, and categories with title
GET /api/products/
GET /api/category/
POST /api/product/
Headers | Body |
---|---|
Authorization Token |
required product_title , product_price , product_desc , product_img , inventory , category , best_seller , discount , product_brand |
POST /api/category/
Headers | Body | Description |
---|---|---|
Authorization Token |
required title |
slug is created automatically from title field |
PATCH /api/products/{product_slug}/
Headers | Body |
---|---|
Authorization Token |
Body --> data want to update |
PUT /api/category/{title}/
Headers | Body |
---|---|
Authorization Token |
title |
DELETE /api/products/{product_slug}/
DELETE /api/category/{slug}/
Headers |
---|
Authorization Token |
GET /api/products/
GET /api/category/
params | Type | Description |
---|---|---|
search |
str |
use product_title or product_brand for search products, title for category |
This app for adding products to cart. In the cart the total and the number of items are calculated.
GET /api/carts/
GET /api/cartitems/
DELETE /api/carts/{user-id}/
Headers |
---|
Authorization Token |
POST /api/cartitems/
Body | Type | Description |
---|---|---|
api_key |
id |
Required. cartID , product-ID |