Hi,
I'm trying to change a product name with the API. When I set the custom request as PUT, the response is always 404. What am I doing wrong?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url.'products/2');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($data_json)));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS,$data_json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERPWD, "$user_login:$api_key");
$response = curl_exec($ch);
curl_close($ch);
ProductID 2 exists and with a GET the reponse the reponse is ok.