Status code 405 on Updating Deal, yet not on Creating
Hello!
I’m having an issue with the “Update deal” method of the API. Without any error response, I’m getting a 405 Status Code and I’m unable to update a deal.
As far as I can tell, I don’t find any syntaxis errors on the JSON nor I’m sending incorrect data for each property. In fact I tried to send each property individually and I’m getting the same result.
Also I succesfully created a Deal with this same JSON (adding associations and changing the endpoint of course), however updating always gives me the same status code.
I have not had any issues with other methods such as Update Contact, Get all Deals, Get All Contacts, Create Deal, etc.
Thanks for the detailed note, the status code 405 means the method is not allowed for that endpoint. For this line @curl_setopt($ch, CURLOPT_POST, true); you should instead use url_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); Essentially you are making a POST request when you need to be making a PUT request.