setBranchLimit
Requires a customer (portal or buyer app) session.
set/clear the branch order-value ceiling (CUSTOMER_ADMIN only). Null = unlimited; a non-positive value is rejected.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation SetBranchLimit($addressId: ID!) {
setBranchLimit(addressId: $addressId) {
id
approverCount
isActive
isBranch
label
memberCount
approvers {
firstName
lastName
email
role
userId
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SetBranchLimit($addressId: ID!) {\n setBranchLimit(addressId: $addressId) {\n id\n approverCount\n isActive\n isBranch\n label\n memberCount\n approvers {\n firstName\n lastName\n email\n role\n userId\n }\n }\n}",
"variables": {
"addressId": "id"
}
}
EOF
Variables:
{
"addressId": "id"
}
Response:
{
"data": {
"setBranchLimit": {
"id": "id",
"approverCount": 0,
"isActive": true,
"isBranch": true,
"label": "string",
"memberCount": 0,
"approvers": [
{
"firstName": "string",
"lastName": "string",
"email": "string",
"role": "string",
"userId": "id"
}
]
}
}
}
setBranchLimit(
addressId: ID!
orderLimit: Float
): CustomerBranch!
Arguments
setBranchLimit.addressId ● ID! non-null scalar
The ID of the address.
setBranchLimit.orderLimit ● Float scalar
The most a branch may order in one order. Send null for no limit.
Type
CustomerBranch object
a partner sales branch — an Address with isBranch = true. The label is the branch name; pendingApprovalCount feeds the deactivation warning (EDGE #4).