ZapytanieBetaQuery.productInvoices
Sales invoices of the products of orders, one page at a time, with the total count. Filter by order, product, billing entity, type or issue date; with updatedFrom and the UPDATED_AT sort, fetch only invoices recorded or changed since your last sync. Without a sort: the latest issued first.
| Wymagany zakres | invoices:read |
|---|---|
| Dostępne od | Prynt 0.28.0 |
| Stabilność | Beta (co to znaczy) |
Argumenty
| Nazwa | Typ | Opis |
|---|---|---|
filter | ProductInvoiceFilterInput | Conditions the invoices must meet; without it every invoice is listed. |
pagination | PaginationInput | Page of the list to return; without it the first page at the default size. |
sort | ProductInvoiceSortInput | Order of the list; without it the latest issued first. |
Zwraca
Przykład
query ProductInvoices($orderId: ID!) { productInvoices(filter: { orderId: $orderId }, sort: { field: ISSUE_DATE, direction: ASC }) { totalCount items { id invoiceNumber type issueDate dueDate productId orderId currencyCode vatRate netAmount vatAmount grossAmount file { originalFilename downloadUrl } } }}{ "orderId": "7c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f"}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 ProductInvoices($orderId: ID!) {\n productInvoices(filter: { orderId: $orderId }, sort: { field: ISSUE_DATE, direction: ASC }) {\n totalCount\n items {\n id\n invoiceNumber\n type\n issueDate\n dueDate\n productId\n orderId\n currencyCode\n vatRate\n netAmount\n vatAmount\n grossAmount\n file {\n originalFilename\n downloadUrl\n }\n }\n }\n}", "variables": { "orderId": "7c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f" }}JSON{ "data": { "productInvoices": { "totalCount": 1, "items": [ { "id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e01", "invoiceNumber": "FV/412/10/2026", "type": "VAT", "issueDate": "2026-10-12T00:00:00.000Z", "dueDate": "2026-10-26T00:00:00.000Z", "productId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c01", "orderId": "7c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f", "currencyCode": "PLN", "vatRate": 0.23, "netAmount": 3400, "vatAmount": 782, "grossAmount": 4182, "file": { "originalFilename": "FV-412-10-2026.pdf", "downloadUrl": "https://storage.example.com/pliki/FV-412-10-2026.pdf?signature=…" } } ] } }}