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

NameTypeRead OnlyDescription
contact_idnumberfalseUnique identifier of the contact to be associated with the deal.
rolestringfalseRole name. Possible values: involved
created_atstringtrueDate and time that the associated contact was created in UTC (ISO8601 format).
updated_atstringtrueDate 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

NameTypeInRequiredDescription
pagenumberQueryfalsePage number to start from. Page numbering starts at 1, and omitting the page parameter will return the first page. e.g. ?page=2
per_pagenumberQueryfalseNumber 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-8Content-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

NameTypeRequiredDescription
contact_idnumbertrueUnique identifier of the contact to be associated with the deal. e.g. "contact_id": "2"
rolestringfalseRole 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-8Content-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

NameTypeInRequiredDescription
deal_idnumberQuerytrueUnique identifier of the deal. e.g. ?deal_id=1
contact_idnumberQuerytrueUnique 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