3.0
API change historyREST API with full access to Enquire Objects and meta-data for CRUD operations.
HousingContract GET
Housing Contracts let users know which Units are occupied in a Community. They are typically created when a Prospect (Lead) converts to a Resident in EnquireLEADS. All Housing Contracts have assigned Units and Care Types.
Housing Contracts drive all Inventory and Occupancy Reports.
Try itRequest
Request URL
Request parameters
-
number
This is your company Id. You can request this value from EnquireLEADS support when registering for the API.
-
(optional)number
Get all housing contracts for an individual
-
(optional)string
Get all housing contracts for a case
-
(optional)number
Get all active or non-active housing contracts for a Unit
-
(optional)number
Get housing contract by Id
-
(optional)number
Request all housing contracts in a particular community
Request headers
Request body
Responses
200 OK
Returns all Housing Contracts for an Individual, Case, Community or Unit
You can retrieve a full list of all available Types for the following fields
- CommunityId (https://api2.enquiresolutions.com/v3/Community/[?PortalId][)
- CommunityName (https://api2.enquiresolutions.com/v3/Community/[?PortalId])
- UnitId (https://api2.enquiresolutions.com/v3/Unit[?PortalId])
- FloorPlan (https://api2.enquiresolutions.com/v3/Type[?PortalId])&TypeId= 11)
- CareGroup (https://api2.enquiresolutions.com/v3/Type[?PortalId])&TypeId= 14)
ActiveLease = This is historical flag. If marked to false, the Contract has expired or Cancelled
CareGroup = Type of Resident Care
MonthlyFee = Monthly Fee for the Resident
IsRepayable = Is the Resident required repay the deposit
FloorPlan = What type of Floor Plan is the Unit listed on the Housing Contract
UnitId = Which Unit is the Housing Contract for
Capacity = How many Residents can live in the Unit
Representations
[
{
"Id": 3117,
"DateCreated": "2013-08-26T23:59:29.2031372-06:00",
"CommunityId": 31,
"CommunityName": "Enquire Villas",
"NameUnique": "EnquireVillas",
"MoveInDate": "2013-09-30T00:00:00.0000000-06:00",
"MoveOutDate": "2013-12-17T00:00:00.0000000-07:00",
"DateUpdated": "2013-12-29T00:57:40.7449682-07:00",
"UnitId": 3211,
"UnitNumber": "100",
"SquareFoot": 900,
"BaseMonthly": 3500,
"Capacity": 1,
"FloorPlan": "2 BR",
"CareGroup": "AL",
"UnitDateCreated": "2013-08-26T14:58:50.4174356-06:00",
"UnitDateUpdated": "2015-04-23T19:22:04.2078441-06:00",
"MonthlyFee": 2500,
"IsRepayable": false,
"CaseNumber": "DEMO100005",
"IndividualId": 126091,
"IndividualName": "Robert Miller",
"ActiveLease": false
},
{
"Id": 6062,
"DateCreated": "2014-01-08T00:32:19.1377994-07:00",
"CommunityId": 31,
"CommunityName": "Enquire Villas",
"NameUnique": "EnquireVillas",
"MoveInDate": "2013-08-05T00:00:00.0000000-06:00",
"MoveOutDate": "2013-09-03T00:00:00.0000000-06:00",
"DateUpdated": "2014-01-16T17:20:00.0708675-07:00",
"UnitId": 3211,
"UnitNumber": "100",
"SquareFoot": 900,
"BaseMonthly": 3500,
"Capacity": 1,
"FloorPlan": "2 BR",
"CareGroup": "AL",
"UnitDateCreated": "2013-08-26T14:58:50.4174356-06:00",
"UnitDateUpdated": "2015-04-23T19:22:04.2078441-06:00",
"IsRepayable": false,
"CaseNumber": "DEMO100042",
"IndividualId": 136379,
"IndividualName": "Erin Glover",
"ActiveLease": false
},
{
"Id": 15652,
"DateCreated": "2014-10-08T20:44:56.3085000-06:00",
"CommunityId": 31,
"CommunityName": "Enquire Villas",
"NameUnique": "EnquireVillas",
"MoveInDate": "2014-10-10T00:00:00.0000000-06:00",
"MoveOutDate": "2014-10-08T00:00:00.0000000-06:00",
"DateUpdated": "2016-01-29T16:02:08.9040467-07:00",
"UnitId": 3211,
"UnitNumber": "100",
"SquareFoot": 900,
"BaseMonthly": 3500,
"Capacity": 1,
"FloorPlan": "2 BR",
"CareGroup": "AL",
"UnitDateCreated": "2013-08-26T14:58:50.4174356-06:00",
"UnitDateUpdated": "2015-04-23T19:22:04.2078441-06:00",
"IsRepayable": false,
"CaseNumber": "DEMO100534",
"IndividualId": 207521,
"IndividualName": "Dave Smith",
"ActiveLease": false
},
{
"Id": 38357,
"DateCreated": "2016-04-29T03:32:52.5914624-06:00",
"CommunityId": 31,
"CommunityName": "Enquire Villas",
"NameUnique": "EnquireVillas",
"MoveInDate": "2016-04-28T00:00:00.0000000-06:00",
"MoveOutDate": "2016-04-28T00:00:00.0000000-06:00",
"DateUpdated": "2016-04-30T01:51:59.3769168-06:00",
"UnitId": 3211,
"UnitNumber": "100",
"SquareFoot": 900,
"BaseMonthly": 3500,
"Capacity": 1,
"FloorPlan": "2 BR",
"CareGroup": "AL",
"UnitDateCreated": "2013-08-26T14:58:50.4174356-06:00",
"UnitDateUpdated": "2015-04-23T19:22:04.2078441-06:00",
"IsRepayable": false,
"CaseNumber": "DEMO101659",
"IndividualId": 693605,
"IndividualName": "Frank Enquire",
"ActiveLease": false
},
{
"Id": 6681,
"DateCreated": "2014-01-22T18:42:08.8120203-07:00",
"CommunityId": 31,
"CommunityName": "Enquire Villas",
"NameUnique": "EnquireVillas",
"MoveInDate": "2014-01-24T00:00:00.0000000-07:00",
"DateUpdated": "2014-11-07T21:48:31.2034554-07:00",
"UnitId": 3211,
"UnitNumber": "100",
"SquareFoot": 900,
"BaseMonthly": 3500,
"Capacity": 1,
"FloorPlan": "2 BR",
"CareGroup": "AL",
"UnitDateCreated": "2013-08-26T14:58:50.4174356-06:00",
"UnitDateUpdated": "2015-04-23T19:22:04.2078441-06:00",
"MonthlyFee": 3000,
"IsRepayable": false,
"CaseNumber": "DEMO100076",
"IndividualId": 146036,
"IndividualName": "Sam Gross",
"ActiveLease": true
},
{
"Id": 15615,
"DateCreated": "2014-10-08T16:43:55.5972207-06:00",
"CommunityId": 31,
"CommunityName": "Enquire Villas",
"NameUnique": "EnquireVillas",
"MoveInDate": "2015-05-01T00:00:00.0000000-06:00",
"DateUpdated": "2015-04-21T16:53:33.1789431-06:00",
"UnitId": 3211,
"UnitNumber": "100",
"SquareFoot": 900,
"BaseMonthly": 3500,
"Capacity": 1,
"FloorPlan": "2 BR",
"CareGroup": "AL",
"UnitDateCreated": "2013-08-26T14:58:50.4174356-06:00",
"UnitDateUpdated": "2015-04-23T19:22:04.2078441-06:00",
"IsRepayable": false,
"CaseNumber": "DEMO100520",
"IndividualId": 207455,
"IndividualName": "Harry Ford",
"ActiveLease": true
},
{
"Id": 19253,
"DateCreated": "2015-07-15T17:42:40.6429434-06:00",
"CommunityId": 31,
"CommunityName": "Enquire Villas",
"NameUnique": "EnquireVillas",
"MoveInDate": "2015-07-14T00:00:00.0000000-06:00",
"UnitId": 3211,
"UnitNumber": "100",
"SquareFoot": 900,
"BaseMonthly": 3500,
"Capacity": 1,
"FloorPlan": "2 BR",
"CareGroup": "AL",
"UnitDateCreated": "2013-08-26T14:58:50.4174356-06:00",
"UnitDateUpdated": "2015-04-23T19:22:04.2078441-06:00",
"IsRepayable": false,
"CaseNumber": "DEMO101023",
"IndividualId": 301739,
"IndividualName": "Cathy Sanders",
"ActiveLease": true
},
{
"Id": 38358,
"DateCreated": "2016-04-29T03:34:13.3098667-06:00",
"CommunityId": 31,
"CommunityName": "Enquire Villas",
"NameUnique": "EnquireVillas",
"MoveInDate": "2016-04-28T00:00:00.0000000-06:00",
"DateUpdated": "2016-04-29T03:34:13.3098667-06:00",
"UnitId": 3211,
"UnitNumber": "100",
"SquareFoot": 900,
"BaseMonthly": 3500,
"Capacity": 1,
"FloorPlan": "2 BR",
"CareGroup": "AL",
"UnitDateCreated": "2013-08-26T14:58:50.4174356-06:00",
"UnitDateUpdated": "2015-04-23T19:22:04.2078441-06:00",
"IsRepayable": false,
"CaseNumber": "DEMO101643",
"IndividualId": 689604,
"IndividualName": "Papa John",
"ActiveLease": true
}
]
Code samples
@ECHO OFF
curl -v -X GET "https://api2.enquiresolutions.com/v3/HousingContract?PortalId={number}&IndividualId={number}&CaseNumber={string}&UnitId={number}&Id={number}&CommunityId={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["IndividualId"] = "{number}";
queryString["CaseNumber"] = "{string}";
queryString["UnitId"] = "{number}";
queryString["Id"] = "{number}";
queryString["CommunityId"] = "{number}";
var uri = "https://api2.enquiresolutions.com/v3/HousingContract?" + 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/HousingContract");
builder.setParameter("PortalId", "{number}");
builder.setParameter("IndividualId", "{number}");
builder.setParameter("CaseNumber", "{string}");
builder.setParameter("UnitId", "{number}");
builder.setParameter("Id", "{number}");
builder.setParameter("CommunityId", "{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}",
"IndividualId": "{number}",
"CaseNumber": "{string}",
"UnitId": "{number}",
"Id": "{number}",
"CommunityId": "{number}",
};
$.ajax({
url: "https://api2.enquiresolutions.com/v3/HousingContract?" + $.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/HousingContract";
NSArray* array = @[
// Request parameters
@"entities=true",
@"PortalId={number}",
@"IndividualId={number}",
@"CaseNumber={string}",
@"UnitId={number}",
@"Id={number}",
@"CommunityId={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/HousingContract');
$url = $request->getUrl();
$headers = array(
// Request headers
'Ocp-Apim-Subscription-Key' => '{subscription key}',
);
$request->setHeader($headers);
$parameters = array(
// Request parameters
'PortalId' => '{number}',
'IndividualId' => '{number}',
'CaseNumber' => '{string}',
'UnitId' => '{number}',
'Id' => '{number}',
'CommunityId' => '{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}',
'IndividualId': '{number}',
'CaseNumber': '{string}',
'UnitId': '{number}',
'Id': '{number}',
'CommunityId': '{number}',
})
try:
conn = httplib.HTTPSConnection('api2.enquiresolutions.com')
conn.request("GET", "/v3/HousingContract?%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}',
'IndividualId': '{number}',
'CaseNumber': '{string}',
'UnitId': '{number}',
'Id': '{number}',
'CommunityId': '{number}',
})
try:
conn = http.client.HTTPSConnection('api2.enquiresolutions.com')
conn.request("GET", "/v3/HousingContract?%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/HousingContract')
query = URI.encode_www_form({
# Request parameters
'PortalId' => '{number}',
'IndividualId' => '{number}',
'CaseNumber' => '{string}',
'UnitId' => '{number}',
'Id' => '{number}',
'CommunityId' => '{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