Hi Mark! A similar way to do this may be to create all the files you need with fileCreate. I wrote a doc on this here, but we are basically moving from files being embedded within resources to files being more centrally managed. Then you can take that file ID and append it to your products with productSet. Does this help? Any feedback on this that you’d like us to take into account as we’re updating this system? Our goal is to make this as ergonomic as possible - just some sharp edges while we get there.
Ok, for media creation switched from productUpdate to fileCreate
That works fine and can clearly get the created media ID back.
Next, need to attach that media ID to one product variant, and ignore the other variants, which we can’t do with productSet (it requires a full list of variants to update).
I guess the best way to do this and be consistent with your direction would be to allow fileUpdate to accept variant Ids in referencesToAdd. Would you agree?
Until then, tried productVariantAppendMedia which doesn’t seem to work. No errors, but the returned product id is null. This could be deprecated though if fileUpdate will accept variant ids.