{"info":{"_postman_id":"5e168e9b-8c31-4b0e-b082-c2f5d802c2f0","name":"Bakery Management Api","description":"<html><head></head><body><p>This <em><strong>Bakery Management System</strong></em> is an API based on Django Rest framework and Uses the Token Authentications for authentication.The source code of this is Api is available at <a href=\"https://github.com/Moinkhan8439/Bakery-Management-System-API\">source code</a>.\n<br>Since this api uses token authentication, everytime an user  login he/she will be provided with a token.Now everytime he/she try to access any end-point that require user to be authenticated he/she have to pass that token to be considered authenticated.<br></p>\n<hr>\n\n\n<h2 id=\"users\">Users</h2>\n<p>The API has two types of User : ADMIN and CUSTOMER.\nthese both are registered in Database as Proxy Model for User meaning they don,t have\nseparate tables in the databases they can be considered just different views of the User table.</p><p>\n\n</p><h2 id=\"modelstable-in-the-database\">Models(Table in the database)</h2>\n<p>We have used three different table to register three main objects i.e Ingredients , Dishes and Orders . These tables  are inter-connected in such a way that a single dish can be made up of more than one Ingredients and a paticular User(CUSTOMER) can order many dishes at once.</p><p>\n\n\n\n\n\n</p><h2 id=\"api-overview\">API-OVERVIEW</h2>\n<p>Now enter <a href=\"https://bakery-management-api.herokuapp.com/\">https://bakery-management-api.herokuapp.com/</a> in your Browser this will give the details about the functionality offered.\nTo perform any of the operations mentioned just add the corresponding relative url to this <a href=\"https://bakery-management-api.herokuapp.com/\">https://bakery-management-api.herokuapp.com/</a>.</p>\n<p><em><strong>Note : All the endpoints corresponding to Ingredients and Dishes are only accessible to ADMIN.</strong></em></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"14584052","collectionId":"5e168e9b-8c31-4b0e-b082-c2f5d802c2f0","publishedId":"TWDdjZYb","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-03-02T05:27:37.000Z"},"item":[{"name":"accounts","item":[{"name":"Customer Registration","id":"af5bcfbe-0a00-4fa7-9dce-a0ce3c45111f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"username","value":"xyz","type":"text"},{"key":"password","value":"xyz","type":"text"},{"key":"first_name","value":"xyz","type":"text"},{"key":"last_name","value":"xyz","type":"text"},{"key":"email","value":"xyz@123.com","type":"text"}]},"url":"https://bakery-management-api.herokuapp.com/accounts/register/","description":"<p>This uses POST request and expects username,email,password,first_name,last_name to be entered through JSON object or a Form data.The username needs to be UNIQUE</p>\n","urlObject":{"protocol":"https","path":["accounts","register",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"af5bcfbe-0a00-4fa7-9dce-a0ce3c45111f"},{"name":"User Login","id":"fa4c728f-6f68-4644-94bc-9b98933ca568","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"username","value":"moink","type":"text"},{"key":"password","value":"********","type":"text"}]},"url":"https://bakery-management-api.herokuapp.com/accounts/login/","description":"<p>This uses POST request and expects username and password.After successfull login this will return a Token . Now everytime you try to enter some authenticated url you need to pass the token in the header section of the url</p>\n","urlObject":{"protocol":"https","path":["accounts","login",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"fa4c728f-6f68-4644-94bc-9b98933ca568"}],"id":"dc64783a-9c0f-4b9b-ad9f-780bfbfeea98","description":"<h3 id=\"registering-an-admin\">Registering an Admin</h3>\n<p>We can only register admin through the Django admin panel. To access Django Admin panel you have to create a superuser. Follows these steps to register an ADMIN user:</p>\n<ul>\n<li>python manage.py createsuperuser</li>\n<li>Fill all details(username ,email and password)</li>\n<li>Now got to https://bakery-management-api.herokuapp.com/admin/ and login through the credentials you just entered.</li>\n<li>Register admin through the USERS section(please tick the is_staff then only you will be considered as ADMIN)</li>\n\n<p><em><strong>Note: Since I am the superuser of this app only can i can create Admin user.</strong></em></p>\n</ul>","_postman_id":"dc64783a-9c0f-4b9b-ad9f-780bfbfeea98"},{"name":"Ingredients","item":[{"name":"List of Ingredients","id":"cdd05a35-564c-4895-a657-3e01acdf6f8c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/ingredients/","description":"<p>This  returns a Json value containing the list of all ingredients.</p>\n","urlObject":{"protocol":"https","path":["ingredients",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"cdd05a35-564c-4895-a657-3e01acdf6f8c"},{"name":"Adding new Ingredient","id":"88bcceb2-87db-4d4b-8b55-5d80023755b5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"flour","type":"text"},{"key":"quantity","value":"2","type":"text"},{"key":"quantity_type","value":"kg","type":"text"},{"key":"cost_price","value":"25","type":"text"}]},"url":"https://bakery-management-api.herokuapp.com/ingredients/","description":"<p>This uses POST request and expects name,quantity,quantity_type,cost_price to be entered through JSON object or a Form data.The name needs to be UNIQUE\nand Django adds a primary key by name \"id\" by default.The quantity_type contains three choices only in which you can enter a single one either 'kg' for\nkilogram ,'lt' for litre and \"-\" for only numbers.If you don't specify any options in the quantity_type \"-\" i.e \"no.\" will be selected by default.</p>\n","urlObject":{"protocol":"https","path":["ingredients",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"88bcceb2-87db-4d4b-8b55-5d80023755b5"},{"name":"Details of a particular Ingredient","id":"bb89e98c-1789-45a0-9e9f-5d13bb405bc1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/ingredients/1/","description":"<p>The \"id\" mentioned in the above url must be an integer referring to the \"id\" of the ingredient you want to fetch.This returns details of the \ningredient you mentioned.</p>\n","urlObject":{"protocol":"https","path":["ingredients","1",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bb89e98c-1789-45a0-9e9f-5d13bb405bc1"},{"name":"Deleting a Particular Ingredient","id":"e9901ad9-25ab-4467-82fc-38e681961d53","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/ingredients/4/","description":"<p>The \"id\" mentioned in the above url must be an integer referring to the \"id\" of the ingredient you want to fetch.This deletes the \ningredient you mentioned.</p>\n","urlObject":{"protocol":"https","path":["ingredients","4",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"e9901ad9-25ab-4467-82fc-38e681961d53"}],"id":"401fbf3d-4ce3-404a-b5e5-10d1d57af12f","description":"<p>All the operation related to Ingredients are under this section.</p>\n<p><em><strong>Note: Only admin are allowed to access the endpoints under this section.</strong></em></p>\n","_postman_id":"401fbf3d-4ce3-404a-b5e5-10d1d57af12f"},{"name":"Menu","item":[{"name":"List of Dishes","id":"be088a8c-2c81-4ee1-83cc-011828e937e0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/menu/","description":"<p>This  returns a Json value containing the list of details of all  dishes.</p>\n","urlObject":{"protocol":"https","path":["menu",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"be088a8c-2c81-4ee1-83cc-011828e937e0"},{"name":"Adding new Dish","id":"0e01fe2e-82b9-4931-af89-bd673f1692b8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"name","value":"tea","type":"text"},{"key":"quantity","value":"5","type":"text"},{"key":"description","value":"absvvd","type":"text"},{"key":"cost_price","value":"100","type":"text"},{"key":"selling_price","value":"130","type":"text"},{"key":"ingredients","value":"5","type":"text","disabled":true},{"key":"ingredients","value":"6","type":"text"}]},"url":"https://bakery-management-api.herokuapp.com/menu/","description":"<p>This uses POST request and expects name , quantity , description , cost_price , selling_price , ingredients to be entered through JSON object or a Form data.\nThe name needs to be UNIQUE and Django adds a primary key by name \"id\" by default.The ingredients field can contain multiple ingredients id.</p>\n","urlObject":{"protocol":"https","path":["menu",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"0e01fe2e-82b9-4931-af89-bd673f1692b8"},{"name":"Details of a particular Dish","id":"13c15809-19ea-49e2-a135-65fa3635c911","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/menu/1/","description":"<p>The \"id\" mentioned in the above url must be an integer referring to the \"id\" of the Dish you want to fetch.This returns details of the \nDish you mentioned.</p>\n","urlObject":{"protocol":"https","path":["menu","1",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"13c15809-19ea-49e2-a135-65fa3635c911"},{"name":"Deleting a Particular Ingredient","id":"9cb3f001-c2fa-4cec-a101-87b8ac5b2373","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/menu/1/","description":"<p>The \"id\" mentioned in the above url must be an integer referring to the \"id\" of the Dish you want to fetch.This deletes the \nDish you mentioned</p>\n","urlObject":{"protocol":"https","path":["menu","1",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"9cb3f001-c2fa-4cec-a101-87b8ac5b2373"}],"id":"9e68c0dc-fc99-490f-a6b7-d5c188ea64c1","description":"<p>All the operation related to Dishes are under this section.</p>\n<p><em><strong>Note: Only admin are allowed to access the endpoints under this section.</strong></em></p>\n","_postman_id":"9e68c0dc-fc99-490f-a6b7-d5c188ea64c1"},{"name":"Orders","item":[{"name":"Orders History","id":"1dbc8865-ed00-4750-88db-af59c6d6adcc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/order/history/","description":"<p>This will return the all the orders placed by the Customer making the request.(Latest first) </p>\n","urlObject":{"protocol":"https","path":["order","history",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"1dbc8865-ed00-4750-88db-af59c6d6adcc"},{"name":"Placing/adding an Order","id":"1738a706-cce1-477c-b8ea-3c1fc0254857","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"body":{"mode":"formdata","formdata":[{"key":"items_ordered","value":"2","type":"text","disabled":true},{"key":"items_ordered","value":"3","type":"text"},{"key":"order_ by","value":"","type":"text","disabled":true},{"key":"","value":"","type":"text","disabled":true}]},"url":"https://bakery-management-api.herokuapp.com/order/","description":"<p>This uses POST request and expects items_ordered to be entered through JSON object or a Form data.Django adds a primary key by name \"id\" by default.\nThe items_ordered field can contain multiple dishes .</p>\n","urlObject":{"protocol":"https","path":["order",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"1738a706-cce1-477c-b8ea-3c1fc0254857"},{"name":"Deleting a Particular Order","id":"bd0405df-0912-42a4-b159-0932673e3673","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/order/8/","description":"<p>The \"id\" mentioned in the above url must be an integer referring to the \"id\" of the Order you want to delete.This deletes the \nOrder you mentioned</p>\n","urlObject":{"protocol":"https","path":["order","8",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd0405df-0912-42a4-b159-0932673e3673"},{"name":"Customer Menu","id":"7fc9304f-b583-4957-ae32-48ba78c62509","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/customer/menu/","description":"<p>This request return a list of dishes having only id related to dish,name of the dish,description and the price of the dish through a JSON object.</p>\n","urlObject":{"protocol":"https","path":["customer","menu",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"7fc9304f-b583-4957-ae32-48ba78c62509"}],"id":"03f07de5-8962-4a2c-a24d-096a6f8d79b2","description":"<p>All the endpoints related to the Orders are under this section.</p>\n<p><em><strong>Note: Both admin and Customers are allowed to access the endpoints under this section.However if we want we can change the permission to Customer only.</strong></em></p>\n","_postman_id":"03f07de5-8962-4a2c-a24d-096a6f8d79b2"},{"name":"Monthly sales Report","id":"79ee3fd7-033f-4d24-a729-a54b135dc7c9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"token #################################","type":"text"}],"url":"https://bakery-management-api.herokuapp.com/sales/report/","description":"<p>This request can only be accessed by admins. This returns a months wise report of last 12 months) with the count of product sold ,total product sold and total profit made i each month through a JSON object.</p>\n","urlObject":{"protocol":"https","path":["sales","report",""],"host":["bakery-management-api","herokuapp","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"79ee3fd7-033f-4d24-a729-a54b135dc7c9"}]}