Contacts
Contact endpoints allow for querying or updating of Contact data within CMap
Get Contact
HTTP GET v2/Contacts/5
Returns the contact with the matching id (if that contact exists)
Response
{
"id": 234234,
"email": "mike.smith@smithindustries.com",
"firstname": "Mike",
"lastname": "Smith",
"linkedIn": "linkedin profile url",
"mainContact": true,
"financeContact": false,
"mobile": "07533 234 234",
"notes": "notes about this contact",
"ownerId": null,
"telephone": "01625 521 000",
"title": "Mr",
"twitter": "twitter url",
"jobTitle": "Software Developer",
"companyId": 33454,
"company": "Smith Industries",
"companyTelephone": "01625 521 000",
"externalRef": "ABCD",
"address": {
"addressID": 12313,
"description": "Main Address",
"address1": "1 Hope Street",
"address2": "",
"address3": "",
"townCity": "Manchester",
"countyState": "",
"postcode": "M22 4TG",
"externalRef": null,
"country": {
"Name": "United Kingdom",
"Code": "GB"
},
"formatted": "Main Address\r\n1 Hope Street\r\nManchester\r\nM22 4TG\r\nUnited Kingdom",
"commaDelimited": "Main Address,1 Hope Street,Manchester,M22 4TG,United Kingdom"
},
"customFields": {
"A Custom Field": "A value",
"Another Custom Field": "Another value"
}
}
Get Contacts
HTTP GET v1/Contacts
Returns all contacts belonging to the client
Response
[
{
"company": "Smith Industries",
"id": "876876",
"name": "Mike Smith"
}
]
Get Contacts By Company
HTTP GET v1/Contacts?companyId=5
Returns all contacts belonging to the company
Response
[
{
"id": "876876",
"firstName": "Mike",
"lastName": "Smith",
"displayName": "Smith, Mike",
"email": "mike.smith@something.com",
}
]
Get Active Contacts By Company
HTTP GET v1/Contacts/ActiveContactsForCompany?companyId=5
Returns all active contacts belonging to the company
Response
[
{
"id": "876876",
"firstName": "Mike",
"lastName": "Smith",
"displayName": "Smith, Mike",
"email": "mike.smith@something.com",
}
]
Get Historic Contacts By Company
HTTP GET v1/Contacts/HistoricContactsForCompany?companyId=5
Returns all historic contacts belonging to the company
Response
[
{
"id": "876876",
"firstName": "Mike",
"lastName": "Smith",
"displayName": "Smith, Mike",
"email": "mike.smith@something.com",
}
]
Get Contacts By Query
HTTP GET v1/Contacts?q=[query]
Returns all contacts that match the search query
Response
[
{
"company": "Smith Industries",
"id": "876876",
"name": "Mike Smith",
"email": "mike.smith@smith.inc",
"jobTitle": "Manager"
},
{
"company": "Smith Industries",
"id": "3534",
"name": "Mike Jones",
"email": "mike.jones@smith.inc",
"jobTitle": "Deputy Manager"
}
]
Get Contacts By Email/Name
HTTP GET v1/Contacts?email=email&name=name
Returns all the contacts that match the email address or name specified
Response
[
{
"company": "Smith Industries",
"id": "876876",
"name": "Mike Smith",
"email": "mike.smith@smith.inc",
"jobTitle": "Manager"
},
{
"company": "Smith Industries",
"id": "3534",
"name": "Mike Jones",
"email": "mike.jones@smith.inc",
"jobTitle": "Deputy Manager"
}
]
Create Contact
HTTP POST v1/Contacts
Create a new Contact
Request
{
"firstName" : "Robert",
"lastName" : "Smith",
"companyId" : 12456,
"jobTitle" : "Managing Director",
"telephone" : "01625 521 000",
"mobile" : "07799 876543",
"email" : "robert.smith@abc.com",
"addressId" : 324,
"ownerId" : 454,
"mainContact" : true,
"financeContact" : false,
"notes" : "Some information about this contact",
"CustomFields":{
"Text Field":"Some exciting text here",
"Number Field":4356,
"Dropdown":"one",
"Date Field":"2024-01-01",
"Boolean":"Yes",
"Dropdown Multi":["Item 1", "Item 2"],
"User Field":"Jim Murphy",
"User Multi":["Jim Murphy","Arthur Dent"]
}
}
Response
{
"contactId" : 1234
}
Update Contact
HTTP PUT v1/Contacts
Updates a Contact
Request
{
"contactId": 987897,
"firstName": "Robert",
"lastName": "Smith",
"companyId": 12456,
"jobTitle": "Managing Director",
"telephone": "01625 521 000",
"mobile": "07799 876543",
"email": "robert.smith@abc.com",
"addressId": 324,
"ownerId": 454,
"mainContact": true,
"financeContact": false,
"notes": "Some information about this contact",
"CustomFields": {
"Text Field": "Some exciting text here",
"Number Field": 4356,
"Dropdown": "one",
"Date Field": "2024-01-01",
"Boolean": "Yes",
"Dropdown Multi": [
"Item 1",
"Item 2"
],
"User Field": "Jim Murphy",
"User Multi": [
"Jim Murphy",
"Arthur Dent"
]
}
}
Response
{
"contactId" : 1234
}
Move Contact
HTTP PUT v1/Contacts/MoveContact
Request
{
"contactId": 1245,
"accountId": 12456,
"addressId": 124567
}
Response
{
"contactId" : 1234
}
Update Contact Company Status
HTTP PUT v1/Contacts/UpdateContactCompanyStatus
Updates a Contact’s link to a Company to a status of Active or Historic
Request
{
"ContactAccountId": 1245,
"ContactAccountStatus": "Active"
}
Response
{
contactCompanyId = 198198,
contactId = 987897,
companyId = 876876,
jobTitle = "Managing Director",
addressId = 324,
isMain = true,
status = "Active"
}