Hey Everybody,
I’m hving issues updating the metafields of a custom collection only.
When I try to update the collection it runs well, but if I try to add metafields object to the API call I get 422 unprocessible entity.
What I try to call is:
PUT /admin/custom_collection/206042311.json
And I send this info.
{"custom_collection":{"id":206042311,"metafields":[{"key":"size","namespace":"sbtd_collection_filter","value":"size--large, size--medium, size--small","value_type":"string"},{"key":"color","namespace":"sbtd_collection_filter","value":"color--blue, color--green","value_type":"string"},{"key":"style","namespace":"sbtd_collection_filter","value":"style--srafciger, style--testproduct","value_type":"string"}]}}
All according to https://help.shopify.com/api/reference/customcollection
I tried with a single metafield inside to no avail. Any other data I try to update colection with works properly, but metafields no. Any help guys, please, really stuck.
I use PHP & CURL to make my calls. Also, same happens when I try to create a new custom collection via API, works if I don’t put in the metafields.
This will also be the issue with collects I bet, wonder what I’m missing here..
Thanks in advance!