I can post a number of metafields for an existing product if I do it one at a time:
/admin/products/#{id}/metafields.json
{ "metafield":
{
"namespace":"c_f",
"key":"label",
"value":"Am:pm",
"value_type":"string"
}
}
When I try to add multiple fields in the same post, I am getting an error:
{ "metafields":[
{
"namespace":"c_f",
"key":"artist",
"value":"CHEMICAL BROTHERS",
"value_type":"string"
},
{
"namespace":"c_f",
"key":"label",
"value":"Virgin",
"value_type":"string"
}
]
}
The error is:
"metafield": "Required parameter missing or invalid"
API has examples of posting one metafield only. Is there any way I can combine the metafields (need about 8) into a single POST request?
metafields
with an S, so the required fieldmetafield
is missing. – Matthew Darnell