Green Kiosk is a Django-based e-commerce platform designed specifically for grocery shopping. It enables users to easily browse a wide selection of grocery products, add items to their carts, and efficiently manage their orders.
-
Clone the repository:
git clone https://github.com/Florence-nyokabi/Green-Kiosk-API cd Green-Kiosk-API
-
Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
To run the project, use the following command:
python manage.py runserver
You can access the application at http://127.0.0.1:8000/.
- GET
/api/products/
- Retrieve a list of all products. - POST
/api/products/
- Create a new product. - GET
/api/products/{id}/
- Retrieve details of a specific product by ID. - PUT
/api/products/{id}/
- Update details of a specific product by ID. - DELETE
/api/products/{id}/
- Delete a specific product by ID.
- GET
/api/customers/
- Retrieve a list of all customers. - POST
/api/customers/
- Create a new customer. - GET
/api/customers/{id}/
- Retrieve details of a specific customer by ID. - PUT
/api/customers/{id}/
- Update details of a specific customer by ID. - DELETE
/api/customers/{id}/
- Delete a specific customer by ID.
- GET
/api/cart/
- Retrieve a list of all product carts. - POST
/api/cart/
- Create a new product cart. - GET
/api/cart/{id}/
- Retrieve details of a specific product cart by ID. - PUT
/api/cart/{id}/
- Update details of a specific product cart by ID. - DELETE
/api/cart/{id}/
- Delete a specific product cart by ID.
- POST
/api/add_to_cart/
- Add a product to a specific cart. - POST
/api/remove_from_cart/
- Remove a product from a specific cart.
- GET
/api/orders/
- Retrieve a list of all orders. - POST
/api/orders/
- Create a new order. - GET
/api/orders/{id}/
- Retrieve details of a specific order by ID. - PUT
/api/orders/{id}/
- Update details of a specific order by ID. - DELETE
/api/orders/{id}/
- Delete a specific order by ID.
- POST
/api/checkout/
- Create an order from the cart. - POST
/api/payment/
- Process a payment for an order. - POST
/api/shipment/
- Create a shipment for an order.