- Admin can add a product
- Admin or store attendant can get all products
- Admin or store attendant can get a specific product.
- Store attendant can add a sale order.
- Admin can get all sale order details.
REQUEST | ROUTE | FUNCTIONALITY |
---|---|---|
GET | /api/v1/products | Fetches all products |
GET | api/v1/products/<product_id> | Fetches a single product |
GET | api/v1/sales | Fetches all sales records |
GET | api/v1/sales/<sales_id> | Fetches a single sales record |
POST | api/v1/products | Creates a product |
POST | api/v1/sales | Creates a sales order |
Getting started with the app
Modules and tools used to build the endpoints
Create a new directory and initialize git in it. Clone this repository by running
$ git clone URL which in this case is https://github.com/masete/Shop-manager.git
Create a virtual environment. For example, with virtualenv, create a virtual environment named venv using
$ virtualenv venv
Activate the virtual environment
$ cd venv/scripts/activate
Install the dependencies in the requirements.txt file using pip
$ pip install -r requirements.txt
Populate the requirements.txt using
$ pip freeze > requirements.txt
Start the application by running
$ python run.py
Test your setup using [postman](www.getpostman.com) REST-client
You can checkout my postman collections from :
https://documenter.getpostman.com/view/5131975/RWgxvFbt
The APP is hosted on heroku, checkout this Link: https://store-manager-vii.herokuapp.com/
Hope you had a nice ride