Here you'll find documentation on all available endpoints. If you have suggestions on new endpoints you would like to see, please tell us. We would love to hear from you.
All endpoints require that you provide the following parameters via HTTPS POST:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
apiID |
varchar | assigned API ID | yes | |
apiKey |
varchar | assigned API Key | yes | |
format |
varchar | json, xml | response data format | yes |
The /lenders
endpoint will provide a list of all lenders you are authorized for. This endpoint does not require any additional parameters.
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/lenders" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
Response may contain one or more lenders. If no lenders are found, null will be returned.
{
"name":"Test Mortgage Company",
"lenderID":"I34TRH7J",
},
{
"name":"Demo Mortgage Company",
"lenderID":"OH7JG44T",
},
...
The /lenders
endpoint will return the following properties:
Property | Type | Possible Values | Description |
---|---|---|---|
name |
varchar | full name | |
lenderID |
varchar | lender's unique identifier |
The /lender/users
endpoint will provide a list of all users with the requested role for the requested lender. This endpoint also requires the lenderID
and filter
parameters as follows:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
lenderID |
varchar | unique identifier | yes | |
filter |
varchar | loanofficer | specify role to return | yes |
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'lenderID' => "I34TRH7J",
'filter' => "loanofficer"
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/lender/users" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
Response may contain one or more users. If no users are found, null will be returned.
{
"userID":"XBTHT5JZ",
"firstName":"Tina",
"lastName":"Jones",
"phonePrimary":"555-555-5555",
"email":"tjones@testmortgagecompany.com",
"role":"Loan Officer",
"loanOfficer_nmls":"999999",
},
{
"userID":"28PKXX4A",
"firstName":"James",
"lastName":"Carter",
"phonePrimary":"444-444-4444",
"email":"jcarter@testmortgagecompany.com",
"role":"Loan Officer",
"loanOfficer_nmls":"888888",
},
...
The /lender/users
endpoint will return the following properties:
Property | Type | Possible Values | Description |
---|---|---|---|
userID |
varchar | unique identifier for user | |
firstName |
varchar | first name of user | |
lastName |
varchar | last name of user | |
phonePrimary |
varchar | primary phone number of user | |
email |
varchar | email of user | |
role |
varchar | role of user | |
loanOfficer_nmls |
varchar | nmls number of user |
API access tokens are environment-dependent. This means if you are granted an access token in one environment, it can only be used to make API calls in that environment. The Access Token API endpoint is /access-token-lender
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'lenderID' => "I34TRH7J",
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/access-token-lender" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
This endpoint requires a lenderID in order to receive an access token. This access token will be needed to make subsequent API calls that affect that lender. Our implementation specialist can give you the appropriate lender public ID value to use. Your integration specialist will also need to enable access to a lender for your partner account.
The response will always contain one access token.
{
"accessToken":"gUS2j4hD6Op2lCtghYJ1gDwH0kms4utaap1knyuw",
"date":1443566713,
"expiration":1445726713,
"ip":"127.0.0.1",
}
You’ll need the accessToken value to make further API calls. This is your API partner access token allowing you to make partner API calls affecting the corresponding lender specified in the payload.
If there are errors requesting an API access token, the response will be structured in the following way.
{
"error":
{
"code":403,
"message":"You are not authorized to access this endpoint."
}
}
The following is a list of error codes and possible messages depending on the error context.
Error Code | Possible Error Messages |
---|---|
401 |
|
403 |
|
The /access-token/destroy
endpoint will completely destroy the requested access token. Once executed, this process cannot be undone.
This endpoint also requires the accessToken
parameter as follows:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes |
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/access-token/destroy" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
Response will return null if successful, and return the root key error
if not. See Error Codes and Handling.
The /application
endpoint will create a new session and redirect that session to the application process. This endpoint does not require the apiID
and apiKey
parameters, but does require the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
boFirstName |
varchar | first name of borrower | yes | |
boLastName |
varchar | last name of borrower | yes | |
boPhone |
varchar | phone number of borrower, 10 digits, no dashes | yes |
This endpoint expects that boFirstName
and boLastName
parameters are URL encoded. These values will be URL decoded, and if they are not URL encoded, results may not be as expected.
$url = "https://www.besmartee.com/api/partner/application?format=json&accessToken=ACCESS_TOKEN"
. "&boFirstName=" . urlencode( "Michael Lee" )
. "&boLastName=" . urlencode( "Smith Jr." )
. "&boPhone=5555555555";
Response will redirect your user to the start of the application process if successful, and return the root key error
if not. See Error Codes and Handling.
The /application/status
endpoint will return the application status. This endpoint also requires the accessToken
parameter as follows:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes |
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/application/status" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
Response will always contain the last status available.
{
"statusMain":"New",
"date":1443569459,
"user":"Borrower",
"note":null
}
The /application/status
endpoint will return the following properties:
Property | Type | Possible Values | Description |
---|---|---|---|
statusMain |
varchar | Start Application, Create Application, Verify Application, Loan Approval, Appraisal, Underwriting, Closing, Closed | main status of application |
date |
unix timestamp | date/time of status | |
user |
varchar | person who updated status | |
note |
varchar | optional, note related to status |
The /update/user
endpoint will update a User borrower. This endpoint also requires the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing the User data to update | yes |
{
"lenderID": "DA4W7MNZ",
"userID": "6FD9DD2N",
"email": "alice.firstimer@besmartee.com",
"user": {
"prefEmailNotifications": "0"
}
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
lenderID |
varchar | BeSmartee identifier | yes | |
userID |
varchar | BeSmartee identifier | yes, if email not provided | |
email |
varchar | consumer email | yes, if userID not provided | |
user.prefEmailNotifications |
bit | 0, 1 | email notification flag | no |
$jsonPayload = {...};
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN,
'data' => $jsonPayload
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/update/user" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
Response will return null if successful, and return the root key error
if not. See Error Codes and Handling.
The /set-signup-product-pricing
endpoint will return a product and pricing unique identifier that may be used to bypass the loan search and loan product & pricing at the signup page. You must pass in search parameters and the resulting loan product and pricing being applied for. This endpoint requires the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing data on the borrower and loan applied for (if applicable) | yes |
{
"borrower" : {
"firstName" : "Charles",
"lastName" : "Cooper",
"dob" : "10/22/1968",
"phonePrimary" : "7142458223",
"phoneSecondary" : "7142357114",
"status" : "Married",
"primaryAddressStreet" : "16892 Bolsa Chica St",
"primaryAddressCity" : "Huntington Beach",
"primaryAddressState" : "CA",
"primaryAddressZipcode" : "92649",
"email" : "charlescooper@mail.com",
"autoCheckTOUPP": 1,
"isCreateLeadInPipeline": 1
},
"loan": {
"subjectPropertyAddressStreet" : "5361 Bonanza Dr",
"subjectPropertyAddressCity" : "Huntington Beach",
"subjectPropertyAddressState" : "CA",
"subjectPropertyAddressZipcode" : "92649",
"loanPurpose": "RefinanceCashOut",
"lockPeriod": "30",
"homePrice": "500000",
"downPayment": "250000",
"cashOut": "10000",
"fico": "750",
"grossMonthlyIncome": "5000.00",
"monthlyDebts": "951.62",
"propertyType": "SingleFamily",
"occupancyType": "PrimaryResidence",
"bankruptcy": "0",
"foreclosure": "0",
"noImpounds": "0",
"firstTimeBuyer": "1",
"employmentStatus": "FullTime",
"documentationType": "Full",
"numberHomesOwned": "0",
"financeUFMIP": "0",
"flip": "0",
"streamline": "0",
"productProgram": "Conventional",
"loanAmortizationType": "AdjustableRate",
"loanAmortization": "30",
"armType": "7/1",
"armIndexMargin": "2.25",
"armCapRates": "5/2/5",
"lpmi": "0",
"hpml": "0",
"rate": "4.500",
"apr": "4.552",
"monthlyPayment": "1315.84",
"discountPointPercent": "-1.00",
"discountPoint": "-2600.00",
"leadID": "ABCD1234",
"advertisingCampaignProviderID": "65613",
"advertiserID": "4edzbe0c-aa81-4181-a5cf-cef9062a4cea",
"loanOfficerUID" : "6ETBTZ4N",
"campaignID" : "N4X7UY4N"
}
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
company.lenderID |
varchar | BeSmartee identifier | yes | |
borrower.firstName |
varchar | first name, and middle name if applicable | no | |
borrower.lastName |
varchar | last name | no | |
borrower.dob |
date | date of birth | no | |
borrower.phonePrimary |
varchar | phone number with no other characters | no | |
borrower.phoneSecondary |
varchar | phone number with no other characters | no | |
borrower.status |
varchar | Married, Unmarried | marital status | no |
borrower.primaryAddressStreet |
varchar | address line | no | |
borrower.primaryAddressCity |
varchar | address city | no | |
borrower.primaryAddressState |
varchar | address state | no | |
borrower.primaryAddressZipcode |
varchar | address zip code | no | |
borrower.email |
varchar | email address | no | |
borrower.autoCheckTOUPP |
int | 0, 1 | Automatically check the "Term of use and privacy policy" checkbox | no |
borrower.isCreateLeadInPipeline |
int | 0, 1 | Show lead information in the dashboard. | no |
borrower.bsmLeadUID |
varchar | The BeSmartee unique identifier of lead. You can use borrower.bsmLeadUID if you want update Lead on BeSmartee | no | |
borrower.pushToCRM |
int | 0, 1 | Push lead to CRM | no |
borrower.crmLeadID |
varchar | The CRM unique identifier of lead. You can use borrower.bsmLeadUID if you want update Lead on CRM | no | |
loan |
json | json data with loan search and product & pricing data. | yes | |
loan.subjectProperty |
varchar | subject property address | no | |
loan.subjectPropertyAddressCity |
varchar | subject property address city | no | |
loan.subjectProperty |
varchar | subject property address state | no | |
loan.subjectProperty |
varchar | subject property address zipcode | yes | |
loan.loanPurpose |
varchar | Purchase, Refinance, RefinanceCashOut |
loan purpose | yes |
loan.lockPeriod |
integer | number of days the loan is locked | no | |
loan.homePrice |
double | home price | yes | |
loan.downPayment |
double | down payment if loan.loanPurpose is Purchase,current loan balance if loan.loanPurpose is Refinance or RefinanceCashOut |
yes | |
loan.cashOut |
double | cash out amount, required if loan.loanPurpose is RefinanceCashOut |
no | |
loan.fico |
integer | FICO score | no | |
loan.grossMonthlyIncome |
double | gross monthly income | no | |
loan.monthlyDebts |
double | monthly debts | no | |
loan.propertyType |
varchar | SingleFamily, Condominium, DetachedCondominium, Duplex, Triplex, Quadplex, ManufacturedMobileHome, PUD |
subject property type | yes |
loan.occupancyType |
varchar | PrimaryResidence, SecondHome, Investor |
occupancy type | yes |
loan.bankruptcy |
bit | 0, 1 | Bankruptcy | no |
loan.foreclosure |
bit | 0, 1 | Foreclosure | no |
loan.noImpounds |
bit | 0, 1 | no impounds | no |
loan.firstTimeBuyer |
bit | 0, 1 | first-time buyer | no |
loan.employmentStatus |
varchar | NotEmployed, FullTime, PartTime, SelfEmployed, Homemaker, Student, Retired | employment status | no |
loan.documentationType |
varchar | Full | documentation type | no |
loan.numberHomesOwned |
integer | number of homes owned | no | |
loan.financeUFMIP |
bit | 0, 1 | finance UFMIP | no |
loan.flip |
bit | 0, 1 | flip | no |
loan.streamline |
bit | 0, 1 | streamline | no |
loan.productProgram |
varchar | Conventional, FHA, VA |
product program | yes |
loan.loanAmortizationType |
varchar | Fixed, AdjustableRate |
loan amortization type | yes |
loan.loanAmortization |
integer | loan amortization (number of years) | yes | |
loan.armType |
varchar | [First adjustment]/ [Per adjustment], e.g. 10/1, 7/1, 5/1 |
ARM type, required if loan.loanAmortizationType is AdjustableRate |
no |
loan.armIndexMargin |
double | ARM index margin, required if loan.loanAmortizationType is AdjustableRate |
no | |
loan.armCapRates |
varchar | [First adjustment cap]/ [Per adjustment cap]/ [Lifetime cap], e.g. 5/2/5, 2/2/5 |
ARM cap rates, required if loan.loanAmortizationType is AdjustableRate |
no |
loan.lpmi |
bit | 0, 1 | lender-paid mortgage insurance | no |
loan.hpml |
bit | 0, 1 | higher priced mortgage loan flag | no |
loan.rate |
double | rate | yes | |
loan.apr |
double | APR | yes | |
loan.monthlyPayment |
double | monthly payment | no | |
loan.discountPointPercent |
double | discount point percent | yes | |
loan.discountPoint |
double | negative value: lender credit, positive value: loan discount points |
yes | |
loan.leadID |
varchar | Unique leadID generated by the API consumer | no | |
loan.advertisingCampaignProviderID |
varchar|integer |
The provider identifier of advertising campaign.
You can use advertisingCampaignUID if you don't have provider identifier.
|
no | |
loan.advertiserID |
varchar | The identifier of advertiser. | no | |
loan.advertisingCampaignUID |
varchar |
The BeSmartee identifier of advertising campaign.
You can use advertisingCampaignProviderID if you don't have BeSmartee identifier.
|
no | |
loan.loanOfficerUID |
varchar | The BeSmartee identifier of loan officer. | no | |
loan.campaignID |
varchar | Campaign identifier in BeSmartee. You can use campaign friendly name if you don't know BeSmartee identifier. | no |
$jsonPayload = {...};
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN,
'data' => $jsonPayload
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/set-signup-product-pricing" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
{"signUpURL":"https://www.besmartee.com/app/signup/p/smartmortgage/r/GEU5229JCL3Z?leadReferralSource=K8ZW5BJM","bsmLeadUID":"K8ZW5BJM"}
Response will return signUpURL
and bsmLeadUID
if successful, and return the root key error
if not. See Error Codes and Handling.
Error Code | Description |
---|---|
400 | Parameter format missing or invalid. |
401 | Parameter apiID and/or apiKey missing or invalid format. |
401 | Parameter accessToken missing or invalid format. |
401 | Parameter data missing or invalid format. |
401 | Parameter apiID and/or apiKey invalid. |
401 | This accessToken is expired. |
401 | Parameter accessToken mismatch. |
401 | Parameter accessToken invalid. |
401 | Parameter lenderID and/or userUID invalid. |
The /loan-role-assignment
endpoint will reassign loan role ( Loan Officer, Loan Officer Assistant, Processors, etc) to loan. This
endpoint also requires the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing request parameters | yes |
{
"leadID": "887",
"loanOfficerCRMUID": "DM4W7mNZ"
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
leadID |
varchar | LOS unique identifier (may be used for any source) | yes | |
loanOfficerCRMUID |
varchar | Loan officer CRM unique identifier | yes |
$jsonPayload = {...};
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN,
'data' => $jsonPayload
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL,
"https://www.besmartee.com/api/partner/reassign-loan-officer" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
Response will return null if successful, and return the root key error
if not. See
Error Codes and Handling.
The /create-lead
endpoint will create a lead (or update a lead or loan), which will then pre-populate the consumer and loan officer application experience. This endpoint also requires the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing request parameters | yes |
{
"losID" : "t5D7HgV3",
"loanOfficerUID" : "11DfK59L",
"borrowerUID" : "h0HyE55e",
"leadURL" : "https://www.salesforce.com/lead",
"salesforceOpportunityID" : "0061I00000Ev5dUQAR",
"crmLeadID" : "1009103310",
"firstName" : "Alice",
"lastName" : "Firstimer",
"dob" : "01/01/2017",
"ssn" : "991919991",
"status" : "Unmarried",
"phonePrimary" : "7142357114",
"email" : "borrower@besmartee.com",
"primaryAddressStreet" : "16892 Bolsa Chica St #201",
"primaryAddressCity" : "Huntington Beach",
"primaryAddressState" : "CA",
"primaryAddressZipcode" : "92649",
"subjectPropertyAddressStreet" : "1234 Any Street",
"subjectPropertyAddressCity" : "Anytown",
"subjectPropertyAddressState" : "CA",
"subjectPropertyAddressZipcode" : "55555",
"homePrice" : 500000,
"loanPurpose" : "Purchase",
"cashOut": 10000,
"propertyType" : "SingleFamily",
"productType" : "MortgageLoan",
"autoCheckTOUPP" : "0"
"leadSource" : "Lending Tree",
"referralPersonName" : "Joe Teller",
"referralPersonID" : "8Q3nGlf3",
"referralBranchName" : "Branch 12-1212",
"referralBranchID" : "g9Dv5H74",
"campaignPrimaryName" : "New Account Opening Special",
"campaignPrimaryID" : "K3t4Bp5F",
"offerPrimary" : "",
"offerPrimaryPurpose" :"",
"offerSecondary" : "",
"offerSecondaryPurpose" : "",
"segment" : ""
}
Below, you'll find details on all parameters that can be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
update |
bit | 0, 1 | set to 1 to update lead or loan, default is 0 | no |
publicID |
varchar | BeSmartee UID for lead or loan, returned during original create-lead | yes, if update = 1 | |
losID |
varchar | LOS unique identifier (may be used for any source) | no | |
loanOfficerUID |
varchar | loan officer unique identifier | yes, if loanOfficerLOSUID or loanOfficerCRMUID is not provided | |
loanOfficerLOSUID |
varchar | loan officer LOS unique identifier | yes, if loanOfficerUID or loanOfficerCRMUID is not provided | |
loanOfficerCRMUID |
varchar | loan officer CRM unique identifier | yes, if loanOfficerUID or loanOfficerLOSUID is not provided | |
loanOfficerAssistantUID |
varchar | loan officer assistant unique identifier | no | |
loanOfficerAssistantLOSUID |
varchar | loan officer assistant LOS unique identifier | no | |
loanOfficerAssistantCRMUID |
varchar | loan officer assistant CRM unique identifier | no | |
csrID |
varchar | customer service representative unique identifier | no | |
borrowerUID |
varchar | borrower unique identifier | no | |
leadURL |
varchar | lead URL (usually for CRM) | no | |
salesforceOpportunityID |
varchar | Salesforce Opportunity ID | no | |
crmLeadID |
varchar | Lead ID in your CRM | no | |
firstName |
varchar | first name | yes | |
middleName |
varchar | middle name | no | |
lastName |
varchar | last name | yes | |
suffixName |
varchar | suffix name | no | |
dob |
date | date of birth | no | |
ssn |
varchar | social security with no other characters | no | |
status |
varchar | Married, Unmarried, Separated | marital status | no |
phonePrimary |
varchar | phone number with no other characters | no | |
phoneSecondary |
varchar | phone number with no other characters | no | |
email |
varchar | email address | no | |
primaryAddressStreet |
varchar | address line | no | |
primaryAddressCity |
varchar | address city | no | |
primaryAddressState |
varchar | address state | no | |
primaryAddressZipcode |
varchar | address zip code | no | |
subjectPropertyAddressStreet |
varchar | address line | no | |
subjectPropertyAddressCity |
varchar | address city | no | |
subjectPropertyAddressState |
varchar | address state | no | |
subjectPropertyAddressZipcode |
varchar | address zip code | no | |
homePrice |
double | sales price if purchase, or estimated value if refinance | no | |
loanPurpose |
varchar | Purchase, Refinance, RefinanceCashOut |
purpose for loan | no |
cashOut |
double | cash out if loanPurpose is RefinanceCashOut | yes if loanPurpose is RefinanceCashOut |
|
propertyType |
varchar | SingleFamily, Condominium, DetachedCondominium, Duplex, Triplex, Quadplex, ManufacturedMobileHome, PUD |
type of property | no |
productType |
varchar | MortgageLoan, SolarLoan | type of loan | yes |
autoCheckTOUPP |
bit | 0, 1 | flag to auto check agreement | no |
leadSource |
varchar | name of lead source | no | |
referralPersonName |
varchar | name of referring person | no | |
referralPersonID |
varchar | ID of referring person | no | |
referralBranchName |
varchar | name of referring branch | no | |
referralBranchID |
varchar | ID of referring branch | no | |
campaignPrimaryName |
varchar | primary campaign name | no | |
campaignPrimaryID |
varchar | primary campaign ID | no | |
campaignSecondaryName |
varchar | secondary campaign name | no | |
campaignSecondaryID |
varchar | secondary campaign ID | no | |
offer1 |
varchar | offer 1 | no | |
offer1Purpose |
varchar | offer 1 purpose | no | |
offer2 |
varchar | offer 2 | no | |
offer2Purpose |
varchar | offer 2 purpose | no |
$jsonPayload = {...};
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN,
'data' => $jsonPayload
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/create-lead" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
Response will return a unique publicID, if successful. If a lead is converted into a loan, the publicID will remain unchanged. Response will return the root key error
, if any error. See Error Codes and Handling.
{
"publicID": "UU473IOJ"
}
The /get-ppe-anonymous
endpoint takes in search parameters in the query string and returns a list of products, pricing, eligibility and fees from your product & pricing engine (PPE).
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing search parameters | yes |
{
"channel": "Retail",
"subChannel": "Employee",
"loanPurpose": [
"RefinanceCashOut"
],
"lockPeriod": "30",
"zipcode": [
"92649"
],
"homePrice": "500000",
"downPayment": "250000",
"loanAmount": "250000",
"cashOut": "10000",
"fico": "750",
"grossMonthlyIncome": "5000.00",
"monthlyDebts": "951.62",
"propertyType": "SingleFamily",
"numUnits": "1",
"buildingStatus": "Existing",
"occupancyType": "PrimaryResidence",
"bankruptcy": "0",
"foreclosure": "0",
"noImpounds": "0",
"firstTimeBuyer": "1",
"employmentStatus": "FullTime",
"documentationType": "Full",
"numberHomesOwned": "0",
"financeUFMIP": "0",
"flip": "0",
"streamline": "0",
"filterARMs": "1",
"filterConventional": "1",
"filterFHA": "1",
"filterVA": "0",
"filterHomeReady": "0",
"filterUSDA": "0",
"filter40Year": "0",
"filter30Year": "1",
"filter25Year": "0",
"filter20Year": "1",
"filter15Year": "1",
"filter10Year": "1",
"filter10YearARM": "1",
"filter7YearARM": "1",
"filter5YearARM": "1",
"filter3YearARM": "0",
"filter2YearARM": "0",
"filter1YearARM": "0",
"filterLess1YearARM": "0",
"filterPoints" : {
"low" : "-1",
"high" : "1"
},
"isSecondFinancing": "0",
"isStudentLoanCashout": "0",
"isTexas50a": "0",
"priorLoanIsTexas50a": "0",
"ppeID": "173"
}
This endpoint can also run a large set of permutations for clients who are looking for bulk pricing, such as a daily nationwide rate card for marketing purposes. You'll need to pass multiple values in the loanPurpose
and/or zipcode
arrays as such:
{
"loanPurpose": [
"Purchase",
"Refinance",
"RefinanceCashOut"
],
"zipcode": [
"92649",
"33154",
"10014"
],
...
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
channel |
varchar | varies by client | indicate channel | no |
subChannel |
varchar | varies by client | indicate sub-channel | yes, if channel is provided |
loanPurpose |
array/varchar | Purchase, Refinance, RefinanceCashOut |
loan purpose(s) | yes |
lockPeriod |
integer | number of days the loan is locked | no | |
zipcode |
array/varchar | subject property address zipcode(s) | yes | |
homePrice |
double | home price | yes | |
downPayment |
double | down payment if loanPurpose is Purchase,current loan balance if loanPurpose is Refinance or RefinanceCashOut. |
yes, if loanAmount is not provided | |
loanAmount |
double | Loan amount. If provided, downPayment will be ignored. | yes, if downPayment is not provided | |
cashOut |
double | cash out amount, required if loanPurpose is RefinanceCashOut |
no | |
fico |
integer | FICO score | no | |
grossMonthlyIncome |
double | gross monthly income | no | |
monthlyDebts |
double | monthly debts | no | |
propertyType |
varchar | SingleFamily, Condominium, DetachedCondominium, Duplex, Triplex, Quadplex, ManufacturedMobileHome, PUD |
property type | yes |
numUnits |
integer | number of units | no | |
buildingStatus |
varchar | Existing | building status of property | no |
occupancyType |
varchar | PrimaryResidence, SecondHome, Investor |
occupancy type | yes |
bankruptcy |
bit | 0, 1 | bankruptcy flag | no |
foreclosure |
bit | 0, 1 | foreclosure flag | no |
noImpounds |
bit | 0, 1 | no impounds | no |
firstTimeBuyer |
bit | 0, 1 | first-time buyer | no |
employmentStatus |
varchar | NotEmployed, FullTime, PartTime, SelfEmployed, Homemaker, Student, Retired | employment status | no |
documentationType |
varchar | Full | documentation type | no |
numberHomesOwned |
integer | number of homes owned | no | |
financeUFMIP |
bit | 0, 1 | finance UFMIP (may be used for VA Funding Fee and USDA Guarantee Fee as well | no |
flip |
bit | 0, 1 | flip | no |
streamline |
bit | 0, 1 | streamline | no |
filterARMs |
bit | 0, 1 | search for ARM products | yes |
filterConventional |
bit | 0, 1 | search for conventional products | yes |
filterFHA |
bit | 0, 1 | search for FHA products | yes |
filterVA |
bit | 0, 1 | search for VA products | yes |
filterHomeReady |
bit | 0, 1 | search for home ready products | yes |
filterUSDA |
bit | 0, 1 | search for USDA products | yes |
filter40Year |
bit | 0, 1 | search for 40 year products | yes |
filter30Year |
bit | 0, 1 | search for 30 year products | yes |
filter25Year |
bit | 0, 1 | search for 25 year products | yes |
filter20Year |
bit | 0, 1 | search for 20 year products | yes |
filter15Year |
bit | 0, 1 | search for 15 year products | yes |
filter10Year |
bit | 0, 1 | search for 10 year products | yes |
filter10YearARM |
bit | 0, 1 | search for 10 year ARM products | yes |
filter7YearARM |
bit | 0, 1 | search for 7 year ARM products | yes |
filter5YearARM |
bit | 0, 1 | search for 5 year ARM products | yes |
filter3YearARM |
bit | 0, 1 | search for 3 year ARM products | yes |
filter2YearARM |
bit | 0, 1 | search for 2 year ARM products | yes |
filter1YearARM |
bit | 0, 1 | search for 1 year ARM products | yes |
filterLess1YearARM |
bit | 0, 1 | search for less than 1 year ARM products | yes |
filterPoints |
array | array of point range | no | |
filterPoints.low |
double | -2, -1, -0.5, 0, 1, etc... | point | yes, if filterPoints is provided |
filterPoints.high |
double | -2, -1, -0.5, 0, 1, etc... | point | yes, if filterPoints is provided |
isSecondFinancing |
bit | 0, 1 | second financing | no |
isStudentLoanCashout |
bit | 0, 1 | student loan cashout | no |
isTexas50a |
bit | 0, 1 | Texas 50A | no |
priorLoanIsTexas50a |
bit | 0, 1 | prior Texas 50A | no |
additionalCriteria. |
varchar | varies by client | Promo Code | no |
additionalCriteria. |
varchar | varies by client | Borrower Qualifies as Relationship | no |
additionalCriteria. |
varchar | varies by client | Private Bank | no |
additionalCriteria. |
varchar | varies by client | Servicing Option | no |
additionalCriteria. |
varchar | varies by client | PMI Type | no |
additionalCriteria. |
varchar | varies by client | Documents Type | no |
additionalCriteria. |
varchar | varies by client | Lead Status | no |
customGrouping |
bit | 0, 1 | Group loan options | no |
bestMatch |
bit | 0, 1 | Return the bestmatch if the value is 1 | no |
$jsonPayload = {...};
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN,
'data' => $jsonPayload
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/get-ppe-anonymous" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
print_r( $response );
The response will include list of all eligible loan products being requested for with pricing and fees. Response will return the root key error
if any error. See Error Codes and Handling.
{
"status": "success",
"searchID": "4SG21P",
"loanPurpose": "Purchase",
"zipcode": "90745",
"products": [
{
"armFirstAdj": 120,
"armFirstAdjCap": 5,
"armIndex": "LIBOR",
"armIndexMargin": 2.25,
"armLifeCap": 5,
"armPerAdj": 12,
"interestOnly": 0,
"loanAmortizationType": "AdjustableRate",
"loanTerm": 30,
"lpmi": 0,
"productName": "10/1 LIBOR ARM",
"productProgram": "Conventional",
"rates": [
{
"apr": 4.672,
"fees": [
{
"fee": 200,
"leSection": "A",
"mismoType": "ApplicationFee",
"mismoTypeOther": null,
"name": "Application Fee",
"percent": null
},
{
"fee": 625,
"leSection": "A",
"mismoType": "LoanDiscountPoints",
"mismoTypeOther": null,
"name": "Loan discount points",
"percent": null
},
{
"fee": 500,
"leSection": "B",
"mismoType": "AppraisalFee",
"mismoTypeOther": null,
"name": "Appraisal Fee",
"percent": null
},
{
"fee": 40,
"leSection": "B",
"mismoType": "CreditReportFee",
"mismoTypeOther": null,
"name": "Credit report",
"percent": null
},
{
"fee": 75,
"leSection": "C",
"mismoType": "CourierFee",
"mismoTypeOther": null,
"name": "Title - Courier/Wire Fee",
"percent": null
},
{
"fee": 606,
"leSection": "H",
"mismoType": "TitleOwnersCoveragePremium",
"mismoTypeOther": null,
"name": "Title - Owners Title Insurance (optional)",
"percent": null
}
],
"isHPML": 0,
"monthlyPayment": 1211.62,
"piti": {
"principalAndInterest": 486.09,
"propertyTaxes": 107.65,
"homeownerInsurance": 25.24,
"mortgageInsurance": 0
},
"paymentStream": [
{
"mortgageInsurance": 0,
"numberOfPayments": 120,
"principalAndInterest": 1211.63,
"startDate": "2018-09-01"
},
{
"mortgageInsurance": 0,
"numberOfPayments": 239,
"principalAndInterest": 1198.56,
"startDate": "2028-09-01"
},
{
"mortgageInsurance": 0,
"numberOfPayments": 1,
"principalAndInterest": 1195.48,
"startDate": "2048-08-01"
}
],
"points": 0.25,
"rate": 4.125
},
{
"apr": 4.732,
"fees": [
{
"fee": 200,
"leSection": "A",
"mismoType": "ApplicationFee",
"mismoTypeOther": null,
"name": "Application Fee",
"percent": null
},
{
"fee": 500,
"leSection": "B",
"mismoType": "AppraisalFee",
"mismoTypeOther": null,
"name": "Appraisal Fee",
"percent": null
},
{
"fee": 40,
"leSection": "B",
"mismoType": "CreditReportFee",
"mismoTypeOther": null,
"name": "Credit report",
"percent": null
},
{
"fee": 75,
"leSection": "C",
"mismoType": "CourierFee",
"mismoTypeOther": null,
"name": "Title - Courier/Wire Fee",
"percent": null
},
{
"fee": 606,
"leSection": "H",
"mismoType": "TitleOwnersCoveragePremium",
"mismoTypeOther": null,
"name": "Title - Owners Title Insurance (optional)",
"percent": null
}
],
"isHPML": 0,
"monthlyPayment": 1229.85,
"piti": {
"principalAndInterest": 486.09,
"propertyTaxes": 107.65,
"homeownerInsurance": 25.24,
"mortgageInsurance": 0
},
"paymentStream": [
{
"mortgageInsurance": 0,
"numberOfPayments": 120,
"principalAndInterest": 1229.85,
"startDate": "2018-09-01"
},
{
"mortgageInsurance": 0,
"numberOfPayments": 239,
"principalAndInterest": 1203.53,
"startDate": "2028-09-01"
},
{
"mortgageInsurance": 0,
"numberOfPayments": 1,
"principalAndInterest": 1201.95,
"startDate": "2048-08-01"
}
],
"points": 0,
"rate": 4.25
}
]
}
],
"watchableLoanPrograms": [
"Conventional 10 Year Fixed",
"Conventional 15 Year Fixed",
"Conventional 30 Year Fixed"
]
}
If using optional method to return a set of bulk pricing permutations with parameters loanPurposes
and/or zipcodes
, then the products array will be wrapped in a new array called permutations as such:
{
"status": "success",
"permutations": [
{
"searchID": "4SG21P",
"loanPurpose": "Purchase",
"zipcode": "33154",
"products": {
"productProgram": "Conventional",
"loanTerm": "30",
...
},
"watchableLoanPrograms": [
...
]
},
{
"searchID": "4SG21P",
"loanPurpose": "Purchase",
"zipcode": "33154",
"products": {
"productProgram": "Conventional",
"loanTerm": "15",
...
},
"watchableLoanPrograms": [
...
]
}
]
}
Below, you'll find details on the data types of the response payload.
Parameter | Type | Possible Values |
---|---|---|
status |
varchar | success, error |
permutations |
array | |
permutations.searchID |
varchar | |
permutations.loanPurpose |
varchar | Purchase, Refinance, RefinanceCashOut |
permutations.zipcode |
varchar | |
permutations.products |
array | |
products.ppeID |
varchar | |
products.productName |
varchar | |
products.productProgram |
varchar | Conventional, FHA, VA, USDA |
products.loanTerm |
int | |
products.loanAmortizationType |
varchar | AdjustableRate, Fixed |
products.interestOnly |
bit | 0, 1 |
products.lpmi |
bit | 0, 1 |
products.armIndex |
varchar | OneYearTreasury, ThreeYearTreasury, LIBOR, EleventhDistrictCostOfFunds, MonthlyAverageConstantMaturingTreasury, WeeklyAveragePrimeRate |
products.armIndexMargin |
double | |
products.armFirstAdj |
int | |
products.armFirstAdjCap |
int | |
products.armPerAdj |
int | |
products.armLifeCap |
int | |
products.rates |
array | |
rates.rate |
double | |
rates.points |
double | |
rates.isHPML |
bit | 0, 1 |
rates.apr |
double | |
rates.monthlyPayment |
double | |
rates.fees |
array | |
fees.name |
varchar | |
fees.fee |
double | |
fees.percent |
double (can be null) | |
fees.mismoType |
varchar | |
fees.mismoTypeOther |
varchar (can be null) | |
fees.leSection |
varchar | |
rates.piti |
array | |
piti.principalAndInterest |
double | |
piti.propertyTaxes |
double | |
piti.homeownerInsurance |
double | |
piti.mortgageInsurance |
double | |
rates.paymentStream |
array | |
paymentStream.principalAndInterest |
double | |
paymentStream.mortgageInsurance |
double | |
paymentStream.startDate |
varchar (YYYY-mm-dd) | |
paymentStream.numberOfPayments |
int | |
permutations.watchableLoanPrograms |
array |
Error Code | Description |
---|---|
400 | Parameter format missing or invalid. |
401 | Parameter apiID and/or apiKey missing or invalid format. |
401 | Parameter accessToken missing or invalid format. |
401 | Parameter data missing or invalid format. |
401 | Parameter apiID and/or apiKey invalid. |
401 | This accessToken is expired. |
401 | Parameter accessToken mismatch. |
401 | Parameter accessToken invalid. |
401 | Parameter lenderID and/or userUID invalid. |