how to PUT in Postman to change Woo REST API meta_data
-
I am trying to change a key-value pair in woocommerce using
put
in postman, but just cannot get ANY data to change.I know it works from our ERP system, where I just put the key and value in and it does its magic. But I want to learn and be able to test some other scenarios manually.
- I have set up the REST API consumer_key and consumer_secret in woo
- It is set to read AND write
- I can use a
GET
and get a correct reply with info - Now I would like to
PUT
a specific meta_data field. - I am on the correct server (checked the url) and I get Status 200ok, but nothing changes
This is the reply from?
GET
?(just made it shorter){ "id": 123445, "name": "Productname", "meta_data": [ { "id": 121796, "key": "_product_checkbox", "value": "0" } ] }
I want to change the value of?
_product_checkbox
, but even if I try just?name
, I have no success.These are my
PUT
settings:staging102.ourdomain.com/wp-json/wc/v3/products/123445?consumer_key=ck_something&consumer_secret=cs_somethingelse
and then I tried in Body > raw > JSON
{"name":"Postmantest"}
and also separately
{ "meta_data": [ { "key": "_product_checkbox", "value": "1" } ] }
It always returns with status 200 and ok, but there is just nothing at all happening. What am I doing wrong, what have I missed?
Thanks!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘how to PUT in Postman to change Woo REST API meta_data’ is closed to new replies.