APIs & Integrations

pbmartin
Contributor

Company Custom Property - API Get Label Instead of Internal Value?

SOLVE

We added an enumerated property ("sector") to Companies and now would like to use the API to return the company's sector label, not the internal value.  How would I construct the URL?

 

Here's the URL that returns the internal value (among other properties):

{{baseUrl}}/crm/v3/objects/companies?hapikey=xx&limit=100&properties=name,city,state,domain,sector&archived=false

0 Upvotes
1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Company Custom Property - API Get Label Instead of Internal Value?

SOLVE

Hello @pbmartin 

I do not believe there is a way to construct the URL to get what you want.  You would have to call/crm/v3/properties/{objectType}/{propertyName} and get the label there.

@Mike_Eastwood , would you agree with that?

View solution in original post

2 Replies 2
GFaircloth5
Participant

Company Custom Property - API Get Label Instead of Internal Value?

SOLVE

Interesting solution, but doesn't look like Owner properties return their options which is a shame. Wonder why that is. 

0 Upvotes
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Company Custom Property - API Get Label Instead of Internal Value?

SOLVE

Hello @pbmartin 

I do not believe there is a way to construct the URL to get what you want.  You would have to call/crm/v3/properties/{objectType}/{propertyName} and get the label there.

@Mike_Eastwood , would you agree with that?