API - Adding note not showing up


#1

I got the following success message, but can't find the test note I created under the contact:

errors: , status_code: 200array(4) { ["engagement"]=> array(8) { ["id"]=> int(1335691001) ["portalId"]=> int(2427637) ["active"]=> bool(true) ["createdAt"]=> float(1539364444441) ["lastUpdated"]=> float(1539364444441) ["ownerId"]=> int(0) ["type"]=> string(4) "NOTE" ["timestamp"]=> int(1539364444) } ["associations"]=> array(8) { ["contactIds"]=> array(1) { [0]=> int(4472251) } ["companyIds"]=> array(1) { [0]=> int(183147166) } ["dealIds"]=> array(0) { } ["ownerIds"]=> array(0) { } ["workflowIds"]=> array(0) { } ["ticketIds"]=> array(0) { } ["contentIds"]=> array(0) { } ["quoteIds"]=> array(0) { } } ["attachments"]=> array(0) { } ["metadata"]=> array(1) { ["body"]=> string(18) "note body from PHP" } }

I made sure to add the association. Thoughts?


#3

Hi @jpaullewer,

You included the timestamp value 1539364444 which logged the notes in 1970:


#4

Please disregard this issue. I'm not using the correct timestamp format. I'll have to look into how to format those when doing an import. I could use some help with that though...


#5

What format should I use then? I'm doing everything through PHP

$today=new DateTime();
$currentTimeStamp=$today->getTimestamp();


#6

Hey @jpaullewer,

Happy to clarify. Make sure your timestamps are in milliseconds, per this documentation.


#7

I saw that, but based on what date?


#8

UNIX Epoch time, which starts on January 1, 1970.


#9

Thank you. I'm trying to get it using PHP and can't nail down the correct date. I'll see if there are any other threads that address this. Thank you.