Update a service sheet
Replaces the data of one service sheet item. The processing is asynchronous: the result is sent to the webhook with the returned correlationId.
costObjects:
- For every cost object, send its share in costRate, quantity or costAmount. When more than one is sent, costRate is used first, then quantity, then costAmount, and the others must match it (tolerance 0.01), as returned by GET /v1/service-sheets-document/{serviceSheetHeaderId}. The shares must add up to 100%, to the item quantity or to the item total value (the items when sent, otherwise quantity x value), rounded to 2 decimals. A single cost object without a share counts as 100%. These rules return 400. Without items in the body, the item total comes from the saved items, so the quantity and value checks are reported in the webhook.
- The cost center must exist in ME. This is checked asynchronously, and an unknown one is reported as an error in the webhook.
- Omitting costObjects keeps the saved ones. Resending the saved apportionment changes nothing.
- Saved cost objects can only be replaced before the service sheet is sent to approval. The replacement is recorded in the service sheet history, and the webhook message includes a warning.
- After the service sheet is sent to approval (and while it is approved, integrated, accepted or canceled), a change to the cost objects is refused in the webhook: the service sheet must be returned or rejected first.