How can we attach existing image to a variant using eCom API?
Hi @marlexladag ,
Thank you for contacting us.
You can do this by updating the variant and attach the image, please check https://developers.lightspeedhq.com/ecom/endpoints/variant/#put-update-a-variant for more information.
i also encounter this as a problem. Of course i already checked the link you give here. For me it does not explain how to succesfully attach the image. All the other information are succesfully updated, but not the image. So I started a discussion about this elsewhere. But can you provide a working example with Json body how to succesfully upload an image and link it to a variant or product?
You can use something like this to convert your image to a base64 attachment, https://stackoverflow.com/questions/3967515/how-to-convert-an-image-to-base64-encoding or an online tool like: https://www.base64-image.de/