API Methods

ZOHO.BIGIN.API.addNotes(config) → {Promise}

Use this method for adding notes to a record.

Parameters

NameTypeDescription
config
ObjectConfiguration Object
Entity
StringSysRefName of the module
RecordID
LongRecordID to associate the notes
Title
StringNotes Title
Content
StringNotes Content

Returns

TypeDescription
PromiseResolved with notes creation status

Example

Request

CopiedZOHO.BIGIN.API.addNotes({Entity:"Contacts",RecordID:"1475615000000292033",Title:"Notes Title",Content:"TitleContent"}).then(function(data){
 console.log(data);
});

Response

Copied{
 "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"
   }
 ]
}

ZOHO.BIGIN.API.deleteRecord(config) → {Promise}

Use this method for deleting a record from a module.

NameTypeDescription
config
ObjectConfiguration Object
Entity
StringSysRefName of the module
RecordID
StringRecordID to associate the notes

Returns

TypeDescription
PromiseResolved with Response to update record

Example

Request

CopiedZOHO.BIGIN.API.deleteRecord({Entity:"Contacts",RecordID: "1000000049031"})
.then(function(data){
    console.log(data)
})

Response

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

ZOHO.BIGIN.API.getAllProfiles() → {Promise}

Use this method for retrieving complete profiles of an app.

Returns

TypeDescription
PromiseResolved with all the profiles present in the app

Example

Request

CopiedZOHO.BIGIN.API.getAllProfiles().then(function(data){
	console.log(data);
});

Response

Copied{
   "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"
       }
    }
   ]
 }

ZOHO.BIGIN.API.getAllRecords(config) → {Promise}

Use this method for retrieving the list of records from a module.

NameTypeDescription
config
ObjectConfiguration Object
Entity
StringSysRefName of the module
sort_order
String(optional) To sort records. allowed values {asc|desc}
converted
String(optional) To get the list of converted records
cvid
String(optional) To get the list of records based on custom views
fields
String(optional) To list all the module records with respect to fields
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

TypeDescription
PromiseResolved with data of record matching with RecordID

Example

Request

CopiedZOHO.BIGIN.API.getAllRecords({Entity:"Contacts",sort_order:"asc",per_page:2,page:1})
.then(function(data){
   console.log(data)
})

Response

Copied{
 "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
 }
}

ZOHO.BIGIN.API.getAllUsers(config) → {Promise}

Use this method for retrieving list of users present in Bigin.

NameTypeDescription
config
ObjectConfiguration Object
type
StringAllowed 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

TypeDescription
PromiseResolved List of users matching specified Type

Example

Request

CopiedZOHO.BIGIN.API.getAllUsers({type:"AllUsers"})
.then(function(data){
    console.log(data)
})

Response

Copied{
 "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
 }
}

ZOHO.BIGIN.API.getProfile(config) → {Promise}

Use this method for retrieving details of a specific profile by providing the profile Id as input.

NameTypeDescription
config
ObjectConfiguration Object
ID
StringProfileID

Returns

TypeDescription
PromiseResolved with the details of the profile for the given ProfileID

Example

Request

CopiedZOHO.BIGIN.API.getProfile({ID:"12000000029858"}).then(function(data){
	console.log(data);
});

Response

Copied{
	"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"
				}
			]
		}]
	}]
}

ZOHO.BIGIN.API.getRecord(config) → {Promise}

Use this method for retrieving complete details of a record.

NameTypeDescription
config
ObjectConfiguration Object
Entity
StringSysRefName of the module
RecordID
StringRecordID to associate the notes

Returns

TypeDescription
PromiseResolved with data of record matching with RecordID

Example

Request

CopiedZOHO.BIGIN.API.getRecord({Entity:"Contacts",RecordID:"1000000030132"})
.then(function(data){
    console.log(data)
})

Response

Copied{
 "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
   }
 ]
}

ZOHO.BIGIN.API.getRelatedRecords(config) → {Promise}

Use this method for retrieving records of a related list.

NameTypeDescription
config
ObjectConfiguration Object
Entity
StringSysRefName of the module
RecordID
StringRecordID to associate the notes
RelatedListName
StringSysRefName 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
user_id
Number(optional) fetch emails accessible to this specific userId
type
Number(optional) Type of emails to fetch 1 - Entity Emails, 2 - user Emails , 3 - All IMAP EMAILS , 4 - ALL Contact Emails (Accounts)
deals_mail
Number(optional) true/false - either to retrive deals email

Returns

TypeDescription
PromiseResolved user matching userID

Examples

Request to fetch related email

