Download Product File
Download a file attached to a product or a variant.
You don't call this endpoint directly with your API token. Instead, read the
product or the variant
and follow the file's 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 product or variant; read it again to get a fresh one.
Request
GET /product-files/{id}/download?expires={expires}&signature={signature}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | File UUID. Carried by download_url. |
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 product or variant verbatim — it already carries the
required query parameters. Follow redirects (curl -L): a file attached by link answers
with a 302 to that URL.
curl -L -X GET "https://cart.easy.tools/api/v1/product-files/9c1e7f42-3b8a-4d6e-9f10-2a5c7d3e8b41/download?expires=1749384000&signature=abc123" \
-o ebook.pdf
Response
Success Response (200)
A file uploaded to your store is streamed back as its raw bytes. The response carries:
| Header | Value |
|---|---|
Content-Type | application/octet-stream |
Content-Disposition | attachment; filename="My ebook.pdf" |
The filename is the file's name as it appears on the product or variant.
Redirect Response (302)
A file attached by link is not served here: the response redirects to the url it was
attached with, exactly as it was provided, and the contents come from wherever that URL is
hosted.
Error Responses
Not Found (404)
Returned when the link has expired or its signature is invalid, or when the file does not
exist. Read the product or variant again to obtain a fresh download_url.