Download Invoice
Download an invoice's PDF.
You don't call this endpoint directly with your API token. Instead, read the
invoice and follow its download_url — a temporary signed link
to this endpoint. The signature in the link authorizes the download, so it needs
no Authorization header and can be opened straight in a browser. The link
expires about an hour after you read the invoice; fetch the invoice again to get
a fresh one.
Request
GET /invoices/{id}/download?expires={expires}&signature={signature}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Invoice UUID |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
expires | integer | Yes | Carried by download_url. |
signature | string | Yes | Carried by download_url. |
Example Request
Use the download_url from the invoice verbatim — it already carries the
required query parameters:
curl -X GET "https://cart.easy.tools/api/v1/invoices/5b2c0f2e-1d4a-4c8b-9f3a-7e1a2b3c4d5e/download?expires=1749384000&signature=abc123" \
-o invoice.pdf
Response
Success Response (200)
The body is the binary PDF. The response carries:
| Header | Value |
|---|---|
Content-Type | application/pdf |
Content-Disposition | attachment; filename="invoice_<number>.pdf" |
Error Responses
Not Found (404)
Returned when the link has expired or its signature is invalid, when the invoice
does not exist, or when its PDF is not available yet — for example a Polish KSeF
invoice with status pending, which has no document until it is finalized.
Read the invoice again to obtain a fresh download_url.