I am performing Axios put request to change the status of an order through Woocommerce REST API. I tried different patterns but I am getting 404 error. This is my request
axios.put('https://staging/wp-json/wc/v3/orders/1977/consumer_key=123&consumer_secret=456',
{status: "completed"});
I tried this also
axios.put('https://staging/wp-json/wc/v3/orders/1977/consumer_key=123&consumer_secret=456/"Content-Type: application/json"',
{status: "completed"});
This is from API documentation
curl -X PUT https://example.com/wp-json/wc/v3/orders/727 \
-u consumer_key:consumer_secret \
-H "Content-Type: application/json" \
-d '{
"status": "completed"
}'
Where am I doing wrong? Any suggestions please...