APIs & Integrations

pbmartin
Mitwirkender/Mitwirkende

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

lösung

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 Akzeptierte Lösung
dennisedson
Lösung
HubSpot-Produktteam
HubSpot-Produktteam

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

lösung

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?

Lösung in ursprünglichem Beitrag anzeigen

2 Antworten
GFaircloth5
Teilnehmer/-in

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

lösung

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

0 Upvotes
dennisedson
Lösung
HubSpot-Produktteam
HubSpot-Produktteam

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

lösung

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?