I have a REST service that serves Invoice functionality, for example I can create, update and delete an invoice via the REST service.
However I now need to have functionality to split an invoice into several new invoices, i.e. the method needs to create x invoices based on one invoice, and then delete the original invoice in one transaction.
I also need a merge method that does the opposite, i.e. multiple invoices merged into one.
How do I create such architect the RESTful way?