Get Association
This endpoint returns one project-to-contact association. You identify it by the project ID in the path and the contact ID in the query string.
Endpoint
Section titled “Endpoint”GET /v1/associations/associations/:idAuthentication
Section titled “Authentication”Include your API key in the x-api-key header. See Authentication.
Required Scope
Section titled “Required Scope”associations:readPath Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Project ID. |
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
contactId | string | Yes | Contact ID paired with the project ID. |
Request Body
Section titled “Request Body”This endpoint does not accept a request body.
Example Request
Section titled “Example Request”curl "https://api.crewsum.com/v1/associations/associations/project-mno123pqr4567890?contactId=contact-jkl123mno4567890" \ -H "x-api-key: $CREWSUM_API_KEY"const response = await fetch( "https://api.crewsum.com/v1/associations/associations/project-mno123pqr4567890?contactId=contact-jkl123mno4567890", { headers: { "x-api-key": process.env.CREWSUM_API_KEY }, },);const result = await response.json();GET /v1/associations/associations/project-mno123pqr4567890?contactId=contact-jkl123mno4567890 HTTP/1.1Host: api.crewsum.comx-api-key: <your-api-key>Response
Section titled “Response”On success, the API returns HTTP 200 OK.
Example Response
Section titled “Example Response”{ "message": "Successfully fetched association", "data": { "association": { "projectId": "project-mno123pqr4567890", "projectName": "Project Name", "contactId": "contact-jkl123mno4567890", "contactName": "Contact Name", "contactType": "MANAGER", "notificationLevel": "COPY_ONLY", "projectEndCustomer": "End Customer Name" } }}Behavior
Section titled “Behavior”- This endpoint can return an association that was removed when its project or contact was deleted. The response does not show that the association is removed. To list only active associations, use List Associations.
projectEndCustomeris the name of the project’s end customer, ornull.
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
400 | The request did not include contactId. The message is contactId must be supplied. |
404 | No association was found for the supplied project and contact IDs. |
500 | Crewsum could not fetch the association. The message is Error fetching association. |
Authentication and scope failures are described in Errors.
Related Webhooks
Section titled “Related Webhooks”This endpoint does not trigger a webhook.