Hi,
I have an API call to the search endpoint of the custom objects API (https://developer.zendesk.com/api-reference/custom-data/custom-objects-api/search/). I want to return records using a "like" sentence and my understanding from documentation is that you must use "contains" for that (https://developer.zendesk.com/api-reference/custom-data/custom-objects-api/search/#comparison-object). But in my case, it works as "eq". Example: The field to search is an string that can contains numbers so I want to return all records that have a number 2 in that string (e.g. AB2, 2AB...). If I use "$contains": "2", it returns no records. If I use "$contains": "AB2" or "$contains": "2AB", it returns one record.
Is that the expected behavior? If so, is there any way to get records back using a "like" instruction in a field that just contains one string?
Thanks.
Regards,
Lydia
Have you tried searching for 2 without the quotes? I believe that when you place the query value in quotes it treats it as a phrase search instead of a prefix search. It ends up looking for a phrase where the full value is 2 instead of just part of it.
Hope this helps!
Best,
Erica