Legacy Lead Post
INFO
Lead Post API V1 Coming Soon!
Legacy Lead Post ingestion endpoint.
Header Parameters
Request Parameters
Request Information
api_key
stringrequiredDecision Cloud generated campaign API Key.
lead_flow_identifier
stringrequired ifThe lead flow identifier can be used to map portfolios to campaigns. You can use any identifier you like (up to 64 chars).
DANGER
Required if the campaign is using "Lead Flow -> Auto Select" settings with an "Identifier Type" of "Custom".
decision_flow_identifier
stringrequired ifThe decision flow identifier can be used to map decision waterfalls and decision trees to campaigns. You can use any identifier you like (up to 64 chars).
DANGER
Required if the campaign is using "Decision Flow -> Auto Select" settings.
campaign_code
stringrequired withoutA campaign code is a customer friendly version of the campaign's API key (only available on direct mail and radio type campaigns). This should be passed as a string like "CMP100".
DANGER
Required without api_key
Source Information
ip_address
stringrequiredThe IP address of the user that filled out the lead form. Both IPv4 and IPv6 addresses are accepted. This should be passed as a string like "44.55.66.77" or "2001:0db8:85a3:0000:0000:8a2e:0370:7334".
source_url
stringrequiredThe website address (URL) which the lead orginated from. This should be passed as a string like
www.example.comorhttp://www.example.comorhttp://www.example.com/apply. Remove any query parameters if the strings are expected to be longer than 255 characters.affiliate_id
stringrequiredThe affiliate ID of the source of the lead.
affiliate_sub_id
stringThe affiliate sub ID of the source of the lead.
affiliate_type
integerIndicates the type of affiliate.
- 1 = Production/Organic
- 2 = Aggregator/Partner
- 3 = Lead Provider
reference_id
stringThis field can be used to identify the type of lead data.
lead_reference_id
stringThis field can be used to reference a Unique ID in your system.
time_stamp
stringThe exact time the lead was captured. Set this to UTC−06:00 (Central Time Zone).
Format: yyyy-mm-dd hh:mm:ss
advertising_method
integerIndicates how the lead heard about you.
- 1 = Web Search
- 2 = Web Ad
- 3 = TV Ad
- 4 = Radio Ad
- 5 = Email
- 6 = Direct Mail
- 7 = Social Media
- 8 = Referral
- 9 = Other
user_agent
stringrequiredThe User-Agent HTTP header.
Loan Information
loan_request_amount
floatrequiredThe loan amount requested by the lead. This should be passed like "500" or "500.00".
alt_loan_request_amount
floatField to be used as an alternate for lead request amount. This optional field should only be used if something other than the actual loan request amount is posted into the required loan request amount field. This should be passed like "500" or "500.00".
Personal Information
social_security_number
stringrequiredThe lead 9 digit social security number with no delimiters. For example, this should be passed as a string like "123456789".
first_name
stringrequiredThe lead first name. This should be passed as a string like "John".
middle_name
stringThe lead middle name. This should be passed as a string like "Michael".
last_name
stringrequiredThe lead last name. This should be passed as a string like "Doe".
name_suffix
integerIndicates the lead name suffix.
- 1 = None
- 2 = Jr
- 3 = Sr
- 4 = I
- 5 = II
- 6 = III
- 7 = IV
- 8 = V
- 9 = VI
- 10 = VII
- 11 = VIII
gender
integerIndicates the lead Gender.
- 1 = Male
- 2 = Female
date_of_birth
stringrequiredThe lead date of birth. This should be passed as a string like "1985-12-31".
Format: yyyy-mm-dd
drivers_license_state
stringrequiredThe lead drivers license state. This should be passed as a string like "MN" for Minnesota.
drivers_license_number
stringrequiredThe lead driver's license number.
is_military
integerrequiredIndicates whether the lead is active military.
- 1 = True
- 0 = False
marital_status
integerIndicates the lead marital status.
- 1 = Married
- 2 = Single/Never Married
- 3 = Divorced/Separated
- 4 = Widowed
- 5 = Domestic Partnership
mother_maiden_name
stringThe lead mother maiden name.
Contact Information
email
stringrequiredThe lead email address. This should be passed as a string like "johndoe@yahoo.com".
address
stringrequiredThe lead address line 1. This shoould be passed as a string like "1500 Great Falls Drive".
address2
stringThe lead address line 2 (apartment or suite number). This should be passed as a string like "Apartment #230" or "Ste. 100"
city
stringrequiredThe lead city. This should be passed as a string like "St. Louis".
state
stringrequiredThe lead 2 character state abbreviation. This should be passed as a string like "MN" for Minnesota.
zip
stringrequiredThe lead zip code. There should be no delimiters. This should be passed as a string like "55125".
mailing_address
stringThe lead mailing address. This shoould be passed as a string like "1500 Great Falls Drive"
mailing_city
stringThe lead mailing city. This should be passed as a string like "St. Louis".
mailing_state
stringThe lead 2 character mailing state abbreviation. This should be passed as a string like "MN" for Minnesota.
mailing_zip
stringThe lead Mailing zip code. There should be no delimiters. This should be passed as a string like "55125".
home_phone
stringrequiredThe lead home phone number. This should be passed as a 10 character string like "6125552222" (no country code or delimiters).
cell_phone
stringThe lead mobile/cell phone number. This should be passed as a 10 character string like "6125552222" (no country code or delimiters).
preferred_phone
integerIndicates the lead preferred contact phone.
- 1 = Home Phone
- 2 = Cell Phone
- 3 = Work Phone
best_contact_time
integerIndicates the best time to contact the lead.
- 1 = Anytime
- 2 = Morning
- 3 = Noon
- 4 = Afternoon
- 5 = Evening
rent_or_own
integerrequiredIndicates the lead either being a renter or home owner.
- 1 = Rent
- 2 = Own
- 3 = Other
monthly_rent_or_mortgage
floatThe monthly amount paid of rent or mortgage by the lead. This should be passed like "1000" or "1000.00".
months_at_address
integerThe number of months the lead has been living at the current address. This should be passed as a string like "3", "12", or "108".
Income Source Information
income_sources
arrayis_primary
integerrequiredIndicates the primary income source.
- 1 = True
- 0 = False
income_source
integerIndicates the lead source of income.
- 1 = Employed
- 2 = Social Security
- 3 = Disability
- 4 = Pension
- 5 = Self Employed
- 6 = Unemployed
- 7 = Welfare
- 8 = Other
monthly_income
floatrequired ifThe gross amount of monthly income. This value should be passed like "1800" or "1800.00".
DANGER
Required without last_pay_amount
last_pay_amount
floatrequired ifThe gross amount of the most recent paycheck. This should be passed like "950" or "950.00".
DANGER
Required without monthly_income
pay_frequency
integerrequiredIndicates the frequency in which the lead gets paid.
- 1 = Weekly
- 2 = Bi-Weekly
- 3 = Twice a Month
- 4 = Monthly
pay_frequency_type
integerIndicates the frequency type in which the lead gets paid. "Day-Based" gets paid on the same day(s) of the month each month (1st - 31st). "Weekday-Based" gets paid on the same day(s) of the week each month (Monday - Sunday).
- 1 = Day-Based
- 2 = Weekday-Based
last_pay_date
stringThe date the lead was last paid. This should be passed as a string like "1985-12-31".
Format: yyyy-mm-dd
next_pay_date
stringrequiredThe date the lead will next be paid. This should be passed as a string like "1985-12-31".
Format: yyyy-mm-dd
second_pay_date
stringThe second next date the lead will next be paid. This should be passed as a string like "1985-12-31".
Format: yyyy-mm-dd
payment_type
integerrequiredIndicates the lead regarding income source payments.
- 1 = Cash
- 2 = Check
- 3 = Direct Deposit
compensation_type
integerIndicates if the employed applicant gets paid on an hourly or salary basis.
- 1 = Hourly
- 2 = Salary
employer_name
stringrequired ifCurrent employer's name.
DANGER
Required if income_source=1
employer_address
stringThe employer's street address.
employer_city
stringThe employer's city.
employer_state
stringThe employer's state.
employer_zip
stringThe employer's zip.
work_phone
stringrequired ifThe lead work phone number. This should be passed as a 10 character string like "6512229999" (no country code or delimiters).
DANGER
Required if income_source=1
job_title
stringThe position held by the employee. This should be passed as a string like "Cashier".
employment_type
integerIndicates the type of employment.
- 1 = Full-Time
- 2 = Part-Time
months_at_job
integerrequired ifThe number of months the lead has been with the employer. This should be passed as a 3 digit max number like "3", "12", or "108".
DANGER
Required if income_source=1
Bank Account Information
bank_accounts
arrayis_primary
integerrequiredIndicates the primary income source.
- 1 = True
- 0 = False
bank_name
stringThe bank name for the lead. This should be passed as a string like "Bank of America".
INFO
By default, this field attempts to auto-populate if a valid bank_routing_number is supplied.
bank_address
stringThe bank's street address.
INFO
By default, this field attempts to auto-populate if a valid bank_routing_number is supplied.
bank_city
stringThe bank's city.
INFO
By default, this field attempts to auto-populate if a valid bank_routing_number is supplied.
bank_state
stringThe bank's state.
INFO
By default, this field attempts to auto-populate if a valid bank_routing_number is supplied.
bank_zip
stringThe bank's zip.
INFO
By default, this field attempts to auto-populate if a valid bank_routing_number is supplied.
bank_phone
stringThe bank account phone number for the lead. This should be passed as a 10 character string like "6512229999" (no country code or delimiters).
INFO
By default, this field attempts to auto-populate if a valid bank_routing_number is supplied.
bank_routing_number
stringrequiredThe indicated bank routing number (ABA number). Value should be exactly 9 digits, and contain no delimiters. For example, a valid input value would should look like "123456789".
bank_account_number
stringrequiredThe indicated bank account number. Value should have no delimiters, For example, a valid input value should look like "98469859".
bank_account_type
integerrequiredIndicates the type of bank account for the lead.
- 1 = Checking
- 2 = Savings
months_at_bank
integerrequiredThe number of months the lead has had the bank account. This should be passed as a 3 digit max number like "3", "12", or "108".
Reference Information
references
arrayreference_first_name
stringThe reference first name.
reference_last_name
stringThe reference last name.
reference_address
stringThe reference street address.
reference_city
stringThe reference city.
reference_state
stringThe reference state.
reference_zip
stringThe reference zip.
reference_phone
stringThe reference phone number for the lead. This should be passed as a 10 character string like "6512229999" (no country code or delimiters).
reference_relation
integerIndicates the reference relationship to the lead.
- 1 = Spouse
- 2 = Sibling
- 3 = Parent
- 4 = Co-worker
- 5 = Friend
- 6 = Boyfriend
- 7 = Girlfriend
- 8 = Brother
- 9 = Sister
- 10 = Other
Optional Information
optional_n
stringUser defined fields (up to 255 chars).
Additional fields can be added as needed by assigning a number to them (1 - 15):
optional_1, optional_2, optional_3, ..., optional_15
Response Parameters
status
stringContains the status on the request. There are two possible status codes:
- OK = Indicates that no errors occured and the response contains a valid result.
- ERROR = Indicates that there was an error on the request.
result
nullablestringContains the result of the lead post. There are two possible results:
- A = Lead Accepted.
- R = Lead Rejected.
INFO
This field is only present if no error has been detected.
redirect_url
nullablestringContains the URL to redirect the customer to if the lead has been accepted.
INFO
This field is only present if the lead has been accepted.
errors
nullablearrayWhen the API returns a status code other than OK, this additional field will be present within the response object. This field contains more detailed information about the reasons behind the given status code. This may contain debugging information to help you track down why the API is not working.
INFO
This field is only present if an error has been detected, and its content is subject to change.
POST /api/legacy
curl --request POST \
"https://api.decisioncloud.me/api/legacy" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"api_key\": \"{API_KEY}\",
\"source_url\": \"www.samplesourceurl.com\",
\"affiliate_id\": \"id-123456789-12345\",
\"affiliate_sub_id\": \"id-1234\",
\"reference_id\": \"1234567890\",
\"lead_reference_id\": \"0987654321\",
\"time_stamp\": \"2018-10-01 22:52:23\",
\"advertising_method\": 9,
\"ip_address\": \"127.0.0.1\",
\"user_agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0\",
\"loan_request_amount\": 600,
\"social_security_number\": \"666124800\",
\"first_name\": \"Justin\",
\"middle_name\": \"Peter\",
\"last_name\": \"Griffin\",
\"name_suffix\": 1,
\"gender\": 1,
\"date_of_birth\": \"1955-07-22\",
\"drivers_license_state\": \"RI\",
\"drivers_license_number\": \"R900830623718\",
\"is_military\": 0,
\"marital_status\": 1,
\"email\": \"justin.griffin651955804@mac.com\",
\"address\": \"31 Spooner Street\",
\"city\": \"Quahog\",
\"state\": \"RI\",
\"zip\": \"00093\",
\"home_phone\": \"6018262946\",
\"cell_phone\": \"9018262942\",
\"preferred_phone\": 1,
\"best_contact_time\": 1,
\"rent_or_own\": 2,
\"monthly_rent_or_mortgage\": 1500,
\"months_at_address\": 51,
\"income_sources\": [
{
\"is_primary\": 1,
\"income_source\": 1,
\"monthly_income\": 3354.56,
\"pay_frequency\": 2,
\"next_pay_date\": \"2018-10-12\",
\"payment_type\": 3,
\"employer_name\": \"Subway\",
\"employer_address\": \"5020 N Academy\",
\"employer_city\": \"Clovis\",
\"employer_state\": \"CA\",
\"employer_zip\": \"93611\",
\"work_phone\": \"3222123223\",
\"job_title\": \"Sandwhich Artist\",
\"employment_type\": 1,
\"months_at_job\": 41
}
],
\"bank_accounts\": [
{
\"is_primary\": 1,
\"bank_name\": \"WELLS FARGO BANK NA (MINNESOTA)\",
\"bank_address\": \"255 2ND AVE SOUTH\",
\"bank_city\": \"MINNEAPOLIS\",
\"bank_state\": \"MN\",
\"bank_zip\": \"55479\",
\"bank_phone\": \"6512229999\",
\"bank_routing_number\": \"091000019\",
\"bank_account_number\": \"434343434\",
\"bank_account_type\": 1,
\"months_at_bank\": 59
}
],
\"references\": [
{
\"reference_first_name\": \"Ring\",
\"reference_last_name\": \"Filippyev\",
\"reference_address\": \"243 Lake View Park\",
\"reference_city\": \"Miami Beach\",
\"reference_state\": \"FL\",
\"reference_zip\": \"33141\",
\"reference_phone\": \"3054396293\",
\"reference_relation\": 5
}
]
}"const url = new URL(
"https://api.decisioncloud.me/api/legacy"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"api_key": "{API_KEY}",
"source_url": "www.samplesourceurl.com",
"affiliate_id": "id-123456789-12345",
"affiliate_sub_id": "id-1234",
"reference_id": "1234567890",
"lead_reference_id": "0987654321",
"time_stamp": "2018-10-01 22:52:23",
"advertising_method": 9,
"ip_address": "127.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0",
"loan_request_amount": 600,
"social_security_number": "666124800",
"first_name": "Justin",
"middle_name": "Peter",
"last_name": "Griffin",
"name_suffix": 1,
"gender": 1,
"date_of_birth": "1955-07-22",
"drivers_license_state": "RI",
"drivers_license_number": "R900830623718",
"is_military": 0,
"marital_status": 1,
"email": "justin.griffin651955804@mac.com",
"address": "31 Spooner Street",
"city": "Quahog",
"state": "RI",
"zip": "00093",
"home_phone": "6018262946",
"cell_phone": "9018262942",
"preferred_phone": 1,
"best_contact_time": 1,
"rent_or_own": 2,
"monthly_rent_or_mortgage": 1500,
"months_at_address": 51,
"income_sources": [
{
"is_primary": 1,
"income_source": 1,
"monthly_income": 3354.56,
"pay_frequency": 2,
"next_pay_date": "2018-10-12",
"payment_type": 3,
"employer_name": "Subway",
"employer_address": "5020 N Academy",
"employer_city": "Clovis",
"employer_state": "CA",
"employer_zip": "93611",
"work_phone": "3222123223",
"job_title": "Sandwhich Artist",
"employment_type": 1,
"months_at_job": 41
}
],
"bank_accounts": [
{
"is_primary": 1,
"bank_name": "WELLS FARGO BANK NA (MINNESOTA)",
"bank_address": "255 2ND AVE SOUTH",
"bank_city": "MINNEAPOLIS",
"bank_state": "MN",
"bank_zip": "55479",
"bank_phone": "6512229999",
"bank_routing_number": "091000019",
"bank_account_number": "434343434",
"bank_account_type": 1,
"months_at_bank": 59
}
],
"references": [
{
"reference_first_name": "Ring",
"reference_last_name": "Filippyev",
"reference_address": "243 Lake View Park",
"reference_city": "Miami Beach",
"reference_state": "FL",
"reference_zip": "33141",
"reference_phone": "3054396293",
"reference_relation": 5
}
]
};
fetch(url, {
method: "POST",
headers,
body: body,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.decisioncloud.me/api/legacy',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'form_params' => [
'api_key' => '{API_KEY}',
'source_url' => 'www.samplesourceurl.com',
'affiliate_id' => 'id-123456789-12345',
'affiliate_sub_id' => 'id-1234',
'reference_id' => '1234567890',
'lead_reference_id' => '0987654321',
'time_stamp' => '2018-10-01 22:52:23',
'advertising_method' => 9,
'ip_address' => '127.0.0.1',
'user_agent' => 'Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko\/20100101 Firefox\/61.0',
'loan_request_amount' => 600,
'social_security_number' => '666124800',
'first_name' => 'Justin',
'middle_name' => 'Peter',
'last_name' => 'Griffin',
'name_suffix' => 1,
'gender' => 1,
'date_of_birth' => '1955-07-22',
'drivers_license_state' => 'RI',
'drivers_license_number' => 'R900830623718',
'is_military' => 0,
'marital_status' => 1,
'email' => 'justin.griffin651955804@mac.com',
'address' => '31 Spooner Street',
'city' => 'Quahog',
'state' => 'RI',
'zip' => '00093',
'home_phone' => '6018262946',
'cell_phone' => '9018262942',
'preferred_phone' => 1,
'best_contact_time' => 1,
'rent_or_own' => 2,
'monthly_rent_or_mortgage' => 1500,
'months_at_address' => 51,
'income_sources' => [
[
'is_primary' => 1,
'income_source' => 1,
'monthly_income' => 3354.56,
'pay_frequency' => 2,
'next_pay_date' => '2018-10-12',
'payment_type' => 3,
'employer_name' => 'Subway',
'employer_address' => '5020 N Academy',
'employer_city' => 'Clovis',
'employer_state' => 'CA',
'employer_zip' => '93611',
'work_phone' => '3222123223',
'job_title' => 'Sandwhich Artist',
'employment_type' => 1,
'months_at_job' => 41
],
],
'bank_accounts' => [
[
'is_primary' => 1,
'bank_name' => 'WELLS FARGO BANK NA (MINNESOTA)',
'bank_address' => '255 2ND AVE SOUTH',
'bank_city' => 'MINNEAPOLIS',
'bank_state' => 'MN',
'bank_zip' => '55479',
'bank_phone' => '6512229999',
'bank_routing_number' => '091000019',
'bank_account_number' => '434343434',
'bank_account_type' => 1,
'months_at_bank' => 59
],
],
'references' => [
[
'reference_first_name' => 'Ring',
'reference_last_name' => 'Filippyev',
'reference_address' => '243 Lake View Park',
'reference_city' => 'Miami Beach',
'reference_state' => 'FL',
'reference_zip' => '33141',
'reference_phone' => '3054396293',
'reference_relation' => 5
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));import requests
import json
url = 'https://api.decisioncloud.me/api/legacy'
payload = {
"api_key": "{API_KEY}",
"source_url": "www.samplesourceurl.com",
"affiliate_id": "id-123456789-12345",
"affiliate_sub_id": "id-1234",
"reference_id": "1234567890",
"lead_reference_id": "0987654321",
"time_stamp": "2018-10-01 22:52:23",
"advertising_method": 9,
"ip_address": "127.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0",
"loan_request_amount": 600,
"social_security_number": "666124800",
"first_name": "Justin",
"middle_name": "Peter",
"last_name": "Griffin",
"name_suffix": 1,
"gender": 1,
"date_of_birth": "1955-07-22",
"drivers_license_state": "RI",
"drivers_license_number": "R900830623718",
"is_military": 0,
"marital_status": 1,
"email": "justin.griffin651955804@mac.com",
"address": "31 Spooner Street",
"city": "Quahog",
"state": "RI",
"zip": "00093",
"home_phone": "6018262946",
"cell_phone": "9018262942",
"preferred_phone": 1,
"best_contact_time": 1,
"rent_or_own": 2,
"monthly_rent_or_mortgage": 1500,
"months_at_address": 51,
"income_sources": [
{
"is_primary": 1,
"income_source": 1,
"monthly_income": 3354.56,
"pay_frequency": 2,
"next_pay_date": "2018-10-12",
"payment_type": 3,
"employer_name": "Subway",
"employer_address": "5020 N Academy",
"employer_city": "Clovis",
"employer_state": "CA",
"employer_zip": "93611",
"work_phone": "3222123223",
"job_title": "Sandwhich Artist",
"employment_type": 1,
"months_at_job": 41
}
],
"bank_accounts": [
{
"is_primary": 1,
"bank_name": "WELLS FARGO BANK NA (MINNESOTA)",
"bank_address": "255 2ND AVE SOUTH",
"bank_city": "MINNEAPOLIS",
"bank_state": "MN",
"bank_zip": "55479",
"bank_phone": "6512229999",
"bank_routing_number": "091000019",
"bank_account_number": "434343434",
"bank_account_type": 1,
"months_at_bank": 59
}
],
"references": [
{
"reference_first_name": "Ring",
"reference_last_name": "Filippyev",
"reference_address": "243 Lake View Park",
"reference_city": "Miami Beach",
"reference_state": "FL",
"reference_zip": "33141",
"reference_phone": "3054396293",
"reference_relation": 5
}
]
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, data=payload)
response.json(){
"status": "OK",
"result": "A",
"redirect_url": "https:\/\/api.decisioncloud.me\/redirect\/?t=fbcd830ee915aie8ddf3018b52adff76"
}{
"status": "OK",
"result": "R"
}{
"status": "ERROR",
"errors": [
"Campaign not found."
]
}