From the API I want to be able to POST a new purchasereceipt where I can add a link to a purchaseorder, and include lines that contain information about the received item. For the item I want to send the ItemId, the number and allocation-information.
It is important that the function collects the item-information from the purchaseorder-line and not the item. Any additional information I provide in the POST for the item should overwrite the values from the purchaseorder-line.
The endpoint also need to create the links both ways between the purchaseorder-line and the receipt (both ways).
It is suggested to implement this as a new version of the POST PurchaseReceipt-endpoint.
In the existing endpoint we have the actions "AddPurchaseOrder" and "AddPurchaseOrderLine". We want to move away from this form of "multiple calls to perform a process" and have an atomic call to POST that handles the whole process of creating a purchasereceipt including lines.