Create a digital product variant

Is there a way to create a variant via api that is a digital product?

As you know a variant is associated to a parent product it seems even if the parent product is already marked as a digital product the variant needs something set or it triggers shipping when the order is placed and it doesn’t go through the proper order path that a digital product does.

I see no way to set digital product on a variant in shopify admin so im not so sure what can be done.

Also having looked at the api docs I see not way to even set digital product for a variant or for a product for that matter.

What am I missing? Is this possibly just controlled via inventoryItem requires_shipping option?

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!