See the Queries page for a presentation of this resource.
Create a customer (if you are allowed to create customers)
input Data of the customer
GraphQL
mutation {
CreateCustomer (
input: {
label: "Bob Dylan",
first_name: "Bob",
last_name: "Dylan",
email: "[email protected] "
}
){
id
active
}
}
JSON
{
"data": {
"CreateCustomer": {
"id": 101122,
"active": true
}
}
}
Update a customer
id Id of the customer to update
input Data of the customer
GraphQL
mutation UpdateCustomer($id: ID!, $input: CustomerInput!) {
UpdateCustomer(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": {
"UpdateCustomer": {
"id": 100005,
"label": "Hoppe",
"first_name": "Palma",
"last_name": "Heaney",
"email": "[email protected] "
}
}
}
Delete a customer
GraphQL
mutation DeleteCustomer($id: ID!) {
DeleteCustomer(id: $id)
}
JSON
{
"data": {
"DeleteCustomer": true
}
}
Disable a customer
GraphQL
mutation DisableCustomer($id: ID!) {
DisableCustomer(id: $id) {
id
active
}
}
JSON
{
"data": {
"DisableCustomer": {
"id": 100011,
"active": false
}
}
}
Enable a disabled customer
GraphQL
mutation EnableCustomer($id: ID!) {
EnableCustomer(id: $id) {
id
active
}
}
JSON
{
"data": {
"EnableCustomer": {
"id": 100011,
"active": true
}
}
}
id Unique identifier of the customer
label Full name of the customer
first_name First name of the customer
last_name Last name of the customer
email Email of the customer
addresses Addresses of the customer
data List of the addresses of the customer