Create an API which would accept 3 parameters.
- Invoice Date.
- Invoice Number.
- Invoice Amount.
You have to store these details in the db (Mongodb Atlas). The logic to store the data would be as follows :-
The Invoice date should not be greater than the invoice date of previous or next invoice number. E.g.
-
Invoice number 1 has invoice date 3rd July 2022. Invoice number 3 has invoice date 5th July 2022.
-
So when I put invoice number 2, it’s date should lie between 3rd July and 5th July, such validation should be there at the backend. o Also a clean code, commented code is a plus, along with Readme.md for documentation.
- Enter new invoice details.
- Update a specific invoice based on invoice number
- Delete a specific invoice based on invoice number
- Get all invoices stored in the db
- Get invoices between 2 dates
https://api-invoice-api.herokuapp.com/api/invoice
https://api-invoice-api.herokuapp.com/api/invoice/date/:endDate/:startDate/
https://api-invoice-api.herokuapp.com/api/invoice/date/2022-06-01/2022-05-05/
https://api-invoice-api.herokuapp.com/api/invoice
https://api-invoice-api.herokuapp.com/api/invoice/:number
https://api-invoice-api.herokuapp.com/api/invoice/:number
- Visual Studio Code
- MongoDB Atlas
- Postman
If you want to contact me, you can reach me through below handles.
© 2022 Technokart