Update deal - internal server error

deals

#1

Hi

I’m attempting to update deal amount field using the same array as in documentation example:
{ "properties": [ { "name": "amount", "value": "70000" } ] }
I use valid deal ID that I fetched by get-deals method and valid API key:
https://api.hubapi.com/deals/v1/deal/xxxxxxxx?hapikey={{hapi_key}}

I receive http status 500 and empty curl_error so can’t provide any more information about the situation.
What are possible errors in such an easy case?


#2

Hi @tanya

Are you able to log the body of that error response? curl_error will usually only contain problems with curl itself, but the error response should have more details in the response body.


#3

There’s a screenshot with the most informative response I could get


#4

It appears that CURL option
curl_setopt($ch, CURLOPT_PUT, true);
destroyed the whole request, if anyone will have the same problem, use
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, “PUT”);