If you want call of the contacts with a certain custom field written to it (let’s say id 52
), just leave out the &filters[val]=Spiders
part, and just have:
https://{{yourAccountName}}.api-us1.com/api/{{apiVersion}}/fieldValues?filters[fieldid]=52&include=owner
This will return the contacts, as well as objects like this:
You can see that contact 98
has field 52
populated with the team name Millsbury Reds
You can see that contact 99
has field 52
populated with the team name Spiders
You can see that contact 100
has field 52
not populated (not part of a team)
{
"contact": "98",
"field": "52",
"value": "Millsbury Reds",
"cdate": "2022-08-22T12:00:07-05:00",
"udate": "2022-08-22T12:01:36-05:00",
"created_by": "0",
"updated_by": "0",
"owner": "98",
"links": {
"owner": "https://yourAccountName.api-us1.com/api/3/fieldValues/243/owner",
"field": "https://yourAccountName.api-us1.com/api/3/fieldValues/243/field"
},
"id": "243"
},
{
"contact": "99",
"field": "52",
"value": "Spiders",
"cdate": "2022-08-22T12:27:39-05:00",
"udate": "2022-08-22T12:28:20-05:00",
"created_by": "0",
"updated_by": "0",
"owner": "99",
"links": {
"owner": "https://yourAccountName.api-us1.com/api/3/fieldValues/258/owner",
"field": "https://yourAccountName.api-us1.com/api/3/fieldValues/258/field"
},
"id": "258"
},
{
"contact": "100",
"field": "52",
"value": "",
"cdate": "2022-08-22T12:30:46-05:00",
"udate": "2022-08-22T12:30:46-05:00",
"created_by": null,
"updated_by": null,
"owner": "100",
"links": {
"owner": "https://yourAccountName.api-us1.com/api/3/fieldValues/273/owner",
"field": "https://yourAccountName.api-us1.com/api/3/fieldValues/273/field"
},
"id": "273"
},