WinShopAPI docs
ReferenceDocumentsStock takingStock takings

Get the lock state of a stock taking

Returns whether the stock taking is locked against concurrent edits and, when it is, the name of the user holding the lock. Requires `Permissions.StockTakings.View`.

GET
/api/documents/stock-taking/stock-takings/{documentId}/lock

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

documentId*integer
Formatint32

Response Body

application/json
  1. response
isLocked?|

True while the document is locked against concurrent edits.

lockOwner?|

Name of the user holding the lock; empty when the document is not locked.

curl -X GET 'https://<your-instance>/api/documents/stock-taking/stock-takings/0/lock' \  -H 'Authorization: Bearer <access-token>'
{  "isLocked": true,  "lockOwner": "string"}