Anchor to companyContactAssignRolecompany
companyContactAssignRole
mutation
Requires access scope or
access scope. Also: The API client must be installed on a Shopify Plus store.
Assigns a role to a contact for a location.
Anchor to Arguments
Arguments
- Anchor to companyContactIdcompany•
Contact Id ID!required The ID of the contact to assign a role to.
- Anchor to companyContactRoleIdcompany•
Contact Role Id ID!required The ID of the role to assign to a contact.
- Anchor to companyLocationIdcompany•
Location Id ID!required The ID of the location to assign a role to a contact.
Was this section helpful?
Anchor to CompanyContactAssignRolePayload returnsCompanyContactAssignRolePayload returns
- Anchor to companyContactRoleAssignmentcompany•
Contact Role Assignment The company contact role assignment.
- 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 companyContactAssignRole($companyContactId: ID!, $companyContactRoleId: ID!, $companyLocationId: ID!) {
companyContactAssignRole(companyContactId: $companyContactId, companyContactRoleId: $companyContactRoleId, companyLocationId: $companyLocationId) {
companyContactRoleAssignment {
# CompanyContactRoleAssignment fields
}
userErrors {
field
message
}
}
}
Input
{
"companyContactId": "gid://shopify/<objectName>/10079785100",
"companyContactRoleId": "gid://shopify/<objectName>/10079785100",
"companyLocationId": "gid://shopify/<objectName>/10079785100"
}
{
"companyContactId": "gid://shopify/<objectName>/10079785100",
"companyContactRoleId": "gid://shopify/<objectName>/10079785100",
"companyLocationId": "gid://shopify/<objectName>/10079785100"
}