Posting Metafield for products

buddhanepal
New Member
1 0 0

We are trying to post Length in the metafield but we keep getting errors. We are making a call to 

 

/admin/products/#{id}/metafields.json

 

 and our body of post request contains the following:

 

{
 "metafield": { 
      "namespace": "global", 
      "key": "length", 
      "value": 5, 
      "value_type": "string"
   } 
}

 

We know the authentication is working because if we do the get request we can see the metafields data. 
Any suggestion on what might be causing the issue? 
0 Likes