0

What is the correct API syntax for using the custom_file_ids[] query parameter to specify multiple fields (but not all) in the CLIO API contacts result set? I need to specify multiple custom fields. I can get it to work for a single field, but not multiple fields at the same time.

Specifically, how do I specify and delimit the multiple fields? I have tried the following:

custom_file_ids[]=1234567,2345678
custom_file_ids[]=[1234567,2345678]
custom_file_ids[]=(1234567,2345678)
custom_file_ids[]={1234567,2345678}
custom_file_ids[]=1234567:2345678

The API documentation at https://app.clio.com/api/v4/documentation is silent on the list syntax that it expects.

Below is one specific API call I tried (both the actual URL-encoded call, and a decoded one for clarity) using a simple comma-delimited list, but which only returns custom field data for the first ID in the list--not the second. If I enclose the ID list in any kind of brackets (per above), the endpoint returns a 404 error.

https://app.clio.com/api/v4/contacts?custom_field_ids[]=1234567%2C2345678&custom_field_values[4529224]=true&fields=id%2Cname%2Cprimary_address%2Cprimary_work_address%2Cis_client%2Ctype%2C%20primary_email_address%2Cprimary_phone_number%2Ccustom_field_values%7Bid%2Cfield_type%2Cfield_name%2Cvalue%2Ccustom_field%7D

https://app.clio.com/api/v4/contacts?custom_field_ids[]=1234567,2345678&custom_field_values[4529224]=true&fields=id,name,primary_address,primary_work_address,is_client,type,primary_email_address,primary_phone_number,custom_field_values{id,field_type,field_name,value,custom_field}
RHR
  • 11
  • 2
  • I'm not sure why this question was downvoted. I too had this question as the documentation is very ambiguous. First it says for exclusions, exclude_ids[], "Filter Contact records to those who are not included in the given list of unique identifiers." The entire syntax and description seems to imply you would give it a list as excluded_ids[] = 1,2,3 or excluded_ids[]=[1,2,3]. This makes sense, writing excluded_ids[]=1&excluded_ids[]=2 makes no sense. What if the list is long? – gunnerman Oct 22 '19 at 17:30

1 Answers1

2

Try:

custom_file_ids[]=1234567&custom_file_ids[]=2345678

I was able to do this with Contacts Custom Fields by putting custom_field_id[] on the URL as many times as you have IDs.

I hope this helps.

richski
  • 21
  • 2