Skip to content

Digital Downloads Query

Note: The Teachify Admin API is currently under development and not yet available for public use. This documentation is provided for preview purposes only.

The Digital Downloads API allows you to retrieve digital products for your school. Each digital product represents a downloadable item with pricing, metadata, and associated file attachments.

Returns a paginated list of digital downloads for the authenticated school. Soft-deleted products are excluded.

Required scope: This query accepts any of the following scopes: digital_products:read (the canonical scope) or digital_downloads:read (a legacy scope name still issued to Console admin preview tokens). A request presenting either scope is authorized.

Parameters:

ParameterTypeDescription
filterDigitalProductFilterFilter criteria (see Filtering)
pageIntPage number for pagination
perPageIntNumber of items per page (default: 20, max: 50)
limitIntAlternative to perPage

Returns:

  • AdminDigitalProductPage object with:
    • nodes: Array of AdminDigitalProduct objects
    • currentPage: Current page number
    • hasNextPage: Whether there are more pages
    • hasPreviousPage: Whether there are previous pages
    • nodesCount: Total number of items matching the query
    • totalPages: Total number of pages

Example:

query {
digitalDownloads(
page: 1,
perPage: 10
) {
nodes {
id
name
description
slug
currency
amount
productType
coverPhotoUrl
published
invisible
isRatingActive
createdAt
updatedAt
authors {
id
name
}
attachments {
id
name
contentUrl
}
}
currentPage
hasNextPage
hasPreviousPage
nodesCount
totalPages
}
}

The AdminDigitalProduct object contains the following fields:

FieldTypeDescription
idString!Unique identifier
nameString!The name of the digital product
descriptionStringA description of the digital product
slugString!The URL-friendly identifier for the product
currencyString!The currency code for the product price
amountFloat!The price of the product
productTypeString!The type of digital product
coverPhotoUrlStringThe URL of the product’s cover photo
isRatingActiveBoolean!Whether ratings are enabled for the product
publishedBoolean!Whether the product is published
invisibleBoolean!Whether the product is hidden from listings
createdAtInt!Unix Timestamp (seconds since epoch). When the product was created
updatedAtInt!Unix Timestamp (seconds since epoch). When the product was last updated
authors[Lecturer]The authors associated with this product
attachments[Attachment]The file attachments associated with this product

The digitalDownloads query accepts a filter parameter of type DigitalProductFilter. This allows you to narrow down results based on various criteria.

Filter FieldTypeDescription
idStringOperatorFilter by digital product ID
nameStringOperatorFilter by digital product name
slugStringOperatorFilter by product slug
categoryIds[String]Return products in the given categories
categorySlugs[String]Return products in the categories with the given slugs

The StringOperator used in filters has these operations:

OperationDescription
eqEqual to
neqNot equal to
inIn a list of values
ninNot in a list of values
likeMatch text values against a pattern using wildcards (case-sensitive)
containsContains substring (case-insensitive)

Find a digital product by slug:

query {
digitalDownloads(
filter: {
slug: { eq: "my-ebook" }
}
) {
nodes {
id
name
slug
amount
}
nodesCount
}
}

Search products by name:

query {
digitalDownloads(
filter: {
name: { contains: "guide" }
}
) {
nodes {
id
name
}
nodesCount
}
}

Find products in specific categories:

query {
digitalDownloads(
filter: {
categorySlugs: ["ebooks", "templates"]
}
) {
nodes {
id
name
slug
}
nodesCount
}
}