Customer
Create a customer claim
Creates a customer claim from the header and any items in the body, and returns the stored document (201, `Location` header set). Reserves the next internal document number. Requires `Permissions.ClaimCustomer.Create`.
Search customer claims
Returns one page of customer claims matching the filter. Body is a `PaginationRequest` — see the *Filtering & pagination* concept in the developer docs. Sortable and limitable fields depend on the instance's data-grid view. Requires `Permissions.ClaimCustomer.View`.
Get a customer claim
Returns one customer claim by `documentId`, with its header, items and item variants. Requires `Permissions.ClaimCustomer.View`.
Delete a customer claim
Deletes the customer claim together with its items and item variants. Cannot be undone. Call `GET {documentId}/check-delete` first to find out whether the delete is allowed. Requires `Permissions.ClaimCustomer.Delete`.
Update a customer claim
Updates the customer claim header and the items sent in the body. Pass `removeItemsNotInRequest=true` to also delete the items the body leaves out. Requires `Permissions.ClaimCustomer.Update`.
Check whether a customer claim can be deleted
Advisory pre-flight for `DELETE {documentId}`. `canBeDeleted` is false when `blockingReasons` holds `HEADER_BLOCKED` or `ITEMS_BLOCKED`. The delete re-checks inside its own transaction, so a positive answer here is an indication rather than a guarantee. Requires `Permissions.ClaimCustomer.Delete`.
Add items to a customer claim
Appends the items in the body to an existing customer claim and recalculates the document totals. Requires `Permissions.ClaimCustomer.Create`.
Delete customer claim items
Deletes the items listed in `itemIds` and recalculates the document totals. Call `GET {documentId}/items/check-delete` first to find out whether the delete is allowed. Requires `Permissions.ClaimCustomer.Delete`.
Check whether customer claim items can be deleted
Advisory pre-flight for `DELETE {documentId}/items`. `blockingReasons` holds `ITEMS_BLOCKED` when at least one id in `itemIds` is still referenced elsewhere. At most 1000 ids per call. Requires `Permissions.ClaimCustomer.Delete`.
Update a customer claim item
Replaces one item of the customer claim, identified by `itemId`, and recalculates the document totals. Requires `Permissions.ClaimCustomer.Update`.
Delete a customer claim item variant
Deletes one variant row (a size/colour breakdown) of an item and recalculates the document totals. Call the matching `check-delete` endpoint first to find out whether the delete is allowed. Requires `Permissions.ClaimCustomer.Delete`.
Check whether an item variant can be deleted
Advisory pre-flight for `DELETE {documentId}/items/{itemId}/variants/{variantId}`. `blockingReasons` holds `ITEM_VARIANT_BLOCKED` when the variant is still referenced elsewhere. Requires `Permissions.ClaimCustomer.Delete`.
Get the lock state of a customer claim
Returns whether the customer claim is locked against concurrent edits and, when it is, the name of the user holding the lock. Requires `Permissions.ClaimCustomer.View`.
Lock a customer claim
Locks the customer claim for the calling user so other users cannot edit or process it. Returns 400 when it is already locked. Release it with `DELETE {documentId}/lock`. Requires `Permissions.ClaimCustomer.Update`.
Unlock a customer claim
Releases the lock on the customer claim. Returns 400 when the lock belongs to another user. Requires `Permissions.ClaimCustomer.Update`.
Get a customer claim as PDF
Renders the customer claim with its configured print template and returns `application/pdf` inline. 404 when the document has no printable output. Requires `Permissions.ClaimCustomer.View`.