APIs & Integrations

Mreddy1
Member

Using HUBspot contact API getting some columns

In Hubspot we have nearly 300 columns but accessing from Hubspot API(https://api.hubapi.com/contacts/v1/lists/all/contacts/all) we are getting only some columns.

Hubspot API demo call
https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo&count=2

Both API are returning same number of columns but we need more columns to be added in hubspot API call.

Example JSON output:
{
"contacts": [
{
"addedAt": 1390574181854,
"vid": 204727,
"canonical-vid": 204727,
"merged-vids": [

  ],
  "portal-id": 62515,
  "is-contact": true,
  "profile-token": "AO_T-mMusl38dq-ff-Lms9BvB5nWgFb7sFrDU98e-3CBdnB7G2qCt1pMEHC9zmqSfOkeq2on6Dz72P-iLoGjEXfLuWfvZRWBpkB-C9Enw6SZ-ZASg57snQun5f32ISDfLOiK7BYDL0l2",
  "profile-url": "https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMusl38dq-ff-Lms9BvB5nWgFb7sFrDU98e-3CBdnB7G2qCt1pMEHC9zmqSfOkeq2on6Dz72P-iLoGjEXfLuWfvZRWBpkB-C9Enw6SZ-ZASg57snQun5f32ISDfLOiK7BYDL0l2/",
  "properties": {
    "firstname": {
      "value": "Bob"
    },
    "lastmodifieddate": {
      "value": "1483461406481"
    },
    "company": {
      "value": ""
    },
    "lastname": {
      "value": "Record"
    }
  },
  "form-submissions": [
    
  ],
  "identity-profiles": [
    {
      "vid": 204727,
      "saved-at-timestamp": 1476768116149,
      "deleted-changed-timestamp": 0,
      "identities": [
        {
          "type": "LEAD_GUID",
          "value": "f9d728f1-dff1-49b0-9caa-247dbdf5b8b7",
          "timestamp": 1390574181878
        },
        {
          "type": "EMAIL",
          "value": "mgnew-email@hubspot.com",
          "timestamp": 1476768116137
        }
      ]
    }
  ],
  "merge-audits": [
    
  ]
},

We have more columns in hubspot like "Last Contacted","Lead Status","Hospital name" etc.

Please help me on this.

0 Upvotes
1 Reply 1
mfleming-app
Participant

Using HUBspot contact API getting some columns

The output you posted is from the "Contacts from List" api.

If you take the emails from 'Contacts from List' and run them through the "Get Contacts Via Email", you'll get all the columns you are looking for.

I should mention - it may be easier to use the 'Get Contacts By Id' endpoint. When using 'Contacts from List', the Vid isn't nested, which makes it a little simpler to do the lookup.