WinShopAPI docs
ReferenceProduct

Check whether a product can be deleted

Advisory pre-flight for `DELETE {productId}`. `canBeDeleted` is false when `blockingReferences` lists the places that still point at the product (stock rows, documents, …). Requires `Permissions.Product.View`.

GET
/api/products/{productId}/check-delete

Authorization

Bearer
headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Obtain a client id/secret from Winshop support ([email protected]), then POST to the token URL.

Path Parameters

productId*integer
Formatint32

Response Body

application/json
  1. response
blockingReferences*array<string>
canBeDeleted*boolean
curl -X GET 'https://<your-instance>/api/products/0/check-delete' \  -H 'Authorization: Bearer <access-token>'
{  "blockingReferences": [    "string"  ],  "canBeDeleted": true}