Przejdź do głównej zawartości

stockTakes

Dla: Programista

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 zakreswarehouse:read
Dostępne odPrynt 0.28.0
StabilnośćBeta (co to znaczy)

Argumenty

NazwaTypOpis
filterStockTakeFilterInput

Conditions the stock takes must meet; without it every stock take is listed.

paginationPaginationInput

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

sortStockTakeSortInput

Order of the list; without it newest first.

Zwraca

StockTakesResult!

Przykład

Zapytanie
query StockTakes {
stockTakes(
filter: { status: APPROVED }
sort: { field: UPDATED_AT, direction: DESC }
pagination: { page: 1, pageSize: 20 }
) {
items {
id
code
name
scope
status
completedAt
}
}
}
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 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
Odpowiedź
{
"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"
}
]
}
}
}