I'm trying to programmatically add a couple dozens products to my Shopify shop using the official ShopifyAPI Python SDK, but I can't figure out how to specify the cost of each variant.
This is what I've tried so far:
variant = shopify.Variant()
variant.price = price
variant.option1 = size
variant.inventory_quantity = qty
variant.inventory_management = "shopify"
variant.fullfilment_service = "manual"
variant.requires_shipping = True
variant.sku = sku
variant.taxable = False
variant.inventory_policy = 'deny'
variant.cost = cost
new_product.variants.append(variant)
Naturally, variant.cost
doesn't work. How should I do this? Or is it not yet supported?
I'm using ShopifyAPI version 5.1.0, and the API version is 2019-07.