Create Digital Product
Link assets to a Shopify product or variant to create a digital product.
Last updated
Overview
Section titled “Overview”Creating a digital product links one or more assets to a Shopify product or variant. When a customer purchases that Shopify product, Filemonk will automatically deliver the linked assets to them.
You must provide a shopify_product_id. To link to a specific variant only (rather than all
variants of a product), also include shopify_variant_id.
Request body
Section titled “Request body”-
digital_product(object, required)Digital product fields:
-
shopify_product_id(integer, required)The numeric Shopify product ID to link to.
-
shopify_variant_id(integer)The numeric Shopify variant ID. Omit to link at the product level (all variants).
-
asset_ids(array, required)Array of asset UUIDs to attach to this digital product.
-
upsert_always(boolean, defaultfalse)When
true, a new copy of the assets is created for each order placed, even if the customer has ordered before. Useful for products where every purchase should generate a fresh set of assets (e.g. unique licence keys). -
custom_message(string)A custom message shown to customers on the download page. Required when
preorder_enabledistrue. -
preorder_enabled(boolean, defaultfalse)Set to
trueto configure this as a preorder product. Customers who purchase will see a waiting screen untilpreorder_launch_dateis reached. Requirespreorder_launch_dateandcustom_message. -
preorder_launch_date(string)ISO 8601 datetime when the preorder content becomes available. Must be at least 2 hours in the future. Required when
preorder_enabledistrue. -
preorder_subject(string)Email subject for the preorder notification sent to customers when the content launches.
-
preorder_heading(string)Heading displayed on the customer’s download page while the preorder is active.
-
preorder_description(string)Description displayed on the customer’s download page while the preorder is active.
-
Response
Section titled “Response”Returns the created digital product object with all linked assets.
Example request
curl -X POST 'https://app.filemonk.io/api/v1/external/digital_products' \ -H 'X-Auth-Token: fm_api_key_your_key_here' \ -H 'Content-Type: application/json' \ -d '{ "digital_product": { "shopify_product_id": 8847261098265, "asset_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"], "custom_message": "Thanks for your purchase!" } }'curl -X POST 'https://app.filemonk.io/api/v1/external/digital_products' \ -H 'X-Auth-Token: fm_api_key_your_key_here' \ -H 'Content-Type: application/json' \ -d '{ "digital_product": { "shopify_product_id": 8847261098265, "shopify_variant_id": 46012345678921, "asset_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"], "custom_message": "Thanks for your purchase!" } }'curl -X POST 'https://app.filemonk.io/api/v1/external/digital_products' \ -H 'X-Auth-Token: fm_api_key_your_key_here' \ -H 'Content-Type: application/json' \ -d '{ "digital_product": { "shopify_product_id": 8847261098265, "asset_ids": ["a1b2c3d4-e5f6-7890-abcd-ef1234567890"], "custom_message": "Your download will be available on launch day!", "preorder_enabled": true, "preorder_launch_date": "2026-05-01T09:00:00Z", "preorder_heading": "Coming Soon", "preorder_description": "Your files will be ready on May 1st." } }'const response = await fetch( 'https://app.filemonk.io/api/v1/external/digital_products', { method: 'POST', headers: { 'X-Auth-Token': 'fm_api_key_your_key_here', 'Content-Type': 'application/json' }, body: JSON.stringify({ digital_product: { shopify_product_id: 8847261098265, asset_ids: ['a1b2c3d4-e5f6-7890-abcd-ef1234567890'], custom_message: 'Thanks for your purchase!' } }) });const data = await response.json();response = requests.post( 'https://app.filemonk.io/api/v1/external/digital_products', headers={'X-Auth-Token': 'fm_api_key_your_key_here'}, json={ 'digital_product': { 'shopify_product_id': 8847261098265, 'asset_ids': ['a1b2c3d4-e5f6-7890-abcd-ef1234567890'], 'custom_message': 'Thanks for your purchase!' } })data = response.json()Example response
{ "digital_product": { "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901", "shopify_product_id": 8847261098265, "shopify_variant_id": null, "assets": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "type": "external", "name": "Photoshop Brushes Pack", "filename": "brushes-pack-v2.zip", "external_url": "https://cdn.example.com/files/brushes-pack-v2.zip", "content_type": "application/zip", "byte_size": 0, "created_at": "2026-03-01T14:30:00Z" } ], "upsert_always": false, "custom_message": "Thanks for your purchase!", "preorder_enabled": false, "preorder_launch_date": null, "preorder_subject": null, "preorder_heading": null, "preorder_description": null, "created_at": "2026-04-08T10:00:00Z", "updated_at": "2026-04-08T10:00:00Z" }}{ "errors": ["Preorder launch date must be in the future"]}Thanks for letting us know.
Still stuck? Ask Quinn or chat with support