APIs & Integrations

keerti
Member

Company properties

How to read custom fields of companies? 

 

We have created office property group and added status as custom field on hubspot API. Trying to read that property by running api but not getting any property named "status".

 

Please help. 

0 Upvotes
6 Replies 6
Willson
HubSpot Employee
HubSpot Employee

Company properties

Hi @keerti 

 

Would you be able to provide the request URL that you're working with then attempting to query this property? 

 

Looking into your Portal, I can see that there is a property labelled 'Status' that is a Contact Property but not a Company Property. Can you confirm this is the case and you're instead attempting to reference this property?

 

I hope this helps!

Product Manager @ HubSpot
0 Upvotes
keerti
Member

Company properties

Thanks for reply. I am using given below URL - 

 

https://api.hubapi.com/companies/v2/companies/?hapikey=dem2020-03-01.png

And trying to get values of above properties. 

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Company properties

Hi @keerti 

 

Thanks for providing this! Would you be able to confirm the Portal Id where these Company Properties are currently added? Thanks

Product Manager @ HubSpot
0 Upvotes
keerti
Member

Company properties

Portal id is - 

2820006
 
I want to get current value of given below property. 
 
 
 "name""status",
        "label""Status",
        "description""If the company is still actively using the app and should be in our sales funnel, mark it as active",
        "groupName""ignatiuz",
        "type""enumeration",
        "fieldType""radio",
        "optionsAreMutable"null,
        "isCustomizedDefault"false,
        "searchTextAnalysisMode"null,
        "textDisplayHint"null,
        "optionSortStrategy"null,
        "updatedUserId"3788946,
        "hidden"false,
        "options": [
            {
                "doubleData"null,
                "hidden"false,
                "description"null,
                "label""Active",
                "displayOrder"-1,
                "readOnly"false,
                "value""Active"
            },
            {
                "doubleData"null,
                "hidden"false,
                "description"null,
                "label""Inactive",
                "displayOrder"1,
                "readOnly"false,
                "value""Inactive"
            }
0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Company properties

Hi @keerti 

 

Thanks for providing this! To confirm, the call you're using is returning the details for the Property, Status but you're actually wanting the values for this property, is that correct? 

 

To confirm, the values that CAN be set for this property are listed in your initial response, see here: 

 {
            "readOnly": false,
            "doubleData": null,
            "label": "Active",
            "hidden": false,
            "description": null,
            "displayOrder": -1,
            "value": "Active"
        },
        {
            "readOnly": false,
            "doubleData": null,
            "label": "Inactive",
            "hidden": false,
            "description": null,
            "displayOrder": 1,
            "value": "Inactive"
        }

However, the individual values are actually stored against the respective object records, in this case, Company Records. We do not provide the means of fetching all values stored against a Property, instead, you can fetch the values by referencing the Company Records and retrieving the values stored against these records. 

 

I hope this helps!

Product Manager @ HubSpot
0 Upvotes
keerti
Member

Company properties

Thank you for your quick reply. Your help means a lot.

 

Can you please given me an example URL to fetch the values by referencing the Company Records and retrieving the values stored against these records?

0 Upvotes