Skip to main content
POST
/
api
/
stock_checks
/
resolve
Resolve failed stock check records
curl --request POST \
  --url https://clarus-api.com/api/stock_checks/resolve \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "stock_check_record_ids": [
    1,
    2,
    3
  ],
  "reason_code_id": 5
}
'
{
  "error": "<string>"
}

Request Structure

{
  "stock_check_record_ids": [1, 2, 3],
  "reason_code_id": 5
}

Key Fields

FieldRequiredDescription
stock_check_record_idsYesIDs of the failed stock check records to resolve (must contain at least one)
reason_code_idYesID of an active reason code of type stock_check

Behavior

  • Each record’s latest attempt must be a failure and the record must not already be resolved, otherwise 422 is returned.
  • The reason code must exist, be of type stock_check, and be active.
  • When every failed record on a stock check has been resolved, the stock check’s status changes from failed to resolved.
  • Returns 204 No Content on success.

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.

Body

application/json
stock_check_record_ids
integer[]
required

IDs of the failed stock check records to resolve

Minimum array length: 1
reason_code_id
integer
required

ID of an active reason code of type stock_check

Response

Operation completed successfully with no content to return