ZapytanieBetaQuery.stockTakes
Stock takes, one page at a time, with the total count; newest first unless sorted. With updatedFrom and the UPDATED_AT sort, fetch only stock takes changed since your last sync. What an approved stock take changed in the stock is in stockMovements (stockTakeId).
| Wymagany zakres | warehouse:read |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
filter | StockTakeFilterInput | Conditions the stock takes must meet; without it every stock take is listed. |
pagination | PaginationInput | Page of the list to return; without it the first page at the default size. |
sort | StockTakeSortInput | Order of the list; without it newest first. |
Zwraca
Przykład
query StockTakes { stockTakes( filter: { status: APPROVED } sort: { field: UPDATED_AT, direction: DESC } pagination: { page: 1, pageSize: 20 } ) { items { id code name scope status completedAt } }}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 StockTakes {\n stockTakes(\n filter: { status: APPROVED }\n sort: { field: UPDATED_AT, direction: DESC }\n pagination: { page: 1, pageSize: 20 }\n ) {\n items {\n id\n code\n name\n scope\n status\n completedAt\n }\n }\n}"}JSON{ "data": { "stockTakes": { "items": [ { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b0a", "code": "INV-2026-03", "name": "Inwentaryzacja kwartalna", "scope": "PAINTS", "status": "APPROVED", "completedAt": "2026-09-30T15:10:00.000Z" } ] } }}