Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: API - Mark variant as digital product

API - Mark variant as digital product

DirkDooms
Visitor
2 0 0

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

Replies 2 (2)

Rick-InventoryH
Shopify Partner
118 6 10

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. 

Ricardo | InventoryHero app Specialist
InventoryHero - Automatically Discount Weak Inventory
https://apps.shopify.com/inventory-hero

https://inventoryhero.app

Ottawa, ON, Canada

windmillcode
Shopify Partner
18 0 2

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!