API select help needed
I am executing this API call which specifies the fields to be selected, but the return data still includes all fields. What am I doing wrong?
https://crw.org/sys/api/v2/accounts/[MY ACCOUNT ID]/contacts?$async=false&$select='First name','Last name',Phone
-
Hello!
You request seems to be fine, but there is a small exception for returned fields: Fields with SystemCode like LastUpdated, SystemRulesAndTermsAccepted, FirstName, LastName, Email are always returned back, even if not selected.
for instance request
/Contacts?$async=false&$top=20&$select='Custom Field 298'
will return"FieldValues": [
{
"FieldName": "Profile last updated",
"Value": "2020-10-27T21:51:26.173+00:00",
"SystemCode": "LastUpdated"
},
{
"FieldName": "Terms of use accepted",
"Value": false,
"SystemCode": "SystemRulesAndTermsAccepted"
},
{
"FieldName": "First name",
"Value": "We are located in the his",
"SystemCode": "FirstName"
},
{
"FieldName": "Last name",
"Value": " and take a selfie in the",
"SystemCode": "LastName"
},
{
"FieldName": "e-Mai",
"Value": "",
"SystemCode": "Email"
},
{
"FieldName": "Custom Field 298",
"Value": null,
"SystemCode": "custom-17305834"
}
],