APIs & Integrations

YUtkina
Member

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

0 Upvotes
1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

Properties

Hi, @YUtkina 👋 You certainly can! Here's one approach:

  • Create a custom property — API | In-app
  • Note the internal value (screenshot)
    CleanShot 2022-12-13 at 14.07.28.png
  • 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
    CleanShot 2022-12-13 at 14.16.05.png

     

  • 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
    }​

    CleanShot 2022-12-13 at 14.10.28.png

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





loop


Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.

Learn More




0 Upvotes