CopiedZOHO.BIGIN.API.getRelatedRecords({Entity:"Contacts",RecordID:"111118000000038099",RelatedList:"Emails",type:"2"})
.then(function(response)
{
		var messageId = response.email_related_list[0].message_id;

		// View a particular email
		return ZOHO.BIGIN.API.getRelatedRecords({Entity:"Contacts",RecordID:"111118000000038099",RelatedList:"Emails",RelatedRecordID:messageId,user_id:"111118000000035850"})				

})
.then(function(MessageContent){
	console.log(MessageContent);
}

Request to fetch the record image

Copied//To fetch the record image 
ZOHO.BIGIN.API.getRelatedRecords({Entity:"Contacts",RecordID:"111118000000038099",RelatedList:"photo"})
.then(function(response)
{
		var a = document.createElement("a");
		a.href = window.URL.createObjectURL(response); 
		a.download = "recordImage.png"; 
		a.click();
		window.URL.revokeObjectURL(url);
});

Request to fetch the notes record

CopiedZOHO.BIGIN.API.getRelatedRecords({Entity:"Contacts",RecordID:"1000000030132",RelatedList:"Notes",page:1,per_page:200})
.then(function(data){
    console.log(data)
})

Response

Copied{
 "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": "Contacts",
     "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": "Contacts",
     "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
 }
}

ZOHO.BIGIN.API.getUser(config) → {Promise}

Use this method for retrieving a specific user in Bigin by providing the user Id as input.

NameTypeDescription
config
ObjectConfiguration Object
ID
StringUserID

Returns

TypeDescription
PromiseResolved user matching userID

Example

Request

CopiedZOHO.BIGIN.API.getUser({ID:"3000000029719"})
.then(function(data){
    console.log(data)
})

Response

Copied{
 "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"
   }
 ]
}

Request to fetch the notes record

CopiedZOHO.BIGIN.API.getRelatedRecords({Entity:"Contacts",RecordID:"1000000030132",RelatedList:"Notes",page:1,per_page:200})
.then(function(data){
    console.log(data)
})

Response

Copied{
 "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": "Contacts",
     "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": "Contacts",
     "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
 }
}

ZOHO.BIGIN.API.insertRecord(config) → {Promise}

Use this method for adding a record to a module.

NameTypeDescription
config
ObjectConfiguration Object
Entity
StringSysRefName of the module
Trigger
listThe trigger input can be "workflow", "approval" or "blueprint". If the trigger is not mentioned, the workflows, approvals and blueprints related to the API will get executed. Enter the trigger value as [] to not execute the workflows
APIData
ObjectRecordID to associate the notes

Returns

TypeDescription
PromiseResolved with response data

Examples

Request 1

Copiedvar recordData = {
        "Company": "Zylker",
        "Last_Name": "Peterson"
  }
ZOHO.BIGIN.API.insertRecord({Entity:"Contacts",APIData:recordData,Trigger:["workflow"]}).then(function(data){
	console.log(data);
	});

Response

Copied{
 "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"
   }
 ]
}

Request 2

Copiedvar data = [
{
        "Company": "ZohoCorp",
        "Last_Name": "Babu"
},
{
	"Company": "ZohoCorp",
    	"Last_Name": "Naresh"
}
];
ZOHO.BIGIN.API.insertRecord({Entity:"Contacts",APIData:data,Trigger:["workflow"]}).then(function(data){
	console.log(data);
});

Response

Copied{
 "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"
   }
 ]
}

ZOHO.BIGIN.API.searchRecord(config) → {Promise}

Use this method for retrieving records that matches your search criteria.

NameTypeDescription
config
ObjectConfiguration Object
Entity
StringSysRefName of module
Type
StringAllowed values "email|phone|word|criteria"
Query
Stringquery String
converted
boolean(optional) get Converted records, Allowed values "true|false|both"
approved
boolean(optional) get Approved records, Allowed values "true|false|both"
page
String(optional) Pagination - Page number
per_page
String(optional) Pagination - per page limit
delay
boolean(optional) false - bypass Lucean indexing

Returns

TypeDescription
PromiseResolved with search result

Examples

Request 1

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"phone",Query:"123456789",delay:false})
.then(function(data){
    console.log(data)
})

Request 2

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"email",Query:"test@zoho.com"})
.then(function(data){
    console.log(data)
})

Request 3

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"word",Query:"ZohoCrop"})
.then(function(data){
    console.log(data)
})

Request 4

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"(Company:equals:Zoho)"})
.then(function(data){
    console.log(data)
})

Request 5

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"((Company:equals:Zoho)or(Company:equals:zylker))"})
.then(function(data){
    console.log(data)
})

ZOHO.BIGIN.API.updateProfile(config) → {Promise}

Use this method for updating permissions for a specific profile by providing the profile Id as input.

NameTypeDescription
config
ObjectConfiguration Object
ID
StringProfileID
APIData
ObjectPermission Data (PermissionID : true | false)

Returns

TypeDescription
PromiseResolved with a response message (Success or failure ) after updating the permissions

Example

Request

Copiedvar permissionData = {
    "profiles": [
		{
				"permissions_details": [
				{
					"id": "12000000030827",
					"enabled": false
				},
				{
					"id": "12000000029879",
					"enabled": true
				}
			]
		}
	]
}
ZOHO.BIGIN.API.updateProfile({ID:"12000000033045",APIData:permissionData}).then(function(data){
	console.log(data);
});

Response

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

Request 3

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"word",Query:"ZohoCrop"})
.then(function(data){
    console.log(data)
})

Request 4

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"(Company:equals:Zoho)"})
.then(function(data){
    console.log(data)
})

