Skip to content

Get Customer Downloadable Products

Retrieve all downloadable product purchases belonging to the authenticated customer. This is a read-only API — customers can view their purchased downloadable links, check download status, and see remaining downloads.

Endpoint

GET /api/shop/customer-downloadable-products

Request Headers

HeaderValueRequiredDescription
Content-Typeapplication/jsonYesRequest content type
X-STOREFRONT-KEYpk_storefront_xxxYesStorefront API key
AuthorizationBearer {token}YesCustomer authentication token

Response Fields

FieldTypeDescription
idIntegerDownloadable link purchase ID
productNameStringName of the purchased product
nameStringName of the downloadable link
urlStringSource URL of a url-type link. Absent on a file-type purchase.
fileStringStored path of a file-type link. Absent on a url-type purchase.
fileNameStringDisplay name of the file
typeStringLink type: file or url
downloadBoughtIntegerTotal number of allowed downloads
downloadUsedIntegerNumber of times downloaded
downloadCanceledIntegerNumber of canceled downloads
statusStringPurchase status: available, expired, or pending
remainingDownloadsIntegerdownloadBought minus used and canceled. null when the purchase has no download cap.
orderStringPath of the order, e.g. /api/shop/customer-orders/384. Not a nested object.
customerStringPath of the owning customer.
downloadUrlStringAbsolute URL of the download route. It needs both auth headers, so it is a request URL rather than a shareable link.
createdAtDateTimePurchase creation date
updatedAtDateTimePurchase last update date

Status Values

Use any of these as the ?status= filter value, or read them off the status field:

StatusDescription
availableDownload link is active and can be used
pendingOrder has not been invoiced yet; download is not available
expiredAll downloads have been used or the link has expired

Query Parameters

ParameterTypeDefaultDescription
statusstringFilter by purchase status (available / pending / expired). ?status=available
pageinteger1Page number.
per_pageinteger10Items per page (max 50).

Over GraphQL: customerDownloadableProducts(status: "available", first: 10) { … }.

cURL Example

bash
curl -X GET "https://api-demo.bagisto.com/api/shop/customer-downloadable-products" \
  -H "X-STOREFRONT-KEY: pk_storefront_your_key_here" \
  -H "Authorization: Bearer YOUR_CUSTOMER_TOKEN" \
  -H "Content-Type: application/json"

Empty Collection

When the customer has no downloadable product purchases:

json
[]

Notes

  • Read-only API: Only GET operations are available.
  • Customer isolation: Purchases are automatically filtered by the authenticated customer. A customer can never see another customer's purchases.
  • Field naming: REST responses use camelCase field names (e.g., productName, downloadBought, remainingDownloads).
  • Computed field: remainingDownloads is calculated as downloadBought - downloadUsed - downloadCanceled. Returns null for unlimited downloads.

Released under the MIT License.