Przejdź do głównej zawartości

clients

Dla: Programista

ZapytanieBetaQuery.clients

Clients, one page at a time, with the total count. Filter and sort them; with updatedFrom and the UPDATED_AT sort, fetch only clients changed since your last sync; with externalRef, find the client you gave that reference.

Wymagany zakresclients:read
Dostępne odPrynt 0.28.0
StabilnośćBeta (co to znaczy)

Argumenty

NazwaTypOpis
filterClientFilterInput

Conditions the clients must meet; without it every client is listed.

paginationPaginationInput

Page of the list to return; without it the first page at the default size.

sortClientSortInput

Order of the list; without it alphabetical by display name.

Zwraca

ClientsResult!

Przykład

Zapytanie
query ChangedClients($since: DateTime) {
clients(
filter: { updatedFrom: $since }
sort: { field: UPDATED_AT, direction: ASC }
pagination: { page: 1, pageSize: 25 }
) {
totalCount
items {
id
externalRef
type
displayName
taxIdentificationNumber
email
blockMode
updatedAt
addresses {
type
street
buildingNumber
zip
city
isDefault
}
contacts {
firstName
lastName
email
isPrimary
}
tags {
name
}
}
pageInfo {
hasNextPage
}
}
}
Zmienne
{
"since": "2026-10-05T07:55:00.000Z"
}
Wywołanie (curl)
curl -sS https://twoja-drukarnia.prynt.pl/api/v1/graphql \
-H "Authorization: Bearer $PRYNT_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"query": "query ChangedClients($since: DateTime) {\n clients(\n filter: { updatedFrom: $since }\n sort: { field: UPDATED_AT, direction: ASC }\n pagination: { page: 1, pageSize: 25 }\n ) {\n totalCount\n items {\n id\n externalRef\n type\n displayName\n taxIdentificationNumber\n email\n blockMode\n updatedAt\n addresses {\n type\n street\n buildingNumber\n zip\n city\n isDefault\n }\n contacts {\n firstName\n lastName\n email\n isPrimary\n }\n tags {\n name\n }\n }\n pageInfo {\n hasNextPage\n }\n }\n}",
"variables": {
"since": "2026-10-05T07:55:00.000Z"
}
}
JSON
Odpowiedź
{
"data": {
"clients": {
"totalCount": 1,
"items": [
{
"id": "6c2e4a1b-7d3f-4e5a-9b8c-0d1e2f3a4b5c",
"externalRef": "crm-1042",
"type": "COMPANY",
"displayName": "Wydawnictwo Lipowe sp. z o.o.",
"taxIdentificationNumber": "5213000001",
"email": "[email protected]",
"blockMode": "NONE",
"updatedAt": "2026-10-05T08:12:40.511Z",
"addresses": [
{
"type": "HEADQUARTERS",
"street": "Lipowa",
"buildingNumber": "7",
"zip": "00-950",
"city": "Warszawa",
"isDefault": true
}
],
"contacts": [
{
"firstName": "Anna",
"lastName": "Zając",
"email": "[email protected]",
"isPrimary": true
}
],
"tags": [
{
"name": "Wydawnictwa"
}
]
}
],
"pageInfo": {
"hasNextPage": false
}
}
}
}