Properties

Hello. My name is Yuliia and I’m BA at upSWOT. We are currently working on integrating your Hubspot system.

Upswot technology serves dozens of financial institutions helping them to build loyalty and grow engagement among their SMB clients.

And I have the next question:
If I add my own field in the company or contact property list like ‘‘favorite colour’’, can I get this field with an API call, for example “get all companies”

Thanks

Hi, @YUtkina :waving_hand: You certainly can! Here’s one approach:

  • Create a custom property — API | In-app
  • Note the internal value (screenshot)

  • For an example, let’s use this endpoint — Get Company by ID
  • You’ll add your custom property, using the internal value, as a query param

  • Example request

    curl --request GET \
     --url 'https://api.hubapi.com/crm/v3/objects/companies/10202231595?properties=favorite_colour&archived=false' \
     --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​
    
  • Example response + screenshot

    HTTP 200
    
    {
     "id": "10202231595",
     "properties": {
     "createdate": "2022-11-29T19:11:16.389Z",
     "favorite_colour": "Green",
     "hs_lastmodifieddate": "2022-12-13T21:09:42.268Z",
     "hs_object_id": "10202231595"
     },
     "createdAt": "2022-11-29T19:11:16.389Z",
     "updatedAt": "2022-12-13T21:09:42.268Z",
     "archived": false
    }​
    

You can do the same with other endpoints as well by including the custom property. Either as a query param or in the body request, depending on the endpoint.

Have fun building! — Jaycee