I want to edit the metafields of a Category? For Products there is a ProductMetafield object, but not for Category?
Is there a way to use the default Metafield object and filter by ownerType and ownerId? Can't find it in the docs.
Thank you for contacting us.
You can change this by using this endpoint https://developers.lightspeedhq.com/ecom/endpoints/metafield/#post-create-a-metafield
For example here's my payload to update a meta title of a category:
"ownerId": 8003774, <<-- category ID
"value": "updated title"
I hope this helps.
But what happens if already an metafield exists for this categoryID? Will it overwrite?
When a metafield already exists and you are creating a new one with the same ID then it will overwrite.