Not getting all the wanted fields from contacts

Hi,

I am using the postman code below the retrieve all my contacts with (all) wanted fields, but I don’t get them all.

How do I get ALL fields from contacts

{

"filterGroups": \[

    {

        "filters": \[

            {

                "value": "0",

                "propertyName": "lastmodifieddate",

                "operator": "GTE"

            }

        ]

    }

],

"properties": \[

    "createdate",

    "email",

    "firstname",

    "hs\_object\_id",

    "lastmodifieddate",

    "lastname",

    "company",

    "contactowner",

    "customer\_code\_sap",

    "website",

    "phone",

    "companyname"

],

"limit": "100"

}

I get (partial answer)

{

"total": 22,

"results": \[

    {

        "id": "1",

        "properties": {

            "company": "HubSpot",

            "createdate": "2021-05-11T07:02:08.438Z",

            "customer\_code\_sap": null,

            "email": "emailmaria@hubspot.com",

            "firstname": "Maria",

            "hs\_object\_id": "1",

            "lastmodifieddate": "2021-08-04T09:10:06.850Z",

            "lastname": "Johnson (Sample Contact)",

            "phone": null,

            "website": "http://www.HubSpot.com"

        },

        "createdAt": "2021-05-11T07:02:08.438Z",

        "updatedAt": "2021-08-04T09:10:06.850Z",

        "archived": false

    },

    {

        "id": "51",

        "properties": {

            "company": "HubSpot",

            "createdate": "2021-05-11T07:02:08.798Z",

            "customer\_code\_sap": null,

            "email": "bh@hubspot.com",

            "firstname": "Brian",

            "hs\_object\_id": "51",

            "lastmodifieddate": "2021-08-09T04:19:36.811Z",

            "lastname": "Halligan (Sample Contact)",

            "phone": null,

            "website": "http://www.HubSpot.com"

        },

        "createdAt": "2021-05-11T07:02:08.798Z",

        "updatedAt": "2021-08-09T04:19:36.811Z",

        "archived": false

    },

…

Regard s

Ad

Hi @AdKerremans ,
Please make sure, your property key should be correct then it will be shown required list.

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.

Hi @webdew ,

I just want ALL the properties, how can I do that?

Thanks and Regards

@AdKerremans While there may be a better way to tackle this request, we have a process that first retrieves the full list of properties from HubSpot (GET /crm/v3/properties/{objectType}) and saves those to a database table. We then aggregate all of the rows into a single comma-separated string and call the Contacts API endpoint (search, get specific contact, etc) and concatenate that comma separated list of properties in the request body. This pulls back all contacts that meet our criteria along with all of the current properties in HubSpot.

From there we save the results to a file and parse out specific properties to load to our database tables.

Hopefully this helps.

Hi @KyleParker ,

Thanks, This is what I was looking for