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
}
'import requests
url = "https://clarus-api.com/api/stock_checks/resolve"
payload = {
"stock_check_record_ids": [1, 2, 3],
"reason_code_id": 5
}
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({stock_check_record_ids: [1, 2, 3], reason_code_id: 5})
};
fetch('https://clarus-api.com/api/stock_checks/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Stock Checks
Resolve failed stock check records
Resolve one or more failed stock check records by attaching a reason code to explain the discrepancy. Once every failed record on a stock check has been resolved, the stock check itself transitions from failed to resolved. This endpoint does NOT use JSON:API format.
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
}
'import requests
url = "https://clarus-api.com/api/stock_checks/resolve"
payload = {
"stock_check_record_ids": [1, 2, 3],
"reason_code_id": 5
}
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({stock_check_record_ids: [1, 2, 3], reason_code_id: 5})
};
fetch('https://clarus-api.com/api/stock_checks/resolve', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"stock_check_record_ids": [1, 2, 3],
"reason_code_id": 5
}
Key Fields
| Field | Required | Description |
|---|---|---|
stock_check_record_ids | Yes | IDs of the failed stock check records to resolve (must contain at least one) |
reason_code_id | Yes | ID 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
failedtoresolved. - Returns 204 No Content on success.
Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
FlowAuthorization Code
- Authorization URL
- https://clarus-api.com/oauth/authorize
- Token URL
- https://clarus-api.com/oauth/token
FlowClient Credentials
- Token URL
- https://clarus-api.com/oauth/token
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Body
application/json
Response
Operation completed successfully with no content to return

