Namespace: API

API

Methods

staticZOHO.CRM.API.addNotes(config){Promise}

Add Notes to a record
Name Type Description
config Object Configuration Object.
Name Type Description
Entity String SysRefName of the module.
RecordID Long RecordID to associate the notes.
Title String Notes Title.
Content String Notes Content.
Returns:
Type Description
Promise Resolved with notes creation status
Example
ZOHO.CRM.API.addNotes({Entity:"Leads",RecordID:"1475615000000292033",Title:"Notes Title",Content:"TitleContent"}).then(function(data){
 console.log(data);
});

//prints 
{
 "data": [
   {
     "code": "SUCCESS",
     "details": {
       "Modified_Time": "2017-12-20T14:08:56+05:30",
       "Modified_By": {
         "name": "NareshTesting",
         "id": "1000000031157"
       },
       "Created_Time": "2017-12-20T14:08:56+05:30",
       "id": "1000000044101",
       "Created_By": {
         "name": "NareshTesting",
         "id": "1000000031157"
       }
     },
     "message": "record added",
     "status": "success"
   }
 ]
}

staticZOHO.CRM.API.attachFile(config){Promise}

To delink the relation between the records
Name Type Description
config object Configuration Object
Name Type Description
Entity String SysRefName of the module.
RecordID String RecordID to associate the notes.
File object File Object
Name Type Description
Name String File Name
Content object File Content
Returns:
Type Description
Promise Resolved user Upload acknowledgement
Example
ZOHO.CRM.API.attachFile({Entity:"Leads",RecordID:"1000000031092",File:{Name:"myFile.txt",Content:blob}}).then(function(data){
	console.log(data);
});
//prints
{
 "data": [
   {
     "code": "SUCCESS",
     "details": {
       "Modified_Time": "2017-12-20T14:22:30+05:30",
       "Modified_By": {
         "name": "NareshTesting",
         "id": "1000000031157"
       },
       "Created_Time": "2017-12-20T14:22:30+05:30",
       "id": "1000000044106",
       "Created_By": {
         "name": "NareshTesting",
         "id": "1000000031157"
       }
     },
     "message": "attachment uploaded successfully",
     "status": "success"
   }
 ]
}

staticZOHO.CRM.API.deleteRecord(config){Promise}

To delete a record from a module
Name Type Description
config Object Configuration Object.
Name Type Description
Entity String SysRefName of the module.
RecordID String RecordID to associate the notes.
Returns:
Type Description
Promise Resolved with Response to update record
Example
ZOHO.CRM.API.deleteRecord({Entity:"Leads",RecordID: "1000000049031"})
.then(function(data){
    console.log(data)
})

//prints 
{
 "data": [
   {
     "code": "SUCCESS",
     "details": {
       "id": "3000000040015"
     },
     "message": "record deleted",
     "status": "success"
   }
 ]
}      

staticZOHO.CRM.API.delinkRelatedRecord(config){Promise}

To delink the relation between the records
Name Type Description
config object Configuration Object
Name Type Description
Entity String SysRefName of the module.
RecordID String RecordID to associate the notes.
RelatedListName String SysRefName of the relatedList.
RelatedRecordID String Related Record ID
Returns:
Type Description
Promise Resolved user matching userID
Example
ZOHO.CRM.API.delinkRelatedRecord({Entity:"Leads",RecordID:"1000000079113",RelatedList:"Campaigns",RelatedRecordID:"1000000080041"})
 .then(function(data){
     console.log(data)
 })
//prints
{
 "data": [
   {
     "code": "SUCCESS",
     "details": {
       "id": "3000000040055"
     },
     "message": "record deleted",
     "status": "success"
   }
 ]
}

staticZOHO.CRM.API.getAllProfiles(){Promise}

To get all the profiles in the app
Returns:
Type Description
Promise Resolved with all the profiles present in the app
Example
ZOHO.CRM.API.getAllProfiles().then(function(data){
	console.log(data);
});

