Customers are the companies or individuals you sell to.
GraphQL
query {
Customer (id: 100012) {
id
label
address {
city
}
}
}
GraphQL
query {
Customers {
data {
id
label
email
}
}
}
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
active If true, the customer is active, and can be assigned to sales documents
created_at Creation date of the customer
updated_at Date of the latest update of the customer
Address Subquery Address of the customer
You can create filters based on following fields
label Example: { "column" : "LABEL", "operator" : "LIKE", "value" : "%Ford%" }
first_name Example: { "column" : "FIRST_NAME", "operator" : "EQ", "value" : "John" }
last_name Example: { column": "LAST_NAME", "operator": "NEQ", "value": "Ford"
email Example: { "column": "EMAIL", "operator": "LIKE", "value": "%samsung.com" }
active Example: { column": "ACTIVE", "operator": "EQ", "value": true }
created_at Example: { "column": "CREATED_AT", "operator": "LT", "value": "2023-03-03 15:55:32" }
updated_at Example: { "column": "UPDATED_AT", "operator": "GT", "value": "2023-03-03 15:55:32" }
country Example: { "column": "COUNTRY", "operator": "EQ", "value": "US" }
You can sort data based on following fields : id, label, first_name, last_name, email, active, created_at, updated_at
GraphQL
query Customers(
$orderBy: [QueryCustomersOrderByOrderByClause!],
$first: Int = 50,
$page: Int
) {
Customers(
orderBy: $orderBy
first: $first
page: $page
) {
paginatorInfo {
total
count
currentPage
perPage
}
data {
id
label
first_name
last_name
email
active
}
}
}
Variables (JSON)
{
"orderBy": [
{
"column": "LABEL",
"order": "ASC"
}
],
"first": 50,
"page": 1,
}
GraphQL
query Customers(
$where: QueryCustomersWhereWhereConditions,
$first: Int = 50,
$page: Int
) {
Customers(
where: $where
first: $first
page: $page
) {
paginatorInfo {
total
count
currentPage
perPage
}
data {
id
label
first_name
last_name
email
active
}
}
}
JSON
{
"first": 50,
"page": 1,
"where": {
"AND": [
{
"AND": [
{
"column": "FIRST_NAME",
"operator": "EQ",
"value": "Jared"
}
]
}
]
}
}
JSON
{
"data": {
"Customers": {
"paginatorInfo": {
"total": 1,
"count": 1,
"currentPage": 1,
"perPage": 50
},
"data": [
{
"id": 100001,
"label": "Nienow",
"first_name": "Jared",
"last_name": "Kub",
"email": "[email protected] ",
"active": true
}
]
}
}
}