Null responses for search API

Hi, I’m trying to use the search API as the Freshsales/CRM API document at Freshsales | Refreshingly new CRM & Deal Management Software
Here is my API request for searching with string:

We get the response: []

For the string = word, the API works normally but it does not work with string = number.

Please advise me in this case.
Thanks.

1 Like

Hey @khucngoc12,

From the sample request you’ve given above, you’re trying to search using a phone number, please correct me if i’m wrong,

also from the sample response in the docs, it seems like phone number is a string, so maybe could you check, if the entity you’re searching is the of the same type in the response object.

this seems like the behaviour of the api rather than an error, as the response is an empty array.

Hope this helps!

Stay safe :slight_smile:

1 Like

Hi Velmurugan,
It is exactly a phone number. We also have a record is lead which comes with this phone number string.
But when we execute the API request, it responds null. But we do have one record, so it makes us confused.
We did this with the same API in other URL organizations, it works.
Any thoughts?

1 Like

@khucngoc12,

Does both the org URL have the same records and are of same types? could you please check that, if not maybe try adding the same records in the org that doesn’t work. if possible could you please share the record that is available in the portal, but doesn’t show up in the results.

Meanwhile i’ll forward this to the CRM team.

1 Like

We did try in multiple Org. And it does not happen on a record, every search request for the phone number (number string) get the same response (null).

Please take a look and get back to me soon.