APIs & Integrations

jijoamt
Participant

API Clarifications

Hi 
Are there API's available in hubspot to get data  for the following

 

 1. to get details about who added how many contacts on a specified date
2. to get details about who created how many deals on a specified date
3. to get details about which deals were updated by whom  and what was updated
4. to get the  total pipeline $ worth per respective hubspot user
5. to get the total Pipeline value

 

Thanks

0 Upvotes
7 Replies 7
IsaacTakushi
HubSpot Employee
HubSpot Employee

API Clarifications

Welcome, @jijoamt.

 

This information can be indirectly retrieved or calculated from data which is accessible via the Contacts API and Deals API, but there are no dedicated endpoints for any of these metrics. Several if not many steps are involved for each.

 

It sounds like you're building an app focused on sales. Could you describe the "how many X on a specified date" use cases in more detail? I ask because I can already tell one significant roadblock will be historical changes. It will be much easier to create an app which keeps track of changes after it is installed but much more challenging to go back in time and attribute changes to users.

Isaac Takushi

Associate Certification Manager
jijoamt
Participant

API Clarifications

Hi

 

can you please let me know hwo can we know the owner of a contact. In the APi for contact listing, i cant find the owner id of a contact

 

Also how can we know the owner of  deal via API

 

Which APi should we use

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

API Clarifications

Hi, @jijoamt.

 

If you're using Contacts API endpoints like this, you'll have to append property=hubspot_owner_id to your request URL to get the values for that contact property, which are owner IDs.

 

For example, a request which fetches a batch of contacts with their first name, last name, and owner values would be:

https://api.hubapi.com/contacts/v1/lists/all/contacts/all?property-firstname&property=lastname&property=hubspot_owner_id

 

Similarly, when using the Deals API, you must append properties=hubspot_owner_id to get the deal owner value.

 

For example, a request which retrieves a group of deals with the deal name, amount, and owner values would be:

https://api.hubapi.com/deals/v1/deal/paged?properties=dealname&properties=amount&properties=hubspot_owner_id

Isaac Takushi

Associate Certification Manager
jijoamt
Participant

API Clarifications

Hi Issac

 

thanks for the clarifications. I need a few more APi clarifcations

 

1.   if something is updated on a deal, is it possible to know what exactly ( which field)was updated  

2. is there an API  to get the total pipeline $ worth per respective hubspot user, by providing the user id   and dealstage

3.  is there an APi to get the total pipeline value for the company

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

API Clarifications

Hi, @jijoamt.

 

I'll address each of your questions below:

  1. Yes. This is most easily done by setting up deal.propertyChange subscriptions with the Webhooks API. If you don't use webhooks, though, this goal becomes much more challenging. You'll have to check every deal property and either compare it to historical values in your system or use the timestamp value as a reference for when the value was set.
  2. No. At this time, you will have to loop through all deals returned by this endpoint and sort and calculate the deal values on your end. The CRM Search API which should be released to developer preview shortly should eliminate the need to loop through results. Subscribe to the HubSpot Developer Changelog to be notified when that API is released.
  3. No. This answer is the same as above, however.

Isaac Takushi

Associate Certification Manager
jijoamt
Participant

API Clarifications

Hi Issac

 

Thankyou for your support.

Is there an APi available to get the notes added for a contact or company

 

Thanks jijo

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

API Clarifications

Hi, @jijoamt.

 

Yes. Notes are a type of engagement, so they can be retrieved through the Engagements API.

 

If you need to find the engagement IDs associated with a contact or company record, you can query the CRM Associations API.

 

For example, if you sent the following request to this endpoint, the results array would contain engagement IDs associated with contact 1234 (since the definitionId of 9 is the "contact to engagement" association):

GET
https://api.hubapi.com/crm-associations/v1/associations/1234/HUBSPOT_DEFINED/9

Isaac Takushi

Associate Certification Manager
0 Upvotes