companyLocationAssignRoles
mutation
An access token is required to call this API. Refer to Authorization for more information about how to obtain the token.
Assign roles to multiple customers at one company location
Arguments
input param
Return
error message
Status and error codes
For detailed information about common codes, see Status and error codes.
Example
Assigns roles to company contacts for a company location.
Code
mutation MyMutation {
companyLocationAssignRoles(input: {
companyLocationId:"gid://shopline/CompanyLocation/6620008035519046926",
rolesToAssign: [
{
companyContactRoleId:"gid://shopline/CompanyContactRole/164499664320701",
companyContactId:"gid://shopline/CompanyContact/4603165148"
},
{
companyContactRoleId:"gid://shopline/CompanyContactRole/164499664320702",
companyContactId:"gid://shopline/CompanyContact/4603165149"
}
]
}) {
userErrors {
field
message
}
}
}
Response
{
"data": {
"companyLocationAssignRoles": {
"userErrors": []
}
}
}
Was this article helpful to you?