APIs & Integrations

Vazgen_Makaryan
Member

Update deal error

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

0 Upvotes
3 Replies 3
Dadams
HubSpot Employee
HubSpot Employee

Update deal error

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.

0 Upvotes
Vazgen_Makaryan
Member

Update deal error

Thank you Dear @dadams
It worked

0 Upvotes
Bs_Sisodiya
Member

Update deal error

Hello @Vazgen_Makaryan,

 

I am also getting the same error as you, can you please suggest me where I need to change in our code. I receiving this type of error.

Update_DealError.png

0 Upvotes