Complete a stock check
curl --request POST \
--url https://clarus-api.com/api/stock_checks/{id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'X-Clarus-Subdomain: <api-key>'import requests
url = "https://clarus-api.com/api/stock_checks/{id}/complete"
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Clarus-Subdomain': '<api-key>'}
};
fetch('https://clarus-api.com/api/stock_checks/{id}/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "passed"
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Stock Checks
Complete a stock check
Finalize a stock check after counts have been recorded. Any product groups that were not counted are implicitly recorded as a physical count of zero. The stock check transitions to passed if every group’s latest attempt matched the system count, or to failed otherwise. The associated task is marked as completed at the same time.
POST
/
api
/
stock_checks
/
{id}
/
complete
Complete a stock check
curl --request POST \
--url https://clarus-api.com/api/stock_checks/{id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'X-Clarus-Subdomain: <api-key>'import requests
url = "https://clarus-api.com/api/stock_checks/{id}/complete"
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Clarus-Subdomain': '<api-key>'}
};
fetch('https://clarus-api.com/api/stock_checks/{id}/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "passed"
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
No request body is required.Behavior
- Any product group with no recorded attempt is automatically counted as zero, producing a failed attempt where stock was expected.
- The stock check’s final status is
passedwhen all groups’ latest attempts succeeded, otherwisefailed. - The associated task is completed and
last_counted_atis set on the location and any matched stocks. - The stock check must currently be in
pendingstatus and its task must not be completed or cancelled; otherwise 422 is returned. - Failed stock check records can subsequently be resolved with a reason code via
POST /api/stock_checks/resolve.

