Update deal error


#1

Hi guys

I am trying to update a deal, but i am encountering an error

{ ["status"]=> string(5) "error" ["message"]=> string(19) "deal cannot be null" ["correlationId"]=> string(36) "99ca50d4-64cc-40c8-be9d-96cbeffc2f43" ["requestId"]=> string(32) "b9bd92fb29a34d8fe0e08454012d0e27" }

This is my example data

  $json  = array(
    'properties'=>array(
        array(
          'name' =>'phone',
          'value'=>4646584654
        )
    )
  );

Here is the url I used
https://api.hubapi.com/deals/v1/deal/xxxxxxxx?hapikey={{hapi_key}}

The method i use is PUT

Thanks in advance


#2

Hi @Vazgen_Makaryan

Do you have an example of the actual data that’s included in the PUT request? The most likely cause for that error is that null is somehow getting passed in the actual request instead of the JSON from that $json variable.


#3

Thank you Dear @dadams
It worked