Crmnext Rest API-guide
Crmnext Rest API-guide
2
Table of Contents
3
Introducing REST API
Web Services are of two kinds SOAP and REST, while SOAP is quite complex and rule based REST is
an Architectural Style that is simple and quite light. It is technically not a standard and works on the
HTTP protocol. REST API, also known by the names of RESTful API or RESTful Web Service is a type of
web service which is REST based.
It is one of the most powerful types of API that provides a powerful, convenient and flexible
mechanism to connect and interact with applications. This web service is not constrained to XML,
but instead can return XML, JSON, YAML or any other format as per the client requests.
REST stands for Representational State Transfer is basically an architectural style and RESTful is the
interpretation of it.
Characteristics
Some of the important characteristics of RESTful API are as follows:
• Client-Server
• Stateless
• Cacheable
• Uniform Interface
• Layered System
• Code on Demand
Other Benefits
• Simplicity
• Evolveability
• Reusability
• Visibility
• Extensibility
• Configuration
4
REST API Security
Security control is one of the essential and prerequisite elements of any application when designing
or deploying RESTful API. The security aspect for API’s should be a serious and top consideration for
the organizations and thus solving the security challenge is expected to be a catalyst in the growth in
the API world.
Every day, new threats and vulnerabilities are encountered and every day, organizations find
themselves racing against the clock to fix them. As malicious users live in all corners, thus anything
that is sensitive and private must be barred behind an authentication first and authorization, next.
Using the latest cryptographic protocols, end to end encryption is implemented in CRMNEXT which
helps to ensure full security against any malicious attacks and malwares
To counter possibility of such attack, a type of key i.e. ’Nonce’ has been applied or set in the request
header by the security admin. The value of the key is encrypted with AES encryption algorithm. This
Nonce token or key is a simply cryptographic combination of GUID value, UNIX timestamp.
These are the important prerequisites required at Sender’s end to share the key (only when the
encryption is on).
5
NOTE: The Nonce token should be valid for only one request; also, the timestamp
value added to the token can be used to limit the time within which the token is
valid.
Thus, when a request is received and the encryption is on, then the Content -Type for the request
body should be Text and encrypted via AES algorithm. Also, the value of the Query String for request
body should be encrypted and key should not be encrypted.
The encryption algorithm is combination of two attributes; Key and IV. Using this encryption, the
data of the request body is encrypted and the same combination is used for decryption. Thus, the
preventive measures to guard against such attacks are using encryption techniques or timestamp on
all messages.
6
Classic Methods
Authentication Method
Login
The login method is used to validate the user credentials of the user under which the web service is
being called. This method returns token information. The access token needs to be passed with the
header.
Pre-requisite
Valid CRMNEXT LoginID and Password needs to be specified.
Syntax
curl https://{RestApiRootUrl}/crmWebApi//oauth2/token -H "Authorization: Bearer access_token"
{
"userName":"[email protected]",
"password":"acid_qa"
}
7
{
"access_token": "5a4df0b6ed673a090c781a6c491447b8",
"expires_in": 1800,
"token_type": "Bearer",
"refresh_token": "f927bbc7e208c12090ea7fd00494b668"
}
acess_token Access token acts as a session ID that the application uses for
making requests. This token should be protected though it
was user credentials.
token_type Value is Bearer for all responses that include an access token.
Metadata Methods
getAssignedRoles
Description
This method retrieves the roles assigned to the logged in user. The method returns a json Array of
the assigned roles.
Pre-requisite
Successful user login with the given login credentials is needed.
Syntax
curl https://{RestApiRootUrl}/crmWebApi/getAssignedRoles -H "Authorization: Bearer access_token"
Sample Output
8
[
{
"RoleId": 1,
"RoleName": "Administrator"
},
{
"RoleId": 1038,
"RoleName": "Administrator(c)"
},
{
"RoleId": 1038,
"RoleName": "Administrator(c)"
},
{
"RoleId": 1047,
"RoleName": "Administrator12"
},
{
"RoleId": 1059,
"RoleName": "AdminNewRoleForManagement"
},
{
"RoleId": 1004,
"RoleName": "Branch Unit Manager"
},
{
"RoleId": 1081,
"RoleName": "BW_Test"
},
{
"RoleId": 1066,
"RoleName": "Log Manager"
},
{
"RoleId": 5,
"RoleName": "Managers (Marketing)"
},
{
"RoleId": 2,
"RoleName": "Marketing Users"
},
{
"RoleId": 1064,
"RoleName": "Non Admin"
},
{
"RoleId": 1023,
"RoleName": "Operations Manager"
}
9
]
getCurrentRole
Description
This method returns the user role with which the user has logged in by default. This is typically
needed in cases where a web service user has been assigned multiple roles and we need to check his
current role and decide whether a role switch is needed or not.
Pre-requisite
Successful user login with the given login credentials is needed.
Syntax
curl https://{RestApiRootUrl}/crmWebApi/getCurrentRole -H "Authorization: Bearer access_token"
Sample Output
[
{
"RoleName": "Administrator",
"RoleId": 1
}
]
getStatusCodes
Description
The GetStatusCodes method is used to retrieve the status code Key for an input status code text.
Additionally, we also need to specify the CRMNEXT object type for which the status code lookup
needs to be done
Pre-requisite
• Successful user login with given credentials is needed
• Valid status code text and CRMNEXT object type should passed in the input
Syntax
curl https://{RestApiRootUrl}/crmWebApi/getStatusCodes -H "Authorization: Bearer access_token"
10
Parameter Name Description
objectType Specify the CRMNEXT object for which status code lookup needs
to be done.
value Specify the status code text for which status code key needs to be
retrieved.
11
Sample Output
[
{
"Key": "1498",
"IsSuccess": "True"
}
]
getStatusCodeCollection
Description
The GetStatusCodeCollection method is used to retrieve all the status-codes assigned to a layout.
The ObjectType and the layout object for which the assigned status-codes need to be retrieved have
to be passed in the input parameters. The layoutKey can be first retrieved using the GetLayouts
method.
Syntax
curl https://{RestApiRootUrl}/crmWebApi/getStatusCodeCollection -H "Authorization: Bearer access_token"
objectType Object Type of the CRMNEXT object for which the assigned status
codes need to be returned.
Sample Output
12
[
{
"Value": "Active",
"Key": "1445",
"IsSuccess": "True"
},
{
"Value": "Eligible",
"Key": "129",
"IsSuccess": "True"
},
{
"Value": "Fresh Lead",
"Key": "128",
"IsSuccess": "True"
},
{
"Value": "Application Rejected",
"Key": "132",
"IsSuccess": "True"
},
{
"Value": "BRE Check",
"Key": "133",
"IsSuccess": "True"
},
{
"Value": "New",
"Key": "1446",
"IsSuccess": "True"
},
{
"Value": "Approved in Principle",
"Key": "130",
"IsSuccess": "True"
},
{
"Value": "Closed",
"Key": "1448",
"IsSuccess": "True"
},
{
"Value": "Loan Disbursed",
"Key": "131",
"IsSuccess": "True"
},
{
"Value": "s2",
13
"Key": "10000071",
"IsSuccess": "True"
},
{
"Value": "Admin",
"Key": "10000111",
"IsSuccess": "True"
},
{
"Value": "dasd",
"Key": "10000123",
"IsSuccess": "True"
},
{
"Value": "Lead Review",
"Key": "134",
"IsSuccess": "True"
},
{
"Value": "Application Hold",
"Key": "160",
"IsSuccess": "True"
},
{
"Value": "Fresh Lead2",
"Key": "10000138",
"IsSuccess": "True"
},
{
"Value": "asd",
"Key": "10000145",
"IsSuccess": "True"
},
{
"Value": "Documents Collected",
"Key": "161",
"IsSuccess": "True"
},
{
"Value": "Handoff To LOS",
"Key": "162",
"IsSuccess": "True"
},
{
"Value": "Not Eligible",
"Key": "164",
"IsSuccess": "True"
},
{
14
"Value": "Not Interested",
"Key": "165",
"IsSuccess": "True"
},
{
"Value": "leadstateNew",
"Key": "10000163",
"IsSuccess": "True"
},
{
"Value": "APPREF Generation",
"Key": "167",
"IsSuccess": "True"
},
{
"Value": "CFA",
"Key": "168",
"IsSuccess": "True"
},
{
"Value": "CAM Generation",
"Key": "170",
"IsSuccess": "True"
},
{
"Value": "Deviation",
"Key": "171",
"IsSuccess": "True"
},
{
"Value": "Credit Approval",
"Key": "172",
"IsSuccess": "True"
},
{
"Value": "Branch Data Entry",
"Key": "174",
"IsSuccess": "True"
},
{
"Value": "Docs Gen",
"Key": "175",
"IsSuccess": "True"
},
{
"Value": "Branch RMU",
"Key": "176",
"IsSuccess": "True"
},
15
{
"Value": "Ledger Check",
"Key": "180",
"IsSuccess": "True"
},
{
"Value": "Disbursal",
"Key": "183",
"IsSuccess": "True"
},
{
"Value": "Lost Lead",
"Key": "1498",
"IsSuccess": "True"
},
{
"Value": "s1",
"Key": "10000070",
"IsSuccess": "True"
}
]
16
getLookupKey
Description
This method returns all the lookup keys for a given Lookup Item. The method expects the Group key,
Lookup Item name as input and returns the lookup ID for that Lookup item.
Pre-requisite
• Successful user login with the given login credentials is needed.
• The Lookup Item name specified should exist in CRMNEXT.
Syntax
curl https://{RestApiRootUrl}/crmWebApi/getLookupKey -H "Authorization: Bearer access_token"
lookupName The lookup name value for which the lookup Key needs to be
retrieved.
Sample Output
[
{
"Key": "10",
"IsSuccess": "True",
"Message": "Success"
}
]
17
getLookupDetails
Description
The GetLookupDetails method is used to retrieve the json Object of all the lookup
valuescorresponding to the groupkey of the lookup passed in the input parameter.
Pre-Requisite
• Successful user login with the given login credentials is needed.
• Valid lookup key for which all lookup values need to be retrieved should be passed in the input
parameter.
key Groupkey of the lookup for which the lookup values need to be
retrieved.
Sample Output
{
"lookupup": [
{
"groupKey": 10,
"lookupID": 0,
"lookupName": "",
"displayOrder": 0,
"tag": "",
"code": null,
"isEditable": false,
"parentID": -1,
"topParentID": -1,
"isActive": true,
"isParent": null
},
{
"groupKey": 10,
"lookupID": 1,
"lookupName": "Hot",
"displayOrder": 1,
18
"tag": "",
"code": null,
"isEditable": false,
"parentID": -1,
"topParentID": -1,
"isActive": true,
"isParent": null
},
{
"groupKey": 10,
"lookupID": 2,
"lookupName": "Warm",
"displayOrder": 2,
"tag": "",
"code": null,
"isEditable": false,
"parentID": -1,
"topParentID": -1,
"isActive": true,
"isParent": null
},
{
"groupKey": 10,
"lookupID": 3,
"lookupName": "Cold",
"displayOrder": 3,
"tag": "",
"code": null,
"isEditable": false,
"parentID": -1,
"topParentID": -1,
"isActive": true,
"isParent": null
},
{
"groupKey": 10,
"lookupID": 4,
"lookupName": "Dead",
"displayOrder": 4,
"tag": "",
"code": null,
"isEditable": false,
"parentID": -1,
"topParentID": -1,
"isActive": true,
"isParent": null
}
]
}
19
getLayouts
The GetLayouts returns the Layout collection for the CRMNEXT object sent in the input. The Layout
collection contains the Layout key and the Layout Name of all the layouts for that object.
Syntax
curl https://{RestApiRootUrl}/crmWebApi/getLayouts -H "Authorization: Bearer access_token"
objectType Object Type of the CRMNEXT object for which the LayoutID needs
to be returned.
Sample Output
[
{
"layoytKey": "10002595",
"LayoutName": "MultiLingualTest",
"IsSuccess": true
},
{
"layoytKey": "10002596",
"LayoutName": "5 may cust",
"IsSuccess": true
},
{
"layoytKey": "10002597",
"LayoutName": "SSP5may16Acc",
"IsSuccess": true
},
{
"layoytKey": "10002602",
"LayoutName": "TestLayoutMay6",
"IsSuccess": true
20
},
{
"layoytKey": "10002604",
"LayoutName": "6 may",
"IsSuccess": true
},
{
"layoytKey": "10002619",
"LayoutName": "may 10",
"IsSuccess": true
},
{
"layoytKey": "10002625",
"LayoutName": "Clone:MultiLingualTest",
"IsSuccess": true
},
{
"layoytKey": "10002645",
"LayoutName": "cust 16",
"IsSuccess": true
},
{
"layoytKey": "10002673",
"LayoutName": "Catalyst",
"IsSuccess": true
},
{
"layoytKey": "10203043",
"LayoutName": "card_customization(d)",
"IsSuccess": true
},
{
"layoytKey": "10203061",
"LayoutName": "account card layout ",
"IsSuccess": true
},
{
"layoytKey": "10203095",
"LayoutName": "cloning",
"IsSuccess": true
},
{
"layoytKey": "10203121",
"LayoutName": "PyramidField",
"IsSuccess": true
},
{
"layoytKey": "10203124",
"LayoutName": "Pyramid Field On Detail",
"IsSuccess": true
21
},
{
"layoytKey": "10002360",
"LayoutName": "s",
"IsSuccess": true
},
{
"layoytKey": "10002546",
"LayoutName": "cust abc",
"IsSuccess": true
},
{
"layoytKey": "10002554",
"LayoutName": "customer123",
"IsSuccess": true
},
{
"layoytKey": "10002556",
"LayoutName": "composite_card_newux",
"IsSuccess": true
},
{
"layoytKey": "10002462",
"LayoutName": "account 1",
"IsSuccess": true
},
{
"layoytKey": "10002314",
"LayoutName": "10 march lay",
"IsSuccess": true
},
{
"layoytKey": "10002260",
"LayoutName": "TestLayoutMarch8",
"IsSuccess": true
},
{
"layoytKey": "10002196",
"LayoutName": "AccountLayout",
"IsSuccess": true
},
{
"layoytKey": "10002162",
"LayoutName": "CIAccountLayout",
"IsSuccess": true
},
{
"layoytKey": "10001824",
"LayoutName": "cards testing",
"IsSuccess": true
22
},
{
"layoytKey": "10001771",
"LayoutName": "Customer 19 Nov",
"IsSuccess": true
},
{
"layoytKey": "10001728",
"LayoutName": "GraphCards",
"IsSuccess": true
},
{
"layoytKey": "10001429",
"LayoutName": "External Card",
"IsSuccess": true
},
{
"layoytKey": "10001269",
"LayoutName": "Acc 5 Oct 1",
"IsSuccess": true
},
{
"layoytKey": "10001264",
"LayoutName": "Account 5 Oct",
"IsSuccess": true
},
{
"layoytKey": "10001168",
"LayoutName": "25 Sept 2015",
"IsSuccess": true
},
{
"layoytKey": "10001141",
"LayoutName": "24 Sept 2015",
"IsSuccess": true
},
{
"layoytKey": "10001139",
"LayoutName": "New react layout 24 ",
"IsSuccess": true
},
{
"layoytKey": "10001898",
"LayoutName": "8 dec ",
"IsSuccess": true
},
{
"layoytKey": "10001125",
"LayoutName": "React All Cards Layout",
23
"IsSuccess": true
},
{
"layoytKey": "10001090",
"LayoutName": "Crd 2 Column 22 Sept",
"IsSuccess": true
},
{
"layoytKey": "10000930",
"LayoutName": "Test React card Layout",
"IsSuccess": true
},
{
"layoytKey": "10000905",
24
"LayoutName": "Wallet Share",
"IsSuccess": true
},
{
"layoytKey": "108085",
"LayoutName": "Family Details",
"IsSuccess": true
},
{
"layoytKey": "108084",
"LayoutName": "HDFC Account",
"IsSuccess": true
},
{
"layoytKey": "108080",
"LayoutName": "Central Upload",
"IsSuccess": true
},
{
"layoytKey": "10000089",
"LayoutName": "ExpenseTest",
"IsSuccess": true
},
{
"layoytKey": "108073",
"LayoutName": "ScreenFlow Assests",
"IsSuccess": true
},
{
"layoytKey": "108072",
"LayoutName": "Screen flow Test",
"IsSuccess": true
},
{
"layoytKey": "108021",
"LayoutName": "qa",
"IsSuccess": true
},
{
"layoytKey": "108019",
"LayoutName": "Default",
"IsSuccess": true
},
{
"layoytKey": "107989",
"LayoutName": "testlayout",
"IsSuccess": true
},
{
25
"layoytKey": "103395",
"LayoutName": "Dependent Field Visibilty",
"IsSuccess": true
},
{
"layoytKey": "103387",
"LayoutName": "Migration Test",
"IsSuccess": true
},
{
"layoytKey": "2044",
"LayoutName": "FICC Non user Employees",
"IsSuccess": true
},
{
"layoytKey": "2042",
"LayoutName": "Dealer",
"IsSuccess": true
},
{
"layoytKey": "1003",
"LayoutName": "Customer",
"IsSuccess": true
},
{
"layoytKey": "10203138",
"LayoutName": "tab list",
"IsSuccess": true
},
{
"layoytKey": "10203176",
"LayoutName": "Account Related Product Pricebook",
"IsSuccess": true
},
{
"layoytKey": "10203179",
"LayoutName": "Sales Account",
"IsSuccess": true
},
{
"layoytKey": "10203201",
"LayoutName": "Pyramid21Nov",
"IsSuccess": true
},
{
"layoytKey": "10203245",
"LayoutName": "Annu",
"IsSuccess": true
},
{
26
"layoytKey": "10203293",
"LayoutName": "ServiceModelTest",
"IsSuccess": true
},
{
"layoytKey": "10203294",
"LayoutName": "6 march",
"IsSuccess": true
},
{
"layoytKey": "10203297",
"LayoutName": "all system fields",
"IsSuccess": true
},
{
"layoytKey": "10203306",
"LayoutName": "Account Smart Activity Process ",
"IsSuccess": true
},
{
"layoytKey": "10203308",
"LayoutName": "S(DNC)",
"IsSuccess": true
},
{
"layoytKey": "10203313",
"LayoutName": "account_lookup",
"IsSuccess": true
},
{
"layoytKey": "10203321",
"LayoutName": "Service modeller",
"IsSuccess": true
},
{
"layoytKey": "10203327",
"LayoutName": "TEmp",
"IsSuccess": true
},
{
"layoytKey": "10303146",
"LayoutName": "14 july report card",
"IsSuccess": true
},
{
"layoytKey": "10303156",
"LayoutName": "My Test attachment ",
"IsSuccess": true
},
27
{
"layoytKey": "10303201",
"LayoutName": "shalini_layout(childflow)",
"IsSuccess": true
},
{
"layoytKey": "10303213",
"LayoutName": "Account_shubham",
"IsSuccess": true
},
{
"layoytKey": "10303214",
"LayoutName": "11OctProfileCard",
"IsSuccess": true
},
{
"layoytKey": "10303237",
"LayoutName": "AnnuAcc",
"IsSuccess": true
},
{
"layoytKey": "10303278",
"LayoutName": "SidePanelLayout",
"IsSuccess": true
}
]
getLayoutsFieldMetadata
Description
The GetLayoutFieldMetaData method is used to retrieve the metadata of the fields available on
theLayout whose Layout key has been passed in the input. This method can be used to retrieve
thelayout field information like whether the field is mandatory on the layout or not.
Pre-Requisite
• Successful user login with the given login credentials is needed.
• Valid Layout key should passed in the input.
Syntax
curl https://{RestApiRootUrl}/crmWebApi/getLayoutsFieldMetadata -H "Authorization: Bearer access_token"
28
Query String Parameters
objectType Object Type of the CRMNEXT object for which the LayoutID needs
to be returned.
Sample Output
[
{
"FieldName": "Amount",
"Type": "MulticurrencyAmount",
"IsMandatory": false,
"Label": "SN_Lead_Amount",
"FieldId": 10001569,
"IsSuccess": true
},
{
"FieldName": "CampaignName",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_CampaignName",
"FieldId": 10001584,
"IsSuccess": true
},
{
"FieldName": "StatusCode",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_StatusCode",
"FieldId": 10001732,
"IsSuccess": true
},
{
"FieldName": "TerritoryName",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_TerritoryName",
"FieldId": 10001740,
"IsSuccess": true
29
},
{
"FieldName": "LeadName",
"Type": "Text",
"IsMandatory": true,
"Label": "SN_Lead_Name",
"FieldId": 10001660,
"IsSuccess": true
},
{
"FieldName": "Title",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_Title",
"FieldId": 10001742,
"IsSuccess": true
},
{
"FieldName": "CompanyName",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_CompanyName",
"FieldId": 10001592,
"IsSuccess": true
},
{
"FieldName": "EmployeeCount",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_EmployeeCount",
"FieldId": 10001608,
"IsSuccess": true
},
{
"FieldName": "PreferredChannel",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_PreferredChannel",
"FieldId": 10001693,
"IsSuccess": true
},
{
"FieldName": "Industry",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_Industry",
"FieldId": 10001627,
"IsSuccess": true
},
30
{
"FieldName": "Rating",
"Type": "Text",
"IsMandatory": true,
"Label": "SN_Lead_RatingName",
"FieldId": 10001714,
"IsSuccess": true
},
{
"FieldName": "LeadOwnerName",
"Type": "Text",
"IsMandatory": true,
"Label": "SN_Lead_OwnerName",
"FieldId": 10057455,
"IsSuccess": true
},
{
"FieldName": "LeadSource",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_Source",
"FieldId": 10001669,
"IsSuccess": true
},
{
"FieldName": "Product",
"Type": "Text",
"IsMandatory": true,
"Label": "SN_Lead_ProductName",
"FieldId": 10057449,
"IsSuccess": true
},
{
"FieldName": "Comments",
"Type": "Comments",
"IsMandatory": false,
"Label": "SN_Lead_Comments",
"FieldId": 10001591,
"IsSuccess": true
},
{
"FieldName": "Email",
"Type": "Email",
"IsMandatory": false,
"Label": "SN_Lead_Email",
"FieldId": 10001606,
"IsSuccess": true
},
{
31
"FieldName": "Fax",
"Type": "Phone",
"IsMandatory": false,
"Label": "SN_Lead_Fax",
"FieldId": 10001614,
"IsSuccess": true
},
{
"FieldName": "MobilePhone",
"Type": "Phone",
"IsMandatory": false,
"Label": "SN_Lead_MobilePhone",
"FieldId": 10001680,
"IsSuccess": true
},
{
"FieldName": "OfficePhone",
"Type": "Phone",
"IsMandatory": false,
"Label": "SN_Lead_OfficePhone",
"FieldId": 10001682,
"IsSuccess": true
},
{
"FieldName": "Phone",
"Type": "Phone",
"IsMandatory": false,
"Label": "SN_Lead_Phone",
"FieldId": 10001691,
"IsSuccess": true
},
{
"FieldName": "WebsiteURL",
"Type": "Url",
"IsMandatory": false,
"Label": "SN_Lead_Website",
"FieldId": 10001744,
"IsSuccess": true
},
{
"FieldName": "Address",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_Address",
"FieldId": 10001568,
"IsSuccess": true
},
{
"FieldName": "City",
32
"Type": "City",
"IsMandatory": false,
"Label": "SN_Lead_City",
"FieldId": 10001587,
"IsSuccess": true
},
{
"FieldName": "Country",
"Type": "Country",
"IsMandatory": false,
"Label": "SN_Lead_Country",
"FieldId": 10001595,
"IsSuccess": true
},
{
"FieldName": "Locality",
"Type": "Text",
"IsMandatory": false,
"Label": "SN_Lead_Locality",
"FieldId": 10001676,
"IsSuccess": true
},
{
"FieldName": "State",
"Type": "State",
"IsMandatory": false,
"Label": "SN_Lead_State",
"FieldId": 10001731,
"IsSuccess": true
},
{
"FieldName": "ZipCode",
"Type": "Pincode",
"IsMandatory": false,
"Label": "SN_Lead_ZipCode",
"FieldId": 10001745,
"IsSuccess": true
},
{
"FieldName": "FollowupAppointment",
"Type": "None",
"IsMandatory": false,
"Label": "FollowupAppointment",
"FieldId": -1,
"IsSuccess": true
},
{
"FieldName": "LeadMalingList",
"Type": "None",
33
"IsMandatory": false,
"Label": "LeadMalingList",
"FieldId": -1,
"IsSuccess": true
}
]
Operational Methods
activateDeactivateUser
The ActivateDeactivateUser method is used to Activate or deactive the user profile depending upon
the isActive vale passed as input parameter in the method.
Pre-requisite
• Successful user login with the given login credentials is needed.
• Valid UniqueFieldName and UniqueFieldValue should be passed.
• Valid isActive should be passed.
Syntax
curl https://{RestApiRootUrl}/crmWebApi/activateDeactivateUser -H "Authorization: Bearer access_token"
34
NOTE: All Query String Parameters are Case Sensitive.
Sample Output
{
"IsSuccess": "True",
"Message": ""
}
enableDisableUserLogin
Description
The EnableDisableLogin method is used to enable or disable a user from login depending on the
isEnable vale passed as input parameter in the method.
Pre-requisite
• Successful user login with the given login credentials is needed.
• Valid UniqueFieldName and UniqueFieldValue should be passed.
• Valid isEnable should be passed.
Syntax
curl https://{RestApiRootUrl}/crmWebApi/enableDisableUserLogin -H "Authorization: Bearer access_token"
35
Sample Output:
{
"isSuccess": true,
"message": ""
}
deleteUserByParam
Description:
The method is used to delete a user from the application and assign all the tasks of the deleted User
to the new user.
Syntax
curl https://localhost/Acidaes.Api.CRMnext/crmWebApi/deleteUserByParam
Input Parameters
newUserFieldName Unique field Name for new User for assigning all the task of
deleted User first.
Sample Output
36
{
"parameter":
{
"UserID":"1"
}
}
FetchObject
Description
The FetchObject method is used to fetch records in CRMNEXT. The value provided in the output field
list key in the input request of the JSON.
Pre-requisite
• Successful user login with the given login credentials is needed.
• All CRMNEXT system mandatory fields should be provided when sending a record for creation.
• Filter Parameter should be correct or ItemID must be given in input as per item type
Syntax
https://localhost/Acidaes.Api.CRMnext/crmWebApi/FetchObject
objectType Object Type of the CRMNEXT object for which the LayoutID needs
to be returned.
Request Body
37
{
"outputFieldList":
["LastName","LeadID","Email","MobilePhone","CompanyName","ProductID"],
"objectSearchCondition":[
{
"FieldName":"LeadID",
"Value":"1917",
"Operation":"equal"
},
{
"FieldName":"MobilePhone",
"Value":"8888888888",
"Operation":"equal"
}
],
"queryOptions":{
"advanceFilterExpression":"",
"PageSize":"50",
"Index":"1",
"OrderByFieldName":"",
"VisibilityOption":"AllRecords"
}
}
}
Response Body
[
"lastname": "SS",
"leadid": 1917,
"email": "",
"mobilephone": "8888888888",
"companyname": "",
"productid": 87
38
getEDSJsonResult
Description
The getEDSJsonResult method is used to return the Json result for CRMNEXT EDS.
Syntax
https://localhost/Acidaes.Api.CRMnext/crmWebApi/getEDSJsonResult
Request Body
{
"parameter":[
{
"LeadID":"111977"
},
{
"ProductID":"5"
}
]
}
Response Body
{
"parameter":
{
"UserID":"1"
}
}
39
saveObject
Description
The Save method is used to Create and Update records related to Objects in CRMNEXT. All the
records that need to be created or updated need to be sent in the input parameter, as a collection of
CRMNEXT Objects.
In case the record key is specified in the object, then it is automatically marked for update, while if
output of this method is a collection of SaveResults.
Pre-requisite
• Successful user login with the given login credentials is needed.
• All CRMNEXT system mandatory fields should be provided when sending a record for
creation.
• Filter Parameter should be correct or ItemID must be given in input as per item type.
Syntax
https://localhost/Acidaes.Api.CRMnext/crmWebApi/saveObject
Request Body
[
{
"ItemId":0,
"ItemType":"Case",
"ProcessMode":"Create",
"OutputFieldList":["Subject","AccountID","ReportedOn"],
"Condition":[
{
"FieldName": "CaseID",
"Operation": "Equal",
"Value": "1"
}
],
"ObjectData":{
]
40
NOTE: All Request Body Parameters are Case Sensitive.
Response Body
[
{
"ItemType":"Activity",
"ProcessMode":"Create",
"ObjectData":{
"ItemTypeID":1,
"Subject":"Test Reply Email’
"LayoutID":1014,
"ContactID":1,
"StartDate":"06/03/2018",
"Act_ex1_33":1
}
File Upload
Description
The File Upload method is used to upload Files in the DMS of the application. It is a Post type
method used to upload or create a file. The File will be provided in Form Data.
Syntax
https://localhost/Acidaes.Api.CRMnext/crmWebApi/objects/document/save.
Request Body
{
"ObjectType" : "{CRMnext Object Name}",
"ObjectId" :"{Created Object ItemId}",
"ConfigId" :"{Config}",
"StorageType" :"{Storage Type}",
"folderId" :"{Folder Id}"
}
Pre-requisite
• Successful user login with the given login credentials is needed.
Syntax
http://localhost/Acidaes.Api.CRMnext/crmWebApi/SaveUserProfile
Request Body
{
"User":{
"Birthday":"05/29/2015 5:50",
"IsEmailOptOut":"true",
"Gender":"Male",
"GenderCode":"1",
"GenderID":1,
"PanNumber":"cmpr334",
"PhoneOptOut":"true",
"PreferredChannel":"ssf",
"ProcessInFreeFlow":"true",
"SMSOptOut":"true",
"TerritoryName":"TeamTest",
"Action1EmailList":"",
"Action2EmailList":"",
"Action3EmailList":"",
42
"Action4EmailList":"",
"Action5EmailList":"",
"AgentExtension":"",
"AgentID":"",
"Anniversory":"",
"AgentPassword":"",
"City":"Noida",
"Code":"",
"CompanyName":"",
"Country":"India",
"CountryKey":"",
"CreatedBy":"",
"CreatedOn":"05/29/2015 5:50",
"Department":"sdfsd",
"Division":"sfdf",
"EmailEncoding":"sdfksjbn",
"EmailEncodingKey":"bdhsb",
"EmailID":"[email protected]",
"EmployeeCode": null,
"EmployeeNumber": null,
"EscalationEmailsTime": null,
"Fax": null,
"FirstName": null,
"InsertRoleList": null,
"IsEmailClientUser": null,
"IsEmailSyndicationUser": null,
"IsMobileUser": null,
"IsOfflineUser": null,
"IsPhoneOptOut": null,
"IsTicker": null,
"IsUserManager": null,
"IsWebServiceUser": null,
"IsWirelessUser": null,
"KandyUsername": null,
"LanguageKey": null,
"LastModifiedBy": null,
"LastModifiedOn": null,
"LastName": null,
"LayoutKey": null,
"Locale": null,
"LocaleKey": null,
"Locality": null,
"Location": null,
"LoginID": null,
"ManagerName": null,
"MiddleName": null,
"Mobile": null,
"Phone": null,
"PreferredChannelKey": null,
43
"PreviousShortName": null,
"Queue": null,
"ReportsToName": null,
"Salutation": null,
"SalutationKey": null,
"ScopeID": null,
"State": null,
"Street": null,
"Tag1": null,
"Tag10": null,
"Tag2": null,
"Tag3": null,
"Tag4": null,
"Tag5": null,
"Tag6": null,
"Tag7": null,
"Tag8": null,
"Tag9": null,
"TimeZone": null,
"TimeZoneKey": null,
"Title": null,
"UserKey": null,
"UserName": null,
"WirelessEmail": null,
"Zip": null,
"LongDateFormat":"dd/mm/yyyy",
"LongDateTimeFormat":"dd/mm/yy",
"DeletedTeamList":[],
"ImageInfoCollection":[
{
"ContentType":"",
"DisplayName":"",
"FieldName":"",
"Image64BaseString":""
}
],
"ProfileImageInfo":{
"ContentType":"",
"DisplayName":"",
"FieldName":"",
"Image64BaseString":""
},
"Custom": {
"agent_password": null,
"Cust_KandyUserName": null,
"Kandy_ApiKey": null,
"nw": null,
"agentid": null,
"Designation_I": null,
44
"agentextension": null,
"Designation": null,
"FieldID_1107": null,
"FieldID_2878": null,
"FieldID_2879": null,
"Check_check": null,
"Test22": null
}
},
"UniqueFieldName":"User",
"UniqueFieldValue":"Rahul Rathore",
"TeamList":[
{
"Branches":[{
"TeamBranches": {
"Branches": "229",
"Mode": "Allocate"
}
}
],
"Products":[
{
"TeamProducts": {
"Mode": "Allocate",
"Products": "Saving Account",
"isPrimary": "false"
}
}
],
"ReportToFieldName": null,
"ReportToFieldValue": null,
"TeamKey": null,
"TeamMode": null
}
],
"SearchCondition":[
{
"FieldName":"UserID",
"Operation":"equal",
"Value":"1"
}
],
"IsActive":"Active",
"UserMode":"",
"ProductHierarchy":"true",
"BranchHierarchy":"true",
"OverrideProduct":"false",
45
"OverrideBranch":"false",
"ProductResolverMode":"Default",
"BranchResolverMode":"Default",
"RoleResolverMode":"Default",
"VerifyAssignmentCheck":"true"
}
46
47