Skip to main content
POST
Create a digital product
Creates a digital product. shop, price, file and deleted are set by the server; any such keys in the body are dropped. Requires the WRITE_INVENTORY scope. Free preview. preview: { enabled, pages } controls the free sample of a PDF book (default { enabled: true, pages: 3 }, 1 to 20 pages, never more than half of the book). Out-of-range values return 400. Send only the key you change on an update: { "preview": { "pages": 5 } } keeps the switch as it was. Pricing rules. access: "purchase" needs pricing.oneTime, access: "subscription" needs pricing.monthly, and access: "both" needs both. A needed price must be above 0. price in the response is derived: the cheapest way in.
An app cannot attach the file. The book itself is uploaded to the store’s private file storage with a store file token that app tokens cannot obtain. So a product created through the Apps API has no file: it is saved with listed: false, and asking to list it returns 400 (Upload a file before listing this product) until the merchant attaches a file from the Digital page of the dashboard. Use this endpoint to prepare listings, not to publish them.
These endpoints only work on a store whose type is digital. On any other store they return 403 with This is only available on digital stores. See Digital stores.

Authorizations

Authorization
string
header
required

Installed-app access token (prefix app_), issued by the OAuth install flow. The store is bound to the token server-side , never send a shop id.

Body

application/json
name
string
required

Product name (required, max 120 characters).

description
string

Description (max 10,000 characters).

author
string

Author or publisher (max 120 characters).

images
string<uri>[]

Cover image links (http or https, max 10).

category
string | null

Category ObjectId, which must belong to this store. null or an empty string clears it.

access
enum<string>

How buyers get the product. Default purchase.

Available options:
purchase,
subscription,
both
pricing
object

Prices in the store currency. A price for a way of buying that access does not offer is discarded.

inPass
boolean

Include the product in the store's all-access pass.

preview
object

The free preview of a PDF book: the first pages pages, cut on demand. A product with no stored preview setting reads as { enabled: true, pages: 3 }.

fileId
string

Id of a private file already uploaded to the store's file storage. See the note on this page: an app cannot upload that file itself.

listed
boolean

Show the product in the storefront. A product with no file is saved unlisted, and asking to list it returns 400.

Response

Create a digital product: success.

status
integer
required
Example:

201

success
boolean
required
Example:

true

message
string
required
Example:

"Digital product created successfully"

data
object
required
Example: