Contacts API Reference
The purpose of Contact API is to:
- Explain how contact records can be created
- Example responses for different operations
- List of API methods for contacts
API methods for Contacts as follows:
- Get all contacts
- Create contact
- Search a contact
- Update a contact
- Delete a contact
Web Method: getContactsConfigData
Purpose
You can use the getContactsConfigData method to get all the configuration data like Case Statuses, Case Types, Case Priorities and Assignees List.
Request API URL
https://api.apptivo.com/app/dao/v6/contacts?a=getConfigData&apiKey=API_KEY&accessKey=ACCESS_KEY
Request Parameters
Parameter | Data Type | Description |
apiKey* | String | Apptivo business account API Key |
accessKey* | String | Apptivo business account Access Key |
* – Mandatory parameter
Output
This will return all the contacts configuration data with JSON format.
Note
Get these configuration values and use them at the time of creating contacts.
Sample URL
https://www.apptivo.com/app/dao/v6/contacts?a=getConfigData&ObjectId=2&apiKey=dEDYQzXzGXHW-FXSNzKRRZTsGSC-645b0c91-63a6-477e-8377-8e531ea93cae&accessKey=u3W9873Ihw54lEb1
Result
You will get configuration data with their respective details, below are the few lines of sample config data:
{
“phoneTypes”: [
{
“id”: 20673183,
“code”: “PHONE_BUSINESS”,
“name”: “Business”,
“description”: “Business phone number”,
“isEnabled”: “Y”,
“isSmsEnabled”: “N”
},
{
“id”: 20673182,
“code”: “PHONE_HOME”,
“name”: “Home”,
“description”: “Home phone number”,
“isEnabled”: “Y”,
“isSmsEnabled”: “N”
},
{
“id”: 20673184,
“code”: “PHONE_MOBILE”,
“name”: “Mobile”,
“description”: “Mobile phone number”,
“isEnabled”: “Y”,
“isSmsEnabled”: “N”
},
{
“id”: 20673185,
“code”: “PHONE_OTHER”,
“name”: “Other”,
“description”: “Other phone number”,
“isEnabled”: “Y”,
“isSmsEnabled”: “N”
},
}
Web Method: createContacts
Purpose:
You can use createContact method to create Contacts in Apptivo with generic fields provided by application.
Request URL:
https://api.apptivo.com/app/dao/v6/contacts?a=save&contactData{Contact_DATA}&apiKey=API_KEY&accesKey=ACCESS_KEY
Request Parameters:
Parameter | Data Type | Description |
contactData* | JSON | Please see the sample request URL |
apiKey* | String | Apptivo API Key |
accessKey* | String | Apptivo Access Key |
* – Mandatory parameter
Output:
This will return the details of the created contact with JSON format.
Sample Request URL:
https://www.apptivo.com/app/dao/v6/contacts?a=save&contactData={"customAttributes":[],"title":null,"firstName":"","externalRefId":"","lastName":"Testcontact","jobTitle":"","contactTypeName":"E-Commerce User","contactType":305381,"accountName":"","customerNumber":"","accountId":null,"customerNumberId":null,"supplierName":"","supplierId":null,"assigneeObjectRefName":"Db2Es s","assigneeObjectRefId":77021,"assigneeObjectId":"8","contactCategoryName":"","categoryId":null,"description":"","skypeName":"","phoneticName":"","nickName":"","dateOfBirth":"","marketName":"","marketId":null,"segmentName":"","segmentId":null,"territoryName":"","territoryId":null,"industryName":"","industryId":null,"hobbies":"","foods":"","faceBookURL":"","twitterURL":"","linkedInURL":"","website":"","createdByName":"","lastUpdatedByName":"","creationDate":"","lastUpdateDate":"","labels":[],"contactStatusName":"Active","contactStatusId":10000,"isPrimary":"Y","bestWayToContactName":"Email","bestWayToContactId":10000,"accounts":[],"isUnsubscribed":"N","isBounced":"N","isResponded":"N","bouncedReason":null,"languageCode":"en","languageName":"English","createdBy":null,"lastUpdatedBy":null,"contactCategoryIds":[],"categories":[],"syncToGoogle":"N","addresses":[{"addressAttributeId":"address_section_attr_id","addressTypeCode":"1","addressType":"Billing Address","addressLine1":"","addressLine2":"","city":"","stateCode":"","addressGroupName":"Address1","state":"","zipCode":"","countryId":70,"countryName":"India","countryCode":"IN","deliveryInstructions":null,"county":null}],"lastContactedDate":null}
&isLeadConvert=N
&isDuplicate=N
Web Method: updateContacts
Purpose:
This method used to update the contact information.
Request URL:
https://api.apptivo.com/app/dao/v6/contacts?a=update&contactData={CONTACT_DATA_VALUES}&attributeNames=[CONTACT_DATA_NAME]&objectId=4&contactId=CONTACT_ID&isEmailAddressUpdate=EMAIL_UPDATE&apiKey=API_KEY&accesKey=ACCESS_KEY
Request Parameters:
Parameter | Data Type | Description |
CONTACT_ID | Contact ID | |
CONTACT_DATA_VALUES | Updated field value | |
CONTACT_DATA_NAME | Updated field name | |
EMAIL_UPDATE | If Email updated, it should be true or false | by default, it is false |
SESSION_KEY | Apptivo session key from username and password |
* – Mandatory parameter
Output:
This will return the details of updated contact data with JSON format.
Sample Request URL:
https://www.apptivo.com/app/dao/v6/contacts?a=update&contactData={"contactId":2693983,"firstName":"","lastName":"TestContact update","fullName":"TestContact","jobTitle":"","customerNumber":"","assigneeObjectRefId":77021,"assigneeObjectRefName":"Db2Es s","assigneeObjectId":8,"description":"","faceBookURL":"","linkedInURL":"","twitterURL":"","marketName":"","segmentName":"","skypeName":"","industryName":"","objectStatus":0,"contactType":305381,"contactTypeName":"E-Commerce User","website":"","phoneticName":"","nickName":"","syncToGoogle":"Y","hobbies":"","foods":"","languageCode":"en","languageName":"English","contactStatusName":"Active","contactStatusId":10000,"isPrimary":"Y","bestWayToContactName":"Email","bestWayToContactId":10000,"isUnsubscribed":"Y","isResponded":"Y","labels":[],"removeLabels":[],"addresses":[{"addressId":12937152,"addressAttributeId":"address_section_attr_id","addressType":"Billing Address","addressTypeCode":"1","addressLine1":"","addressLine2":"","city":"","state":"","stateCode":"","countryId":70,"countryName":"India","countryCode":"IN","zipCode":"","addressGroupName":"Address1","isAdded":false}],"removeAddresses":[],"phoneNumbers":[],"removePhoneNumbers":[],"emailAddresses":[],"removeEmailAddresses":[],"customAttributes":[],"categories":[],"contactAttributes":[],"notes":[],"accounts":[],"isBounced":"Y","firmId":218079,"lastContactedDate":"Not Contacted","createdBy":76130,"lastUpdatedBy":76130,"createdByName":"Db2Es s","creationDate":"2017-10-07 05:19:01","lastUpdateDate":"2017-10-07 05:19:01","lastUpdatedByName":"Db2Es s","version":1,"externalRefId":"","logoUrl":"https://d13d1qr27dbvhu.cloudfront.net/app/v1.1/war/app/images/profilebg128x128px.png","tags":[],"salutations":[{"id":29685675,"code":"Dr.","name":"Dr."},{"id":29685800,"code":"Miss.","name":"Miss."},{"id":29685672,"code":"Mr.","name":"Mr."},{"id":29685673,"code":"Mrs.","name":"Mrs."},{"id":29685674,"code":"Ms.","name":"Ms."}],"isDirtypage":null,"dateOfBirth":"","followUpDate":"N/A"}
&objectId=2&contactId=2693983&attributeName:["lastName","emailAddresses"]
Web Method: searcContacts
Purpose:
This method used to get the number of contacts in Apptivo based on the email address.
Request URL:
https://api.apptivo.com/app/dao/v6/contacts?a=getAllByAdvancedSearch&numRecords=NUM_OF_RECORDS&searchData={SEARCH_DATA}&multiSelectData={}&apiKey=API_KEY&accesKey=ACCESS_KEY
Request Parameters:
Parameter | Data Type | Description |
SEARCH_DATA | search data with Json format | please see the sample request URL |
NUM_OF_RECORDS | number of records to return | |
SESSION_KEY | Apptivo session key from username and password |
* – Mandatory parameters
Output:
This will return the number of contacts with JSON format.
Sample Request URL:
https://www.apptivo.com/app/dao/v6/contacts?a=getAllByAdvancedSearch
&startIndex=0
&numRecords=50
&sortColumn=lastName.sortable
&sortDir=asc
&iDisplayLength=50
&iDisplayStart=0
&sSortDir_0=asc
&objectId=2
&multiSelectData={"marketIds":[],"segmentIds":[],"contactTypeIds":[],"industryIds":[]}
&searchData={"title":"","lastName":"TestContact","accountId":null,"isPrimary":null,"isBounced":null,"categories":[],"addresses":[{"addressAttributeId":"address_section_attr_id","addressGroupName":"Address1","addressType":"","state":"","stateCode":"","stateId":null,"stateName":""}],"phoneNumbers":[],"emailAddresses":[],"customAttributes":[],"labels":[]}
&status=0
Comments
0 comments
Please sign in to leave a comment.