APIs & Integrations

Jarro
Member

Getting more info for activities from the API

SOLVE

Hi everyone. I'm very new to Hubspot and I'm working on an integration and just had some questions about the API responses for some endpoints. On my test account I created a sample task, logged a call and logged a meeting with a sample contact of mine. When I query the API for these activties, they get returned but with only basic properties: create date, last modified and id. I would also like to see the other fields that you typically see on the front end on Hubspot such as the outcome of my calls and meetings, whether a task is completed yet or not etc. Is there a way to make the responses of these endpoints more verbose, or maybe can I get the missing properties from another endpoint? Any assistance would be appreciated.

Thanks in advance!

0 Upvotes
1 Accepted solution
Jaycee_Lewis
Solution
Community Manager
Community Manager

Getting more info for activities from the API

SOLVE

Hey, @Jarro 👋 Welcome to the community. These endpoints mostly all behave the same way. Meaning, you'll need to specify the properties you want returned. Or you'll only get back a small subset of default properties. 

 

You'll need to make a request to the Properties API to get a list of all the properties. Then you can include them in your request param or in the request body, depending on the endpoint you use. Just make sure you use the internal value (`name` in the API response from the Properties API) and not the label.

Example — “hs_created_by” (correct) versus “Created by:” (incorrect).

 

Example Request to the Properties API:

curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/properties/notes?archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

 

Example Request to the Notes API (including an additional property — “hs_created_by”):

curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/objects/notes/32628797339?properties=hs_created_by&archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

Response:

HTTP 200

{
  "id": "32628797339",
  "properties": {
    "hs_created_by": "10233975",
    "hs_createdate": "2023-03-17T20:33:25.196Z",
    "hs_lastmodifieddate": "2023-03-17T20:33:25.196Z",
    "hs_object_id": "32628797339"
  },
  "createdAt": "2023-03-17T20:33:25.196Z",
  "updatedAt": "2023-03-17T20:33:25.196Z",
  "archived": false
}

 

I hope this helps get you moving forward! — Jaycee

 


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !

View solution in original post

0 Upvotes
2 Replies 2
Jaycee_Lewis
Solution
Community Manager
Community Manager

Getting more info for activities from the API

SOLVE

Hey, @Jarro 👋 Welcome to the community. These endpoints mostly all behave the same way. Meaning, you'll need to specify the properties you want returned. Or you'll only get back a small subset of default properties. 

 

You'll need to make a request to the Properties API to get a list of all the properties. Then you can include them in your request param or in the request body, depending on the endpoint you use. Just make sure you use the internal value (`name` in the API response from the Properties API) and not the label.

Example — “hs_created_by” (correct) versus “Created by:” (incorrect).

 

Example Request to the Properties API:

curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/properties/notes?archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

 

Example Request to the Notes API (including an additional property — “hs_created_by”):

curl --request GET \
  --url 'https://api.hubapi.com/crm/v3/objects/notes/32628797339?properties=hs_created_by&archived=false' \
  --header 'authorization: Bearer YOUR_ACCESS_TOKEN'

Response:

HTTP 200

{
  "id": "32628797339",
  "properties": {
    "hs_created_by": "10233975",
    "hs_createdate": "2023-03-17T20:33:25.196Z",
    "hs_lastmodifieddate": "2023-03-17T20:33:25.196Z",
    "hs_object_id": "32628797339"
  },
  "createdAt": "2023-03-17T20:33:25.196Z",
  "updatedAt": "2023-03-17T20:33:25.196Z",
  "archived": false
}

 

I hope this helps get you moving forward! — Jaycee

 


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes
Jarro
Member

Getting more info for activities from the API

SOLVE

Hey @Jaycee_Lewis
Thanks for the quick reply, this answers my question perfectly. I managed to see all available properties for my calls so I just need to cover the rest of my activities.

Appreciate the assistance, have a great day 🙏
- Jarro

0 Upvotes