Cratio CRM API Reference
Cratio CRM API Reference
Introduction
---------------------------------------------------------------------
{"error":"Please give the valid API key"} API Key value is Empty, Enter the API Key
{"error":"Access denied.Please provide Incorrect API Key. Check the API key
valid api key."} entered.
.{"error":"your api daily limit crossed for API call cannot be completed as the limit
this operation"} rate exceeds.
To Insert a Record
Purpose : You can use the insertRecords operation to insert records into the required
CRM module.
Important: Use the POST operation to pass these parameters instead of GET
operation.
{
"apikey":"Y3JhdGlvJEAwIyMyMDE3LTA4LTAzIDEyOjQ5OjM0",
"formname":"Leads",
"operation":"insertRecords",
"Overwrite":"false",
"Records":
[
{
"Contact Name":"Prabhu1",
"Company Name":"Quick Sales1",
"Email":"[email protected]",
"Mobile":"9710247372",
"Assigned To":"Prabhu",
"Lead Date":"2017-08-05"
},
{
"Contact Name":"Prabhu2",
"Company Name":"Quick Sales2",
"Email":"[email protected]",
"Mobile":"9710247373",
"Assigned To":"Prabhu",
"Lead Date":"2017-08-05"}
]
}
Error Message:
"{
"Success":
[
{
"Rowindex":1,
"Formid":3683,
"Info":"created"
},
{
"Rowindex":2,
"Formid":3684,
"Info":"created"
}
]
}"
Rowindex - represents row of the record inserted.
Formid - represents ID of the record inserted.
Info - represents the action that performed.
Request sample:
{
"apikey":"dGVzdCRAMTIjIzIwMTctMDgtMDkgMTQ6NDE6MjA=",
"formname":"Leads",
"operation":"insertRecords",
"Overwrite":"true",
"Records":
[
{
"Contact Name":"vinoth",
"Company Name":"Cratio",
"Email":"[email protected]",
"Mobile":"9797979797",
"Assigned To":"",
"Lead Date":"2017-08-07"
},
{
"Contact Name":"Bharathi",
"Company Name":
"Cratio2",
"Email":"[email protected]",
"Mobile":"8189890706",
"Assigned To":"",
"Lead Date":"2017-08-07"
}
]
}
Response sample:
“{
"Success":
[
{
"Rowindex":1,
"Formid":"3683",
"Info":"updated"
},
{
"Rowindex":2,
"Formid":"3684"
,"info":"updated"
}
]
}"
Request sample:
{
"apikey":"QXJhdmluZCRAMzcjIzIwMTctMDgtMTYgMTE6MDE6MjI=",
"formname":"Leads",
"operation":"insertRecords",
"Overwrite":"false",
"Records":
[
{
"Contact Name":"Bharathi1",
"Company Name":"Cratio1",
"Email":"[email protected]",
"Mobile":"9790606709",
"Lead Stage":"Yet To Talk",
"Assigned To":"",
"Time Test":"09-08-2017 10:21 PM"
},
{
"Contact Name":"Bharathi2",
"Company Name":"Cratio2",
"Email":"[email protected]",
"Mobile":"8189890706",
"Lead Stage":"Hot",
"Assigned To":"",
"Time Test":"09-08-2017 10:21 PM"
}
]
}
Response sample:
“{
"Success":
[
{
"Rowindex":1,
"Formid":3462,
"Info":"created"
}
,
{
"Rowindex":2,
"Formid":3463,
"Info":"created"
}
]
}"
For reference
Refer insertRecords.php in same folder.
Purpose
You can use the updateRecords operation to update or modify the records in CRM.
Important: Use the POST operation to pass these parameters instead of GET
operation.
Parameter Data Type Description
Request Sample
{"apikey":"Y3JhdGlvJEAwIyMyMDE3LTA4LTAzIDEyOjQ5OjM0",
"formname":"Leads",
"operation":"updateRecords",
"Records":
[
{
"Form ID":"3522",
"Contact Name":"Prabhu11",
"Company Name":"Quick Sales11",
"Email":"[email protected]",
"Mobile":"9710247372",
"Assigned To":"Suresh Shamalan",
"Lead Date":"2017-08-05"
}
,{
"Form ID":"3523",
"Contact Name":"Prabhu22",
"Company Name":"Quick Sales22",
"Email":"[email protected]",
"Mobile":"9710247373",
"Assigned To":"Suresh Shamalan",
"Lead Date":"2017-08-05"
}
]
}
Error Message:
Example Scenario:
Request sample:
{
"apikey":"dGVzdCRAMTIjIzIwMTctMDgtMDkgMTQ6NDE6MjA=",
"formname":"Leads",
"operation":"updateRecords",
"Records":
[
{
"Form ID":"3671",
"Contact Name":"Bharathi",
"Company Name":"Bharathi Electronics",
"Email":"[email protected]",
"Mobile":"9710247372",
"Assigned To":"vinoth",
"Lead Date":"2017-08-05"
},
{
"Form ID":"3672",
"Contact Name":"vinoth",
"Company Name":"vinoth constructions",
"Email":"[email protected]",
"Mobile":"9710247370",
"Assigned To":"vinoth",
"Lead Date":"2017-08-05"
}
]
}
Response sample:
"{
"Success":
[
{
"Rowindex":1,
"Info":"updated"
},
{
"Rowindex":2,
"Info":"updated"
}
]
}"
For reference
Refer updateRecords.php in Source Code folder.
General Errors
getAllRecords
Purpose
You can use the getAllRecords operation to fetch all users data specified in the API request.
* - Mandatory parameter
In Security, Recently Created template fields only shown at the time of api call to avoid
all fields display and data sharing will apply based on api key(user+appid).
Request Sample:
{
"apikey":"Y3JhdGlvJEAwIyMyMDE3LTA4LTAzIDEyOjQ5OjM0",
"formname":"Leads",
"operation":"getAllRecords",
"displayfields":["Contact Name","Company Name","Email","Mobile","Assigned To"],
"Pageno":2,
"Numofrecords":100,
"sortcolumn":"Mobile",
"Sortorder":"desc",
"Isnull":1
}
Example Scenario:
Scenario 1: To get first 5 Record from Lead form Based on Lead date (descending
order).
● Chose formname as “Leads” and operation as "getAllRecords".
● For example, here we chose four fields as displayfield. ( "Contact
Name","Company Name","Mobile","Lead Date" ).
● To fetch first five records,set Pageno as 1 and number records as 5.
● Sort column as Lead Date, sort order as desc
Request sample:
{
"apikey":"dGVzdCRAMzcjIzIwMTctMDgtMDkgMTA6MTQ6NTU=", //Mandatory field
"formname":"Leads", //Mandatory field
"operation":"getAllRecords", //Mandatory field
"displayfields":["Contact Name","Company Name","Mobile","Lead Date",""],
"Pageno":1, //Represent page Number
"Numofrecords":5, //Represent Number of Records per page
"sortcolumn":"Lead Date",
"Sortorder":"desc",
"Isnull":1
}
Response sample:
{
"pageno":1,
"Totalrows":167,
"Responserows":5,
"data":
[{"Contact Name":"Mr. Navab Rajan","Company
Name":"Negm","Mobile":"9745188823","Lead Date":"2017-08-07"},
{"Contact Name":"SREESHANT MADHAVAN","Company
Name":"homergize.com","Mobile":"9446020160","Lead Date":"2017-08-07"},
{"Contact Name":"Mr. Ankit Dara","Company Name":"Scientific
Corporation","Mobile":"9975310010","Lead Date":"2017-08-06"},
{"Contact Name":"Mr. Nikhil","Company
Name":"Kindersports","Mobile":"9623369464","Lead Date":"2017-08-06"},
{"Contact Name":"Mr. Madan","Company Name":"Future development Consumption
Company","Mobile":"9145067847","Lead Date":"2017-08-06"}]
}"
"{
"Pageno":1,
"Totalrows":112,
"Responserows":5,
"Data":
[{"Contact Name":"Mr. Anup Raut","Opportunity Date":"2017-07-27","Assigned
To":"Aravindh"},
{"Contact Name":"Ms. Neha","Company Name":"Takshila Learning Pvt Ltd","Opportunity
Date":"2017-07-26","Assigned To":"Aravindh"},
{"Contact Name":"Ms. Vanshika singh","Company Name":"Radish
Technologies","Opportunity Date":"2017-07-26","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Bhanu","Company Name":"Telugu Realty","Opportunity
Date":"2017-07-25","Assigned To":"Aravindh"},
{"Contact Name":"Mr. NAGESH","Company Name":"COSMOS","Opportunity
Date":"2017-07-25","Assigned To":"Aravindh"}]
}"
(In response sample, you can see in the first response record,the empty company name
is removed from display)
pageno - current page number.
totalrows - total no. of records available.
responserows - no. of records got by request
For reference
Refer getAllRecords.php in same folder.
getRecordsBySearch
Purpose
You can use this operation to search records by expressions of the selected columns.
* - Mandatory parameter
Request Sample:
{
"apikey":"Y3JhdGlvJEAwIyMyMDE3LTA4LTAzIDEyOjQ5OjM0",
"formname":"Leads",
"operation":"getRecordsBySearch",
"displayfields":["Contact Name","Company Name","Email","Mobile","Assigned To"],
"Pageno":1,
"Numofrecords":100,
"sortcolumn":"Mobile",
"Sortorder":"desc",
"Isnull":1,
"searchcondition":"Lead Date@Last Week@2017-07-23|2017-07-29@AND\$Assigned
To@is@Aravindh@AND$"
}
Error Messages:
" {"error":"Invalid column( Lead ) is presented Incorrect search condition Label Name.
in search condition"}"
Example Scenario:
Request sample:
{
"apikey":"dGVzdCRAMzcjIzIwMTctMDgtMDkgMTA6MTQ6NTU=",
"formname":"Leads",
"operation":"getRecordsBySearch",
"displayfields":["Contact Name","Company Name","Assigned To","Lead Date",""],
"Pageno":1,
"Numofrecords":5,
"Sortcolumn":"",
"Sortorder":"",
"Isnull":1,
"searchcondition":"Lead Date@Last Week@2017-08-1|2017-08-07@AND"
}
Response sample:
{
"Pageno":1,
"Totalrows":11,
"Responserows":5,
"data":
[{"Contact Name":"Ms. Vailane Fernandes","Company Name":"CG GROUP","Lead
Date":"2017-08-05","Assigned To":"Aravindh"},
{"Contact Name":"sudarshan more","Company Name":"Athiya developers","Lead
Date":"2017-08-04","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Ashok Kumar Mali","Company Name":"InNow India Private
Limited","Lead Date":"2017-08-04","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Andrei","Company Name":"Alesonor","Lead
Date":"2017-08-03","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Pankaj Joshi","Company Name":"Punjab Kesari","Lead
Date":"2017-08-02","Assigned To":"Aravindh"}]
}"
Scenario 2: To get the leads record,that are assigned to particular user by search.
● Chose formname as “Leads” and operation as "getRecordsBySearch".
● For example, here we chose four fields as displayfield.
( "Contact Name","Company Name",”Assigned To","Lead Date" ).
● Pageno as 1 and number records as 5.
● Inorder to get a record related to particular user, searchfield is to be like this
( Assigned To@is@USERNAME )
● Replace the USERNAME in above condition as you require. For example, here
we take USERNAME in condition like this ( "Assigned To@is@Aravindh")
( Incase,if you need all records,except the records that are assigned to particular
user means, change the condition as “is not” like this (Assigned To@is
not@USERNAME ) )
Request sample:
{
{"apikey":"dGVzdCRAMzcjIzIwMTctMDgtMDkgMTA6MTQ6NTU=",
"formname":"Leads",
"operation":"getRecordsBySearch",
"displayfields":["Contact Name","Company Name","Assigned To","Lead Date",""],
"Pageno":1,
"Numofrecords":5,
"Sortcolumn":"",
"Sortorder":"",
"Isnull":1,
"searchcondition":"Assigned To@is@Aravindh"
}
Response sample:
{
"Pageno":1,
"Totalrows":102,
"Responserows":5,
"data":
[{"Contact Name":"SREESHANT MADHAVAN","Company
Name":"homergize.com","Lead Date":"2017-08-07","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Navab Rajan","Company Name":"Negm","Lead
Date":"2017-08-07","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Madan","Company Name":"Future development Consumption
Company","Lead Date":"2017-08-06","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Nikhil","Company Name":"Kindersports","Lead
Date":"2017-08-06","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Ankit Dara","Company Name":"Scientific Corporation","Lead
Date":"2017-08-06","Assigned To":"Aravindh"}]
}"
Scenario 3: To get lead records which have empty Company Name and remove the
empty value.
● Chose formname as “Leads” and operation as "getRecordsBySearch".
● For example, here we chose four fields as displayfield.
( "Contact Name","Company Name",”Assigned To","Lead Date" ).
● Pageno as 1 and number records as 5.
● To remove the fields with empty value, set Isnull value as 0.
● Inorder to get lead records which have empty Company Name,
searchcondition is to be
(LabelName@is empty).
● Insert the LabelName in condition as you require. For example, here we take
Company name in condition like this ( Company Name@is empty).
( Incase, if you need the records which should not be empty means, change the
condition like this (LabelName@is not empty) )
Request sample:
{
"apikey":"dGVzdCRAMzcjIzIwMTctMDgtMDkgMTA6MTQ6NTU=",
"formname":"Leads",
"operation":"getRecordsBySearch",
"displayfields":["Contact Name","Company Name","Assigned To","Lead Date",""],
"Pageno":1,
"numofrecords":5,
"Sortcolumn":"",
"Sortorder":"",
"Isnull":0,
"searchcondition":"Company Name@is empty"
}
Response sample:
{
"Pageno":1,
"Totalrows":5,
"Responserows":5,
"data":
[{"Contact Name":"roshni","Lead Date":"2017-05-18","Assigned To":"Ashwin"},
{"Contact Name":"Rakesh Sharma","Lead Date":"2017-05-07","Assigned To":"Ashwin"},
{"Contact Name":"Abhishek","Lead Date":"2017-05-02","Assigned To":"Ashwin"},
{"Contact Name":"Alok","Lead Date":"2017-04-28","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Abhay","Lead Date":"2017-04-19","Assigned To":"Aravindh"}]
}"
(In response sample, you can see the empty company name is removed from display)
Scenario 4: To search a lead records which have a field that contain particular value.
● Chose formname as “Leads” and operation as "getRecordsBySearch".
● For example, here we chose three fields as displayfield.
( "Contact Name","Company Name",”Mobile”).
● Pageno as 1 and number records as 5.
● Inorder to get leads with a Mobile field that contains particular value,
searchcondition is to be (LabelName@contains@Value).
● In above condition enter the field as per your requirement.here, we take condition
like this ( Mobile@contains@9819 )
( Incase, if you need to get the records with field that should not contain particular value
means, change condition as (LabelName@not contains@Value) )
Request sample:
{
"apikey":"dGVzdCRAMzcjIzIwMTctMDgtMDkgMTA6MTQ6NTU=",
"formname":"Opportunities",
"operation":"getRecordsBySearch",
"displayfields":["Contact Name","Company Name","Mobile","",""],
"Pageno":1,
"Numofrecords":5,
"Sortcolumn":"",
"Sortorder":"",
"Isnull":1,
"searchcondition":"Mobile@contains@9819"
}
Response sample:
"{
"Pageno":1,
"Totalrows":3,
"Responserows":3,
"Data":
[{"Contact Name":"Mr. Amit Jasani","Company Name":"Smartnet
Infotech","Mobile":"9819728316"},
{"Contact Name":"Mr. Gaurav Agarwal","Company Name":"Krisha
Impex","Mobile":"9819631007"},
{"Contact Name":"Mr. B.K. Bhatiya (Hindi Person)","Company Name":"Samrath
Services","Mobile":"9981997777"}]}"
Request sample:
{
"apikey":"dmlub3RoJEAyIyMyMDE3LTA4LTExIDE2OjUwOjE3",
"formname":"Leads",
"operation":"getRecordsBySearch",
"displayfields":["Contact Name","Company Name","Email","Mobile","Assigned To"],
"Pageno":1,
"Numofrecords":100,
"sortcolumn":"Mobile",
"Sortorder":"desc",
"Isnull":1,
"searchcondition":"Lead Date@Today@2017-08-11|2017-08-11@AND\$Assigned
To@is@Aravindh@AND$"
}
Response sample:
"{
"Pageno":1,
"Totalrows":1,
"Responserows":1,
"Data":
[
{
"Contact Name":"test",
"Company Name":"test",
"Mobile":"",
"Assigned To":"Aravindh"
}
]
}"
For reference
Refer getRecordsBySearch.php in same folder.
getRecordsByTemplate
Purpose
You can use this operation to search records by template of the selected columns.
Request Sample:
{
"apikey":"Y3JhdGlvJEAwIyMyMDE3LTA4LTAzIDEyOjQ5OjM0",
"formname":"Leads",
"operation":"getRecordsBySearch",
"displayfields":["Contact Name","Company Name","Email","Mobile","Assigned To"],
"Pageno":1,
"Numofrecords":100,
"sortcolumn":"Mobile",
"Sortorder":"desc",
"Isnull":1,
"templatename":"Suresh_Leads"
}
Error Message:
Example Scenario:
Senario 1: To get the lead records that have lead stage as Hot from Template.
● Chose formname as “Leads” and operation as "getRecordsBySearch".
● For example, here we chose five fields as displayfield.
( "Contact Name","Company Name",”Email”,”Mobile”,”Assigned To”).
● Pageno as 1 and number records as 100.
● To get the leads from view template that have lead stage as Hot,give the
templatename as (Hot Leads).
● Verify and give correct templatename for successful request.
Request sample:
{
"apikey":"dGVzdCRAMzcjIzIwMTctMDgtMDkgMTA6MTQ6NTU=",
"formname":"Leads",
"operation":"getRecordsBySearch",
"Displayfields":["Contact Name","Company Name","Email","Mobile","Assigned To"],
"Pageno":1,
"Numofrecords":100,
"sortcolumn":"Mobile",
"Sortorder":"desc",
"Isnull":1,
"templatename":"Hot Leads"
}
Response sample:
{
"Pageno":1,
"Totalrows":6,
"Responserows":6,
"Data":
[{"Contact Name":"Mr. Navab Rajan","Company
Name":"Negm","Mobile":"9745188823","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Nikhil","Company
Name":"Kindersports","Mobile":"9623369464","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Debasish","Company
Name":"Eugenix","Mobile":"9599803060","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Shivprakash","Company Name":"MEC SHOT BLASTING
EQUIPMENTS","Mobile":"9530053850","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Madan","Company Name":"Future development Consumption
Company","Mobile":"9145067847","Assigned To":"Aravindh"},
{"Contact Name":"Mr. Parth Pathak","Company Name":"Sneh World
Studio","Mobile":"8866003372","Assigned To":"Aravindh"}]
}"
Request sample:
{
"apikey":"dGVzdCRAMzcjIzIwMTctMDgtMDkgMTA6MTQ6NTU=",
"formname":"Opportunities",
"operation":"getRecordsBySearch",
"displayfields":["Contact Name","Company Name","Email","Mobile","Assigned To"],
"Pageno":1,
"Numofrecords":100,
"sortcolumn":"Mobile",
"Sortorder":"desc",
"Isnull":1,
"templatename":"Last 7 Days"
}
Response sample:
{
"Pageno":1,
"Totalrows":5,
"Responserows":5,
"Data":
[{"Contact Name":"Mr. Pankaj","Company
Name":"Intellistocks","Mobile":"9999404366","Email":"[email protected]","Assig
ned To":"Aravindh"},
{"Contact Name":"Mr. Amit Jasani","Company Name":"Smartnet
Infotech","Mobile":"9819728316","Email":"[email protected]","Assigned
To":"Aravindh"},
{"Contact Name":"Mr. Karan Singh","Company Name":"Sowar Private
Limited","Mobile":"9810518432","Email":"[email protected]","Assigned
To":"Aravindh"},
{"Contact Name":"Mr. Kirti","Company Name":"Swikar
Garments","Mobile":"9322287939","Email":"[email protected]","Assigned
To":"Aravindh"},
{"Contact Name":"Mr. Thomas","Company Name":"Sun
Estates","Mobile":"9075097917","Email":"[email protected]","Assigned
To":"Aravindh"}]
}"
pageno - current page number.
totalrows - total no. of records available.
responserows - no. of records got by request
For reference:
Refer getRecordsByTemplate.php in same folder.
getRelatedrecords
Purpose
To fetch all subtable or related records of given base record details.
Request Sample
{"apikey":"Y3JhdGlvJEAwIyMyMDE3LTA4LTAzIDEyOjQ5OjM0",
"formname":"Leads",
"operation":"getRelatedRecord",
"Id":2817,
"isnull":1}
Error Message:
Example Scenario:
Scenario 1: To get all Subtable records that are related to particular Lead using ID.
● Chose formname as “Leads” and operation as "getRelatedRecords".
● Inorder to get all subtable values that are related to particular lead,we have to
give correct ID, eg:3458.
Request sample:
{
"apikey":"dGVzdCRAMzcjIzIwMTctMDgtMDkgMTA6MTQ6NTU="
,"formname":"Leads",
"operation":"getRelatedRecord",
"Id":3458,
"Isnull":1
}
Response sample:
{
"Leads_Mailing_History":[],
"Call_Log":[],
"Documents":[]
}"
For reference
Refer getRelatedrecords.php for your reference.
insertRecords
Purpose
You can use the insertRecords operation to insert records into the required CRM
module.
Important: Use the POST operation to pass these parameters instead of GET
operation.
Request Sample
{
"apikey":"Y3JhdGlvJEAwIyMyMDE3LTA4LTAzIDEyOjQ5OjM0",
"formname":"Leads",
"operation":"insertRecords",
"Overwrite":"false",
"Records":
[
{
"Contact Name":"Prabhu1",
"Company Name":"Quick Sales1",
"Email":"[email protected]",
"Mobile":"9710247372",
"Assigned To":"Prabhu",
"Lead Date":"2017-08-05"
},
{
"Contact Name":"Prabhu2",
"Company Name":"Quick Sales2",
"Email":"[email protected]",
"Mobile":"9710247373",
"Assigned To":"Prabhu",
"Lead Date":"2017-08-05"}
]
}
Error Message:
Example Scenario:
"{
"Success":
[
{
"Rowindex":1,
"Formid":3683,
"Info":"created"
},
{
"Rowindex":2,
"Formid":3684,
"Info":"created"
}
]
}"
Rowindex - represents row of the record inserted.
Formid - represents ID of the record inserted.
Info - represents the action that performed.
Scenario 2: Inserting two record that are already exist in lead with record duplication
disabled.
● Enter the formname as “Leads” and operation as “insertRecords”.
● Enter the fields that to be inserted.for example, here we chose six fields
( Contact name,Company Name,Email,Mobile,Assigned To,Lead Date )
● Lead Date is to be in this format eg.(YYYY-MM-DD or DD-MM-YYYY).
● When the record duplication is disabled,
Incase, if the records that are already exist in Lead is once again inserted means,it
overwrite the record with same ID.
● Inorder to disable record duplication, give overwrite value as “true”.
Request sample:
{
"apikey":"dGVzdCRAMTIjIzIwMTctMDgtMDkgMTQ6NDE6MjA=",
"formname":"Leads",
"operation":"insertRecords",
"Overwrite":"true",
"Records":
[
{
"Contact Name":"vinoth",
"Company Name":"Cratio",
"Email":"[email protected]",
"Mobile":"9797979797",
"Assigned To":"",
"Lead Date":"2017-08-07"
},
{
"Contact Name":"Bharathi",
"Company Name":
"Cratio2",
"Email":"[email protected]",
"Mobile":"8189890706",
"Assigned To":"",
"Lead Date":"2017-08-07"
}
]
}
Response sample:
“{
"Success":
[
{
"Rowindex":1,
"Formid":"3683",
"Info":"updated"
},
{
"Rowindex":2,
"Formid":"3684"
,"info":"updated"
}
]
}"
Scenario 3: To Insert records in lead form with Date and Time value
● Enter the formname as “Leads” and operation as “insertRecords”.
● Enter the fields that to be inserted.for example, here we chose seven fields
( Contact name,Company Name,Email,Mobile,Lead Stage,Assigned To,Time Test ).
● Here,Time Test is date and time field.
● Lead Date is to be in this format eg.(YYYY-MM-DD or DD-MM-YYYY).and Time
is to be in this format ( hh:mm TT (TT is AM or PM) or hh:mm:ss (24 hours format) ).
● For Date and Time field, format is to be like this ( DATE TIME ).
● For example, we are inserting Date and Time value as ( 09-08-2017 10:21 PM )
Request sample:
{
"apikey":"QXJhdmluZCRAMzcjIzIwMTctMDgtMTYgMTE6MDE6MjI=",
"formname":"Leads",
"operation":"insertRecords",
"Overwrite":"false",
"Records":
[
{
"Contact Name":"Bharathi1",
"Company Name":"Cratio1",
"Email":"[email protected]",
"Mobile":"9790606709",
"Lead Stage":"Yet To Talk",
"Assigned To":"",
"Time Test":"09-08-2017 10:21 PM"
},
{
"Contact Name":"Bharathi2",
"Company Name":"Cratio2",
"Email":"[email protected]",
"Mobile":"8189890706",
"Lead Stage":"Hot",
"Assigned To":"",
"Time Test":"09-08-2017 10:21 PM"
}
]
}
Response sample:
“{
"Success":
[
{
"Rowindex":1,
"Formid":3462,
"Info":"created"
}
,
{
"Rowindex":2,
"Formid":3463,
"Info":"created"
}
]
}"
For reference
Refer insertRecords.php in same folder.
updateRecords
Purpose
You can use the updateRecords operation to update or modify the records in CRM.
Important: Use the POST operation to pass these parameters instead of GET
operation.
Parameter Data Type Description
Request Sample
{"apikey":"Y3JhdGlvJEAwIyMyMDE3LTA4LTAzIDEyOjQ5OjM0",
"formname":"Leads",
"operation":"updateRecords",
"Records":
[
{
"Form ID":"3522",
"Contact Name":"Prabhu11",
"Company Name":"Quick Sales11",
"Email":"[email protected]",
"Mobile":"9710247372",
"Assigned To":"Suresh Shamalan",
"Lead Date":"2017-08-05"
}
,{
"Form ID":"3523",
"Contact Name":"Prabhu22",
"Company Name":"Quick Sales22",
"Email":"[email protected]",
"Mobile":"9710247373",
"Assigned To":"Suresh Shamalan",
"Lead Date":"2017-08-05"
}
]
}
Error Message:
Example Scenario:
Request sample:
{
"apikey":"dGVzdCRAMTIjIzIwMTctMDgtMDkgMTQ6NDE6MjA=",
"formname":"Leads",
"operation":"updateRecords",
"Records":
[
{
"Form ID":"3671",
"Contact Name":"Bharathi",
"Company Name":"Bharathi Electronics",
"Email":"[email protected]",
"Mobile":"9710247372",
"Assigned To":"vinoth",
"Lead Date":"2017-08-05"
},
{
"Form ID":"3672",
"Contact Name":"vinoth",
"Company Name":"vinoth constructions",
"Email":"[email protected]",
"Mobile":"9710247370",
"Assigned To":"vinoth",
"Lead Date":"2017-08-05"
}
]
}
Response sample:
"{
"Success":
[
{
"Rowindex":1,
"Info":"updated"
},
{
"Rowindex":2,
"Info":"updated"
}
]
}"
For reference
Refer updateRecords.php in Source Code folder.
deleteRecords
Purpose
You can use this operation to delete the selected record (you must specify unique ID of
the record)
* - Mandatory parameter
Request Sample
{
"apikey":"Y3JhdGlvJEAwIyMyMDE3LTA4LTAzIDEyOjQ5OjM0",
"formname":"Leads",
"operation":"deleteRecords",
"Deletedids":["3522","3523"]
}
Example Scenario:
Scenario 1: To delete a lead record based on its ID.
● Enter the formname as “Leads” and operation as deleteRecords”.
● To perform delete operation, ID is important.
● Verity and enter the correct ID. eg: “Deletedids” : “[“3671”]”
Request sample:
{
"apikey":"dGVzdCRAMTIjIzIwMTctMDgtMDkgMTY6MzQ6NDI=",
"formname":"Leads",
"operation":"deleteRecords",
"Deletedids":["3671","3672"]
}
Response sample:
"{
"success":"Deleted Successfully"
}"