{"info":{"_postman_id":"2f00cd74-0495-439a-a9f2-f41efb281355","name":"Invoice Api","description":"<html><head></head><body><ul>\n<li>It is an API that allows users to create multiple invoices by providing correct details about it , store them in database and send a email upon successful creation of invoice.</li>\n<li>It alerts the user a day before the due date of invoice through Email.</li>\n<li>It also facilitates the user to change the status of invoice to paid or late as per their requirement and automatically send email related to the successful change in status of their invoices.</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"19569751","collectionId":"2f00cd74-0495-439a-a9f2-f41efb281355","publishedId":"UVkgxJsK","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-02-15T13:30:43.000Z"},"item":[{"name":"http://localhost:8000/api/invoices","id":"c369da74-5843-46d0-a6d5-089711077408","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/api/invoices","description":"<p>This API endpoint is used to fetch all the invoices stored in the database.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","invoices"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c369da74-5843-46d0-a6d5-089711077408"},{"name":"http://localhost:8000/api/generate/invoice","event":[{"listen":"prerequest","script":{"id":"495748a4-b662-4a63-96d0-10c18411e27f","exec":["const dateNow= new Date().getTime()+(15*24*60*60*1000);\r","pm.environment.set('currentDate', dateNow);"],"type":"text/javascript"}}],"id":"9a48ea6f-6f84-4681-95cf-7e4b8265ccea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"itssrijit099@gmail.com\",\r\n    \"labour\":{\r\n        \"hours_Of_Work\":100,\r\n        \"price_per_hour\":500\r\n    },\r\n    \"materialUsed\":[\r\n        {\r\n            \"name\":\"glass\",\r\n            \"price\":60,\r\n            \"no_of_items\":100\r\n        },\r\n        {\r\n            \"name\":\"machineries\",\r\n            \"price\":200,\r\n            \"no_of_items\":200\r\n        }        \r\n    ],\r\n    \"dueDate\":\"{{currentDate}}\",\r\n    \"notes\":\"Invoice Must be Paid Within 10 days\",\r\n    \"modeOfPayment\":\"offline\",\r\n    \"accountNumber\":\"3692581470789\",\r\n    \"ifscCode\":\"SBIN45628\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8000/api/generate/invoice","description":"<h6 id=\"post-generate-a-invoice\"><strong>POST GENERATE A INVOICE</strong></h6>\n<p>User needs to pass details about the components of invoice like</p>\n<ul>\n<li><strong>email</strong></li>\n<li><strong>expenses :- Labour</strong> ( hours of work at a certain rate per hour), <strong>materials Used</strong>(name, price, no of Items)</li>\n<li><strong>Due date</strong>(in milliseconds)</li>\n<li><strong>Mode of payment</strong> :- online (BHIMUPI ID), offline (Account No. , IFSCcode)</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8000","path":["api","generate","invoice"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9a48ea6f-6f84-4681-95cf-7e4b8265ccea"},{"name":"http://localhost:8000/api/invoices/{objectId}","id":"a5926e2b-9291-4fc5-9fca-af66ecccde61","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/api/invoices/620b427d6a543edd3e96b7e1","description":"<p>This API endpoint is used to fetch one invoice from database having the same id as the ObjectId(i.e. id of the invoice) passed in the above route.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","invoices","620b427d6a543edd3e96b7e1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a5926e2b-9291-4fc5-9fca-af66ecccde61"},{"name":"http://localhost:8000/api//invoices/{ObjectId}/change-status","id":"e194c896-911d-4c95-ac30-b9f25b649e61","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"url":"http://localhost:8000/api//invoices/621144d79ab17b2874c680cd/change-status","description":"<p>This API endpoint provides ability to update the status of the invoice by user.</p>\n<p>It needs either of two query params i.e. late or paid with boolean value attached in the API.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","","invoices","621144d79ab17b2874c680cd","change-status"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e194c896-911d-4c95-ac30-b9f25b649e61"},{"name":"http://localhost:8000/api/invoices/late","id":"cd094f39-8ae6-4f5b-a4e8-a42582d40641","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/api/invoices/late","description":"<p>This API endpoint is used to fetch invoices from database whose due date had been expired.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","invoices","late"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"cd094f39-8ae6-4f5b-a4e8-a42582d40641"},{"name":"http://localhost:8000/api/invoices/paid","id":"05f49543-965f-4794-9751-83ce75246f82","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8000/api/invoices/paid","description":"<p>This API endpoint is used to fetch invoices from database which payments have been cleared.</p>\n","urlObject":{"protocol":"http","port":"8000","path":["api","invoices","paid"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"05f49543-965f-4794-9751-83ce75246f82"}]}