Modifying products using the REST API V2
-
I’m trying to modify stock levels via the REST API V2 using PHP, I need to modify a V1 client library to do this but am struggling to format the string/param combo correctly for updating a product (can update order statuses fine but the product => [ ‘name’ => ‘value’ ] notation is causing me issues )
Can anyone tell me how to express this as a URL/params combo:
https://example.com/wc-api/v2/products/546 \
-u consumer_key:consumer_secret \
-H “Content-Type: application/json” \
-d ‘{
“product”: {
“stock_quantity”: “999”
}
}’
- The topic ‘Modifying products using the REST API V2’ is closed to new replies.