Update an account-warehouse association
curl --request PATCH \
--url https://clarus-api.com/api/account_warehouses/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "account_warehouses",
"attributes": {
"account_id": 2,
"warehouse_id": 3
}
}
}
'import requests
url = "https://clarus-api.com/api/account_warehouses/{id}"
payload = { "data": {
"type": "account_warehouses",
"attributes": {
"account_id": 2,
"warehouse_id": 3
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {type: 'account_warehouses', attributes: {account_id: 2, warehouse_id: 3}}
})
};
fetch('https://clarus-api.com/api/account_warehouses/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "1",
"type": "account_warehouses",
"relationships": {
"account": {
"data": {
"id": "2",
"type": "accounts"
}
},
"warehouse": {
"data": {
"id": "3",
"type": "warehouses"
}
}
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Account Warehouses
Update an account-warehouse association
Update which account or warehouse is linked. Both account_id and warehouse_id are required. The combination must be unique — duplicates return 422. A nested route alternative exists at /accounts/{account_id}/warehouses/{id}.
PATCH
/
api
/
account_warehouses
/
{id}
Update an account-warehouse association
curl --request PATCH \
--url https://clarus-api.com/api/account_warehouses/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "account_warehouses",
"attributes": {
"account_id": 2,
"warehouse_id": 3
}
}
}
'import requests
url = "https://clarus-api.com/api/account_warehouses/{id}"
payload = { "data": {
"type": "account_warehouses",
"attributes": {
"account_id": 2,
"warehouse_id": 3
}
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
Authorization: 'Bearer <token>',
'X-Clarus-Subdomain': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
data: {type: 'account_warehouses', attributes: {account_id: 2, warehouse_id: 3}}
})
};
fetch('https://clarus-api.com/api/account_warehouses/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": "1",
"type": "account_warehouses",
"relationships": {
"account": {
"data": {
"id": "2",
"type": "accounts"
}
},
"warehouse": {
"data": {
"id": "3",
"type": "warehouses"
}
}
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}
