Get Customer Downloadable Products
Retrieve a paginated list of 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.
Query
graphql
query GetCustomerDownloadableProducts {
customerDownloadableProducts(first: 10) {
edges {
cursor
node {
_id
productName
name
fileName
type
downloadBought
downloadUsed
downloadCanceled
status
remainingDownloads
order {
_id
incrementId
status
}
createdAt
updatedAt
}
}
pageInfo {
endCursor
startCursor
hasNextPage
hasPreviousPage
}
totalCount
}
}Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
first | Int | No | Number of items to return from the start (default: 10) |
last | Int | No | Number of items to return from the end |
after | String | No | Cursor to start pagination after |
before | String | No | Cursor to start pagination before |
status | String | No | Filter by status: available, expired, or pending |
Response Fields
| Field | Type | Description |
|---|---|---|
_id | Int | Downloadable link purchase ID |
productName | String | Name of the purchased product |
name | String | Name of the downloadable link |
fileName | String | Display name of the file |
type | String | Link type: file or url |
downloadBought | Int | Total number of allowed downloads |
downloadUsed | Int | Number of times downloaded |
downloadCanceled | Int | Number of canceled downloads |
status | String | Purchase status: available, expired, or pending |
remainingDownloads | Int | Computed remaining downloads (null if unlimited) |
order | Object | Associated order details |
createdAt | DateTime | Purchase creation date |
updatedAt | DateTime | Purchase last update date |
Status Values
| Status | Description |
|---|---|
available | Download link is active and can be used |
pending | Order has not been invoiced yet; download is not available |
expired | All downloads have been used or the link has expired |
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
Content-Type | application/json | Yes | Request content type |
X-STOREFRONT-KEY | pk_storefront_xxx | Yes | Storefront API key |
Authorization | Bearer {token} | Yes | Customer authentication token |
cURL Example
bash
curl -X POST "http://localhost:8000/api/graphql" \
-H "X-STOREFRONT-KEY: pk_storefront_your_key_here" \
-H "Authorization: Bearer YOUR_CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "query { customerDownloadableProducts(first: 10) { edges { cursor node { _id productName name fileName type downloadBought downloadUsed status remainingDownloads createdAt } } pageInfo { endCursor hasNextPage } totalCount } }"
}'Notes
- Read-only API: Only
GET/ query operations are available. - Customer isolation: Purchases are automatically filtered by the authenticated customer. A customer can never see another customer's purchases.
- Status filtering: Use the
statusparameter to filter byavailable,expired, orpending. - Cursor pagination: Uses cursor-based pagination. Use
first/afterfor forward pagination andlast/beforefor backward pagination. - Computed field:
remainingDownloadsis calculated asdownloadBought - downloadUsed - downloadCanceled. Returnsnullfor unlimited downloads.