//prints 
 {
   "profiles": [
    {
       "created_time": null,
       "modified_time": null,
       "name": "Administrator",
       "modified_by": null,
      "description": "This profile will have all the permissions. Users with Administrator profile will be able to view and manage all the data within the organization *. *        account by default.",
       "id": "12000000029855",
       "category": false,
       "created_by": null
     },
     {
       "created_time": null,
       "modified_time": null,
       "name": "Standard",
       "modified_by": null,
       "description": "This profile will have all the permissions except administrative privileges.",
       "id": "12000000029858",
       "category": false,
       "created_by": null
     },
     {
       "created_time": "2018-02-05T14:20:38+05:30",
       "modified_time": "2018-02-05T17:44:58+05:30",
       "name": "TestUser",
       "modified_by": {
         "name": "Arun ",
         "id": "12000000032013"
       },
       "description": "TestUser API",
       "id": "12000000033045",
       "category": true,
       "created_by": {
         "name": "Arun ",
         "id": "12000000032013"
       }
    }
   ]
 }

staticZOHO.CRM.API.getAllRecords(config){Promise}

get list of all records in a module
Name Type Description
config Object Configuration Object.
Name Type Description
Entity String SysRefName of the module.
sort_order String optional To sort records. allowed values {asc|desc}
converted String optional To get the list of converted records
approved String optional To get the list of approved records
page String optional To get the list of records from the respective pages
per_page String optional To get the list of records available per page
Returns:
Type Description
Promise Resolved with data of record matching with RecordID
Example
ZOHO.CRM.API.getAllRecords({Entity:"Leads",sort_order:"asc",per_page:2,page:1})
.then(function(data){
   console.log(data)
})

//prints 
{
 "data": [
   {
     "Owner": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Company": "Testrec1",
     "Email": null,
     "Description": null,
     "$currency_symbol": "$",
     "$photo_id": null,
     "Website": null,
     "Twitter": null,
     "$upcoming_activity": null,
     "Salutation": null,
     "Last_Activity_Time": "2017-12-16T09:54:37+05:30",
     "First_Name": null,
     "Full_Name": "Testrec1",
     "Lead_Status": null,
     "Industry": null,
     "Modified_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Skype_ID": null,
     "$converted": false,
     "$process_flow": false,
     "Phone": null,
     "Street": null,
     "Zip_Code": null,
     "id": "3000000032009",
     "Email_Opt_Out": false,
     "$approved": true,
     "Designation": null,
     "$approval": {
       "delegate": false,
       "approve": false,
       "reject": false
     },
     "Modified_Time": "2017-12-16T09:54:37+05:30",
     "Created_Time": "2017-12-16T09:54:37+05:30",
     "$converted_detail": {},
     "$followed": false,
     "$editable": true,
     "City": null,
     "No_of_Employees": null,
     "Mobile": null,
     "Last_Name": "Testrec1",
     "State": null,
     "$status": "cv_1",
     "Lead_Source": null,
     "Country": null,
     "Created_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Fax": null,
     "Annual_Revenue": null,
     "Secondary_Email": null
   },
   {
     "Owner": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Company": "Testrec2",
     "Email": null,
     "Description": null,
     "$currency_symbol": "$",
     "$photo_id": null,
     "Website": null,
     "Twitter": null,
     "$upcoming_activity": null,
     "Salutation": null,
     "Last_Activity_Time": "2017-12-16T09:54:58+05:30",
     "First_Name": null,
     "Full_Name": "Testrec2",
     "Lead_Status": null,
     "Industry": null,
     "Modified_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Skype_ID": null,
     "$converted": false,
     "$process_flow": false,
     "Phone": null,
     "Street": null,
     "Zip_Code": null,
     "id": "3000000032091",
     "Email_Opt_Out": false,
     "$approved": true,
     "Designation": null,
     "$approval": {
       "delegate": false,
       "approve": false,
       "reject": false
     },
     "Modified_Time": "2017-12-16T09:54:58+05:30",
     "Created_Time": "2017-12-16T09:54:58+05:30",
     "$converted_detail": {},
     "$followed": false,
     "$editable": true,
     "City": null,
     "No_of_Employees": null,
     "Mobile": null,
     "Last_Name": "Testrec2",
     "State": null,
     "$status": "c_1",
     "Lead_Source": null,
     "Country": null,
     "Created_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Fax": null,
     "Annual_Revenue": null,
     "Secondary_Email": null
   }
 ],
 "info": {
   "per_page": 2,
   "count": 2,
   "page": 1,
   "more_records": true
 }
}

