Update Product Url - API
in Development
I am trying to update the Url title but this is not working. this is the Post/put
{"product": {"visibility": "hidden","url": "Zuka trousers in blue alrecchino","title": "Zuka trousers in blue alrecchino",...
should I use a specific syntax for this ?
8 comments
Hi,
To update the URL, you should fill in the name as a slug.
Example:
{
"product": {
"title": "Zuka trousers in blue alrecchino",
"url" : "zuka trousers_in_blue_alrecchino"
}
}
You can use the ProductMetafield to update the Meta Title.
Example:
{
"productMetafield": {
"key": "meta_title_en",
"value": "Zuka trousers in blue alrecchino"
}
}
Documentation:
https://developers.lightspeedhq.com/ecom/endpoints/productmetafield/
hello Ali , thank you for the update, I tried this with no luck so far.
PUT /products/135516935.json
{ "productMetafield": { "key": "meta_url_en", "value": "Woma_skirt_in_blue_arlecchino"} }
I also tried this one with no luck , cannot see what is wrong..
{"product": {"url": "Woma_skirt_in_blue_arlecchino","title": "Woma skirt in blue arlecchino"}}
Hi,
It seems like you're doing the PUT call to the following:
Which is not correct. Please use the following:
Documentation: https://developers.lightspeedhq.com/ecom/endpoints/productmetafield/#put-update-a-metafield
so I first have to download all the metafields before I can do an update. otherwise i do not have the ID of the metafield.
Is there a way to do it with the Product PUT ?
To update existing metafields, you'd indeed have to get the ID first.
hey Ali, sync is working now. Thank you for the support !
My pleasure!