Allow API users to specify a number format when creating a number property

When using the CRM API to create a number property, it seems they are always created with a default format of “Formatted number”. In the UI, I see that other options available, such as “Unformatted number”, “Currency”, and “Percentage”. It would be nice if there was a way to specify this other format in API calls.

Would be very helpful. I have to create the same property across multiple portals. So the missing currency option is a bit annoying.

+1 on this.

+1

I would like to extend this idea to include reading from the V3 properties API where the same issue is present.

The ‘read all properties’ API is very powerful for enabling integrations to obtain custom field schemas. However the V3 API has removed a critical field, previously ‘numberDisplayHint’ in the V2 API, which makes the V3 endpoint unusable for applications that need to parse values from HubSpot accurately. Within HubSpot a percentage custom field could be represented as a raw number, or a decimal. I.e. 40% could be either represented as 40 or 0.4 depending whether the user picks a ‘Percentage’ number format.

A concrete example

Our integration needs to extract custom fields from deal records so that we can intelligently update key metrics. However, to accurately parse the fields, it is essential to know whether they are percentages. Otherwise in the example above, 0.4 could be erroneously parsed as 0.4%.

In our case, we’ve had to revert to the V2 API which is a great shame as it means we have to use the pass through rather than the excellent, typed Node SDK methods.

I need to create a thousand custom properties. I’m surprised this is not available through the API. Appreciate if you could add this.

Hi all - You can now set and read number display format via the CRM Properties API. The numberDisplayHint field is available on both the create and update endpoints. The accepted values map directly to what you see in the UI.

Docs here: Create a property - HubSpot docs