Skip to main content
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
    }
  }
}
'
{
  "data": {
    "id": "1",
    "type": "account_warehouses",
    "relationships": {
      "account": {
        "data": {
          "id": "2",
          "type": "accounts"
        }
      },
      "warehouse": {
        "data": {
          "id": "3",
          "type": "warehouses"
        }
      }
    }
  }
}

Request Structure

{
  "data": {
    "type": "account_warehouses",
    "attributes": {
      "account_id": 2,
      "warehouse_id": 3
    }
  }
}

Key Fields

FieldRequiredDescription
account_idYesThe stock account to associate
warehouse_idYesThe warehouse to associate

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Path Parameters

id
integer
required

The unique identifier of the account-warehouse association to update

Body

application/json
data
object
required

Response

Account-warehouse association updated successfully

data
object