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 zakres | clients:read |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
filter | ClientFilterInput | Conditions the clients must meet; without it every client is listed. |
pagination | PaginationInput | Page of the list to return; without it the first page at the default size. |
sort | ClientSortInput | Order of the list; without it alphabetical by display name. |
Zwraca
Przykład
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 } }}{ "since": "2026-10-05T07:55:00.000Z"}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{ "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", "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", "isPrimary": true } ], "tags": [ { "name": "Wydawnictwa" } ] } ], "pageInfo": { "hasNextPage": false } } }}