Check whether stock taking 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.StockTakings.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*integerint32itemIds?array<>application/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/stock-taking/stock-takings/0/items/check-delete' \ -H 'Authorization: Bearer <access-token>'{ "blockingReasons": [ "string" ], "canBeDeleted": true}Delete stock taking items DELETE
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.StockTakings.Delete`.
Update a stock taking item PUT
Replaces one item of the stock taking, identified by `itemId`, and recalculates the document totals. Requires `Permissions.StockTakings.Update`.