Skip to main content
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>'
{
  "status": "passed"
}

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 passed when all groups’ latest attempts succeeded, otherwise failed.
  • The associated task is completed and last_counted_at is set on the location and any matched stocks.
  • The stock check must currently be in pending status 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.

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Path Parameters

id
integer
required

The unique identifier of the stock check

Response

Stock check completed

status
enum<string>

Final status of the stock check after completion

Available options:
passed,
failed