Place stocks on hold
curl --request POST \
--url https://clarus-api.com/api/stocks/hold \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"ids": [
123,
456
],
"description": "Quality check required"
}
'import requests
url = "https://clarus-api.com/api/stocks/hold"
payload = {
"ids": [123, 456],
"description": "Quality check required"
}
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({ids: [123, 456], description: 'Quality check required'})
};
fetch('https://clarus-api.com/api/stocks/hold', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 123,
"type": "<string>",
"attributes": {}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Stocks
Place stocks on hold
Place one or more stock records on hold, preventing them from being allocated to orders. Held stock remains at its location but is excluded from available inventory calculations.
POST
/
api
/
stocks
/
hold
Place stocks on hold
curl --request POST \
--url https://clarus-api.com/api/stocks/hold \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"ids": [
123,
456
],
"description": "Quality check required"
}
'import requests
url = "https://clarus-api.com/api/stocks/hold"
payload = {
"ids": [123, 456],
"description": "Quality check required"
}
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({ids: [123, 456], description: 'Quality check required'})
};
fetch('https://clarus-api.com/api/stocks/hold', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 123,
"type": "<string>",
"attributes": {}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"ids": [123, 456],
"description": "Quality check required",
"reason_code_id": 1
}
Key Fields
| Field | Required | Description |
|---|---|---|
ids | Yes | Array of stock IDs to place on hold |
description | Yes | Reason for placing stock on hold |
reason_code_id | No | Reason code ID for audit trail |
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
Stocks placed on hold successfully
Standard successful response wrapper following JSON:API format
The response payload
Show child attributes
Show child attributes

