Associated Contacts
The Associated Contact is an object used to present a relationship between a deal and a contact. In addition, each Associated Contact is assigned a role that corresponds to the role it plays in the deal.
With every deal, there might be any number of Associated Contacts.
JSON format
Name | Type | Read Only | Description |
---|---|---|---|
contact_id | number | false | Unique identifier of the contact to be associated with the deal. |
role | string | false | Role name. Possible values: involved |
created_at | string | true | Date and time that the associated contact was created in UTC (ISO8601 format). |
updated_at | string | true | Date and time of the last update on the associated contact in UTC (ISO8601 format). |
Retrieve Deal's Associated Contacts
GET /v2/deals/:deal_id/associated_contacts
Returns all deal associated contacts.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
page | number | Query | false | Page number to start from. Page numbering starts at 1, and omitting the page parameter will return the first page. e.g. ?page=2 |
per_page | number | Query | false | Number of records to return per page. Default limit is 25 and the maximum number that can be returned is 100 . e.g. ?per_page=20 |
Allowed for
- Agents
Using curl
curl -v -X GET https://api.getbase.com/v2/deals/:deal_id/associated_contacts \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Example Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Language: en
{
"items": [
{
"data": {
"contact_id": 2,
"role": "involved",
"created_at": "2014-08-27T16:32:56Z",
"updated_at": "2014-08-27T17:32:56Z"
},
"meta": {
"type": "associated_contact"
}
}
],
"meta": {
"type": "collection",
"count": 1,
"links": {
"self": "http://api.getbase.com/v2/deals/1/associated_contacts"
}
}
}
Create an Associated Contact
POST /v2/deals/:deal_id/associated_contacts
Creates a deal’s associated contact and its role. If the specified deal or contact does not exist, the request will return an error.
Parameters
Name | Type | Required | Description |
---|---|---|---|
contact_id | number | true | Unique identifier of the contact to be associated with the deal. e.g. "contact_id": "2" |
role | string | false | Role name. Default value: involved . e.g. "role": "involved" |
Allowed for
- Agents
Using curl
curl -v -X POST https://api.getbase.com/v2/deals/1/associated_contacts \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"data": {
"contact_id": 2,
"role": "involved"
},
"meta": {
"type": "associated_contact"
}
}'
Example Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Language: en
{
"data": {
"contact_id": 2,
"role": "involved",
"created_at": "2014-08-27T16:32:56Z",
"updated_at": "2014-08-27T17:32:56Z"
},
"meta": {
"type": "associated_contact"
}
}
Remove an Associated Contact
DELETE /v2/deals/:deal_id/associated_contacts/:contact_id
Remove a deal’s associated contact. If a deal with the supplied unique identifier does not exist, it returns an error. This operation cannot be undone.
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
deal_id | number | Query | true | Unique identifier of the deal. e.g. ?deal_id=1 |
contact_id | number | Query | true | Unique identifier of the contact. e.g. ?contact_id=2 |
Allowed for
- Agents
Using curl
curl -v -X DELETE https://api.getbase.com/v2/deals/1/associated_contacts/2 \
-H "Authorization: Bearer $ACCESS_TOKEN"
Example Response
HTTP/1.1 204 No Content