staticZOHO.CRM.API.getAllUsers(config){Promise}

To retrieve list of users in ZohoCRM
Name Type Description
config object Configuration Object
Name Type Description
Type String Allowed values "AllUsers | ActiveUsers | DeactiveUsers | ConfirmedUsers | NotConfirmedUsers | DeletedUsers | ActiveConfirmedUsers | AdminUsers | ActiveConfirmedAdmins"
page number optional To get the list of users from the respective pages
per_page number optional To get the list of users available per page
Returns:
Type Description
Promise Resolved List of users matching specified Type
Example
ZOHO.CRM.API.getAllUsers({Type:"AllUsers"})
.then(function(data){
    console.log(data)
})
//prints
{
 "users": [
   {
     "confirm": true,
     "full_name": "NareshTesting ",
     "role": {
       "name": "CEO",
       "id": "3000000029719"
     },
     "territories": [],
     "profile": {
       "name": "Administrator",
       "id": "3000000029725"
     },
     "last_name": null,
     "alias": null,
     "id": "3000000031045",
     "first_name": "NareshTesting",
     "email": "naresh.babu+dev2@zylker.com",
     "zuid": "5073288",
     "status": "active"
   }
 ],
 "info": {
   "per_page": 200,
   "count": 1,
   "page": 1,
   "more_records": false
 }
}

staticZOHO.CRM.API.getOrgVariable(){Promise}

get plugins configuration data
Returns:
Type Description
Promise Resolved with Plugin Configuration
Example
ZOHO.CRM.API.getOrgVariable("variableNamespace").then(function(data){
	console.log(data);
});

//prints 
{
 "Success": {
  "Content": "12345"
 }
}

staticZOHO.CRM.API.getProfile(config){Promise}

To get a particular profile's details with ProfileID as input
Name Type Description
config Object Configuration Object.
Name Type Description
ID String ProfileID
Returns:
Type Description
Promise Resolved with the details of the profile for the given ProfileID
Example
ZOHO.CRM.API.getProfile({ID:"12000000029858"}).then(function(data){
	console.log(data);
});

//prints 
{
	"profiles": [{
		"created_time": null,
		"modified_time": null,
		"permissions_details": [{
				"display_label": "Email Integration ( POP3 / IMAP )",
				"module": null,
				"name": "Crm_Implied_Zoho_Mail_Integ",
				"id": "12000000030788",
				"enabled": true
			},
			{
				"display_label": "BCC Dropbox",
				"module": null,
				"name": "Crm_Implied_BCC_Dropbox",
				"id": "12000000030752",
				"enabled": true
			},
			{
				"display_label": "Show Chat Bar",
				"module": null,
				"name": "Crm_Implied_Chat_Bar",
				"id": "12000000030806",
				"enabled": true
			},
			{
				"display_label": null,
				"module": null,
				"name": "Crm_Implied_Social_Integration",
				"id": "12000000030734",
				"enabled": false
			}
		],
		"name": "Standard",
		"modified_by": null,
		"description": "This profile will have all the permissions except administrative privileges.",
		"id": "12000000029858",
		"category": false,
		"created_by": null,
		"sections": [{
			"name": "template",
			"categories": [{
					"display_label": "Email & Chat Settings",
					"permissions_details": [
						"12000000030788",
						"12000000030752",
						"12000000030806"
					],
					"name": "email_chat"
				},
				{
					"display_label": "Manage Templates",
					"permissions_details": [
						"12000000029984",
						"12000000029987",
						"12000000030698"
					],
					"name": "template"
				}
			]
		}]
	}]
}

staticZOHO.CRM.API.getRecord(config){Promise}

get all Details of a record
Name Type Description
config Object Configuration Object.
Name Type Description
Entity String SysRefName of the module.
RecordID String RecordID to associate the notes.
Returns:
Type Description
Promise Resolved with data of record matching with RecordID
Example
ZOHO.CRM.API.getRecord({Entity:"Leads",RecordID:"1000000030132"})
.then(function(data){
    console.log(data)
})

