Mutation
mutation AddCustomerToAccounts($input: AddCustomerToAccountsInput!) {
addCustomerToAccounts(input: $input) {
customer {
id
externalId
fullName
shortName
email {
email
isVerified
verifiedAt {
__typename
}
}
avatarUrl
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerIdentifier": {},
"accountIdentifiers": [
{}
]
}
}Response
{
"data": {
"addCustomerToAccounts": {
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"email": "string",
"isVerified": true,
"verifiedAt": {
"__typename": "DateTime"
}
},
"avatarUrl": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
addCustomerToAccounts
Adds a customer to one or more accounts. The customer can be identified by their Plain ID, external ID, or email address.
If the customer is already a member of a given account the operation is a no-op for that account.
Requires the customer:edit and customerTenantMembership:create permissions.
MUTATION
addCustomerToAccounts(input: AddCustomerToAccountsInput!): AddCustomerToAccountsOutput!Arguments
input
required
Returns
customer
error
Mutation
mutation AddCustomerToAccounts($input: AddCustomerToAccountsInput!) {
addCustomerToAccounts(input: $input) {
customer {
id
externalId
fullName
shortName
email {
email
isVerified
verifiedAt {
__typename
}
}
avatarUrl
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"customerIdentifier": {},
"accountIdentifiers": [
{}
]
}
}Response
{
"data": {
"addCustomerToAccounts": {
"customer": {
"id": "id",
"externalId": "id",
"fullName": "string",
"shortName": "string",
"email": {
"email": "string",
"isVerified": true,
"verifiedAt": {
"__typename": "DateTime"
}
},
"avatarUrl": "string"
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