Request 5

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"((Company:equals:Zoho)or(Company:equals:zylker))"})
.then(function(data){
    console.log(data)
})

ZOHO.BIGIN.API.updateRecord(config) → {Promise}

Use this method for updating a record in a module.

NameTypeDescription
config
ObjectConfiguration Object
Entity
StringSysRefName of the module
Trigger
listThe trigger input can be "workflow", "approval" or "blueprint". If the trigger is not mentioned, the workflows, approvals and blueprints related to the API will get executed. Enter the trigger value as [] to not execute the workflows
APIData
StringUpdate Record Data

Returns

TypeDescription
PromiseResolved with data of update Record Response

Example

Request

Copiedvar config={
  Entity:"Contacts",
  APIData:{
        "id": "1000000049031",
        "Company": "Zylker",
        "Last_Name": "Peterson"
  },
  Trigger:["workflow"]
}
ZOHO.BIGIN.API.updateRecord(config)
.then(function(data){
    console.log(data)
})

Response

Copied{
 "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"
   }
 ]
}

Request 3

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"word",Query:"ZohoCrop"})
.then(function(data){
    console.log(data)
})

Request 4

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"(Company:equals:Zoho)"})
.then(function(data){
    console.log(data)
})

Request 5

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"((Company:equals:Zoho)or(Company:equals:zylker))"})
.then(function(data){
    console.log(data)
})

ZOHO.BIGIN.API.updateRelatedRecords(config) → {Promise}

Use this method for updating the relation between the records.

NameTypeDescription
config
ObjectConfiguration Object
Entity
StringSysRefName of the module
RecordID
StringRecordID to associate the notes
RelatedListName
StringSysRefName of the relatedList
RelatedRecordID
StringRelated Record ID
APIData
StringData to be updated in the related record

Returns

TypeDescription
PromiseResolved user matching userID

Examples

Request 1

CopiedTo upload Record Image
var file = document.getElementById("attachmentinput").files[0];
ZOHO.BIGIN.API.updateRelatedRecords({Entity:"Contacts",RecordID:"111118000000038099",RelatedList:"photo",APIData:file})
.then(function(data)
{
 	console.log(data)
})

Request 2

Copiedvar APIData = {
	Description:"Test description"
 }
 ZOHO.BIGIN.API.updateRelatedRecords({Entity:"Contacts",RecordID:"1000000079113",RelatedList:"Campaigns",RelatedRecordID:"1000000080041",APIData:APIData})
 .then(function(data){
     console.log(data)
 })

Response

Copied{
 "data":[
  {
    "code": "SUCCESS",
    "details": {
      "id": 1000000080041
    },
    "message": "relation updated",
    "status": "success"
  }
	]
}

Request 4

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"(Company:equals:Zoho)"})
.then(function(data){
    console.log(data)
})

Request 5

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"((Company:equals:Zoho)or(Company:equals:zylker))"})
.then(function(data){
    console.log(data)
})

ZOHO.BIGIN.API.getOrgVariables({"nameSpace":"VariableName"}) → {Promise}

Use this method for retrieving the values of Bigin Variables.

NameTypeDescription
nameSpace
StringThe custom variable name of Bigin

Returns

TypeDescription
PromiseResolved with data of Custom Property Value

Example

Request

CopiedZOHO.BIGIN.API.getOrgVariables({"nameSpace" : "VariableName"}).then(function(data){
console.log(data);	
});

Response

Copied{
    "Content": "samplevalue"
}

Response

Copied{
 "data":[
  {
    "code": "SUCCESS",
    "details": {
      "id": 1000000080041
    },
    "message": "relation updated",
    "status": "success"
  }
	]
}

Request 4

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"(Company:equals:Zoho)"})
.then(function(data){
    console.log(data)
})

Request 5

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"((Company:equals:Zoho)or(Company:equals:zylker))"})
.then(function(data){
    console.log(data)
})

ZOHO.BIGIN.API.setOrgVariable({"apiname":"VariableApiName", "value":"VariableValue"}) → {Promise}

Use this method for setting up the Bigin Variable value.

NameTypeDescription
apiname
StringThe api name of Bigin's custom variable
value
StringThe Bigin's custom variable value you want to set

Returns

TypeDescription
PromiseResolved with new value of Custom Property Variable

Example

Request

CopiedZOHO.BIGIN.API.setOrgVariable({"apiname":"VariableApiName","value":"samplevalue"}).then(function(data){
console.log(data);	
});

Response

Copied{
    "status_code": "200",
    "response": "{\"libraryfunction__bigvar\":\"samplevalue\",\"message\":\"New value updated successfully.\"}"
}

Response

Copied{
 "data":[
  {
    "code": "SUCCESS",
    "details": {
      "id": 1000000080041
    },
    "message": "relation updated",
    "status": "success"
  }
	]
}

Request 4

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"(Company:equals:Zoho)"})
.then(function(data){
    console.log(data)
})

Request 5

CopiedZOHO.BIGIN.API.searchRecord({Entity:"Contacts",Type:"criteria",Query:"((Company:equals:Zoho)or(Company:equals:zylker))"})
.then(function(data){
    console.log(data)
})