Anchor to companyContactAssignRolescompany
companyContactAssignRoles
mutation
Requires access scope or
access scope. Also: The API client must be installed on a Shopify Plus store.
Assigns roles on a company contact.
Anchor to Arguments
Arguments
- Anchor to companyContactIdcompany•
Contact Id ID!required The contact whose roles are being assigned.
- Anchor to rolesToAssignroles•
To Assign [CompanyContact requiredRole Assign!]! The new roles to assign.
Was this section helpful?
Anchor to CompanyContactAssignRolesPayload returnsCompanyContactAssignRolesPayload 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 companyContactAssignRoles($companyContactId: ID!, $rolesToAssign: [CompanyContactRoleAssign!]!) {
companyContactAssignRoles(companyContactId: $companyContactId, rolesToAssign: $rolesToAssign) {
roleAssignments {
# CompanyContactRoleAssignment fields
}
userErrors {
field
message
}
}
}
Input
{
"companyContactId": "gid://shopify/<objectName>/10079785100",
"rolesToAssign": [
{
"companyContactRoleId": "gid://shopify/<objectName>/10079785100",
"companyLocationId": "gid://shopify/<objectName>/10079785100"
}
]
}
{
"companyContactId": "gid://shopify/<objectName>/10079785100",
"rolesToAssign": [
{
"companyContactRoleId": "gid://shopify/<objectName>/10079785100",
"companyLocationId": "gid://shopify/<objectName>/10079785100"
}
]
}
input CompanyContactRoleAssign {
companyContactRoleId: ID!
companyLocationId: ID!
}