APIs & Integrations

DaMask
Member | Diamond Partner
Member | Diamond Partner

Getting Company and Customer details through the api when deal status progresses

SOLVE

I've got a simple php/mysql site i'm using to integrate HubSpot with other services. It's listening for a webhook when the Hubspot deal progresses to `appointmentscheduled` and saves the event to the DB. The fields saved are id; event_type; object_id; event_id;

subscription_id; portal_id and some others. What is the most economical way to retrieve the associated Company and Customer data?

0 Upvotes
1 Accepted solution
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Getting Company and Customer details through the api when deal status progresses

SOLVE

Hey @DaMask,

 

When looking to retrieve associations of deals to company/contact, you would need to use the CRM API | Associations

 

Specifically the. POST crm/v3/associations/{fromObjectType}/{toObjectType}/batch/read

 

i.e. crm/v3/associations/deals/contacts/batch/read

 

{
  "inputs": [
    {
      "id": "{{deal id}}"
    }
  ]
}

The return response will include the associated contact IDs.

View solution in original post

0 Upvotes
1 Reply 1
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Getting Company and Customer details through the api when deal status progresses

SOLVE

Hey @DaMask,

 

When looking to retrieve associations of deals to company/contact, you would need to use the CRM API | Associations

 

Specifically the. POST crm/v3/associations/{fromObjectType}/{toObjectType}/batch/read

 

i.e. crm/v3/associations/deals/contacts/batch/read

 

{
  "inputs": [
    {
      "id": "{{deal id}}"
    }
  ]
}

The return response will include the associated contact IDs.

0 Upvotes