setCustomerApproverScope
Requires a customer (portal or buyer app) session.
set an approver's scope (CUSTOMER_ADMIN only) — COMPANY (all branches; clears grants) or BRANCH (≥1 branch address id; full-array replace of grants).
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 SetCustomerApproverScope($input: SetCustomerApproverScopeInput!) {
setCustomerApproverScope(input: $input) {
branchAddressIds
scope
userId
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation SetCustomerApproverScope($input: SetCustomerApproverScopeInput!) {\n setCustomerApproverScope(input: $input) {\n branchAddressIds\n scope\n userId\n }\n}",
"variables": {
"input": {
"scope": "BRANCH",
"userId": "id"
}
}
}
EOF
Variables:
{
"input": {
"scope": "BRANCH",
"userId": "id"
}
}
Response:
{
"data": {
"setCustomerApproverScope": {
"branchAddressIds": [
"id"
],
"scope": "BRANCH",
"userId": "id"
}
}
}
setCustomerApproverScope(
input: SetCustomerApproverScopeInput!
): CustomerApproverScopeResult!
Arguments
setCustomerApproverScope.input ● SetCustomerApproverScopeInput! non-null input
The fields of the customer approver scope to change.
Type
CustomerApproverScopeResult object
the effective approver scope after setCustomerApproverScope.