ZapytanieBetaQuery.purchaseOrders
Purchase orders to suppliers, one page at a time, with the total count. Filter and sort them; with updatedFrom and the UPDATED_AT sort, fetch only orders changed since your last sync; with externalRef, find the order you gave that reference.
| Wymagany zakres | warehouse:read |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
filter | PurchaseOrderFilterInput | Conditions the purchase orders must meet; without it every purchase order is listed. |
pagination | PaginationInput | Page of the list to return; without it the first page at the default size. |
sort | PurchaseOrderSortInput | Order of the list; without it latest ordered first. |
Zwraca
Przykład
query PurchaseOrderByRef($ref: String!) { purchaseOrders(filter: { externalRef: $ref }) { totalCount items { id code status externalRef supplier { name } } }}{ "ref": "SUP-2026-0042"}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 PurchaseOrderByRef($ref: String!) {\n purchaseOrders(filter: { externalRef: $ref }) {\n totalCount\n items {\n id\n code\n status\n externalRef\n supplier {\n name\n }\n }\n }\n}", "variables": { "ref": "SUP-2026-0042" }}JSON{ "data": { "purchaseOrders": { "totalCount": 1, "items": [ { "id": "3f6b2a1c-8d4e-4f5a-9b6c-1d2e3f4a5b07", "code": "PO-240", "status": "SENT", "externalRef": "SUP-2026-0042", "supplier": { "name": "Papyrus Polska" } } ] } }}