customers
Requires at least one of the permissions customers:customer:list, customers:customer:read, payments:collection:create, payments:invoice:create, products:discount:update, sales:credit_note:create, sales:quote:create or sales:sales_order:create.
Lists the customers the signed-in user may see, newest first. Reps see their own customers, managers see their reporting team's, and admins see all. Needs a customer read grant or a grant to raise a customer document (quote, sales order, invoice, collection, credit note).
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query Customers {
customers {
id
code
registrationNumber
name
customerTierName
displayName
addresses {
id
postalCode
contactName
type
createdAt
addressLine1
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query Customers {\n customers {\n id\n code\n registrationNumber\n name\n customerTierName\n displayName\n addresses {\n id\n postalCode\n contactName\n type\n createdAt\n addressLine1\n }\n }\n}"
}
EOF
Response:
{
"data": {
"customers": [
{
"id": "id",
"code": "string",
"registrationNumber": "string",
"name": "string",
"customerTierName": "string",
"displayName": "string",
"addresses": [
{
"id": "id",
"postalCode": "string",
"contactName": "string",
"type": "string",
"createdAt": "2025-01-15T00:00:00Z",
"addressLine1": "string"
}
]
}
]
}
}
customers(
enteredBy: String
search: String
): [Customer!]!
Arguments
customers.enteredBy ● String scalar
Only customers entered by this user. It can narrow the customers you may see but never widen them.
customers.search ● String scalar
Matches, case-insensitively and in part, a customer's name, code, display name, legal name or customer code, or the value or name of one of its contacts.
Type
Customer object
A customer: a partner with the customer role.