3.0
API change historyREST API with full access to Enquire Objects and meta-data for CRUD operations.
Request
Request URL
Request parameters
-
number
This is your company Id. You can request this value from EnquireLEADS support when registering for the API.
-
number
Activity = 18, Address = 19, Document = 20, Note = 21, Relationship = 22, Individual = 23, Admission = 24, HousingContract = 25, Unit = 26, Campaign = 27, Report = 28, Form = 29, Company = 30, Community = 31, Calendar = 32, Search = 33, Transaction = 34,
Request headers
Request body
Responses
200 OK
Representations
{
"Id": 588,
"Name": "Prospect",
"Type": "Prospect",
"Fields": [
{
"Id": 5444,
"Form": "General Information",
"Name": "TitleId",
"Label": "Salutation",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 145,
"Name": "Mr."
},
{
"Id": 146,
"Name": "Mrs."
},
{
"Id": 147,
"Name": "Ms."
},
{
"Id": 148,
"Name": "Dr."
},
{
"Id": 149,
"Name": "Prof."
},
{
"Id": 150,
"Name": "Rev."
},
{
"Id": 151,
"Name": "Other"
},
{
"Id": 152,
"Name": "Mr. & Mrs."
}
]
},
{
"Id": 5469,
"Form": "General Information",
"Name": "FirstName",
"Label": "First Name",
"Type": "Text Input",
"Required": true
},
{
"Id": 5494,
"Form": "General Information",
"Name": "MiddleName",
"Label": "Middle Name",
"Type": "Text Input",
"Required": false
},
{
"Id": 5519,
"Form": "General Information",
"Name": "LastName",
"Label": "Last Name",
"Type": "Text Input",
"Required": true
},
{
"Id": 5544,
"Form": "General Information",
"Name": "Phone1",
"Label": "Home Phone",
"Type": "Text Input",
"Required": false
},
{
"Id": 5569,
"Form": "General Information",
"Name": "Phone2",
"Label": "Mobile Phone",
"Type": "Text Input",
"Required": false
},
{
"Id": 5594,
"Form": "General Information",
"Name": "Phone3",
"Label": "Work Phone",
"Type": "Text Input",
"Required": false
},
{
"Id": 5619,
"Form": "General Information",
"Name": "Fax",
"Label": "Fax",
"Type": "Text Input",
"Required": false
},
{
"Id": 5644,
"Form": "General Information",
"Name": "Email",
"Label": "Email",
"Type": "Text Input",
"Required": false
},
{
"Id": 5694,
"Form": "General Information",
"Name": "Website",
"Label": "Website",
"Type": "Text Input",
"Required": false
},
{
"Id": 5869,
"Form": "General Information",
"Name": "IsMailingList",
"Label": "Mailing List",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 19,
"Name": "Yes"
},
{
"Id": 44,
"Name": "No"
}
]
},
{
"Id": 5894,
"Form": "General Information",
"Name": "BirthDate",
"Label": "Birthdate",
"Type": "Date Input",
"Required": false
},
{
"Id": 5919,
"Form": "General Information",
"Name": "Gender",
"Label": "Gender",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 19,
"Name": "Male"
},
{
"Id": 44,
"Name": "Female"
}
]
},
{
"Id": 5944,
"Form": "General Information",
"Name": "MaritalStatus",
"Label": "Marital Status",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 19,
"Name": "Widowed"
},
{
"Id": 44,
"Name": "Single"
},
{
"Id": 69,
"Name": "Separated"
},
{
"Id": 94,
"Name": "Married"
},
{
"Id": 119,
"Name": "Divorced"
}
]
},
{
"Id": 5969,
"Form": "General Information",
"Name": "Religion",
"Label": "Religion",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 19,
"Name": "Protestant"
},
{
"Id": 44,
"Name": "Presbyterian"
},
{
"Id": 69,
"Name": "Pentecostal"
},
{
"Id": 94,
"Name": "Other"
},
{
"Id": 119,
"Name": "Methodist"
},
{
"Id": 144,
"Name": "Lutheran"
},
{
"Id": 169,
"Name": "Latter-day Saints"
},
{
"Id": 194,
"Name": "Evening"
},
{
"Id": 219,
"Name": "Christian Reformed"
},
{
"Id": 244,
"Name": "Catholic"
},
{
"Id": 269,
"Name": "Baptist"
}
]
},
{
"Id": 5994,
"Form": "General Information",
"Name": "Language",
"Label": "Language",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 19,
"Name": "Spanish"
},
{
"Id": 44,
"Name": "Other"
},
{
"Id": 69,
"Name": "English"
}
]
},
{
"Id": 6019,
"Form": "General Information",
"Name": "Ethnicity",
"Label": "Ethnicity",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 19,
"Name": "White"
},
{
"Id": 44,
"Name": "Other"
},
{
"Id": 69,
"Name": "Hispanic"
},
{
"Id": 94,
"Name": "Black"
},
{
"Id": 119,
"Name": "Asian"
}
]
},
{
"Id": 6044,
"Form": "General Information",
"Name": "Veteran",
"Label": "Veteran (Y/N)",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 19,
"Name": "Yes"
},
{
"Id": 44,
"Name": "No"
}
]
},
{
"Id": 9389,
"Form": "General Information",
"Name": "checkboxes",
"Label": "Ok to",
"Type": "Multiple Checkboxes",
"Required": false,
"Options": [
{
"Id": 13284,
"Name": "Email"
},
{
"Id": 13285,
"Name": "Mail"
},
{
"Id": 13286,
"Name": "Call"
}
]
},
{
"Id": 8170,
"Form": "Sales and Marketing",
"Name": "Marketing Score",
"Label": "Lead Score",
"Type": "Text Input",
"Required": false
},
{
"Id": 8180,
"Form": "Sales and Marketing",
"Name": "Lead Score",
"Label": "Status Code",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 124,
"Name": "1- Future Lead"
},
{
"Id": 125,
"Name": "2- Cool Lead"
},
{
"Id": 126,
"Name": "3- Warm Lead"
},
{
"Id": 127,
"Name": "4- Hot Lead"
},
{
"Id": 128,
"Name": "5- Ready Immediately"
},
{
"Id": 129,
"Name": "Lost Lead"
},
{
"Id": 130,
"Name": "Not Yet Classified"
},
{
"Id": 131,
"Name": "Unqualified"
}
]
},
{
"Id": 8181,
"Form": "Sales and Marketing",
"Name": "Lost Lead",
"Label": "Lost Lead",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 242,
"Name": "Bad address/phone"
},
{
"Id": 243,
"Name": "Closer to family"
},
{
"Id": 244,
"Name": "Deceased"
},
{
"Id": 245,
"Name": "Decided on homecare"
},
{
"Id": 246,
"Name": "Financial not qualified"
},
{
"Id": 247,
"Name": "Higher level of care"
},
{
"Id": 248,
"Name": "In-house release"
},
{
"Id": 249,
"Name": "Location"
},
{
"Id": 250,
"Name": "Medically inappropriate"
},
{
"Id": 251,
"Name": "Moved in with family"
},
{
"Id": 252,
"Name": "Moved out of area"
},
{
"Id": 253,
"Name": "Moved to competitor"
},
{
"Id": 254,
"Name": "No availability"
},
{
"Id": 255,
"Name": "No response"
},
{
"Id": 256,
"Name": "Not ready"
},
{
"Id": 257,
"Name": "Other"
},
{
"Id": 258,
"Name": "Other community"
},
{
"Id": 259,
"Name": "Referred to alternative community"
},
{
"Id": 260,
"Name": "Remove from list"
},
{
"Id": 261,
"Name": "Respite"
},
{
"Id": 262,
"Name": "Too young"
},
{
"Id": 263,
"Name": "Unknown"
}
]
},
{
"Id": 8182,
"Form": "Sales and Marketing",
"Name": "Market Source",
"Label": "Market Source",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 483,
"Name": "Advertising-Internet"
},
{
"Id": 484,
"Name": "Advertising-Print"
},
{
"Id": 485,
"Name": "Advertising-Radio"
},
{
"Id": 486,
"Name": "Advertising-Television"
},
{
"Id": 487,
"Name": "Brochure"
},
{
"Id": 488,
"Name": "Community Website"
},
{
"Id": 489,
"Name": "Direct Mail"
},
{
"Id": 490,
"Name": "Online Directory"
},
{
"Id": 491,
"Name": "Referral"
},
{
"Id": 492,
"Name": "Unknown-Not Yet Classified"
}
]
},
{
"Id": 8183,
"Form": "Sales and Marketing",
"Name": "Preference",
"Label": "Care Level",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 136,
"Name": "Afforable Housing"
},
{
"Id": 137,
"Name": "Assisted Living"
},
{
"Id": 138,
"Name": "Hospice Care"
},
{
"Id": 139,
"Name": "Independent Living"
},
{
"Id": 140,
"Name": "Memory Care"
},
{
"Id": 141,
"Name": "Rehab Care"
},
{
"Id": 142,
"Name": "Respite Care"
},
{
"Id": 143,
"Name": "Senior Apartments"
},
{
"Id": 144,
"Name": "Skilled Nursing"
}
]
},
{
"Id": 8172,
"Form": "Sales and Marketing",
"Name": "Annual Income",
"Label": "Annual Income",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 54,
"Name": "> 1,000,000"
}
]
},
{
"Id": 8173,
"Form": "Sales and Marketing",
"Name": "Age Code",
"Label": "Age Code",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 44,
"Name": "<52"
}
]
},
{
"Id": 8174,
"Form": "Sales and Marketing",
"Name": "Home Value",
"Label": "Home Value",
"Type": "Select Basic",
"Required": false,
"Options": []
},
{
"Id": 8175,
"Form": "Sales and Marketing",
"Name": "Net Worth",
"Label": "Net Worth",
"Type": "Select Basic",
"Required": false,
"Options": []
},
{
"Id": 8176,
"Form": "Sales and Marketing",
"Name": "Financially Qualified",
"Label": "Financially Qualified",
"Type": "Select Basic",
"Required": false,
"Options": []
},
{
"Id": 8177,
"Form": "Sales and Marketing",
"Name": "Floor Preference",
"Label": "Floor Preference",
"Type": "Select Basic",
"Required": false,
"Options": []
},
{
"Id": 8178,
"Form": "Sales and Marketing",
"Name": "Lead Engagement",
"Label": "Lead Engagement",
"Type": "Text Input",
"Required": false
},
{
"Id": 8179,
"Form": "Sales and Marketing",
"Name": "Lead Fit",
"Label": "Lead Fit",
"Type": "Text Input",
"Required": false
},
{
"Id": 8171,
"Form": "Sales and Marketing",
"Name": "Digital Score",
"Label": "Digital Score",
"Type": "Text Input",
"Required": false
},
{
"Id": 10091,
"Form": "Sales and Marketing",
"Name": "Priority Date",
"Label": "Priority Date",
"Type": "Date Input",
"Required": false
},
{
"Id": 8591,
"Form": "Sales and Marketing",
"Name": "selectbasic",
"Label": "Act-On Opt-Out",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 15937,
"Name": "Yes"
},
{
"Id": 15938,
"Name": "No"
}
]
},
{
"Id": 8592,
"Form": "Sales and Marketing",
"Name": "selectbasic",
"Label": "Act-On Bounce",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 15939,
"Name": "Yes"
},
{
"Id": 15940,
"Name": "No"
}
]
},
{
"Id": 9337,
"Form": "Spouse",
"Name": "SpousePrefix",
"Label": "Prefix",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 12981,
"Name": "Mr."
},
{
"Id": 12982,
"Name": "Mrs."
}
]
},
{
"Id": 9334,
"Form": "Spouse",
"Name": "SpouseFirstName",
"Label": "First Name",
"Type": "Text Input",
"Required": false
},
{
"Id": 9335,
"Form": "Spouse",
"Name": "SpouseLastName",
"Label": "Last Name",
"Type": "Text Input",
"Required": false
},
{
"Id": 9338,
"Form": "Spouse",
"Name": "SpouseGender",
"Label": "Gender",
"Type": "Select Basic",
"Required": false,
"Options": [
{
"Id": 12983,
"Name": "Female"
},
{
"Id": 12984,
"Name": "Male"
}
]
}
]
}
Code samples
@ECHO OFF
curl -v -X GET "https://api2.enquiresolutions.com/v3/Object/?PortalId={number}&TypeId={number}"
-H "Ocp-Apim-Subscription-Key: {subscription key}"
--data-ascii "{body}"
using System;
using System.Net.Http.Headers;
using System.Text;
using System.Net.Http;
using System.Web;
namespace CSHttpClientSample
{
static class Program
{
static void Main()
{
MakeRequest();
Console.WriteLine("Hit ENTER to exit...");
Console.ReadLine();
}
static async void MakeRequest()
{
var client = new HttpClient();
var queryString = HttpUtility.ParseQueryString(string.Empty);
// Request headers
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "{subscription key}");
// Request parameters
queryString["PortalId"] = "{number}";
queryString["TypeId"] = "{number}";
var uri = "https://api2.enquiresolutions.com/v3/Object/?" + queryString;
var response = await client.GetAsync(uri);
}
}
}
// // This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
import java.net.URI;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
public class JavaSample
{
public static void main(String[] args)
{
HttpClient httpclient = HttpClients.createDefault();
try
{
URIBuilder builder = new URIBuilder("https://api2.enquiresolutions.com/v3/Object/");
builder.setParameter("PortalId", "{number}");
builder.setParameter("TypeId", "{number}");
URI uri = builder.build();
HttpGet request = new HttpGet(uri);
request.setHeader("Ocp-Apim-Subscription-Key", "{subscription key}");
// Request body
StringEntity reqEntity = new StringEntity("{body}");
request.setEntity(reqEntity);
HttpResponse response = httpclient.execute(request);
HttpEntity entity = response.getEntity();
if (entity != null)
{
System.out.println(EntityUtils.toString(entity));
}
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
}
}
<!DOCTYPE html>
<html>
<head>
<title>JSSample</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">
$(function() {
var params = {
// Request parameters
"PortalId": "{number}",
"TypeId": "{number}",
};
$.ajax({
url: "https://api2.enquiresolutions.com/v3/Object/?" + $.param(params),
beforeSend: function(xhrObj){
// Request headers
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","{subscription key}");
},
type: "GET",
// Request body
data: "{body}",
})
.done(function(data) {
alert("success");
})
.fail(function() {
alert("error");
});
});
</script>
</body>
</html>
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString* path = @"https://api2.enquiresolutions.com/v3/Object/";
NSArray* array = @[
// Request parameters
@"entities=true",
@"PortalId={number}",
@"TypeId={number}",
];
NSString* string = [array componentsJoinedByString:@"&"];
path = [path stringByAppendingFormat:@"?%@", string];
NSLog(@"%@", path);
NSMutableURLRequest* _request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:path]];
[_request setHTTPMethod:@"GET"];
// Request headers
[_request setValue:@"{subscription key}" forHTTPHeaderField:@"Ocp-Apim-Subscription-Key"];
// Request body
[_request setHTTPBody:[@"{body}" dataUsingEncoding:NSUTF8StringEncoding]];
NSURLResponse *response = nil;
NSError *error = nil;
NSData* _connectionData = [NSURLConnection sendSynchronousRequest:_request returningResponse:&response error:&error];
if (nil != error)
{
NSLog(@"Error: %@", error);
}
else
{
NSError* error = nil;
NSMutableDictionary* json = nil;
NSString* dataString = [[NSString alloc] initWithData:_connectionData encoding:NSUTF8StringEncoding];
NSLog(@"%@", dataString);
if (nil != _connectionData)
{
json = [NSJSONSerialization JSONObjectWithData:_connectionData options:NSJSONReadingMutableContainers error:&error];
}
if (error || !json)
{
NSLog(@"Could not parse loaded json with error:%@", error);
}
NSLog(@"%@", json);
_connectionData = nil;
}
[pool drain];
return 0;
}
<?php
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once 'HTTP/Request2.php';
$request = new Http_Request2('https://api2.enquiresolutions.com/v3/Object/');
$url = $request->getUrl();
$headers = array(
// Request headers
'Ocp-Apim-Subscription-Key' => '{subscription key}',
);
$request->setHeader($headers);
$parameters = array(
// Request parameters
'PortalId' => '{number}',
'TypeId' => '{number}',
);
$url->setQueryVariables($parameters);
$request->setMethod(HTTP_Request2::METHOD_GET);
// Request body
$request->setBody("{body}");
try
{
$response = $request->send();
echo $response->getBody();
}
catch (HttpException $ex)
{
echo $ex;
}
?>
########### Python 2.7 #############
import httplib, urllib, base64
headers = {
# Request headers
'Ocp-Apim-Subscription-Key': '{subscription key}',
}
params = urllib.urlencode({
# Request parameters
'PortalId': '{number}',
'TypeId': '{number}',
})
try:
conn = httplib.HTTPSConnection('api2.enquiresolutions.com')
conn.request("GET", "/v3/Object/?%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
########### Python 3.2 #############
import http.client, urllib.request, urllib.parse, urllib.error, base64
headers = {
# Request headers
'Ocp-Apim-Subscription-Key': '{subscription key}',
}
params = urllib.parse.urlencode({
# Request parameters
'PortalId': '{number}',
'TypeId': '{number}',
})
try:
conn = http.client.HTTPSConnection('api2.enquiresolutions.com')
conn.request("GET", "/v3/Object/?%s" % params, "{body}", headers)
response = conn.getresponse()
data = response.read()
print(data)
conn.close()
except Exception as e:
print("[Errno {0}] {1}".format(e.errno, e.strerror))
####################################
require 'net/http'
uri = URI('https://api2.enquiresolutions.com/v3/Object/')
query = URI.encode_www_form({
# Request parameters
'PortalId' => '{number}',
'TypeId' => '{number}'
})
if uri.query && uri.query.length > 0
uri.query += '&' + query
else
uri.query = query
end
request = Net::HTTP::Get.new(uri.request_uri)
# Request headers
request['Ocp-Apim-Subscription-Key'] = '{subscription key}'
# Request body
request.body = "{body}"
response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
http.request(request)
end
puts response.body