customersPage
Requires at least one of the permissions customers:customer:list or customers:customer:read.
Returns the customer book one page at a time, for apps that sync for offline use. Limited to the customers the signed-in user may see. Pass updatedAfter for a delta pull, which also includes deleted customers, and page with the returned nextCursor. Needs the customers read or list permission.
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 CustomersPage {
customersPage {
nextCursor
items {
id
code
registrationNumber
name
customerTierName
displayName
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query CustomersPage {\n customersPage {\n nextCursor\n items {\n id\n code\n registrationNumber\n name\n customerTierName\n displayName\n }\n }\n}"
}
EOF
Response:
{
"data": {
"customersPage": {
"nextCursor": "string",
"items": [
{
"id": "id",
"code": "string",
"registrationNumber": "string",
"name": "string",
"customerTierName": "string",
"displayName": "string"
}
]
}
}
}
customersPage(
cursor: String
enteredBy: String
search: String
take: Int = 100
updatedAfter: DateTime
): CustomersPage!
Arguments
customersPage.cursor ● String scalar
The nextCursor returned with the previous page. Leave it out for the first page.
customersPage.enteredBy ● String scalar
Only customers entered by this user. It can narrow the customers you may see but never widen them.
customersPage.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.
customersPage.take ● Int scalar
The page size. Defaults to 100.
customersPage.updatedAfter ● DateTime scalar
Only customers changed after this time, including deleted ones.
Type
CustomersPage object
A page of customers, for the offline sales rep app.