Overview
After creating contacts and companies, Enginy calls your/associations endpoint to create relationships between them. This allows your CRM to maintain the organizational structure of contacts.
Associations are created after both contacts and companies have been successfully exported. The request uses
the CRM IDs returned from the
/contacts and /companies endpoints.Create Associations
Your Implementation Required
This endpoint must be implemented on your server
Request
Request Body
Request Fields
| Field | Type | Description |
|---|---|---|
associations | array | Array of association objects to create |
associations[].contactCRMId | string | Required. The CRM ID of the contact (returned from /contacts) |
associations[].companyCRMId | string | Required. The CRM ID of the company (returned from /companies) |
Multiple contacts can be associated with the same company in a single request.
Response
- Success (200)
- Partial Success (200)
- Error (4xx/5xx)
Return a Or with details:
200 OK status to indicate associations were created successfully.Implementation Notes
Handling Existing Associations
Your implementation should handle cases where an association already exists:- Option 1 (Recommended): Skip silently if the association already exists
- Option 2: Return success with a note that the association was already present
- Option 3: Return an error for that specific association
Multiple Companies per Contact
Depending on your CRM’s data model, a contact might be associated with:- One company only: Set or replace the company association
- Multiple companies: Append to existing associations