Skip to content

Instantly share code, notes, and snippets.

@curiouscrusher
Created September 13, 2017 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save curiouscrusher/59ea891c0195cd18f6d13054b8d27734 to your computer and use it in GitHub Desktop.
Save curiouscrusher/59ea891c0195cd18f6d13054b8d27734 to your computer and use it in GitHub Desktop.
Add multiple Metafields to a Shopify Product in one API call
// PUT https://yourstorename.myshopify.com/admin/products/#{id}.json
{
"product": {
"metafields": [{
"namespace": "your_namespace",
"key": "your_key",
"value": "your_value",
"value_type": "string"
},
{
"namespace": "your_namespace",
"key": "your_key",
"value": "your_value",
"value_type": "string"
},
{
"namespace": "your_namespace",
"key": "your_key",
"value": "your_value",
"value_type": "string"
},
{
"namespace": "your_namespace",
"key": "your_key",
"value": "your_value",
"value_type": "string"
}]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment