Good morning,
I'm trying to associate a contact to a company with V4 APIs
var client = new RestClient("https://api.hubapi.com/crm/v4/objects/contacts/5139150/associations/0-1/13751153040");var request = new RestRequest(Method.PUT);request.AddHeader("accept", "application/json");request.AddHeader("content-type", "application/json");request.AddHeader("authorization", "Bearer pat-na1-75287a6f-e79b-4c2b-b992-5e48fb4ef961");request.AddParameter("application/json", "[{\"associationCategory\":\"HUBSPOT_DEFINED\",\"associationTypeId\":1}]", ParameterType.RequestBody);IRestResponse response = client.Execute(request);The contact Id is Good The compagny Id is Good I'm testing with Endpoints from HubSpotIn return I have the following message Do you have an idea of the problem by advance THANKS
HTTP 400
{
“status”: “error”,
“message”: “One or more associations are invalid”,
“correlationId”: “c322688e-aabc-43f2-8eef-adcdc788ff87”,
“context”: {
“INVALID_OBJECT_IDS”: [
“CONTACT=13751153040 is not valid”
]
},
“category”: “VALIDATION_ERROR”
}
Hey Jean,
I’m David from the hapily support team! We have an app called Associ8 that could make those associations for you. No code required! It makes associations in a workflow action based on search parameters set by you. Check it out here.
If you have any questions or need help setting up, feel free to reach out! I’d be happy to hop on a call with you.
Best,
-David Staat