All contacts with custom field values

Is there a way to retrieve all contacts and include custom field values at the same time?

1 Like

Good question! I believe there is. Let me investigate this, and will get back to you shortly.

This is possible with sideloading.

Make a GET request to https://{{yourAccountName}}.api-us1.com/api/3/contacts?include=fieldValues

you’ll get back all accounts, as well as the fieldValues you’re looking for:

    "fieldValues": [
        {
            "contact": "17",
            "field": "3",
            "value": "Foo Bar",
            "cdate": "2022-02-18T11:16:46-06:00",
            "udate": "2022-02-18T11:16:46-06:00",
            "created_by": null,
            "updated_by": null,
            "links": {
                "owner": "https://:account.api-us1.com/api/3/fieldValues/13/owner",
                "field": "https://:account.api-us1.com/api/3/fieldValues/13/field"
            },
            "id": "13",
            "owner": "17"
        },
        {
            "contact": "16",
            "field": "3",
            "value": "Kittens!",
            "cdate": "2022-02-18T11:58:08-06:00",
            "udate": "2022-02-18T11:58:08-06:00",
            "created_by": null,
            "updated_by": null,
            "links": {
                "owner": "https://:account.api-us1.com/api/3/fieldValues/14/owner",
                "field": "https://:account.api-us1.com/api/3/fieldValues/14/field"
            },
            "id": "14",
            "owner": "16"
        }
    ],
1 Like

That’s fantastic, thanks for the help!