Skip to content

Downloadable Products — Download File

Streams the stored file for a given product attribute (the file behind a downloadable product's file/sample attribute) as a binary attachment.

REST only — binary

Returns a binary stream, not JSON. Send Accept: application/octet-stream. No GraphQL counterpart (binary streams aren't expressible over GraphQL).

Endpoint

EndpointMethod
/api/admin/catalog/products/{productId}/downloadable/{attributeId}/downloadGET

Path parameters

ParameterTypeNotes
productIdintegerProduct ID.
attributeIdintegerAttribute ID whose stored file path should be streamed.

Response

200 OK — the file as an application/octet-stream attachment.

Errors

HTTPCause
401 UnauthorizedMissing or invalid admin Bearer token.
403 ForbiddenAdmin role lacks catalog.products.view.
404 Not FoundNo stored file for the given product / attribute.

Released under the MIT License.