Updating Attributes (Omni Channel)

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!
7 comments
Hello? Anyone from Lightspeed can shed some light on this? Thanks, Max.
Hi @whappycannabis,
Thank you for contacting us.
This is because you can't write products when you're having an omnichannel, this because Retail is the leading product. Please check this page for more information https://retail-support.lightspeedhq.com/hc/en-us/articles/229129388-Important-considerations-about-product-information-in-Lightspeed-Retail
Thanks @LucienVersendaal but the issue here is that these fields are unavailable in Retail and are only created in eCom once the product has been sent from Retail to eCom. These fields are unavailable in Retail and only available in eCom and can be updated withing the eCom GUI but why can't they be updated via the API if they can be updated via the eCom GUI? I understand for fields that are pushed from Retail to eCom but for fields that only exist in eCom, there must be a better way to updated those... Max.
Hi @whappycannabis,
I totally understand what you mean. I will check if we can find a workaround.
@whappycannabis,
Unfortunately there is no workaround. I've created an internal ticket for our dev team to improve this. When I got something back from our dev team, I will let you know directly.
I would also like to be notified when this problem is solved. I need to be able to update the eCom-only fields for omnichannel products via the eCom API.
@Yoni
If there are any updates, I will let you know via this thread.