//prints 
{
 "data": [
   {
     "Owner": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Company": "ZohoCorp",
     "Email": null,
     "Description": null,
     "$currency_symbol": "$",
     "$photo_id": null,
     "Website": null,
     "Twitter": null,
     "$upcoming_activity": null,
     "Salutation": null,
     "Last_Activity_Time": "2017-12-22T03:27:23+05:30",
     "First_Name": null,
     "Full_Name": "Naresh",
     "Lead_Status": null,
     "Industry": null,
     "Modified_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Skype_ID": null,
     "$converted": false,
     "$process_flow": false,
     "Phone": null,
     "Street": null,
     "Zip_Code": null,
     "id": "3000000040016",
     "Email_Opt_Out": false,
     "$approved": true,
     "Designation": null,
     "$approval": {
       "delegate": false,
       "approve": false,
       "reject": false
     },
     "Modified_Time": "2017-12-22T03:27:23+05:30",
     "Created_Time": "2017-12-22T03:27:23+05:30",
     "$converted_detail": {},
     "$followed": false,
     "$editable": true,
     "City": null,
     "No_of_Employees": 0,
     "Mobile": null,
     "Last_Name": "Naresh",
     "State": null,
     "$status": "cv_1",
     "Lead_Source": null,
     "Country": null,
     "Created_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Fax": null,
     "Annual_Revenue": 0,
     "Secondary_Email": null
   }
 ]
}

staticZOHO.CRM.API.getRelatedRecords(config){Promise}

To retrive related list records
Name Type Description
config object Configuration Object
Name Type Description
Entity String SysRefName of the module.
RecordID String RecordID to associate the notes.
RelatedListName String SysRefName of the relatedList.
page Number optional To get the list of related records from the respective page.
per_page Number optional To get the list of related records available per page.
Returns:
Type Description
Promise Resolved user matching userID
Example
ZOHO.CRM.API.getRelatedRecords({Entity:"Leads",RecordID:"1000000030132",RelatedList:"Notes",page:1,per_page:200})
.then(function(data){
    console.log(data)
})
//prints

{
 "data": [
   {
     "Owner": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Modified_Time": "2017-12-22T03:58:20+05:30",
     "$attachments": null,
     "Created_Time": "2017-12-22T03:58:20+05:30",
     "Parent_Id": {
       "name": "Peterson",
       "id": "3000000040011"
     },
     "$editable": true,
     "$se_module": "Leads",
     "Modified_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "$size": null,
     "$voice_note": false,
     "$status": null,
     "id": "3000000040059",
     "Created_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Note_Title": null,
     "Note_Content": "Notes2"
   },
   {
     "Owner": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Modified_Time": "2017-12-22T03:58:16+05:30",
     "$attachments": null,
     "Created_Time": "2017-12-22T03:58:16+05:30",
     "Parent_Id": {
       "name": "Peterson",
       "id": "3000000040011"
     },
     "$editable": true,
     "$se_module": "Leads",
     "Modified_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "$size": null,
     "$voice_note": false,
     "$status": null,
     "id": "3000000040055",
     "Created_By": {
       "name": "NareshTesting ",
       "id": "3000000031045"
     },
     "Note_Title": null,
     "Note_Content": "Notes1"
   }
 ],
 "info": {
   "per_page": 200,
   "count": 2,
   "page": 1,
   "more_records": false
 }
}

staticZOHO.CRM.API.getUser(config){Promise}

