Updating Attributes (Omni Channel)

whappycannabiswhappycannabis Member Posts: 9

Hi, I'm trying to update custom attributes in eCom using the values we have in custom fields inside of LSRetail.

I'm using the retail API to get the data from LSRetail. That's easy and works greatd.

However, when I do my PUT of those values into the eCom API, I get a 403 error message:

{"error":{"code":403,"method":"UPDATE","request":"\/us\/products\/34857306\/attributes\/26714.json","message":"The server understood the request, but is refusing to fulfill it."}}

Using Python, this is my request:

key = "fd5662e2df572a--EDITED--bdb"
secret = "73302f1680a08--EDITED--ef199"
url = "https://api.shoplightspeed.com/us/products/" + str(eComID) + "/attributes/" + str(26714) + ".json"
payload = { 'productAttributes[value]': str(THC) + str(UOM) }
response = requests.put(url, data=payload, auth=(key, secret))

I also tried with productAttribute[value] (without the 's') and get the same error.

How can I update these custom attributes in eCom for each products (we have over 200 products to update each with their own different values for those attributes). I want to use the API for this.

Thanks, Max (eCom Store ID: 640569 and retail AccountID: 227120)

FYI, I am the store owner.

For clarity, this is what I am trying to update:

Doing this manually takes forever!

Tags:

7 comments

Sign In or Register to comment.