Support,
I am trying to build a Clio API call that returns all contacts with the name “James Town”. I have reviewed the documentation (https://docs.developers.clio.com/api-reference/#tag/Contacts/operation/Contact#index). It looks like I can do this using the “query” QUERY PARAMETER. But I cannot find any documentation on the syntax of “query."
I have tested many syntaxes in Postman, but I cannot figure it out. Can you direct me to documentation explaining how to use the “query” QUERY PARAMETER?
This call:
https://app.clio.com/api/v4/contacts.json
returns all contacts, including:
{
"meta": {
"paging": {},
"records": 138
},
"data": [
{
"id": 1418254789,
"name": "James Town",
"initials": "J",
"type": "Company",
"etag": "\"5488d9c56043945c6a68f6d0d2c36334\""
},
But these calls return zero results:
https://app.clio.com/api/v4/contacts.json?query="name"="James Town”
https://app.clio.com/api/v4/contacts.json?query=name="James Town”
https://app.clio.com/api/v4/contacts.json?query=name:"James Town”
Thank you,
Scott Brenner
The functionality of this thing is kind of a mess, and not at all what one might think from an API, but consider the behaviour one might want from a user interface.
"Wildcard Search" means that the database is performing a "Where like '%criteria%" search against the fields listed for the object in question.
So, when the Contact API says that it will 'wildcard search for name, title, email address, address, phone number, web site, instant messenger address, custom fields, related matter name, or company name matching a given string.' That means it will search absolutely every one of those fields for where like %criteria%. Searching for names alone will return far more rows than you might like for a broadly applicable search string.