The read behind the Contacts page. It finds contacts by list (listid), tag (tagid, or filters[tagName] for a tag name), list status (status), text (search matches name, email, phone and account name), segment (segmentid), form (formid), automation (seriesid), or created and updated date (filters[created_after], filters[created_before], filters[updated_after], filters[updated_before]). Filters combine, except that while segmentid is set only status and search still apply and the other filters are ignored, and tagid and filters[tagName] cannot be sent together. GET /contactTags and GET /contactLists return association rows, not contacts. Use only the query parameters documented here: unsupported filter and order fields are silently ignored, so the response looks filtered but is not. The API spellings firstName, lastName and owner are accepted as filter keys, but order keys take only the column spellings: orders[lastName] is ignored, orders[last_name] works. Results are paginated: limit defaults to 20 and is capped at 100; page with offset, or walk a large set with id_greater. Results come back sorted by email ascending unless an orders[...] key says otherwise. To fetch one contact by id, use GET /contacts/{id}. To count the contacts a query matches without fetching records, send meta=only and read meta.total. There is no filter on when a contact's list status changed: filters[updated_after] and filters[updated_before] use the contact record's last-modified date (udate). That date moves on any save of the record, including a PUT /contacts/{id} that changes nothing, and, through database triggers, on list, tag, custom field, score, note and task changes, however they are made. A window on it counts every contact touched in that window, not the contacts whose status changed, so it over-counts new unsubscribes or bounces. A count filtered only by status on an account with millions of contacts scans every contact and can take longer than ten seconds. Archived contacts, the contacts that have been deleted, are never returned whatever the status value; list them with GET /contactArchives.
Organization-Related Nodes Have Been DeprecatedContact-Organization relationships are now managed through Account-Contact end points
Performance Tip for PaginationAccounts with many Contacts may encounter slower responses when using the
offsetparameter to paginate with this endpoint. For best performance sort usingorders[id]=ASCand use theid_greaterparameter to paginate. This is especially important when calling this endpoint frequently, such as when retrieving many or all Contacts from an account.Note that when using the
segmentidparameter, best performance will be achieved by: paginating using theoffsetparameter and not using anyordersparameter.
{
"contacts":[
{
"cdate":"2017-01-25T23:58:14-06:00",
"email":"[email protected]",
"phone":"3120000000",
"firstName":"John",
"lastName":"Doe",
"orgid":"0",
"segmentio_id":"",
"bounced_hard":"0",
"bounced_soft":"0",
"bounced_date":"0000-00-00",
"ip":"0",
"ua":"",
"hash":"31e076c964f4262817f9ba302c96e1c6",
"socialdata_lastcheck":"0000-00-00 00:00:00",
"email_local":"",
"email_domain":"",
"sentcnt":"0",
"rating_tstamp":"0000-00-00",
"gravatar":"3",
"deleted":"0",
"adate":"2017-02-22 15:26:24",
"udate":"2017-01-25T23:58:14-06:00",
"edate":"2017-01-27 14:44:13",
"scoreValues":[
],
"links":{
"bounceLogs":"https://:account.api-us1.com/api/:version/contacts/68/bounceLogs",
"contactAutomations":"https://:account.api-us1.com/api/:version/contacts/68/contactAutomations",
"contactData":"https://:account.api-us1.com/api/:version/contacts/68/contactData",
"contactGoals":"https://:account.api-us1.com/api/:version/contacts/68/contactGoals",
"contactLists":"https://:account.api-us1.com/api/:version/contacts/68/contactLists",
"contactLogs":"https://:account.api-us1.com/api/:version/contacts/68/contactLogs",
"contactTags":"https://:account.api-us1.com/api/:version/contacts/68/contactTags",
"contactDeals":"https://:account.api-us1.com/api/:version/contacts/68/contactDeals",
"deals":"https://:account.api-us1.com/api/:version/contacts/68/deals",
"fieldValues":"https://:account.api-us1.com/api/:version/contacts/68/fieldValues",
"geoIps":"https://:account.api-us1.com/api/:version/contacts/68/geoIps",
"notes":"https://:account.api-us1.com/api/:version/contacts/68/notes",
"organization":"https://:account.api-us1.com/api/:version/contacts/68/organization",
"plusAppend":"https://:account.api-us1.com/api/:version/contacts/68/plusAppend",
"trackingLogs":"https://:account.api-us1.com/api/:version/contacts/68/trackingLogs",
"scoreValues":"https://:account.api-us1.com/api/:version/contacts/68/scoreValues"
},
"id":"68",
"organization":null
},
{
"cdate":"2017-02-09T12:14:58-06:00",
"email":"[email protected]",
"phone":"",
"firstName":"Aaron",
"lastName":"Allen",
"orgid":"14",
"segmentio_id":"",
"bounced_hard":"0",
"bounced_soft":"0",
"bounced_date":"0000-00-00",
"ip":"0",
"ua":"",
"hash":"31b92c033c3e55de6d9eb9c44ee1bfa5",
"socialdata_lastcheck":"0000-00-00 00:00:00",
"email_local":"",
"email_domain":"",
"sentcnt":"0",
"rating_tstamp":"0000-00-00",
"gravatar":"1",
"deleted":"0",
"adate":"2017-03-16 13:18:12",
"udate":"2017-02-09T12:14:58-06:00",
"edate":"0000-00-00 00:00:00",
"scoreValues":[
],
"accountContacts": [
"1"
],
"links":{
"bounceLogs":"https://:account.api-us1.com/api/:version/contacts/73/bounceLogs",
"contactAutomations":"https://:account.api-us1.com/api/:version/contacts/73/contactAutomations",
"contactData":"https://:account.api-us1.com/api/:version/contacts/73/contactData",
"contactGoals":"https://:account.api-us1.com/api/:version/contacts/73/contactGoals",
"contactLists":"https://:account.api-us1.com/api/:version/contacts/73/contactLists",
"contactLogs":"https://:account.api-us1.com/api/:version/contacts/73/contactLogs",
"contactTags":"https://:account.api-us1.com/api/:version/contacts/73/contactTags",
"contactDeals":"https://:account.api-us1.com/api/:version/contacts/73/contactDeals",
"deals":"https://:account.api-us1.com/api/:version/contacts/73/deals",
"fieldValues":"https://:account.api-us1.com/api/:version/contacts/73/fieldValues",
"geoIps":"https://:account.api-us1.com/api/:version/contacts/73/geoIps",
"notes":"https://:account.api-us1.com/api/:version/contacts/73/notes",
"organization":"https://:account.api-us1.com/api/:version/contacts/73/organization",
"plusAppend":"https://:account.api-us1.com/api/:version/contacts/73/plusAppend",
"trackingLogs":"https://:account.api-us1.com/api/:version/contacts/73/trackingLogs",
"scoreValues":"https://:account.api-us1.com/api/:version/contacts/73/scoreValues"
},
"id":"73",
"organization":"14"
}
],
"meta":{
"total":"2",
"page_input":{
"segmentid":null,
"formid":0,
"listid":0,
"tagid":0,
"limit":20,
"offset":0,
"search":null,
"sort":null,
"seriesid":0,
"waitid":0,
"status":-1,
"forceQuery":0,
"cacheid":"895202850f4ca4144513c0962812f951"
}
}
}