Move stock to another location
curl --request POST \
--url https://clarus-api.com/api/stocks/{id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "stocks",
"attributes": {
"quantity": 1,
"to_location_id": 123,
"reason_code_id": 123
}
}
}
'import requests
url = "https://clarus-api.com/api/stocks/{id}/move"
payload = { "data": {
"type": "stocks",
"attributes": {
"quantity": 1,
"to_location_id": 123,
"reason_code_id": 123
}
} }
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: 'stocks',
attributes: {quantity: 1, to_location_id: 123, reason_code_id: 123}
}
})
};
fetch('https://clarus-api.com/api/stocks/{id}/move', 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
Move stock to another location
Move a quantity of stock from its current location to a different location within the same warehouse. Creates a transfer transaction for audit purposes.
POST
/
api
/
stocks
/
{id}
/
move
Move stock to another location
curl --request POST \
--url https://clarus-api.com/api/stocks/{id}/move \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "stocks",
"attributes": {
"quantity": 1,
"to_location_id": 123,
"reason_code_id": 123
}
}
}
'import requests
url = "https://clarus-api.com/api/stocks/{id}/move"
payload = { "data": {
"type": "stocks",
"attributes": {
"quantity": 1,
"to_location_id": 123,
"reason_code_id": 123
}
} }
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: 'stocks',
attributes: {quantity: 1, to_location_id: 123, reason_code_id: 123}
}
})
};
fetch('https://clarus-api.com/api/stocks/{id}/move', 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
{
"data": {
"type": "stocks",
"attributes": {
"quantity": 100,
"to_location_id": 456,
"reason_code_id": 1
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
quantity | Yes | Quantity to move (must be > 0 and no more than the available quantity) |
to_location_id | Yes | Destination location ID within the warehouse |
reason_code_id | No | Reason code for audit trail |
Authorizations
Body
application/json