To retrieve list of users in ZohoCRM
Name Type Description
config object Configuration Object
Name Type Description
ID String UserID
Returns:
Type Description
Promise Resolved user matching userID
Example
ZOHO.CRM.API.getUser({ID:"3000000029719"})
.then(function(data){
    console.log(data)
})
//prints
{
 "users": [
   {
     "country": null,
     "role": {
       "name": "CEO",
       "id": "3000000029719"
     },
     "customize_info": {
       "notes_desc": null,
       "show_right_panel": null,
       "bc_view": null,
       "show_home": false,
       "show_detail_view": true,
       "unpin_recent_item": null
     },
     "city": null,
     "signature": null,
     "name_format": "Salutation,First Name,Last Name",
     "language": "en_US",
     "locale": "en_US",
     "personal_account": true,
     "ntc_notification_type": [
       3000000020985,
       3000000020988,
       3000000020991,
       3000000020994,
       3000000020997,
       3000000021012,
       3000000021003,
       3000000021006,
       3000000021009,
       3000000021078,
       3000000021072,
       3000000021075,
       3000000021069,
       3000000021081,
       3000000021084,
       3000000021087
     ],
     "default_tab_group": "0",
     "street": null,
     "alias": null,
     "theme": {
       "normal_tab": {
         "font_color": "#FFFFFF",
         "background": "#222222"
       },
       "selected_tab": {
         "font_color": "#FFFFFF",
         "background": "#222222"
       },
       "new_background": null,
       "background": "#F3F0EB",
       "screen": "fixed",
       "type": "default"
     },
     "id": "3000000031045",
     "state": null,
     "country_locale": "en_US",
     "fax": null,
     "first_name": "NareshTesting",
     "email": "naresh.babu+dev2@zylker.com",
     "telephony_enabled": false,
     "imap_status": false,
     "zip": null,
     "decimal_separator": "en_US",
     "website": null,
     "time_format": "hh:mm a",
     "profile": {
       "name": "Administrator",
       "id": "3000000029725"
     },
     "mobile": null,
     "last_name": null,
     "time_zone": "Asia/Kolkata",
     "zuid": "5073288",
     "confirm": true,
     "rtl_enabled": false,
     "full_name": "NareshTesting ",
     "ezuid": "6ca2127e9d60c217",
     "territories": [],
     "phone": null,
     "dob": null,
     "date_format": "MM/dd/yyyy",
     "ntc_enabled": true,
     "status": "active"
   }
 ]
}

staticZOHO.CRM.API.insertRecord(config){Promise}

Insert record to a modue
Name Type Description
config Object Configuration Object.
Name Type Description
Entity String SysRefName of the module.
APIData Object RecordID to associate the notes.
Returns:
Type Description
Promise Resolved with response data
Examples
var recordData = {
        "Company": "Zylker",
        "Last_Name": "Peterson"
  }
ZOHO.CRM.API.insertRecord({Entity:"Leads",APIData:recordData}).then(function(data){
	console.log(data);
	});
//prints
{
 "data": [
   {
     "code": "SUCCESS",
     "details": {
       "Modified_Time": "2017-12-22T03:24:39+05:30",
       "Modified_By": {
         "name": "NareshTesting ",
         "id": "3000000031045"
       },
       "Created_Time": "2017-12-22T03:24:39+05:30",
       "id": "3000000040011",
       "Created_By": {
         "name": "NareshTesting ",
         "id": "3000000031045"
       }
     },
     "message": "record added",
     "status": "success"
   }
 ]
}
var data = [
{
        "Company": "ZohoCorp",
        "Last_Name": "Babu"
},
{
	"Company": "ZohoCorp",
    	"Last_Name": "Naresh"
}
];
ZOHO.CRM.API.insertRecord({Entity:"Leads",APIData:data}).then(function(data){
	console.log(data);
});

//prints
{
 "data": [
   {
     "code": "SUCCESS",
     "details": {
       "Modified_Time": "2017-12-22T03:27:23+05:30",
       "Modified_By": {
         "name": "NareshTesting ",
         "id": "3000000031045"
       },
       "Created_Time": "2017-12-22T03:27:23+05:30",
       "id": "3000000040015",
       "Created_By": {
         "name": "NareshTesting ",
         "id": "3000000031045"
       }
     },
     "message": "record added",
     "status": "success"
   },
   {
     "code": "SUCCESS",
     "details": {
       "Modified_Time": "2017-12-22T03:27:23+05:30",
       "Modified_By": {
         "name": "NareshTesting ",
         "id": "3000000031045"
       },
       "Created_Time": "2017-12-22T03:27:23+05:30",
       "id": "3000000040016",
       "Created_By": {
         "name": "NareshTesting ",
         "id": "3000000031045"
       }
     },
     "message": "record added",
     "status": "success"
   }
 ]
}

