Create a stock check
curl --request POST \
--url https://clarus-api.com/api/stock_checks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "stock_checks",
"attributes": {
"location_id": 25,
"expected_completion_date": "2026-05-25T17:00:00Z"
}
}
}
'import requests
url = "https://clarus-api.com/api/stock_checks"
payload = { "data": {
"type": "stock_checks",
"attributes": {
"location_id": 25,
"expected_completion_date": "2026-05-25T17:00:00Z"
}
} }
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({
data: {
type: 'stock_checks',
attributes: {location_id: 25, expected_completion_date: '2026-05-25T17:00:00Z'}
}
})
};
fetch('https://clarus-api.com/api/stock_checks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"stock_check_id": 42,
"task_id": 101
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Stock Checks
Create a stock check
Create a new stock check for a location. A stock check is a request to physically count the products held at a location and reconcile them against the system count. Creating a stock check also creates an associated task that operators can be assigned to. If a stock check is already pending for the supplied location, the existing one is returned instead of a duplicate being created.
POST
/
api
/
stock_checks
Create a stock check
curl --request POST \
--url https://clarus-api.com/api/stock_checks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "stock_checks",
"attributes": {
"location_id": 25,
"expected_completion_date": "2026-05-25T17:00:00Z"
}
}
}
'import requests
url = "https://clarus-api.com/api/stock_checks"
payload = { "data": {
"type": "stock_checks",
"attributes": {
"location_id": 25,
"expected_completion_date": "2026-05-25T17:00:00Z"
}
} }
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({
data: {
type: 'stock_checks',
attributes: {location_id: 25, expected_completion_date: '2026-05-25T17:00:00Z'}
}
})
};
fetch('https://clarus-api.com/api/stock_checks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"stock_check_id": 42,
"task_id": 101
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "stock_checks",
"attributes": {
"location_id": 25,
"expected_completion_date": "2026-05-25T17:00:00Z"
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
location_id | Yes | ID of the location whose stock will be counted |
expected_completion_date | Yes | ISO 8601 datetime by which the count is expected to be completed |
Behavior
- If a pending stock check already exists for the location, the existing one is returned and no new record is created.
- Otherwise a new stock check is created in
pendingstatus together with an associated task. - The response returns both the stock check ID and the ID of the associated task.

