Stock checks
Called with warehouse account keys. A key only sees its own account's data. Every example uses the same sample brand, order and item, so you can follow one item from call to call.
http://62.169.23.239:8001/api/v1Auth Bearer token4 endpointsEndpoints
Start a stock check#
Requires scope warehouse_stock:write
Open a scan-to-verify audit against everything currently held.
Request body
- notesstring | null
Returns
HTTP 201- check_idstringRequired
- statusstringRequired
Current state of the object. See the allowed values.
One ofopencompletedcancelled - expected_countinteger
Defaults to
0 - scanned_countinteger
Defaults to
0 - matched_countinteger
Defaults to
0 - unexpected_countinteger
Defaults to
0 - coverage_pctinteger
Defaults to
0 - missingarray of objects
+Show 7 child attributesHide child attributes
- refstringRequired
- ref_kindstringRequiredOne of
boxunit - product_namestring
Defaults to
— - brand_namestring
Defaults to
— - colorstring | null
Colour name, exactly as on the product's variants.
- sizestring | null
Size name, exactly as on the product's variants.
- locationstring | null
Where to find it, e.g. "Aisle 4, Bay B" — None when not recorded.
- unexpectedarray of strings
- notesstring | null
- started_attimestamp | null
- completed_attimestamp | null
curl -X POST http://62.169.23.239:8001/api/v1/warehouse/stock-checks \
-H "Authorization: Bearer $SKANNIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"notes": "Received at dock 3"
}'{
"check_id": "7fe88e63-8269-5209-a216-5aa043212aa9",
"status": "open",
"expected_count": 24,
"scanned_count": 24,
"matched_count": 24,
"unexpected_count": 24,
"coverage_pct": 72,
"missing": [
{
"ref": "BOX-F4E1A9-0003",
"ref_kind": "box",
"product_name": "Trail Tee",
"brand_name": "Northwind Apparel",
"color": "White",
"size": "M",
"location": "Aisle 4, Bay B"
}
],
"unexpected": [
"Qx9…"
],
"notes": "Received at dock 3",
"started_at": null,
"completed_at": null
}Record a stock-check scan#
Requires scope warehouse_stock:write
Record one scanned box or unit. The server works out which it is.
Parameters
- check_idstringpathRequired
Request body
- scanned_refstringRequired
Returns
HTTP 200- scanned_refstringRequired
- ref_kindstringRequiredOne of
boxunit - matchedbooleanRequired
True when the scanned item was accepted. False is a normal answer (wrong item, already sold) — scan another.
- detailstring
False + matched=False means the item is not in this holder's stock at all — a genuine finding, not an error.
Defaults to
- scanned_countinteger
Defaults to
0 - expected_countinteger
Defaults to
0
curl -X POST http://62.169.23.239:8001/api/v1/warehouse/stock-checks/7fe88e63-8269-5209-a216-5aa043212aa9/scan \
-H "Authorization: Bearer $SKANNIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"scanned_ref": "Qm7xK2pL9vR4tY8wZ1nB3c"
}'{
"scanned_ref": "Qm7xK2pL9vR4tY8wZ1nB3c",
"ref_kind": "box",
"matched": true,
"detail": "",
"scanned_count": 24,
"expected_count": 24
}Complete a stock check#
Requires scope warehouse_stock:write
Close the audit and return the final reconciliation.
Parameters
- check_idstringpathRequired
Returns
HTTP 200- check_idstringRequired
- statusstringRequired
Current state of the object. See the allowed values.
One ofopencompletedcancelled - expected_countinteger
Defaults to
0 - scanned_countinteger
Defaults to
0 - matched_countinteger
Defaults to
0 - unexpected_countinteger
Defaults to
0 - coverage_pctinteger
Defaults to
0 - missingarray of objects
+Show 7 child attributesHide child attributes
- refstringRequired
- ref_kindstringRequiredOne of
boxunit - product_namestring
Defaults to
— - brand_namestring
Defaults to
— - colorstring | null
Colour name, exactly as on the product's variants.
- sizestring | null
Size name, exactly as on the product's variants.
- locationstring | null
Where to find it, e.g. "Aisle 4, Bay B" — None when not recorded.
- unexpectedarray of strings
- notesstring | null
- started_attimestamp | null
- completed_attimestamp | null
curl -X POST http://62.169.23.239:8001/api/v1/warehouse/stock-checks/7fe88e63-8269-5209-a216-5aa043212aa9/complete \
-H "Authorization: Bearer $SKANNIT_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"{
"check_id": "7fe88e63-8269-5209-a216-5aa043212aa9",
"status": "open",
"expected_count": 24,
"scanned_count": 24,
"matched_count": 24,
"unexpected_count": 24,
"coverage_pct": 72,
"missing": [
{
"ref": "BOX-F4E1A9-0003",
"ref_kind": "box",
"product_name": "Trail Tee",
"brand_name": "Northwind Apparel",
"color": "White",
"size": "M",
"location": "Aisle 4, Bay B"
}
],
"unexpected": [
"Qx9…"
],
"notes": "Received at dock 3",
"started_at": null,
"completed_at": null
}Retrieve a stock check#
Requires scope warehouse_stock:read
Coverage so far, plus what is missing and what turned up unexpectedly.
Parameters
- check_idstringpathRequired
Returns
HTTP 200- check_idstringRequired
- statusstringRequired
Current state of the object. See the allowed values.
One ofopencompletedcancelled - expected_countinteger
Defaults to
0 - scanned_countinteger
Defaults to
0 - matched_countinteger
Defaults to
0 - unexpected_countinteger
Defaults to
0 - coverage_pctinteger
Defaults to
0 - missingarray of objects
+Show 7 child attributesHide child attributes
- refstringRequired
- ref_kindstringRequiredOne of
boxunit - product_namestring
Defaults to
— - brand_namestring
Defaults to
— - colorstring | null
Colour name, exactly as on the product's variants.
- sizestring | null
Size name, exactly as on the product's variants.
- locationstring | null
Where to find it, e.g. "Aisle 4, Bay B" — None when not recorded.
- unexpectedarray of strings
- notesstring | null
- started_attimestamp | null
- completed_attimestamp | null
curl http://62.169.23.239:8001/api/v1/warehouse/stock-checks/7fe88e63-8269-5209-a216-5aa043212aa9 \
-H "Authorization: Bearer $SKANNIT_TOKEN"{
"check_id": "7fe88e63-8269-5209-a216-5aa043212aa9",
"status": "open",
"expected_count": 24,
"scanned_count": 24,
"matched_count": 24,
"unexpected_count": 24,
"coverage_pct": 72,
"missing": [
{
"ref": "BOX-F4E1A9-0003",
"ref_kind": "box",
"product_name": "Trail Tee",
"brand_name": "Northwind Apparel",
"color": "White",
"size": "M",
"location": "Aisle 4, Bay B"
}
],
"unexpected": [
"Qx9…"
],
"notes": "Received at dock 3",
"started_at": null,
"completed_at": null
}