Sei sulla pagina 1di 8

LeadsMarket.

com Payday Lead Posting Instructions


This document explains the process of posting and reposting leads to LeadsMarket.com Payday
Lead Web Service.

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

Used for tracking and reporting purposes


CampaignKey

Yes

String

670c0005-430a-4686-975e-fe3395a7d8ec

Unique key is assigned to each campaign


TestResult

No

String

"Accepted", "Rejected"

For testing purposes only! Leave blank for production!


The system will mark lead as test and respond with result specified in this field
SubID

No

String

0 <= LENGTH <= 50

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

UserAgent of the consumer browser that filled out the payday loan request form
ClientURL

Yes

String

Valid URL

URL at which the completed payday loan request form is hosted


MinimumPrice

Yes

Integer

0 <= VALUE <= 100

Minimum price you request to sell the lead at. We recommend attempting at 80, 50, 20, 2 and 0.
MaxResponseTime

No

Integer

0 <= VALUE <= 180

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

100 <= VALUE <= 1000

FirstName

Yes

String

2 <= LENGTH <= 50

LastName

Yes

String

2 <= LENGTH <= 50

Email

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

"ANYTIME", "MORNING", "AFTERNOON", "EVENING"

StreetAddress1

Yes

String

3 <= LENGTH <= 50

StreetAddress2

No

String

0 <= LENGTH <= 50

City

Yes

String

3 <= LENGTH <= 50

State

Yes

String

2 characters

ZipCode

Yes

String

5 digits

DOB

Yes

Date

MM/DD/YYYY

SSN

Yes

String

9 digits

DriversLicense

Yes

String

3 <= LENGTH <= 50

DriversLicenseState

Yes

String

US State - 2 Characters

MonthlyIncome

Yes

Integer

750 <= VALUE <=15000

IncomeType

Yes

String

"EMPLOYMENT", "BENEFITS"

PayFrequency

Yes

String

"WEEKLY", "BIWEEKLY", "TWICEMONTHLY", "MONTHLY"

EmployerName

Yes

String

2 <= LENGTH <= 50

JobTitle

Yes

String

2 <= LENGTH <= 50

MonthsEmployed

Yes

Integer

1 <= VALUE <= 1000

DirectDeposit

Yes

Boolean

"True", "1", "Yes", "False", "0", "No"

PayDate1

Yes

Date

MM/DD/YYYY

PayDate2

No

Date

MM/DD/YYYY

BankName

Yes

String

2 <= LENGTH <= 50

BankABA

Yes

String

9 Digits

BankAccountNumbe
r

Yes

String

4 <= LENGTH <= 30

BankAccountType

Yes

String

"CHECKING", "SAVINGS"

DebitCard

No

Boolean

"True", "1", "Yes", "False", "0", "No"

Whether there is a debit card associated with the bank account


MonthsAtBank

Yes

Integer

1 <= VALUE <= 1000

ActiveMilitary

Yes

Boolean

"True", "1", "Yes", "False", "0", "No"

OwnHome

Yes

Boolean

"True", "1", "Yes", "False", "0", "No"

MonthsAtAddress

Yes

Integer

1 <= VALUE <= 1000

Credit

No

String

"EXCELLENT", "VERYGOOD", "GOOD", "FAIR", "POOR", "VERYPOOR",


"UNSURE"

AcceptedTerms

Yes

Boolean

"True", "1", "Yes", "False", "0", "No"

2. Response
The system response is in XML format. Field <Result> will contain one of the four possible results:
"Accepted", "Rejected", "Duplicate" or "Errors".

2.1. Sample <Result>Accepted</Result>


Result "Accepted" means that we sold the lead at the price equal to or higher than requested in
<MinimumPrice> field. Exact sales price will be specified in <Price> field.
In order to complete the sale, consumer must be redirected to the URL provided in the
<RedirectURL> field.
<?xml version="1.0" encoding="utf-8"?>
<PostResponse>
<Result>Accepted</Result>
<CampaignID>123456</CampaignID>
<LeadID>D7B79F03-4971-45C0-A33E-64FF04E9C453</LeadID>
<Price>100.00</Price>
<RedirectURL>http://www.paydaylendersearch.com/?lid=123ABC</RedirectURL>
</PostResponse>

2.2. Sample <Result>Rejected</Result>


Result "Rejected" means that we were unable to sell the lead at the price requested in
<MinimumPrice> field. If the value specified in <MinimumPrice> field is greater than 0, you may try
to repost the lead with lower <MinimumPrice> field. For reposting instructions see Section 3.
<?xml version="1.0" encoding="utf-8"?>
<PostResponse>
<Result>Rejected</Result>
<CampaignID>123456</CampaignID>
<LeadID>D7B78F03-4971-45C0-A33E-64FF04E9C453</LeadID>
<Messages>
<Message>Try lower minimum price</Message>
</Messages>

</PostResponse>

2.3. Sample <Result>Duplicate</Result>


Result "Duplicate" means that we have previously processed the lead and it was either declined by
lenders or customer has an outstanding loan. Please, do not attempt to repost the lead.
<?xml version="1.0" encoding="utf-8"?>
<PostResponse>
<Result>Duplicate</Result>
<Messages>
<Message>Duplicate</Message>
</Messages>
</PostResponse>

2.4. Sample <Result>Errors</Result>


<Errors> tag will list all error fields. <Messages> tag will list all error messages.
<?xml version="1.0" encoding="utf-8"?>
<PostResponse>
<Result>Errors</Result>
<Messages>
<Message>Campaign Not Active</Message>
</Messages>
<Errors>
<Error>
<Field>Email</Field>
<Description>Invalid</Description>
</Error>
<Error>
<Field>PhoneHome</Field>
<Description>Invalid</Description>
</Error>
</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

Web service is provided without any warranty or guarantee.

Potrebbero piacerti anche