Image Upload Code Sample - Python with Requests
Image Upload Sample Code - Python with Requests
import requests
url = "https://<<domain_prefix>>.retail.lightspeed.app/api/2.0/products/{product_id}/actions/image_upload"
files = {'image': open('{file_path}', 'rb')}
headers = {
'authorization': "Bearer {token}"
}
response = requests.request("POST", url, files=files, headers=headers)
print(response.text)
Updated 9 months ago