APIs & Integrations

tiagogeada
Member

"addedAt" field keeps changing

Hello,

 

We're running a integration script, and a step is to periodically download contacts via http://api.hubapi.com/contacts/v1/lists/all/contacts/all or api.hubapi.com/contacts/v1/lists/recently_updated/contacts/recent

 

Checking for differences of contacts we already had stored, I find in may contacts the only think that changes is the "addedAt" timestamp. 

 

Why does this change? How come a timestamp of when the contact was added is changed?

It is not making sense.

 

For instance:

addedAt we had stored previously: 1593086009107
addedAt that we're downloading: 1580288682726

 

What would cause the date of when the contact was added shift from June 25th to January 29th?

 

Browsing the property history, can only find one instance of create date stating January 29th...

 

0 Upvotes
11 Replies 11
WendyGoh
HubSpot Employee
HubSpot Employee

"addedAt" field keeps changing

Hey @tiagogeada,

 

I believe I may be able to shed some lights here!

 

The key {{addedAt}} value is the timestamp when a contact is added to the list. i.e. a contact was remove from a static list on let say 21st Jan 2020 and was readded back on 22nd Jan 2020, the timestamp of the key {{addedAt}} value will be 22nd Jan 2020. 

 

If you could share with me a sample contact in which you're seeing a different in the {{addedAt}} timestamp, I would be able to dig into it deeper to confirm my hypothesis.

0 Upvotes
tiagogeada
Member

"addedAt" field keeps changing

Hello Wendy, thnk you for your repply.

 

Upon reading this message I just ran my download script with debug info, fetching contacts fromapi.hubapi.com/contacts/v1/lists/recently_updated/contacts/recent

For each contact, if it exists in our system we check if the json info has changed.

This is what I just got:

 

canonical vid: 13381451
different value at /addedAt
a: 1594109390613
b: 1594110892239
dict b at /properties
has key(s) that another dict hasn't :
['hs_last_sales_activity_date', 'hs_last_sales_activity_timestamp', 'hs_sales_email_last_opened']
different value at /properties/lastmodifieddate/value
a: '1594109390613'
b: '1594110892239'
different value at /properties/hs_predictivecontactscore_v2/value
a: '27.05'
b: '39.11'
different value at /profile-token
...

I notice that everytime something changes the addedAt changes as well and I can't understand what its timestamp means.

 

OK, so you mentioned the addedAt is the timestamp it was added to a list, and I was using "lists/recently_updated/contacts/recent"

 

so I go and use api.hubapi.com/contacts/v1/lists/all/contacts/all instead:

canonical vid: 1075951
different value at /addedAt

canonical vid: 1076451
different value at /addedAt
a: 1593751788089
b: 1575390037438

canonical vid: 1095651
different value at /addedAt
a: 1593764395637
b: 1575412560560

canonical vid: 1095851
different value at /addedAt
a: 1593770402752
b: 1575413246636

canonical vid: 1107551
different value at /addedAt
a: 1594032140201
b: 1575438731657

canonical vid: 1112151
different value at /addedAt
a: 1593936381414
b: 1575445041619

canonical vid: 1117001
different value at /addedAt
a: 1594039224794
b: 1575448045591

canonical vid: 1121551
different value at /addedAt
a: 1593874839535
b: 1575451420012

So what does the key {{addedAt}} mean on the list "all" ?

 

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

"addedAt" field keeps changing

Hey @tiagogeada,

 

 Thanks for the further details. I initially thought you were using the Contact List API which was why I mentioned about static list.

 

Now that I know you're referring to the Get all contacts | Contacts API endpoint, I try to reproduce the behavior that you mentioned however I wasn't able to reproduce. On my own portal, I have a contact with ID 22651, I'm able to see that the addedAt date:

 

{
addedAt:1539072465076 (October 9, 2018, Tue, 4:07:45pm UTC+08:00),
vid:22651,
canonical-vid:22651,

points to the create date of the contact record and it doesn't change even after I modified the contact:

22651.png

 

I wouldn't expect the create date to change and so, I wouldn't expect the addedAt timestamp to be different. 

 

In this case, could you share with me the full log request which shows a change in the addedAt timestamp on the same contact ID?

0 Upvotes
tiagogeada
Member

"addedAt" field keeps changing

Hello Wendy.

Thank you for your attention and reply.

 

I didn't expect the addedAt to change neither, thus opening this thread.

 

I don't understand what kind of information you would like me to provide.

 

A full log request that shows a change of the dateAdded?

It is not like I can wilingly call the contacts API endpoint and know that the value is comming different each time. This is not the case.

 

On some contacts it does change, I don't know why

😞

 

Again:

  • script runs periodically storing these contacts inside our internal database 
  • script checks what are the differences between previously stored contacts, and contacts returned via the API
  • script identifies this parameter changed value on some contacts...

 

 

What kind of information do you think it would be useful from me?

 

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

"addedAt" field keeps changing

Hey @tiagogeada

 

Right. That is truely strange. In this case, could you share with me your:

 

1. Portal ID

2. An example object ID in which you saw a change in addedAt. i.e. the one you shared:

For instance:

addedAt we had stored previously: 1593086009107
addedAt that we're downloading: 1580288682726

 

3. Do you have a log of the full request you stored previously? If so, that would be extrememly helpful for us to dug further into this.

0 Upvotes
tiagogeada
Member

"addedAt" field keeps changing

Hello @WendyGoh 

 

I have just replied refering to 1- , 2- and 3- but the response is no longer here.

 

Has it been removed? Did I say something wrong?

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

"addedAt" field keeps changing

Hey @tiagogeada,

 

That's strange. Could you send the response to me via DM? 

 

0 Upvotes
tiagogeada
Member

"addedAt" field keeps changing

I don't have the response anymore... but I'll send portal id and a object id via dm..

 

I do feel like taking a log request won't really matter. It is big (we're fetching pages with 100 contacts each) and need to loop them over until I get such a contact that has this field changed.

Is it really necessary?

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

"addedAt" field keeps changing

Hey @tiagogeada,

 

Those details would be helpful for me to further troubleshoot things on my end. The reason I asked for example is so that I can better understand your team environment and see if I could narrow down the issue. Thank you!

0 Upvotes
tiagogeada
Member

"addedAt" field keeps changing

OK, I have the full request now, but it is huge...

 

is there a way I can send you a file and not expose detailed info here?

0 Upvotes
tiagogeada
Member

"addedAt" field keeps changing

Hello @WendyGoh 

 

Replying to your questions:

1 - 6650231

 

2 - In my replies above, I mentioned the canonical-vid, should this be enough?

canonical vid: 1121551
different value at /addedAt
a: 1593874839535
b: 1575451420012

 

3 - I don't have a full log of the request, because we're getting pages of 100 contacts would not be practical to keep one.

 

 

0 Upvotes