Skip to content

Assignment Technokart

Notifications You must be signed in to change notification settings

aakashvani/invoice-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INVOICE API


Problem Statement

Description :

Create an API which would accept 3 parameters.

  1. Invoice Date.
  2. Invoice Number.
  3. 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.

You have to create 4 end points :

  • 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

API Reference :- [API is deployed, You can use very easily by using these urls]

To GET all Invoice

  https://api-invoice-api.herokuapp.com/api/invoice

To GET Invoice between two dates

    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/

To POST/CREATE an Invoice

   https://api-invoice-api.herokuapp.com/api/invoice

To PATCH an Invoice based on Invoice number

   https://api-invoice-api.herokuapp.com/api/invoice/:number

To DELETE an Invoice based on Invoice number

   https://api-invoice-api.herokuapp.com/api/invoice/:number

Presentation

To GET all Invoice

user signup and login


To GET Invoice between two dates

user signup and login


To POST/CREATE an Invoice

user signup and login


To PATCH an Invoice by Invoice number

user signup and login


To DELETE an Invoice by Invoice number

user signup and login

Tools used on this project

  • Visual Studio Code
  • MongoDB Atlas
  • Postman

📬 Contact

If you want to contact me, you can reach me through below handles.

linkedin Github

© 2022 Technokart

About

Assignment Technokart

https://api-invoice-api.herokuapp.com/api/invoice

Topics

Resources

Stars

Watchers

Forks