Internet
Create a web-shop order
Creates a web-shop order 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.OrderInternet.Create`.
Search web-shop orders
Returns one page of web-shop orders 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.OrderInternet.View`.
Get a web-shop order
Returns one web-shop order by `documentId`, with its header, items and item variants. Requires `Permissions.OrderInternet.View`.
Delete a web-shop order
Deletes the web-shop order 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.OrderInternet.Delete`.
Update a web-shop order
Updates the web-shop order header and the items sent in the body. Pass `removeItemsNotInRequest=true` to also delete the items the body leaves out. Requires `Permissions.OrderInternet.Update`.
Check whether a web-shop order 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.OrderInternet.Delete`.
Add items to a web-shop order
Appends the items in the body to an existing web-shop order and recalculates the document totals. Requires `Permissions.OrderInternet.Create`.
Delete web-shop order 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.OrderInternet.Delete`.
Check whether web-shop order 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.OrderInternet.Delete`.
Update a web-shop order item
Replaces one item of the web-shop order, identified by `itemId`, and recalculates the document totals. Requires `Permissions.OrderInternet.Update`.
Delete a web-shop order 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.OrderInternet.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.OrderInternet.Delete`.
Get the lock state of a web-shop order
Returns whether the web-shop order is locked against concurrent edits and, when it is, the name of the user holding the lock. Requires `Permissions.OrderInternet.View`.
Lock a web-shop order
Locks the web-shop order 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.OrderInternet.Update`.
Unlock a web-shop order
Releases the lock on the web-shop order. Returns 400 when the lock belongs to another user. Requires `Permissions.OrderInternet.Update`.
Get a web-shop order as PDF
Renders the web-shop order with its configured print template and returns `application/pdf` inline. 404 when the document has no printable output. Requires `Permissions.OrderInternet.View`.
Get a internal order as PDF GET
Renders the internal order with its configured print template and returns `application/pdf` inline. 404 when the document has no printable output. Requires `Permissions.OrderInternal.View`.
Create a web-shop order POST
Creates a web-shop order 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.OrderInternet.Create`.