APIs & Integrations

artemida
メンバー

Get Contacts at a Company missing properties

If I try to get all contacts via "/contacts/v1/contact/vids/batch?vid=XXXXX" endpoint, I will get all contact's properties. (https://developers.hubspot.com/docs/methods/contacts/get_batch_by_vid)
If I try to get all contacts via "/companies/v2/companies/{companyId}/contacts" , the same contacts I retrieve in the first endpoint do not have all set properties in the "properties" field. (https://developers.hubspot.com/docs/methods/companies/get_company_contacts)
Is there something I am missing or are the properties meant to lack information on this endpoint?

0 いいね!
3件の返信
Derek_Gervais
元HubSpot社員
元HubSpot社員

Get Contacts at a Company missing properties

Hi @artemida,

I just touched base with the team and did a bit more testing on this endpoint, and it actually appears that the documentation is out of date, and doesn't correctly reflect the functionality of this endpoint. This endpoint returns only the firstname, lastname, company, and lastmodifieddate properties by default. This is to increase performance for companies with a large number of associated contacts, and is the intended behavior of this endpoint.

This endpoint can also accept &property= query parameters, which will allow you to specify which contact properties are included in the response. This is also the intended behavior, so you can specify whichever properties you'd like to include.

I'll work on updating the documentation; if you have any questions, please don't hesitate to post again in this thread.

0 いいね!
artemida
メンバー

Get Contacts at a Company missing properties

Hi @Derek_Gervais,

HubId : 62515

AssociatedContacts endpoint returns contacts similar to :
"contacts": [{
"identities": [{
"vid": 872724,
"identity": [{
"value": "0049d3d2-db8c-41fa-82de-9b0794e18923",
"type": "LEAD_GUID",
"timestamp": 1456391892091
}, {
"value": "juanignaciosl-ded-05-1940@test-org.com",
"type": "EMAIL",
"timestamp": 1456391892089,
"isPrimary": true
}
],
"linkedVid": []
}
],
"properties": [{
"name": "firstname",
"value": "Ganesh",
"sourceVid": []
}, {
"name": "lastmodifieddate",
"value": "1529061693743",
"sourceVid": []
}, {
"name": "company",
"value": "1-800-Flowers.com",
"sourceVid": []
}, {
"name": "lastname",
"value": "",
"sourceVid": []
}
],
"formSubmissions": [],
"listMembership": [],
"vid": 872724,
"portalId": 62515,
"isContact": true,
"vids": [],
"imports": [],
"publicToken": "XXXXXX",
"canonicalVid": 872724,
"mergeAudit": [],
"mergedVids": [],
"campaigns": [],
"stateChanges": []
}
]

As you can see, only 4 properties, and requesting this in the BatchContacts endpoint , will return all properties ( as much as 1000 ).

0 いいね!
Derek_Gervais
元HubSpot社員
元HubSpot社員

Get Contacts at a Company missing properties

HI @artemida,

Just to make sure that we're on the same page, you're seeing properties from the batch contact endpoint (/contacts/v1/contact/vids/batch) that do not appear from the associated contacts endpoint (companies/v2/companies/get_company_contacts), is that right?

By default, the batch contact endpoint should return all properties for which a contact record has a value. Similarly, the associated contacts endpoint should return the full contact profile. Can you give me your Hub ID and some example records that I can take a look at?

0 いいね!