Skip to main content
Answered

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


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>

Best answer by Roy

@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

View original
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • April 22, 2021

Hello @priya n​ 👋,

 

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

Intercom


  • Author
  • New Participant
  • 4 replies
  • April 23, 2021

@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.


  • Author
  • New Participant
  • 4 replies
  • April 23, 2021

@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.


Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • Answer
  • April 23, 2021

@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


  • Author
  • New Participant
  • 4 replies
  • April 23, 2021

@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.


  • Author
  • New Participant
  • 4 replies
  • April 26, 2021

@roy s11​  Any Update on above query ??


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings