Skip to content

HryhorenkoVitalii/vegetable-store-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


logo

Restfull API for internet market

Description

To implement the system of monthly discounts I used "Celery" with every day check up data of add product and if it added last month add 20% discounts. So that the accountant can make a selection by dates to endpoint /api/atatistic/ it is possible to make a post request with date_from and date_to in day-mounth-year format (exemple: date_from=10-11-2020 ). Tests were implemented to check performance during development. The database already contains 1 product and 1 order

Run in Postman

Endpoints

# GET to view all products, POST to creae new.
/api/product/

# GET to view product id=pk, PUT to update product, DELETE to delete product.
api/product//<int:pk>

# GET to view all order, POST with id product to creae new order.Example json request {"product_id": 1}
api/order/

# GET to view order id=pk, PUT to update order, DELETE to delete order.
api/order/<int:pk>

# GET to bill based on order.Example endpoint "api/bill/1" for make bill based on order_id = 1 
api/bill/<int:pk>

# GET to view all statistic, POST with application/x-www-form-urlencoded date_from,date_to.Example POST application/x-www-form-urlencoded request: date_from=10-11-2020&date_to=15-11-2020
api/statistic/

Credits

This software uses the following open source packages:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages