LeadExec Data Interface

LeadExec's data interface is built to allow you to connect to your LeadExec database through other software.

Request Parameters

This API receives the following parameters:

Name Type Description
key String API Key
lid Int64 Unique identifier for the lead type being accessed
Query json The query to apply to the dataset being accessed (optional)
SortFields Array (String pipe delimited) The fields to sort the collection by (DateAdded by default) (optional)
SortOrder ASC or DESC Direction to apply the sort on the collection (optional)
Fields Array (String pipe delimited) List of fields to return in the collection (optional)
StartDate DateTime The start date of the data download
EndDate DateTime The end date of the data download
skip int The amount of leads you want to skip before download
take int The amount of leads to take after the skip

Request Example

The following example pulls all leads between 1/1/2010 and 2/1/2010 with a loan amount between 150000 and 200000. This example pulls only the first name, last name, and loan amount fields. The example also sorts by first name then last name. Note: For the example values are not URL encoded. Be sure to properly URL encode any values that require it.

https://apidata.leadexec.net/?key=[API_KEY]&lid=0&query={ "LoanAmount" : { $gte : 150000, $lte : 200000 } }&sortfields=FirstName|LastName&sortorder=ASC&fields=FirstName|LastName|LoanAmount&startdate=1/1/2010&enddate=2/1/2010&skip=100&take=1000

Response Information

This API will return an XML containing the leads as well as the sends for each lead.

Below is an example of the XML (Lead fields will depend on the configuration of your lead type):

<Leads querytotal="3088" takecount="1" sentcount="1">
		<LeadSource>Bills wholesale leads</LeadSource>
		<DateAdded>1/5/2014 10:50:54 AM</DateAdded>
		<Campaign>Default MLM</Campaign>
		<Category>No Category</Category>
		<DateVerified>1/5/2014 10:50:54 AM</DateVerified>
		<VerifyResponse>Call Received</VerifyResponse>
		<LastReturnAction>Not Returned</LastReturnAction>
		<LastReturnActionDate>1/5/2014 10:50:54 AM</LastReturnActionDate>
		<AnalyticProfile>No Profile</AnalyticProfile>
				<DateSent>1/5/2014 10:51:34 AM</DateSent>
				<ClientName>ClickPoint Software</ClientName>
				<ReturnStatus>Not Returned</ReturnStatus>
				<Request>[request information]</Request>
				<Response>[response information]</Response>

Query Information

LeadExec's data API uses a json format to query the lead documents information.

Example query to find leads sent to a specific client:

	"SendInformation.ClientUID" : 6
This example looks in the SendInformation object and only returns lead documents that contain a client ID of 6 (for a list of IDs for your clients, please refer to the LeadExec API for more information).
Example query to find leads with a loan amount between 150,000 and 200,000:
	"LoanAmount" : {
		$gte : 150000,
		$lte : 200000
This example looks at the LoanAmount and only returns lead documents between 150000 and 200000.

Example pulls a single document for the UID specified:

	"UID" : 1234567
This example looks at the UID and only returns the lead document for the UID.

For more information on advanced search operators visit Query and Projection Operators

Note: If you are looking for an API that provides administrative operations, please refer to LeadExec's API for more information.