Przejdź do głównej zawartości

papers

Dla: Programista

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

Argumenty

NazwaTypOpis
filterPaperFilterInput

Conditions the papers must meet; without it every paper is listed.

paginationPaginationInput

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

sortPaperSortInput

Order of the list; without it newest first.

Zwraca

PapersResult!

Przykład

Zapytanie
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
}
}
}
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 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
Odpowiedź
{
"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
}
}
}
}