3.0

API change history

REST API with full access to Enquire Objects and meta-data for CRUD operations.

Activity GET

Activities are used to store a users actions against Individuals. All reporting functionality and sale stage progress are tracked using Activities.

Example Activities could include "Call In", "Email" or "Tour". You can create your own Activities using the Activity POST method.

Try it

Request

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

    See the activities of any individuals

  • (optional)
    number

    Number of results you want returned

  • (optional)
    number

    Page number of results you would like returned

  • (optional)
    number

    Filter activities you would like returned: All = 0, OverDue = 1, Due = 2, DueToday = 3, DueThisweek = 4, History = 5, AllUsers = 6

  • (optional)
    date

    Filter activity by Created Date

  • (optional)
    date

    Filter activity by Created Date

Request headers

  • string
    Subscription key which provides access to this API. Found in your Profile.

Request body

Responses

200 OK

Returns a list of activities in the Portal filtered by status or by an Individual.

ActivityType, ActivityStatus, and ResultId field options can be retrieved by using the Type GET method.

All Activities are returned in the TimeZone your API user. You can change this TimeZone in your account settings in EnquireLEADS CRM

Activities with "AllDay" field marked as true are typically used for tasks or non-scheduled Activity

Overdue activities are non-completed activities, completed activities will not show up as overdue

All activities are assigned communities as Individuals assigned could be a Prospect in multiple communities. For example, an Individual can tour (Activity) multiple facilities

Representations

[
  {
    "Id": 1347568,
    "ActivityStatus": "Assigned",
    "ActivityName": "Activity quick add test w/ reinquiry",
    "ActivityType": "Email In",
    "TimeZone": "Central Standard Time",
    "Reinquiry": false,
    "Community": {
      "Id": 76,
      "Name": "Community 2",
      "NameUnique": "Community2"
    },
    "CaseNumber": "GD100045",
    "IndividualId": 399289,
    "IndividualFullName": "Community2 Prospect",
    "AssignedName": "Support User",
    "DueDateDescriptive": "Overdue - 9/29/2015",
    "DueDate": "2015-09-29T16:00:00.0000000-06:00",
    "DueDateEnd": "2015-09-29T21:00:00.0000000-06:00",
    "DateCreated": "2015-09-21T15:42:00.0000000-06:00",
    "AllDay": false,
    "ResultId": 135,
    "ResultName": "Scheduled Appointment/Visit",
    "SaleStage": "None",
    "Completed": false,
    "Cancelled": false,
    "NoShow": false,
    "Rescheduled": false,
    "IsActivityHistory": false,
    "Overdue": true
  },
  {
    "Id": 1683219,
    "ActivityStatus": "Assigned",
    "ActivityName": "Denver Bronco Email",
    "TimeZone": "Mountain Standard Time",
    "Reinquiry": false,
    "Community": {
      "Id": 73,
      "Name": "Community 1",
      "NameUnique": "Community1"
    },
    "CaseNumber": "GD100055",
    "IndividualId": 407431,
    "IndividualFullName": "Demaryius Thomas",
    "AssignedName": "Support User",
    "DueDateDescriptive": "Overdue - 10/6/2015",
    "DueDate": "2015-10-06T09:25:00.0000000-06:00",
    "DueDateEnd": "2015-10-06T09:40:00.0000000-06:00",
    "DateCompleted": "2015-10-06T03:25:10.0770000-06:00",
    "DateUpdated": "2015-10-06T03:25:10.0770000-06:00",
    "DateCreated": "2015-10-06T03:25:10.0770000-06:00",
    "AllDay": false,
    "ResultId": 133,
    "ResultName": "Attempt",
    "SaleStage": "None",
    "Completed": false,
    "Cancelled": false,
    "NoShow": false,
    "Rescheduled": false,
    "IsActivityHistory": false,
    "Overdue": true
  },
  {
    "Id": 1385660,
    "ActivityStatus": "Assigned",
    "ActivityName": "Call Out",
    "ActivityType": "Call Out",
    "TimeZone": "Central Standard Time",
    "Reinquiry": false,
    "Community": {
      "Id": 73,
      "Name": "Community 1",
      "NameUnique": "Community1"
    },
    "CaseNumber": "GD100012",
    "IndividualId": 193558,
    "IndividualFullName": "Gemma Howard",
    "AssignedName": "Support User",
    "DueDateDescriptive": "Overdue - 10/27/2015",
    "DueDate": "2015-10-27T14:30:00.0000000-06:00",
    "DueDateEnd": "2015-10-27T15:00:00.0000000-06:00",
    "DateUpdated": "2015-10-27T14:23:30.0000000-06:00",
    "DateCreated": "2015-10-27T14:23:00.0000000-06:00",
    "AllDay": false,
    "ResultId": 134,
    "ResultName": "Contact Made",
    "SaleStage": "None",
    "Completed": false,
    "Cancelled": false,
    "NoShow": false,
    "Rescheduled": false,
    "IsActivityHistory": false,
    "Overdue": true
  }
]

