POST /stocktakes/{id}/reopen
Transfers & stocktakes mutation.
POST
/stocktakes/{id}/reopenBase operational scope: manage_slab_stocktake. Existing workflow services can require additional permission or state preconditions.
Accepted top-level fields
{}This list is from the verified endpoint registry. The packaged OpenAPI contract remains authoritative for nested schemas, enum values and required fields.
Write requirements
Content-Type: application/jsonon every write.- A UUID
Idempotency-Keygenerated once per logical operation. - On an unknown outcome, retry the exact same method, path, payload and key.
- Do not send company/actor identity overrides or fabricated workflow statuses.
Request patterns
REQUEST_BODY is intentionally schema-neutral here. Use the accepted field list and packaged OpenAPI contract for exact value types, nested schemas and required fields.
cURL pattern
curl -X POST 'https://your-company.example/api/slab/v1/operations/stocktakes/{id}/reopen' \
-H 'Authorization: Bearer YOUR_OPERATIONAL_TOKEN' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Idempotency-Key: YOUR_UUID' \
--data '{}'JavaScript · server-side
const idempotencyKey = crypto.randomUUID();
const response = await fetch('https://your-company.example/api/slab/v1/operations/stocktakes/{id}/reopen', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.STONEWARE_TOKEN,
Accept: 'application/json',
'Content-Type': 'application/json',
'Idempotency-Key': idempotencyKey
},
body: JSON.stringify(REQUEST_BODY)
});
// On an unknown outcome, retry the exact request with the same key.Python
import os, uuid, requests
idempotency_key = str(uuid.uuid4())
response = requests.request(
'POST',
'https://your-company.example/api/slab/v1/operations/stocktakes/{id}/reopen',
json=REQUEST_BODY,
headers={
'Authorization': f"Bearer {os.environ['STONEWARE_TOKEN']}",
'Accept': 'application/json',
'Idempotency-Key': idempotency_key,
},
timeout=30,
)
# Reuse idempotency_key if the outcome is unknown.Common outcomes
403— effective token/employee authority does not permit the operation.409— idempotency/replay conflict or changed effective authority.422— validation or workflow precondition failed; correct the state or payload rather than forcing a status.429— rate limited; retry according to response guidance.500— retain the same idempotency key for an unknown outcome and record the request ID.