Skip to main content

setBranchActive

Requires a customer (portal or buyer app) session.

activate/deactivate a branch (CUSTOMER_ADMIN only). The response carries pendingApprovalCount for the deactivation warning (EDGE #4).

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:

mutation SetBranchActive($addressId: ID!, $isActive: Boolean!) {
setBranchActive(addressId: $addressId, isActive: $isActive) {
id
approverCount
isActive
isBranch
label
memberCount
approvers {
firstName
lastName
email
role
userId
}
}
}

Variables:

{
"addressId": "id",
"isActive": true
}

Response:

{
"data": {
"setBranchActive": {
"id": "id",
"approverCount": 0,
"isActive": true,
"isBranch": true,
"label": "string",
"memberCount": 0,
"approvers": [
{
"firstName": "string",
"lastName": "string",
"email": "string",
"role": "string",
"userId": "id"
}
]
}
}
}
setBranchActive(
addressId: ID!
isActive: Boolean!
): CustomerBranch!

Arguments​

setBranchActive.addressId ● ID! non-null scalar​

The ID of the address.

setBranchActive.isActive ● Boolean! non-null scalar​

Whether the record is active.

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).