staticZOHO.CRM.API.searchRecord(config, page, per_page){Promise}

To retrieve the records that matches your search criteria
Name Type Description
config object Configuration Object
Name Type Description
Entity String SysRefName of module
Type String Allowed values "email|phone|word|criteria"
Query String query String
page String Pagination - Page number
per_page String Pagination - per page limit
Returns:
Type Description
Promise Resolved with search result
Examples
ZOHO.CRM.API.searchRecord({Entity:"Leads",Type:"phone",Query:"123456789"})
.then(function(data){
    console.log(data)
})
ZOHO.CRM.API.searchRecord({Entity:"Leads",Type:"email",Query:"test@zoho.com"})
.then(function(data){
    console.log(data)
})
ZOHO.CRM.API.searchRecord({Entity:"Leads",Type:"word",Query:"ZohoCrop"})
.then(function(data){
    console.log(data)
})
ZOHO.CRM.API.searchRecord({Entity:"Leads",Type:"criteria",Query:"(Company:equals:Zoho)"})
.then(function(data){
    console.log(data)
})
ZOHO.CRM.API.searchRecord({Entity:"Leads",Type:"criteria",Query:"((Company:equals:Zoho)or(Company:equals:zylker))"})
.then(function(data){
    console.log(data)
})

staticZOHO.CRM.API.updateProfile(config){Promise}

To update permissions for the given ProfileID
Name Type Description
config Object Configuration Object.
Name Type Description
ID String ProfileID
APIData Object Permission Data (PermissionID : true | false)
Returns:
Type Description
Promise Resolved with a response message (Success or failure ) after updating the permissions
Example
var permissionData = {
    "profiles": [
		{
				"permissions_details": [
				{
					"id": "12000000030827",
					"enabled": false
				},
				{
					"id": "12000000029879",
					"enabled": true
				}
			]
		}
	]
}
ZOHO.CRM.API.updateProfile({ID:"12000000033045",APIData:permissionData}).then(function(data){
	console.log(data);
});

//prints 
{
 "profiles": [
   {
     "code": "SUCCESS",
     "details": {},
     "message": "profile updated successfully",
     "status": "success"
   }
 ]
}

staticZOHO.CRM.API.updateRecord(config){Promise}

To update a record in a module
Name Type Description
config Object Configuration Object.
Name Type Description
Entity String SysRefName of the module.
APIData String Update Record Data.
Returns:
Type Description
Promise Resolved with data of update Record Response
Example
var config={
  Entity:"Leads",
  APIData:{
        "id": "1000000049031",
        "Company": "Zylker",
        "Last_Name": "Peterson"
  }
}
ZOHO.CRM.API.updateRecord(config)
.then(function(data){
    console.log(data)
})

//prints 
{
 "data": [
   {
     "code": "SUCCESS",
     "details": {
       "Modified_Time": "2017-12-22T03:29:57+05:30",
       "Modified_By": {
         "name": "NareshTesting ",
         "id": "3000000031045"
       },
       "Created_Time": "2017-12-22T03:27:23+05:30",
       "id": "3000000040016",
       "Created_By": {
         "name": "NareshTesting ",
         "id": "3000000031045"
       }
     },
     "message": "record updated",
     "status": "success"
   }
 ]
}            

staticZOHO.CRM.API.updateRelatedRecords(config){Promise}

To update the relation between the records
Name Type Description
config object Configuration Object
Name Type Description
Entity String SysRefName of the module.
RecordID String RecordID to associate the notes.
RelatedListName String SysRefName of the relatedList.
RelatedRecordID String Related Record ID
APIData String Data to be updated in the related record
Returns:
Type Description
Promise Resolved user matching userID
Example
var APIData = {
	Description:"Test description"
 }
 ZOHO.CRM.API.updateRelatedRecords({Entity:"Leads",RecordID:"1000000079113",RelatedList:"Campaigns",RelatedRecordID:"1000000080041",APIData:APIData})
 .then(function(data){
     console.log(data)
 })
//prints
{
 "data":[
  {
    "code": "SUCCESS",
    "details": {
      "id": 1000000080041
    },
    "message": "relation updated",
    "status": "success"
  }
	]
}