I'm trying to create products via the REST API in v2.3.3. I can create the product, with it's properties, and add images to the product afterwards. However, the primary image is missing the Roles, and all of the images are missing the Alt Text in the UI. When I pull the product again via the API, it shows the images as they exist and both the types and label properly filled in. What am I missing to get this working?
Here's the object that I'm sending to the "/products/{sku}/media" POST message (done in C# as a loop where "info" is the product, and "image" is each picture being added to the product).
new { entry = new { content = new { base64_encoded_data = image.content, name = image.fileName, type = image.mimeType }, disabled = false, label = info.modelName, media_type = "image", position = idx, types = idx == 0 ? new List<string>() { "image", "small_image", "thumbnail" } : new List<string>(), } }
So, new details as I've been doing more research on this item.
Not sure yet what's going on, or where the disconnect is at. But, here's some additional information that may help trigger someone else's thoughts.
More information that we've gleaned off the issue.
It appears that the images are being defined, but they're being defined for store_id = 1. However, the product is on a web site that's under store_id = 5. Is there anyway to define which store the media is good for? Even setting it to "0" would work. Looking through the documentation, I'm not seeing anywhere that I can indicate this level of control for the image when I upload it. So, why is it automatically picking "1", and how do I go about selecting something else?