APIs & Integrations

Not applicable

Entity ID Uniqueness

We are writing an app that pulls down contact information via the API and stores it in our database.

I’m assuming that we cannot count on entity ids being unique across portals (since I see contact vids that are very low). Is this true?

When thinking about an App that may be installed by multiple portals I’m thinking the ID we store on our end should be prefixed with the portal’s id. Something like <portal_id>_ for contacts. Thoughts?

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Entity ID Uniqueness

Hi @homerlex,

You’re correct; contact, company, and deal IDs are only unique in a given portal. They are also only unique within their object type (i.e. a contact record and a company record may both have a vid and companyId of 100). Storing these IDs with the portal ID and object type would make sense.

0 Upvotes