build rest api

Job ID: 30707071

Budget: $14 – $30 NZD

Q. Create this Java application Using Spring Boot
1. Expose an API which takes in a batch of invoices and stores them in mysql and returns that back in response
2. Expose another API which takes in a batch of credit notes and stores them in mysql and returns that back in response
3. Expose another API which returns back an aggregated list of the data stored in invoice and credit note as a single list sorted by createdAt


Considerations:
Invoice or Credit Notes should map to different tables and each of them should be stored as a separate row
Basic validations
Unit test to be written for each layer
A proper README.md to be created explaning how to run the entire project and different elements
Proper Rest Standards to be followed

Model:
Invoice:
{
"id" :"xxxxxxxx-xxxx-xx1x-xxxx-xxxxx1234xxx //autogenerated
"invoiceNumnber: "INV-0001" //provider by user //mandatory (can contain alphanumeric value)
"value" :"100.00" //provider by user //mandatory (can only contain decimal values)
"createdAt" :"1624329410000" //autogenerated
}

CreditNote:
{
"id" :"xxxxxxx-xxxx-xx1x-xxxx-xxxxx1234xxx" //autogenerated
"creditNumber: "abc-0001" //provider by user //mandatory (can contain alphanumeric value)
"value" :"50.00" //provider by user //mandatory (can only contain decimal values)
"createdAt" :"1624329410000" //autogenerated
}