Przejdź do głównej zawartości

foils

Dla: Programista

ZapytanieBetaQuery.foils

Foils 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 foils 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
filterFoilFilterInput

Conditions the foils must meet; without it every foil is listed.

paginationPaginationInput

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

sortFoilSortInput

Order of the list; without it newest first.

Zwraca

FoilsResult!

Przykład

Zapytanie
query Foils {
foils(sort: { field: NAME, direction: ASC }, pagination: { page: 1, pageSize: 50 }) {
totalCount
items {
id
code
name
category
type
metersPerRoll
numberOfRolls
updatedAt
}
}
}
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 Foils {\n foils(sort: { field: NAME, direction: ASC }, pagination: { page: 1, pageSize: 50 }) {\n totalCount\n items {\n id\n code\n name\n category\n type\n metersPerRoll\n numberOfRolls\n updatedAt\n }\n }\n}"
}
JSON
Odpowiedź
{
"data": {
"foils": {
"totalCount": 1,
"items": [
{
"id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b03",
"code": "FO-3",
"name": "Folia mat 25 mic",
"category": "LAMINATION",
"type": "MAT",
"metersPerRoll": 200,
"numberOfRolls": 2.56,
"updatedAt": "2026-10-05T08:15:03.771Z"
}
]
}
}
}