ZapytanieBetaQuery.paints
Paints in the warehouse with their stock, one page at a time, with the total count. Filter and sort them; with updatedFrom and the UPDATED_AT sort, fetch only paints whose card or stock changed since your last sync.
| Wymagany zakres | warehouse:read |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
filter | PaintFilterInput | Conditions the paints must meet; without it every paint is listed. |
pagination | PaginationInput | Page of the list to return; without it the first page at the default size. |
sort | PaintSortInput | Order of the list; without it newest first. |
Zwraca
Przykład
query ChangedPaints($since: DateTime) { paints( filter: { updatedFrom: $since } sort: { field: UPDATED_AT, direction: ASC } pagination: { page: 1, pageSize: 100 } ) { items { id code name quantityGrams minimumStock updatedAt } pageInfo { hasNextPage } }}{ "since": "2026-10-05T06: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 ChangedPaints($since: DateTime) {\n paints(\n filter: { updatedFrom: $since }\n sort: { field: UPDATED_AT, direction: ASC }\n pagination: { page: 1, pageSize: 100 }\n ) {\n items {\n id\n code\n name\n quantityGrams\n minimumStock\n updatedAt\n }\n pageInfo {\n hasNextPage\n }\n }\n}", "variables": { "since": "2026-10-05T06:55:00.000Z" }}JSON{ "data": { "paints": { "items": [ { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b02", "code": "F-1208", "name": "Pantone 1935 C", "quantityGrams": 2349.5, "minimumStock": 500, "updatedAt": "2026-10-05T08:02:44.120Z" } ], "pageInfo": { "hasNextPage": false } } }}