Creating associations in hubspot-api-nodejs new version

Hi @gangelo

Sure, I can help you with that. Here is the code to create an association using the HubSpot Node.js API v4:

```
const hubspot = require(‘hubspot-api-nodejs’);

// Create a new client
const client = new hubspot.Client({
apiKey: ‘<your-api-key>’,
hubspotUrl: ‘<your-hubspot-url>’,
});

// Get the contact and company records
const contact = await client.crm.objects.contacts.get({
id: ‘<contact-id>’,
});

const company = await client.crm.objects.companies.get({
id: ‘<company-id>’,
});

// Create the association
const association = await client.crm.associations.v4.definitionsApi.create({
fromObjectType: ‘contact’,
fromObjectId: contact.id,
toObjectType: ‘company’,
toObjectId: company.id,
});
```

This code will create an association between the contact and company records. The `fromObjectType` and `fromObjectId` properties specify the contact record, and the `toObjectType` and `toObjectId` properties specify the company record.

Hope this will helps you out. Please mark it as Solution Accepted to help other Community member.
Thanks!