Anchor to section titled 'undefined'

companyLocationRevokeRoles
mutation

Requires write_customers access scope or write_companies access scope. Also: The API client must be installed on a Shopify Plus store.

Revokes roles on a company location.


Anchor to companyLocationId
companyLocationId
required

The location whose roles are being revoked.

Anchor to rolesToRevoke
rolesToRevoke
required

The current roles to revoke.


Was this section helpful?

A list of role assignment IDs that were removed from the company location.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation companyLocationRevokeRoles($companyLocationId: ID!, $rolesToRevoke: [ID!]!) {
  companyLocationRevokeRoles(companyLocationId: $companyLocationId, rolesToRevoke: $rolesToRevoke) {
    revokedRoleAssignmentIds
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "companyLocationId": "gid://shopify/<objectName>/10079785100",
  "rolesToRevoke": [
    "gid://shopify/<objectName>/10079785100"
  ]
}