Anchor to companyLocationAssignRolescompany
companyLocationAssignRoles
mutation
Requires access scope or
access scope. Also: The API client must be installed on a Shopify Plus store.
Assigns roles on a company location.
Anchor to Arguments
Arguments
- Anchor to companyLocationIdcompany•
Location Id ID!required The location whose roles are being assigned.
- Anchor to rolesToAssignroles•
To Assign [CompanyLocation requiredRole Assign!]! The roles to assign.
Was this section helpful?
Anchor to CompanyLocationAssignRolesPayload returnsCompanyLocationAssignRolesPayload returns
- Anchor to roleAssignmentsrole•
Assignments A list of newly created assignments of company contacts to a company location.
- Anchor to userErrorsuser•
Errors [BusinessCustomer non-nullUser Error!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation companyLocationAssignRoles($companyLocationId: ID!, $rolesToAssign: [CompanyLocationRoleAssign!]!) {
companyLocationAssignRoles(companyLocationId: $companyLocationId, rolesToAssign: $rolesToAssign) {
roleAssignments {
# CompanyContactRoleAssignment fields
}
userErrors {
field
message
}
}
}
Input
{
"companyLocationId": "gid://shopify/<objectName>/10079785100",
"rolesToAssign": [
{
"companyContactId": "gid://shopify/<objectName>/10079785100",
"companyContactRoleId": "gid://shopify/<objectName>/10079785100"
}
]
}
{
"companyLocationId": "gid://shopify/<objectName>/10079785100",
"rolesToAssign": [
{
"companyContactId": "gid://shopify/<objectName>/10079785100",
"companyContactRoleId": "gid://shopify/<objectName>/10079785100"
}
]
}
input CompanyLocationRoleAssign {
companyContactId: ID!
companyContactRoleId: ID!
}