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

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?

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.