Im creating a new product with the rest api like this :
const product = new shopify.api.rest.Product({ session: res.locals.shopify.session });
product.title = productResponse.title;
product.body_html = productResponse.body_html;
product.vendor = productResponse.vendor;
product.product_type = productResponse.product_type;
product.images = productResponse.images;
product.image = productResponse.image;
product.options = productResponse.options;
product.variants = productResponse.variants;
product.created_at = productResponse.created_at;
product.handle = productResponse.handle;
product.published_at = productResponse.published_at;
product.tags = productResponse.tags;
product.published = true;
await product.save({
update: true,
});
So i already have a full product object that im just pasting into my store, but when i send the request i get back this error : 'The following image IDs do not exist or do not belong to the product: 40075820597538,40075820564770,40075820859682'
does anyone know whats the cause? i tried to match the imageId of the variants to the images in the "images" field but still doesnt work