Deal creating without the associations provided

deals

#1

I am sending the associations as per the documentation, however, my deals are creating without the contact and company association via the api. This was not previously an issue.

Can you please me know if something has changed on the deals api.

Also, I am sending the dates as epoch and they are being converter to the wrong date

see : 1528389984 should be 6/7/2018 but is displaying as 1/18/1970
JSON

{ associations:
{ associatedCompanyIds: [ '12' ],
associatedVids: [ '12' ] },
properties:
[ { name: 'dealname', value: 'Name' },
{ name: 'createdate', value: '1528389984' },
{ name: 'dealtype', value: 'type' },
{ name: 'channel', value: 'channel' },
{ name: 'product_type', value: 'prod' },
{ name: 'dealstage', value: 'stage' },
{ name: 'referral_partner', value: 'part' },
{ name: 'referral_partner_email', value: 'tea@email.com' },
{ name: 'decline_reason_description' },
{ name: 'closedate', value: '1528389984' },
{ name: 'declined_stage', value: '' } ] }


#2

Hi @clevy,

  1. The HubSpot API accepts timestamp values in milliseconds; 1528389984 is in seconds. You'd actually want to send 1528389984000.
  2. The company/contact IDs shouldn't be strings; can you try removing the singe quotes when making your request?

#3

@Derek_Gervais, you rock! Thanks