Hi,
Is there a way to mark a variant as a digital product instead of a physical one through the API? I can’t seem to find anything about digital products/variants in the API documentation.
Thank you
A user asks how to mark a product variant as digital (non-physical) through the Shopify API, noting they cannot find relevant documentation.
Initial Response:
type_t field to “Digital” to indicate the product typeWorking Solution (GraphQL mutation):
productVariantUpdate(
input: {
id: "{id_input}",
inventoryPolicy: CONTINUE,
requiresShipping: false
}
)
Key settings:
requiresShipping: false to indicate no physical shipping neededinventoryPolicy: CONTINUE for inventory handlinginventoryItemUpdate mutation and retrieve inventoryId from the productVariant in productQueryThe discussion provides a practical workaround using variant-level shipping settings rather than a dedicated “digital product” flag.
Hi,
Is there a way to mark a variant as a digital product instead of a physical one through the API? I can’t seem to find anything about digital products/variants in the API documentation.
Thank you
Hi @DirkDooms ,
Unfortunately there is not a specific API endpoint to mark a variant as a digital one. However, you can set the product_type field to Digital to indicate it,
Always remember to handle digital product delivery separately for a smooth customer experience.
This is a late answer but I found it
mutation {
productVariantUpdate(
input: {
id: “{id_input}”,
inventoryPolicy: CONTINUE,
requiresShipping: false
}
) {
userErrors {
field
message
}
}
} come 2024-07 API you need to use inventoryItemUpdate and you can get the inventoryId from the productVariant in the productQuery!