APIs & Integrations

pbmartin
Contributeur

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

Résolue

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 Votes
1 Solution acceptée
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

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

Résolue

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?

Voir la solution dans l'envoi d'origine

2 Réponses
GFaircloth5
Participant

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

Résolue

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

0 Votes
dennisedson
Solution
Équipe de développement de HubSpot
Équipe de développement de HubSpot

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

Résolue

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?