Skip to main content
Answered

1.How Intercom API handle timestamp in search query ? 2.Respnse data in array is not received in correct order for get all contact API despite mentioning order=desc key in qs.

  • January 13, 2021
  • 4 replies
  • 138 views

I am also facing weird kind of issue. what happened in my scenario is that is as below (API V is 2.3).

  1. As per docs intercom save timestamp data in UTC format
  2. when I pass the UTC timestamp to search API sometimes is does not return any result , but at the same time I pass the timestamp of my local region I got requested data . sometimes it happen vise-versa
  3. in GET All CONTACT API - when requested sometimes data come in ASC order despite mention order=DESC key in query-params

 

I am not sure what is happening at server but I am sure about date is correctly formatted from ISO string to UTC timestamp.

 

Please kindly provide help.

Best answer by Roy

Hello @vidyesh​ , I will answer you here.

Q - As per docs intercom save timestamp data in UTC format

A - If you are using API, you should use Unix timestamps.

Are you passing the timestamp encoded as the Unix timestamp?

 

More about Unix Time Stamp.

More information about Dates and Timestamps from Intercom Developer docs.

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

4 replies

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

Hello @vidyesh​ , I will answer you here.

Q - As per docs intercom save timestamp data in UTC format

A - If you are using API, you should use Unix timestamps.

Are you passing the timestamp encoded as the Unix timestamp?

 

More about Unix Time Stamp.

More information about Dates and Timestamps from Intercom Developer docs.


  • Author
  • New Participant
  • 3 replies
  • January 14, 2021

@Roy sh,

thank for reply.

 

Yes i am passing timestamp in UNIX encoded format. I use moment.js to get unix timestamp.

 

I use below method get UNIX timestamp

FOR START OF DAY

moment().utc().startOf('day').unix()

 

FOR CURRENT TIMESTAMP

moment().utc().unix();


Forum|alt.badge.img+5
  • Expert User
  • 1152 replies
  • January 15, 2021

@vidyesh​ , Sorry I have a busy day, missed your post here.

 

Q- when I pass the UTC timestamp to search API sometimes is does not return any result , but at the same time I pass the timestamp of my local region I got requested data . sometimes it happen vise-versa

A - Can you post a request when you are getting an empty result?


  • Author
  • New Participant
  • 3 replies
  • January 18, 2021

epoche-timestamp-proof.contact-search-with-data-GMT-1@Roy sh,

Sorry got so much busy on weekend. Unable to check on post.

yes I have replicate the issue please find the screenshot above.

 

 

 

 


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