The idea of this API is to provide a way to store and retrieve product data. Just clone the repository on your local machine and run the programm "app.py". After running "app.py" a webserver starts running and you can use GET/POST/PATCH/DELETE requests via the webbrowser or with Postman. The data is stored on your local machine at "data/data.json". For running the tests go to "test/test_api.py" and run the programm.
Used data structure to store the data:
{
"records": [
{
"id": "value",
"supplier": "value",
"supplier_sku": "value",
"ean": "value"
}
]
}
url/api/v1/products -> Get all existing products.
url/api/v1/products -> Store new product.
Allowed data structure in body:
{
"supplier": "value",
"supplier_sku": "value",
"ean": "value"
}
url/api/v1/products/<product_id> -> Update existing product
Allowed data structure in body:
{
"supplier": "value",
"supplier_sku": "value",
"ean": "value"
}
url/api/v1/products/<product_id> -> Delete existing product
For further details look at docs/report.md