ZapytanieBetaQuery.papers
Papers 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 papers 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 | PaperFilterInput | Conditions the papers must meet; without it every paper is listed. |
pagination | PaginationInput | Page of the list to return; without it the first page at the default size. |
sort | PaperSortInput | Order of the list; without it newest first. |
Zwraca
Przykład
query LowStockPapers { papers( filter: { lowStock: true, isStock: true } sort: { field: CODE, direction: ASC } pagination: { page: 1, pageSize: 50 } ) { totalCount items { id code name paperType grammage format quantitySheets minimumStock unit isStock updatedAt } pageInfo { hasNextPage } }}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 LowStockPapers {\n papers(\n filter: { lowStock: true, isStock: true }\n sort: { field: CODE, direction: ASC }\n pagination: { page: 1, pageSize: 50 }\n ) {\n totalCount\n items {\n id\n code\n name\n paperType\n grammage\n format\n quantitySheets\n minimumStock\n unit\n isStock\n updatedAt\n }\n pageInfo {\n hasNextPage\n }\n }\n}"}JSON{ "data": { "papers": { "totalCount": 1, "items": [ { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b01", "code": "PA-12", "name": "Kreda mat 130g", "paperType": "COATED_MATTE", "grammage": 130, "format": "70x100", "quantitySheets": 800, "minimumStock": 1000, "unit": "SHEET", "isStock": true, "updatedAt": "2026-10-05T07:41:12.004Z" } ], "pageInfo": { "hasNextPage": false } } }}