Answered

contacts/search API sometimes does not return output for query filter ?

  • 22 April 2021
  • 6 replies
  • 48 views

I am using contact/search API with query using created_at filter. 

My question is, when I query the record using created_at filter for newly created record and I am not getting records. 

but when I query the record using previous day UNIX timestamp for newly created_at record, 

I am able to get record or sometimes I am not able to get records on both scenarios

 

Is there any issue on API side ?

 

Below is my query 

Endpoint: https://api.intercom.io/contacts/search /p>

method: POST

BODY -> JSON format

{

  "query":{

        "field": "created_at",

        "operator": "=",

        "value": "1619049600"

  }

}

 

 

docs link

https://developers.intercom.com/intercom-api-reference/reference#search-for-contacts/p>

icon

Best answer by Roy 23 April 2021, 09:36

View original

6 replies

Userlevel 1
Badge

Hello @priya n​ 👋,

 

Please, take a look at the following notice in the Intercom developer doc:

Intercom

@roy s11​  Thanks for reply.

 

Yes I am aware that notice for intercom developer docs and use it while forming query and requesting data from intercom. But still I face the issue on random occasion.

 

Yesterday I created one contact and tried to search using = operator and same day UNIX timestamp but still I am unable to get records.

@roy s11​ Find below query for your understanding

 

Today I have created one user name "John molton" for e.g. (23-04-2021 (DD/MM/YYYY)

as per docs and timestamp notice if I want to get above record I have to search using eq(=) operator and same day UNIX timestamp.

Please find my postman call below

contact-search-api 

my UNIX timestamp is 1619136000 which equal to

timestamp 

but still I am not able to get record.

 

Please kindly help on above scenarios.

Userlevel 1
Badge

@priya n​ , I just now tested this out, on my end everything seams to working fine.

 

1) Created contact: Time Tester / time@test.com

2) Send the request following request:

===================================

{

 "query": {

  "field": "created_at",

  "operator": "=",

  "value": "1619136000"

 }

}

===================================

3) Get the created contact.

 

One question, how you created the contact? via API call?

Can you try to create contact directly from Intercom?

intercom

@roy s11​  Thanks for promptly reply.

 

Yes I have created the contact from the Intercom (UI).

 

Yes I also tried but but it seems it working right now actually.

I have created 2 record 1 in morning and 1 just now before posting comment but I am getting only one record while querying. (which is just created)

 

We are encountering the issue that contact/search API work randomly.

Day before yesterday it was working but from yesterday it was not returning any record. Now it is returning value but not all just one value.

 

Please kindly provide help on that.

 

Thanks in advance.

@roy s11​  Any Update on above query ??

Reply