The SmartConnect API is SmartSimple’s RESTful JSON API. The sample code below covers API calls for company records, contact records, Universal Tracking Application (UTA)/module metadata, and notes. To review how the JSON API works in greater detail and interact with sample functions and test data, visit the Interactive Demonstration Page. This page is connected to a specific demonstration instance that contains sample data for API testing.
Get a Company Record
The following code retrieves a single company record by record ID.
Request Code for a Company Record
----------HTTP POST Request----------
Parameters (case sensitive)
url: "/API/1/company/"
*companyid : 825646
*alias : api
*username : smartconnectdemo@smartsimple.com
*password : *****************
apitoken : CllAZXoBSn9PUHNVejJxfUA2D3dEcmNnAjI~
--Begin custom parameter (replace '{parameter}' with actual value)--
recordid : 825646
--End custom parameter--
*Only required if calls are originated from remote server
----------Jquery Ajax Request----------
function api_call() {
request = $.ajax(
{ url: "/API/1/company/",
{type: "POST",
data: {
apitoken: "CllAZXoBSn9PUHNVejJxfUA2D3dEcmNnAjI~",
recordid : 825646
},
dataType: "html"
});
request.done(function( data )
{ //TODO
});
}Response Code for a Company Record
{
message: {},
records: [
{
sf_Name: "SmartSimple Software Inc",
cf_Mission Statement: "SmartSimple was designed from the start to help organizations connect
with their communities and streamline<br /> critical processes. We're able to do this because
our products are almost endlessly configurable. Once a system is implemented, <br /> our clients
are able to administer their software on their own, with minimal help from us.",
sf_Company ID: "825646",
sf_Address: "111 Peter Street",
sf_Country: "Canada",
cf_EIN Number: null,
sf_Zip / Postal Code: "M5V 2H1",
sf_City: "Toronto"
}
]
}Get a Contact Record
The following code retrieves a single contact record by record ID.
Request Code for a Contact Record
----------HTTP POST Request----------
Parameters (case sensitive)
url: "/API/1/user/"
*companyid : 825646
*alias : api
*username : smartconnectdemo@smartsimple.com
*password : *****************
apitoken : fzJnYl1lakhFcVJnWwF5Y2xEelNDdXVOAgY~
--Begin custom parameter (replace '{parameter}' with actual value)--
recordid : 825646
--End custom parameter--
*Only required if calls are originated from remote server
----------Jquery Ajax Request----------
function api_call() {
request = $.ajax(
{ url: "/API/1/user/",
{type: "POST",
data: {
apitoken: "fzJnYl1lakhFcVJnWwF5Y2xEelNDdXVOAgY~",
recordid : 825646
},
dataType: "html"
});
request.done(function( data )
{ //TODO
});
}Get a List of Organizations
The following code retrieves a list of organization records. Optional parameters allow filtering and sorting.
Request Code for a List of Organizations
----------HTTP POST Request----------
Parameters (case sensitive)
url: "/API/1/company/"
*companyid : 825646
*alias : api
*username : smartconnectdemo@smartsimple.com
*password : *****************
apitoken : SnZnAgVGVwpSUERfDVUMVXpGYWViXQFTAgc~
--Begin custom parameter (replace '{parameter}' with actual value)--
criteria : {parameter} //Optional: json array each condition contains nodes "andor", "field", "operator", "value" eg
[{"andor":"and","field":"FIELDNAME","operator":"like","value":"PATTERN"},{"andor":"or","field":"FIELDNAME","operator":"like","value":"PATTERN"}]
sortby : {parameter} //Optional: json array each sort by field contains nodes "field", "direction" eg. [{"field":"FIELDNAME","direction":"asc|desc"}]
getstorevalue : {parameter} //Optional: int type: 0 = no (get display value), 1 = yes (get stored value)
--End custom parameter--
*Only required if calls are originated from remote server
----------Jquery Ajax Request----------
function api_call() {
request = $.ajax(
{ url: "/API/1/company/",
{type: "POST",
data: {
apitoken: "SnZnAgVGVwpSUERfDVUMVXpGYWViXQFTAgc~"
},
dataType: "html"
});
request.done(function( data )
{ //TODO
});
}Response Code for a List of Organizations
{
message: {},
records: [
{
sf_Name: "SmartSimple Software Inc",
cf_Mission Statement: "SmartSimple was designed from the start to help organizations connect
with their communities and streamline<br /> critical processes. We're able to do this because
our products are almost endlessly configurable. Once a system is implemented, our<br /> clients
are able to administer their software on their own, with minimal help from us.",
sf_Company ID: "825646",
sf_Address 2: "Suite 405",
sf_Address: "111 Peter Street",
sf_Country: "Canada",
sf_Zip / Postal Code: "M5V 2H1",
sf_State / Province: "Ontario",
sf_City: "Toronto"
},
{
sf_Name: "Grant Seeking Organizations",
cf_Mission Statement: "",
sf_Company ID: "825805",
sf_Address 2: "",
sf_Address: "4555 Westchester Street",
sf_Country: "United States",
sf_Zip / Postal Code: "",
sf_State / Province: "NY",
sf_City: "New York City"
},
{
sf_Name: "Prospect Heights Educational Campus",
cf_Mission Statement: "",
sf_Company ID: "825806",
sf_Address 2: "",
sf_Address: "5108 4th Ave. At 51st St.",
sf_Country: "--- Select One ---",
sf_Zip / Postal Code: "",
sf_State / Province: "New York",
sf_City: "Brooklyn"
},
{
sf_Name: "Acme Insurance",
cf_Mission Statement: "",
sf_Company ID: "826093",
sf_Address 2: "",
sf_Address: "111 Peter Street, Suite 405",
sf_Country: "--- Select One ---",
sf_Zip / Postal Code: "",
sf_State / Province: "",
sf_City: ""
}
],
header: [
{
id: "sf_Name",
index: "1",
name: "Name",
caption: "Organization Name"
},
{
id: "sf_Address",
index: "2",
name: "Address",
caption: "Address"
},
{
id: "sf_Address 2",
index: "3",
name: "Address 2",
caption: "Address 2"
},
{
id: "sf_City",
index: "4",
name: "City",
caption: "City"
},
{
id: "sf_State / Province",
index: "5",
name: "State / Province",
caption: "State"
},
{
id: "sf_Country",
index: "6",
name: "Country",
caption: "Country"
},
{
id: "sf_Zip / Postal Code",
index: "7",
name: "Zip / Postal Code",
caption: "Zip / Postal Code"
},
{
id: "sf_Company ID",
index: "8",
name: "Company ID",
caption: ""
},
{
id: "cf_1523156",
index: "9",
name: "Mission Statement",
caption: "Mission Statement"
}
]
}
}Get a List of Contacts
The following code retrieves a list of contact records. Optional parameters allow filtering and sorting.
Request Code for a List of Contacts
----------HTTP POST Request----------
Parameters (case sensitive)
url: "/API/1/user/"
*companyid : 825646
*alias : api
*username : smartconnectdemo@smartsimple.com
*password : *****************
apitoken : TmZ3NmRFdUIBZ1tFFwYeAlB!e3FlV3FjAgMG
--Begin custom parameter (replace '{parameter}' with actual value)--
criteria : {parameter} //Optional: json array each condition contains nodes "andor", "field", "operator", "value" eg
[{"andor":"and","field":"FIELDNAME","operator":"like","value":"PATTERN"},{"andor":"or","field":"FIELDNAME","operator":"like","value":"PATTERN"}]
sortby : {parameter} //Optional: json array each sort by field contains nodes "field", "direction" eg. [{"field":"FIELDNAME","direction":"asc|desc"}]
getstorevalue : {parameter} //Optional: int type: 0 = no (get display value), 1 = yes (get stored value)
--End custom parameter--
*Only required if calls are originated from remote server
----------Jquery Ajax Request----------
function api_call() {
request = $.ajax(
{ url: "/API/1/user/",
{type: "POST",
data: {
apitoken: "TmZ3NmRFdUIBZ1tFFwYeAlB!e3FlV3FjAgMG"
},
dataType: "html"
});
request.done(function( data )
{ //TODO
});
}Get Metadata from a UTA/module
The following code retrieves metadata from a UTA/module, including level names, statuses, and types.
Request Code for UTA/module Metadata
----------HTTP POST Request----------
Parameters (case sensitive)
url: "/API/1/levelone/"
*companyid : 825646
*alias : api
*username : smartconnectdemo@smartsimple.com
*password : *****************
apitoken : U2N4RwUBTn5XZldZXFdfWX1@C2JAWXVuAjIF
--Begin custom parameter (replace '{parameter}' with actual value)--
--End custom parameter--
*Only required if calls are originated from remote server
----------Jquery Ajax Request----------
function api_call() {
request = $.ajax(
{ url: "/API/1/levelone/",
{type: "POST",
data: {
apitoken: "U2N4RwUBTn5XZldZXFdfWX1@C2JAWXVuAjIF"
},
dataType: "html"
});
request.done(function( data )
{ //TODO
});
}Response Code for UTA/module Metadata
{
hassubactivity: false,
message: {},
levelonename: "Cases",
levelthreename: "Level 3 Activities",
leveltwoname: "Services",
menuname: "Case Manager",
leveltwo: {
statuses: [
{ description: "", name: "To be scheduled" },
{ description: "", name: "Scheduled" },
{ description: "", name: "Application Letter Sent to Insured" },
{ description: "", name: "Assessment Plan Received" },
{ description: "", name: "Late Cancellation" },
{ description: "", name: "Examination Notice Sent to Vendor" },
{ description: "", name: "Report Received" },
{ description: "", name: "On Hold" },
{ description: "", name: "Report Due Today" },
{ description: "", name: "No Show" },
{ description: "", name: "Completed" },
{ description: "", name: "Submitted" },
{ description: "", name: "Completed - Billed" },
{ description: "", name: "Non-Billable" }
],
types: [
{ name: "--- Select One ---", caption: "", fields: [] },
{ name: "Addendum", caption: "", fields: [] },
{ name: "Addendum - In Response to a Sect. 42.1", caption: "", fields: [] },
{ name: "Adjuster Approved Service", caption: "", fields: [] },
{ name: "Cardiology Assessment", caption: "", fields: [] },
{ name: "Chiropractic Assessment", caption: "", fields: [] },
{ name: "Dental Assessment", caption: "", fields: [] },
{ name: "Diagnostic Test", caption: "", fields: [] },
{ name: "Education Session", caption: "", fields: [] },
{ name: "Employer Contact", caption: "", fields: [] },
{ name: "Ergonomic Assessment", caption: "", fields: [] },
{ name: "Exercise Program", caption: "", fields: [] },
{ name: "FAE - Functional Abilities Evaluation", caption: "", fields: [] },
... CODE TRUNCATED ...
}
],
levelthree: {},
hasactivity: true
}Retrieve Notes from an Object
Replace the URL in the request based on the type of object. The objectid parameter is the ID of the record you wish to retrieve notes from.
The URL should be replaces with one of the following:
/API/1/levelone/
/API/1/leveltwo/
/API/1/levelthree/
/API/1/user/
/API/1/company/
Request Code for Notes from an Object
The example below retrieves notes from a Level 1 object with an objectid of 1136627. The criteria filter restricts the note type returned where sf_Type equals Staff Note.
----------HTTP POST Request----------
Parameters (case sensitive)
url: "/API/1/levelone/"
*companyid : 825646
*alias : api
*username : smartconnectdemo@smartsimple.com
*password : *****************
apitoken : cmFgDAIDbHFaWB9jfmsCXQRAXw5mYGlXDggF@C2JAWXVuAjIF
--Begin custom parameter (replace '{parameter}' with actual value)--
--End custom parameter--
*Only required if calls are originated from remote server
----------Jquery Ajax Request----------
function api_call() {
request = $.ajax(
{ url: "/API/1/levelone/",
{type: "POST",
data: {
apitoken: "cmFgDAIDbHFaWB9jfmsCXQRAXw5mYGlXDggF",
objectid: "1136627",
criteria: JSON.stringify([{"andor":"and","field":"sf_Type","operator":"like","value":"Staff Note"}]),
},
dataType: "html"
});
request.done(function( data )
{ //TODO
});
}Response Code for Notes from an Object
"{"message":{},
"records":[
{
"sf_Type":"Internal Notes",
"sf_Content":"option1",
"sf_Type ID":"45377",
"sf_Note ID":"2246482",
"sf_Object ID":"1136627",
"sf_Created By":"SmartSimple",
"sf_Created Date":"2016-08-29 15:58:08",
"recordid":"2246482"
},
{
"sf_Type":"Internal Notes",
"sf_Content":"option2",
"sf_Type ID":"45377",
"sf_Note ID":"2246483",
"sf_Object ID":"1136627",
"sf_Created By":"SmartSimple",
"sf_Created Date":"2016-08-29 15:58:12",
"recordid":"2246483"
},
{
"sf_Type":"L1 Only UTA - 2 and All",
"sf_Content":"option3",
"sf_Type ID":"54302",
"sf_Note ID":"2246484",
"sf_Object ID":"1136627",
"sf_Created By":"SmartSimple",
"sf_Created Date":"2016-08-29 15:58:17",
"recordid":"2246484"
}
],
"header":[]}"