Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1. Posting
Lead must be posted to the following URL using either GET or POST method.
https://www.leadsmarket.com/api2/post/data.aspx
Table below lists required and optional fields.
Field
CampaignID
Required
Yes
Field Type
Integer
Values / Restrictions
222430
Yes
String
670c0005-430a-4686-975e-fe3395a7d8ec
No
String
"Accepted", "Rejected"
No
String
Used for tracking and reporting purposes. Affiliate interface allows grouping reports by this field
ClientIP
Yes
String
Valid IP address
IP address of the consumer that filled out the payday loan request form
ClientUserAgent
Yes
String
UserAgent of the consumer browser that filled out the payday loan request form
ClientURL
Yes
String
Valid URL
Yes
Integer
Minimum price you request to sell the lead at. We recommend attempting at 80, 50, 20, 2 and 0.
MaxResponseTime
No
Integer
Maximum time allocated to our system for finding a lender. In order to maximize our ability to monetize
the lead, we recommend at least 60 seconds.
RequestedAmount
Yes
Integer
FirstName
Yes
String
LastName
Yes
String
Yes
String
Valid email
EmailAlt
No
String
Valid email
PhoneHome
Yes
String
10 digits
PhoneCell
Yes
String
10 digits
PhoneWork
Yes
String
10 digits
PhoneWorkExt
No
String
1-6 digits
BestTimeToCall
Yes
String
StreetAddress1
Yes
String
StreetAddress2
No
String
City
Yes
String
State
Yes
String
2 characters
ZipCode
Yes
String
5 digits
DOB
Yes
Date
MM/DD/YYYY
SSN
Yes
String
9 digits
DriversLicense
Yes
String
DriversLicenseState
Yes
String
US State - 2 Characters
MonthlyIncome
Yes
Integer
IncomeType
Yes
String
"EMPLOYMENT", "BENEFITS"
PayFrequency
Yes
String
EmployerName
Yes
String
JobTitle
Yes
String
MonthsEmployed
Yes
Integer
DirectDeposit
Yes
Boolean
PayDate1
Yes
Date
MM/DD/YYYY
PayDate2
No
Date
MM/DD/YYYY
BankName
Yes
String
BankABA
Yes
String
9 Digits
BankAccountNumbe
r
Yes
String
BankAccountType
Yes
String
"CHECKING", "SAVINGS"
DebitCard
No
Boolean
Yes
Integer
ActiveMilitary
Yes
Boolean
OwnHome
Yes
Boolean
MonthsAtAddress
Yes
Integer
Credit
No
String
AcceptedTerms
Yes
Boolean
2. Response
The system response is in XML format. Field <Result> will contain one of the four possible results:
"Accepted", "Rejected", "Duplicate" or "Errors".
</PostResponse>
3. Reposting
If you received a response <Result>Rejected</Result>, you may repost the same lead with lower
<MinimumPrice> value. Lead should be reposted to the same URL as an initial post.
Response to REPOST of the lead will be in the same format as initial lead post response
(see Section 2).
4. Testing
Before your campaign can be switched to production, we need to receive a successful test post.
Your account manager will be notified when successful post is received.
In order to submit test post, within the tag <TestResult> you need to pass one of the two possible
values: "Accepted" or "Rejected". The system will respond to the test post with <Result> tag
containing the value posted in <TestResult> tag.
5. Code Sample
5.1. PHP
<?php
$vals = array();
$vals["CampaignID"] = "222430";
$vals["CampaignKey"] = "670c0005-430a-4686-975e-fe3395a7d8ec";
$vals["TestResult"] = "Accepted";
$vals["SubSourceID"] = "";
$vals["ClientIP"] = "";
$vals["ClientUserAgent"] = "";
$vals["ClientURL"] = "http://www.YourUrl.com/form.php";
$vals["MinimumPrice"] = "";
$vals["MaxResponseTime"] = "";
$vals["RequestedAmount"] = "";
$vals["FirstName"] = "";
$vals["LastName"] = "";
$vals["Email"] = "";
$vals["EmailAlt"] = "";
$vals["PhoneHome"] = "";
$vals["PhoneCell"] = "";
$vals["PhoneWork"] = "";
$vals["PhoneWorkExt"] = "";
$vals["BestTimeToCall"] = "";
$vals["StreetAddress1"] = "";
$vals["StreetAddress2"] = "";
$vals["City"] = "";
$vals["State"] = "";
$vals["ZipCode"] = "";
$vals["DOB"] = "";
$vals["SSN"] = "";
$vals["DriversLicense"] = "";
$vals["DriversLicenseState"] = "";
$vals["MonthlyIncome"] = "";
$vals["IncomeType"] = "";
$vals["PayFrequency"] = "";
$vals["EmployerName"] = "";
$vals["JobTitle"] = "";
$vals["MonthsEmployed"] = "";
$vals["DirectDeposit"] = "";
$vals["PayDate1"] = "";
$vals["PayDate2"] = "";
$vals["BankName"] = "";
$vals["BankABA"] = "";
$vals["BankAccountNumber"] = "";
$vals["BankAccountType"] = "";
$vals["DebitCard"] = "";
$vals["MonthsAtBank"] = "";
$vals["ActiveMilitary"] = "";
$vals["OwnHome"] = "";
$vals["MonthsAtAddress"] = "";
$vals["Credit"] = "";
$vals["AcceptedTerms"] = "";
$postvals = "";
foreach($vals as $var => $val){
if(strlen($postvals))$postvals.= "&";
$postvals.= $var . "=" . urlencode($val);
}
$ch = curl_init();
$server_url = "https://www.leadsmarket.com/api2/post/data.aspx";
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
curl_setopt(
$ch,
$ch,
$ch,
$ch,
$ch,
$ch,
$ch,
$ch,
$ch,
$ch,
$ch,
$ch,
CURLOPT_URL, $server_url );
CURLOPT_POST, 1 );
CURLOPT_POSTFIELDS, $postvals );
CURLOPT_HTTPHEADER, array("Expect:") );
CURLOPT_FAILONERROR, 1 );
CURLOPT_HEADER, 1 );
CURLOPT_RETURNTRANSFER, 1 );
CURLOPT_SSL_VERIFYPEER, false );
CURLOPT_SSL_VERIFYHOST, false );
CURLOPT_TIMEOUT, 120 );
CURLINFO_HEADER_OUT, true );
CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1 );
if(curl_errno($ch)){
// Error
} else {
$Response = curl_exec($ch);
if(curl_errno($ch))
{
// Error
} else {
// Success
}
curl_close($ch);
}
5.2. ASP.NET
Try
Dim myNameValueCollection As NameValueCollection = HttpUtility.ParseQueryString("")
myNameValueCollection.Add("CampaignID", "222430")
myNameValueCollection.Add("CampaignKey", "670c0005-430a-4686-975e-fe3395a7d8ec")
myNameValueCollection.Add("TestResult", "ACCEPTED")
myNameValueCollection.Add("SubSourceID", "")
myNameValueCollection.Add("ClientIP", "")
myNameValueCollection.Add("ClientUserAgent", "")
myNameValueCollection.Add("ClientURL", "http://www.YourUrl.com/form.aspx")
myNameValueCollection.Add("MinimumPrice", "")
myNameValueCollection.Add("MaxResponseTime", "")
myNameValueCollection.Add("RequestedAmount", "")
myNameValueCollection.Add("FirstName", "")
myNameValueCollection.Add("LastName", "")
myNameValueCollection.Add("Email", "")
myNameValueCollection.Add("EmailAlt", "")
myNameValueCollection.Add("PhoneHome", "")
myNameValueCollection.Add("PhoneCell", "")
myNameValueCollection.Add("PhoneWork", "")
myNameValueCollection.Add("PhoneWorkExt", "")
myNameValueCollection.Add("BestTimeToCall", "")
myNameValueCollection.Add("StreetAddress1", "")
myNameValueCollection.Add("StreetAddress2", "")
myNameValueCollection.Add("City", "")
myNameValueCollection.Add("State", "")
myNameValueCollection.Add("ZipCode", "")
myNameValueCollection.Add("DOB", "")
myNameValueCollection.Add("SSN", "")
myNameValueCollection.Add("DriversLicense", "")
myNameValueCollection.Add("DriversLicenseState", "")
myNameValueCollection.Add("MonthlyIncome", "")
myNameValueCollection.Add("IncomeType", "")
myNameValueCollection.Add("PayFrequency", "")
myNameValueCollection.Add("EmployerName", "")
myNameValueCollection.Add("JobTitle", "")
myNameValueCollection.Add("MonthsEmployed", "")
myNameValueCollection.Add("DirectDeposit", "")
myNameValueCollection.Add("PayDate1", "")
myNameValueCollection.Add("PayDate2", "")
myNameValueCollection.Add("BankName", "")
myNameValueCollection.Add("BankABA", "")
myNameValueCollection.Add("BankAccountNumber", "")
myNameValueCollection.Add("BankAccountType", "")
myNameValueCollection.Add("DebitCard", "")
myNameValueCollection.Add("MonthsAtBank", "")
myNameValueCollection.Add("ActiveMilitary", "")
myNameValueCollection.Add("OwnHome", "")
myNameValueCollection.Add("MonthsAtAddress", "")
myNameValueCollection.Add("Credit", "")
myNameValueCollection.Add("AcceptedTerms", "")
Dim myWebClient As New Net.WebClient
Dim PostingURL As String
PostingURL = "https://www.leadsmarket.com/api2/post/data.aspx"
Dim ResponseArray() As Byte
ResponseArray = myWebClient.UploadValues(PostingURL, "POST", myNameValueCollection)
Dim ResponseData As String = Encoding.ASCII.GetString(ResponseArray)
Catch ex As Threading.ThreadAbortException
Catch ex As Exception
'Error
End Try