Getting type info for "Conversion Information" field

Hi there,

We’re using contacts/v1/contact/vid//profile to get Contact properties.
In this case, HubSpot returns fields for both Contact Information group and Conversion Information group.

But then we want to get types data and use request to /properties/v1/contacts/properties.
In this case, HubSpot returns data only for Contact Information group, not Conversion Information group.
This causes problems to properly recognize dates from Conversion Information group.

Is there a way to get types information for Contact Information group fields?
Maybe there is a better approach overall to achieve the same result?

Thanks!

Hi @Aleksej.Ruckoj,

I’m not sure I understand. Are you pulling all contact properties using the Contact Properties API? This should return all properties from all property groups. Can you give me some more info on what you’re trying to accomplish?

developers.hubspot.com

Get all contacts properties | Contacts properties API

GET /properties/v1/contacts/properties - Properties in HubSpot are fields that have been created, in this case for deals in a given portal. This endpoint will return all of the deal properties, including their definition, for a given portal.

Hi @Derek_Gervais,

Our use case is pretty simple - we just want to get all Contact properties and pass them to our system.
The problem that we’ve encountered goes like this:

  1. We’re creating a custom property “my date” inside Conversion Information group
  2. Then we’re using “Get a contact record by its vid” (https://developers.hubspot.com/docs/methods/contacts/get_contact) and receive this property back:

  1. Then we want to understand properties types and are using “Get All Contacts Properties” (https://developers.hubspot.com/docs/methods/contacts/v2/get_contacts_properties).
    But this type “my date” and its type is not there so we can’t understand that this is actually a date and have to treat it as a number.

Thanks for your help,
Aleksej

Hi @Aleksej.Ruckoj,

I believe I understand. HubSpot has two types of contact properties for storing times, date and datetime. Any properties created in the HubSpot application in Contact Settings would be date properties. Date properties will only store the date, and must be set to midnight UTC for the date you want. Datetime properties can store any time, so any valid millisecond timestamp would be accepted. When you pull all contact properties (/properties/v1/contacts/properties) each property will have a type field. The type isn’t included when pulling a contact by vid (/contacts/v1/contact/vid/:vid/profile).

developers.hubspot.com

How should timestamps be formatted for HubSpot’s APIs?

HubSpot API endpoints accept UNIX formatted timestamps in milliseconds. Most scripting languages have built-in functions or existing libraries that handle time conversion, but you must ensure that your timestamp values are in the correct UNIX…

Hi @Derek_Gervais,

You’re absolutely correct.
The problem is, that for some reason we’re not seeing the custom property in the response from /properties/v1/contacts/properties.

Could you please advice how can we get it?

Hi @Aleksej.Ruckoj,

If you’re not seeing your property in the response from that endpoint, it likely means that there’s a mixup with the portal(s) you’re making requests to. Can you send me your Hub ID and the name of the property you’re referring to?

Hi @Derek_Gervais,

I’ve finally understood what was the problem.
Thanks a lot for your help, it showed the right way!