Use case
Sales invoices are transferred from external system to Procountor and invoices are wanted to send automatically from Procountor to customer too.
Procountor software requires that the sales invoice needs to be approved before sending. After importing the status of sales invoice is “Unfinished”. The invoice needs to be approved first and then it is ready to be sent. No changes can be made to the invoice after approval.
Endpoints to be used and other requirements
POST /invoices endpoint creates a new invoice. Status of new invoice is always “UNFINISHED”. Successfully saved invoice returns invoice data including id of the invoice. The id of the invoice is needed for approving and sending the invoice.
PUT /invoices/{id}/approve endpoint approves the invoice.
PUT /invoices/{id}/send endpoint sends the invoice.
Process of sales invoice in brief