See the Queries page for a presentation of this resource.
Create an account representative (if you are allowed to account representatives)
input Data of the account representative
GraphQL
mutation {
CreateAccountRepresentative (
input: {
label: "Bob Dylan",
first_name: "Bob",
last_name: "Dylan",
email: "[email protected] "
}
){
id
active
}
}
JSON
{
"data": {
"CreateAccountRepresentative": {
"id": 101122,
"active": true
}
}
}
Update a customer
id Id of the customer to update
input Data of the customer
GraphQL
mutation UpdateAccountRepresentative($id: ID!, $input: AccountRepresentativeInput!) {
UpdateAccountRepresentative(id: $id, input: $input) {
id
label
first_name
last_name
email
}
}
Variables (JSON)
{
"id": 100005,
"input": {
"id": 100005,
"label": "Hoppe",
"first_name": "Palma",
"last_name": "Heaney",
"email": "[email protected] "
}
}
JSON
{
"data": {
"UpdateAccountRepresentative": {
"id": 100005,
"label": "Hoppe",
"first_name": "Palma",
"last_name": "Heaney",
"email": "[email protected] "
}
}
}
Delete a customer
GraphQL
mutation DeleteAccountRepresentative($id: ID!) {
DeleteCustomer(id: $id)
}
JSON
{
"data": {
"DeleteAccountRepresentative": true
}
}
Disable a customer
GraphQL
mutation DisableAccountRepresentative($id: ID!) {
DisableAccountRepresentative(id: $id) {
id
active
}
}
JSON
{
"data": {
"DisableAccountRepresentative": {
"id": 100011,
"active": false
}
}
}
Enable a disabled customer
GraphQL
mutation EnableAccountRepresentative($id: ID!) {
EnableAccountRepresentative(id: $id) {
id
active
}
}
JSON
{
"data": {
"EnableAccountRepresentative": {
"id": 100011,
"active": true
}
}
}
label Full name of the account representative
first_name First name of the account representative
last_name Last name of the account representative
phone Phone number of the account representative
email Email of the account representative
Address Address of the account representative