Account Representatives Mutations

CreateAccountRepresentative

Create an account representative (if you are allowed to account representatives)

Parameters

input
Data of the account representative

Example

mutation {
    CreateAccountRepresentative (
        input: {
            label: "Bob Dylan",
            first_name: "Bob",
            last_name: "Dylan",
            email: "[email protected]"
        }
    ){
        id
        active
    }
}

Returned data

{
  "data": {
    "CreateAccountRepresentative": {
      "id": 101122,
      "active": true
    }
  }
}

UpdateAccountRepresentative

Update a customer

Parameters

id
Id of the customer to update
input
Data of the customer

Example

mutation UpdateAccountRepresentative($id: ID!, $input: AccountRepresentativeInput!) {
  UpdateAccountRepresentative(id: $id, input: $input) {
    id
    label
    first_name
    last_name
    email
  }
}
{
  "id": 100005,
  "input": {
    "id": 100005,
    "label": "Hoppe",
    "first_name": "Palma",
    "last_name": "Heaney",
    "email": "[email protected]"
  }
}

Returned data

{
  "data": {
    "UpdateAccountRepresentative": {
      "id": 100005,
      "label": "Hoppe",
      "first_name": "Palma",
      "last_name": "Heaney",
      "email": "[email protected]"
    }
  }
}

DeleteAccountRepresentative

Delete a customer

Parameters

id
Id of the customer

Example

mutation DeleteAccountRepresentative($id: ID!) {
  DeleteCustomer(id: $id)
}
{
  "id": 100009
}

Returned data

{
  "data": {
    "DeleteAccountRepresentative": true
  }
}

DisableAccountRepresentative

Disable a customer

Parameters

id
Id of the customer

Example

mutation DisableAccountRepresentative($id: ID!) {
  DisableAccountRepresentative(id: $id) {
    id
    active
  }
}
{
  "id": 100011
}

Returned data

{
  "data": {
    "DisableAccountRepresentative": {
      "id": 100011,
      "active": false
    }
  }
}

EnableAccountRepresentative

Enable a disabled customer

Parameters

id
Id of the customer

Example

mutation EnableAccountRepresentative($id: ID!) {
  EnableAccountRepresentative(id: $id) {
    id
    active
  }
}
{
  "id": 100009
}

Returned data

{
  "data": {
    "EnableAccountRepresentative": {
      "id": 100011,
      "active": true
    }
  }
}

AccountRepresentativeInput data type

id
Identifier (optional)
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