Trying to work on a .NET client for HubSpot API but I continuously find issues with the lack of consistency across the whole API surface.
The contact object has a property called “canonical-vid” if retrieved via the “get contact by ID” but if you retrieve it as the list of contacts belonging to a company, it’s called “canonicalVid”
Same goes for when retrieving the full list of companies or just the recently updated ones (“companies” vs “results”).
Another one, not as serious because it doesn’t mess up with the model generation, but still.
When querying for a Contact or a group of them, you can specify the desired properties by adding one or more “property” item in the querystring.
When querying for All companies, you the querystring part to add is “properties”, to be added once for each property.
As far as I’m aware, there isn’t a particular reason for a discrepancy in those cases. I’d be happy to take a look into some of these discrepancies if you can send me the two endpoints that return different results. It sounds like these two are:
Get contact by ID vs. Get contacts in a list (?)
Get all companies vs. Get recently updated companies
I’m working on creating a .NET wrapper for the HubSpot REST API and so far I’ve worked only on Contacts and Companies APIs.
But yes, a contact in the list of contacts (or even when you get it by ID) has its properties in a hashset (property name as key), contacts returned by the list of contacts of a company have their properties in a flat array (property name as property).