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.OrderCustomer.Delete`.
BearerAuthorizationBearer <token>OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.
documentId*integerint32itemId*integerint32variantId*integerint32application/json- response
blockingReasons*array<string>Stable reason codes, see DocumentDeleteBlockingReasons. Empty when the delete is allowed.
canBeDeleted*booleanTrue when nothing currently blocks the delete. The delete re-checks in its own transaction, so this is an indication rather than a guarantee.
curl -X GET 'https://<your-instance>/api/documents/orders/customer/0/items/0/variants/0/check-delete' \ -H 'Authorization: Bearer <access-token>'{ "blockingReasons": [ "string" ], "canBeDeleted": true}Delete a customer order item variant DELETE
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.OrderCustomer.Delete`.
Get the lock state of a customer order GET
Returns whether the customer order is locked against concurrent edits and, when it is, the name of the user holding the lock. Requires `Permissions.OrderCustomer.View`.