How to find key of person custom field when using "Search persons"

Hi,

we have created several custom_fields for a person and not all of them are filled for every contact. When I search for a person the response for the custom_fields look like this:

“custom_fields”: [
“Lorem ipsum”,
“Lorem ipsum2”,
“Lorem ipsum3”,
“Lorem ipsum4”
],

there is no id in order to distinguish from which field this data is coming. I really can’t understand why or what the API dev team was thinking when they left out the id of the custom_field. Is it really a big problem to make it like:

“custom_fields”: [
“2025da19a7345d63069409c8d325f4a17f62d221”: “Lorem ipsum”,
“2025da19a7345d63069409c8d325f4a17f62d2df”: “Lorem ipsum2”,
“2025da19a7345d63069409c8d325f4a17f62d2eg”: “Lorem ipsum3”,
“2025da19a7345d63069409c8d325f4a17f62d2ef”: “Lorem ipsum4”,
],

Or did I miss something?

1 Like

Hey Cihan,

You do need to run GET/personFields first to grab the ID numbers, but I’ve sent your feedback to our dev team.

Hi David,

thanks for your reply! I think there is a misunderstanding. I know how the grab the ids of personFields but my problem is about the response you get if you run GET/persons/search and there the values of all custom_fields are returned without any way to find out to which personField the returned custom_fields value is associated.

Ah, okay. Now I see what you mean. Let me talk to the team in charge of that endpoint and see if we can create a task to provide IDs there.

1 Like

Hey again

After talking with the team, they are aware of the limitation and are currently hoping to get this added in the upcoming 6 months or so.

1 Like

Alrighty, thank you so much for asking!

1 Like

Any update on this? It’s well past the six months, and it’s still not right. Consequently, another request is required for each returned item in order to get any reliable data from the search results.

1 Like