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 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
GETand get a correct reply with info - Now I would like to
PUTa specific meta_data field. - I am on the correct server (checked the url) and I get Status 200ok, but nothing changes
Assuming this is the reply from GET (just made it shorter)
{
"id": 123445,
"name": "Productname",
"meta_data": [
{
"id": 121796,
"key": "_product_checkbox",
"value": "0"
}
]
}
I actually 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!