ZapytanieBetaQuery.orders
Orders, 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.
| Wymagany zakres | orders:read |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
filter | OrderFilterInput | Conditions the orders must meet; without it every order is listed. |
pagination | PaginationInput | Page of the list to return; without it the first page at the default size. |
sort | OrderSortInput | Order of the list; without it newest first. |
Zwraca
Przykład
query ChangedOrders($since: DateTime!) { orders( filter: { updatedFrom: $since } sort: { field: UPDATED_AT, direction: ASC } pagination: { pageSize: 50 } ) { items { id displayId status paymentStatus updatedAt products { id name quantity unit status } } totalCount pageInfo { hasNextPage } }}{ "since": "2026-10-05T06:55:00.000Z"}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 ChangedOrders($since: DateTime!) {\n orders(\n filter: { updatedFrom: $since }\n sort: { field: UPDATED_AT, direction: ASC }\n pagination: { pageSize: 50 }\n ) {\n items {\n id\n displayId\n status\n paymentStatus\n updatedAt\n products {\n id\n name\n quantity\n unit\n status\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n }\n }\n}", "variables": { "since": "2026-10-05T06:55:00.000Z" }}JSON{ "data": { "orders": { "items": [ { "id": "3a9c1f52-7d4e-4b8a-9e21-5c6d7e8f9a01", "displayId": "1084/2026", "status": "IN_PRODUCTION", "paymentStatus": "PAID", "updatedAt": "2026-10-05T07:12:41.318Z", "products": [ { "id": "8b2d4e6f-1a3c-4d5e-8f7a-9b0c1d2e3f41", "name": "Ulotka A5", "quantity": 5000, "unit": "PIECES", "status": "IN_PRODUCTION" } ] }, { "id": "4b0d2a63-8e5f-4c9b-8f32-6d7e8f9a0b12", "displayId": "1091/2026", "status": "CREATED", "paymentStatus": "PENDING", "updatedAt": "2026-10-05T08:03:07.904Z", "products": [ { "id": "9c3e5f70-2b4d-4e6f-9a8b-0c1d2e3f4a52", "name": "Katalog A4, 32 strony", "quantity": 300, "unit": "PIECES", "status": "NO_FILES" }, { "id": "ad4f6081-3c5e-4f70-8b9c-1d2e3f4a5b63", "name": "Teczka z wykrojnika", "quantity": 300, "unit": "PIECES", "status": "FILES_TO_CHECK" } ] } ], "totalCount": 2, "pageInfo": { "hasNextPage": false } } }}