Code samples

@ECHO OFF

curl -v -X GET "https://api2.enquiresolutions.com/v3/Activity?PortalId={number}&IndividualId={number}&PageSize={number}&PageNumber={number}&Filter={number}&DateUpdatedStart={date}&DateUpdatedEnd={date}"
-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["PageSize"] = "{number}";
            queryString["PageNumber"] = "{number}";
            queryString["Filter"] = "{number}";
            queryString["DateUpdatedStart"] = "{date}";
            queryString["DateUpdatedEnd"] = "{date}";
            var uri = "https://api2.enquiresolutions.com/v3/Activity?" + 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/Activity");

            builder.setParameter("PortalId", "{number}");
            builder.setParameter("IndividualId", "{number}");
            builder.setParameter("PageSize", "{number}");
            builder.setParameter("PageNumber", "{number}");
            builder.setParameter("Filter", "{number}");
            builder.setParameter("DateUpdatedStart", "{date}");
            builder.setParameter("DateUpdatedEnd", "{date}");

            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}",
            "PageSize": "{number}",
            "PageNumber": "{number}",
            "Filter": "{number}",
            "DateUpdatedStart": "{date}",
            "DateUpdatedEnd": "{date}",
        };
      
        $.ajax({
            url: "https://api2.enquiresolutions.com/v3/Activity?" + $.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/Activity";
    NSArray* array = @[
                         // Request parameters
                         @"entities=true",
                         @"PortalId={number}",
                         @"IndividualId={number}",
                         @"PageSize={number}",
                         @"PageNumber={number}",
                         @"Filter={number}",
                         @"DateUpdatedStart={date}",
                         @"DateUpdatedEnd={date}",
                      ];
    
    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/Activity');
$url = $request->getUrl();

$headers = array(
    // Request headers
    'Ocp-Apim-Subscription-Key' => '{subscription key}',
);

$request->setHeader($headers);

$parameters = array(
    // Request parameters
    'PortalId' => '{number}',
    'IndividualId' => '{number}',
    'PageSize' => '{number}',
    'PageNumber' => '{number}',
    'Filter' => '{number}',
    'DateUpdatedStart' => '{date}',
    'DateUpdatedEnd' => '{date}',
);

$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}',
    'PageSize': '{number}',
    'PageNumber': '{number}',
    'Filter': '{number}',
    'DateUpdatedStart': '{date}',
    'DateUpdatedEnd': '{date}',
})

try:
    conn = httplib.HTTPSConnection('api2.enquiresolutions.com')
    conn.request("GET", "/v3/Activity?%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}',
    'PageSize': '{number}',
    'PageNumber': '{number}',
    'Filter': '{number}',
    'DateUpdatedStart': '{date}',
    'DateUpdatedEnd': '{date}',
})

try:
    conn = http.client.HTTPSConnection('api2.enquiresolutions.com')
    conn.request("GET", "/v3/Activity?%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/Activity')

query = URI.encode_www_form({
    # Request parameters
    'PortalId' => '{number}',
    'IndividualId' => '{number}',
    'PageSize' => '{number}',
    'PageNumber' => '{number}',
    'Filter' => '{number}',
    'DateUpdatedStart' => '{date}',
    'DateUpdatedEnd' => '{date}'
})

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