APIs & Integrations

CBoursinos
Member

Create with php client association of customer with deal

Hello guys,

 

i want to create an association of a customer with a deal,

with the use of php client, and i cannot figure how to do it. 

 

Best regards

0 Upvotes
3 Replies 3
quentin_lamamy
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

Create with php client association of customer with deal

I have nothing to test now but it should be

$dealId    = 1;
$contactId = 2;
$apiKey    = "apiKey";
$hs = \HubSpot\Factory::createWithApiKey($apiKey);
$hs
->crm()
->deal()
->associationsApi()
->create($dealId,"contact",$contactId,"deal_to_contact");

You can test that, i will check when back home if it's right


0 Upvotes
CBoursinos
Member

Create with php client association of customer with deal

Hello Quentin!

 

Yes the php sdk via composer I am using. 

 

Best Regards

Chris

0 Upvotes
quentin_lamamy
Key Advisor | Diamond Partner
Key Advisor | Diamond Partner

Create with php client association of customer with deal

Hi @CBoursinos ,

Are you using the php sdk or not i need to know to help you with the right source code


0 Upvotes