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 /access-token
endpoint will create a new access token if a current access token does not exist, or it will update the current access token if a current access token exists. Access tokens are unique and are set to expire in 25 days. Be sure to refresh your access token using this endpoint.
Tip: A common scenario is to use this endpoint to power single-sign-on within your own application.
$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/lender/access-token" );
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 one access token.
{
"accessToken":"gUS2j4hD6Op2lCtghYJ1gDwH0kms4utaap1knyuw",
"date":1443566713,
"expiration":1445726713,
"ip":"127.0.0.1",
"deviceID":"bsm-1153447f3d05799984b25325452d627a67d02eff378d0226c97424f74d158e23"
}
The /access-token
endpoint will return the following properties:
Property | Type | Possible Values | Description |
---|---|---|---|
accessToken |
varchar | unique identifier | |
date |
unix timestamp | date/time access token created | |
expiration |
unix timestamp | date/time access token will expire | |
ip |
varchar | ip address of requestor |
Error Code | Description |
---|---|
400 | Parameter format missing or invalid. |
401 | Parameter apiID and/or apiKey missing or invalid format. |
401 | Parameter lenderID missing or invalid format. |
401 | Parameter lenderID missing or invalid format. |
401 | Parameter apiID and/or apiKey invalid. |
401 | Parameter apiID, apiKey and/or lenderID mismatch. |
501 | Parameter lenderID invalid. |
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/lender/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.
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 apiID and/or apiKey invalid. |
401 | Parameter accessToken invalid. |
The /broker-setup-url
endpoint will create a new session and redirect that session to the broker setup process. This endpoint also requires the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing data on broker company and users | yes |
{
"loggedInUserUID": "Da4W7mNZ",
"company": {
"brokerUID": "aYF1VBsd46alkI3KD",
"name": "ABC Mortgage Company",
"nameLegal": "ABC Mortgage Company, Inc. dba ABC Loans",
"addressStreet": "16892 Bolsa Chica Street",
"addressStreet2": "#201",
"addressCity": "Huntington Beach",
"addressState": "CA",
"addressZipcode": "92649",
"addressCounty": "Orange",
"addressCountry": "USA",
"website": "https://www.abcloans.com",
"phone": "8888888888",
"phoneExtension": "12345",
"email": "info@abcloans.com",
"nmls": "012345",
"originatorType": "Broker",
"organizationType": "Corporation",
"about": "ABC Mortgage is a mortgage firm in California.",
"aboutShort": "ABC Mortgage is a great local lender.",
"tin": "111223333",
"loCompensation": "1.00",
"pricingTier": "Tier AAA",
"productTypesOffer": {
"conventional": "1",
"fha": "1",
"va": "0"
},
"logo": {
"imageFormat": "jpg",
"base64": "\/9j\/4AAQSkZJRgABAQEAS...9yqOJTGf\/\/Z"
},
"favicon": {
"imageFormat": "png",
"base64": "iVBORw0KGgB+w5jeLawv8DL...fkTd2FK5CYII="
},
"licensing": [{
"state": "CA",
"licenseNum": "09876"
}, {
"state": "NV",
"licenseNum": "76543"
}, {
"state": "TX",
"licenseNum": "n/a"
}]
},
"users": [{
"userUID": "Da4W7mNZ",
"timezone": "America/Los_Angeles",
"headshot": {
"imageFormat": "jpg",
"base64": "\/9j\/4Q+eRXhpZgAATU0AKgAA...AEAE2\/9k="
},
"firstName": "Adam",
"lastName": "Smith",
"phonePrimary": "714-235-7114",
"phoneExtension": "12345",
"email": "adam.smith@abcloans.com",
"role": "Admin",
"loanOfficer_nmls": "012345",
"licensing": [{
"state": "CA",
"licenseNum": "334455"
}, {
"state": "NV",
"licenseNum": "776655"
}, {
"state": "TX",
"licenseNum": "n/a"
}]
}, {
"userUID": "G2bdThp9",
"timezone": "America/Los_Angeles",
"firstName": "Samantha",
"firstNamePreferred": "Sam",
"lastName": "Jones",
"phonePrimary": "818-859-8285",
"phoneExtension": "12345",
"email": "samantha.jones@abcloans.com",
"role": "Admin/Loan Officer",
"loanOfficer_nmls": "010101",
"licensing": [{
"state": "CA",
"licenseNum": "224466"
}, {
"state": "NV",
"licenseNum": "997755"
}, {
"state": "TX",
"licenseNum": "n/a"
}]
}]
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
loggedInUserUID |
varchar | unique identifier of the user who logged in and triggered this API call | yes | |
company.brokerUID |
varchar | unique identifier | yes | |
company.name |
varchar | name of company | yes | |
company.nameLegal |
varchar | legal name of company | yes | |
company.addressStreet |
varchar | company street address | yes | |
company.addressStreet2 |
varchar | company street address line 2 | no | |
company.addressCity |
varchar | company city | yes | |
company.addressState |
varchar | company state | yes | |
company.addressZipcode |
varchar | company zipcode | yes | |
company.addressCounty |
varchar | company county | no | |
company.addressCountry |
varchar | company country | no | |
company.website |
varchar | consumer website | no | |
company.phone |
varchar | consumer phone number with no other characters | yes | |
company.phoneExtension |
varchar | consumer phone number extension with no other characters (optional, must be 5 numeric characters or less) | no | |
company.email |
varchar | consumer email | no | |
company.nmls |
varchar | NMLS number | yes | |
company.originatorType |
varchar | Broker, Correspondent | company originator type, default is Broker | no |
company.organizationType |
varchar | Corporation, LimitedLiabilityCompany, Partnership, SoleProprietorship, Other | company legal formation type | no |
company.about |
varchar | company description | no | |
company.aboutShort |
varchar | short company description | no | |
company.tin |
varchar | tax payer identification number | yes | |
company.loCompensation |
double | loan officer compensation (percentage) | yes | |
company.pricingTier |
varchar | PPE Tier | no | |
company.productTypesOffer. |
bit | 0, 1 | flag for conventional product | yes |
company.productTypesOffer. |
bit | 0, 1 | flag for FHA product | yes |
company.productTypesOffer. |
bit | 0, 1 | flag for VA product | yes |
company.logo |
json | company logo if available | no | |
company.logo.imageFormat |
varchar | png, jpg | logo image format | yes |
company.logo.base64 |
varchar | base64-encoded logo image | yes | |
company.favicon |
json | company favicon if available | no | |
company.favicon.imageFormat |
varchar | png, jpg | favicon image format | yes |
company.favicon.base64 |
varchar | base64-encoded favicon image | yes | |
company.licensing.state |
varchar | AL, CA, TX, WY, etc... | broker license state | yes |
company.licensing.licenseNum |
varchar | n/a, or license number | broker license number | yes |
users.userUID |
varchar | User unique identifier | yes | |
users.timezone |
varchar | Olson timezones: Pacific/Honolulu, America/Anchorage, America/Los_Angeles, America/Denver, America/Chicago, America/New_York | timezone | no |
users.headshot |
json | user headshot if available | no | |
users.headshot.imageFormat |
varchar | png, jpg | headshot format | yes, if users.headshot is provided |
users.headshot.base64 |
varchar | base64-encoded headshot | yes, if users.headshot is provided | |
users.firstName |
varchar | first name, and middle name if applicable | yes | |
users.firstNamePreferred |
varchar | preferred first name | no | |
users.lastName |
varchar | last name | yes | |
users.phonePrimary |
varchar | phone number with no other characters | yes | |
users.email |
varchar | email address | yes | |
users.role |
varchar | Choose the name of a role available to the lender | access role type | yes |
users.loanOfficer_nmls |
varchar | user NMLS number only if Loan Officer role | yes | |
users.licensing |
array | licensing data, required for certain roles | no | |
users.licensing.state |
varchar | loan officer license state | yes | |
users.licensing.licenseNum |
varchar | n/a, or license number | loan officer license number | 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/lender/broker-setup-url" );
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 BeSmartee lenderID, a URL to the broker setup process if successful, a set up process status flag and a list of users with your userUID and BeSmartee userID. redirectURL
will be null if the logged in user is not the person who started the set up process, or if the process has been completed.
The flag isSetUpCompleted
will be 0 if process has NOT been completed, and 1 if the process has been completed. Response will return the root key error
if any error. See Error Codes and Handling.
{
"lenderID": "LENDER_ID",
"redirectURL": "https://www.besmartee.com/lender/sign-up/start-basic?
lenderID=LENDER_ID",
"isSetUpCompleted": 0,
"users": [
{
"userID": "774EE1F9",
"userUID": "Da4W7mNZ"
},
{
"userID": "GNNL88BR",
"userUID": "G2bdThp9"
}
]
}
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. |
501 | Invalid organization type company.organizationType . |
501 | Array company.licensing cannot be empty. |
501 | Invalid time zone users.timezone |
501 | Invalid user role users.role |
501 | Array user.licensing cannot be empty for users.role |
501 | Array users cannot be empty. |
502 | Duplicate user email users.email |
The /connect-vendor
endpoint will establish a connection between a vendor integrated with BeSmartee and the lender organization using the API.
This will enable the vendor to utilize partner API endpoints with the lender organization. This endpoint also requires the following parameter(s):
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing data on broker company and users | yes |
{
"vendor": "ABCD1234",
"allowLoanLevelAccess": true,
"allowBrokerAccess": true
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
vendor |
varchar | unique identifier of the vendor that is integrated with BeSmartee app | yes | |
allowLoanLevelAccess |
boolean | true, false | invoke or revoke loan-level data access | no |
allowBrokerAccess |
boolean | true, false | allow the vendor to execute partner API calls against any broker lenders that are part of that wholesale lender. | 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/lender/broker-setup-url" );
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 JSON object containing success
status.
The JSON data will contain an error object if the API is not successful
{
"success": true
}
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. |
501 | The provided vendor ID is invalid. |
501 | The vendor and lender relationship already exists. |
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",
"advertisingCampaignProviderID": "53781",
"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.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/lender/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 /app-signup
"endpoint" is not so much an endpoint as it is instructions how to pass additional parameters when a consumer is signing up for an account with you. This is commonly used when you have already collected basic information and you wish to pre-populate this data so the consumer is not asked to key in redundant information they provided previously.
The below parameters can be passed as GET parameters added to your unique signup URL:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
firstName |
varchar | borrower's first name | no | |
lastName |
varchar | borrower's last name | no | |
phonePrimary |
varchar | borrower's primary phone, with or without separating dashes | no | |
phoneSecondary |
varchar | 714-235-7114 | borrower's secondary phone, with or without separating dashes | no |
email |
varchar | borrower's email | no | |
dob |
varchar | 01/15/1980, etc... | borrower's date of birth, properly formatted date | no |
status |
varchar | Married, Unmarried | borrower's marital status | no |
primaryAddressStreet |
varchar | borrower's address line | no | |
primaryAddressCity |
varchar | borrower's address city | no | |
primaryAddressState |
varchar | borrower's address state | no | |
primaryAddressZipcode |
varchar | borrower's address zipcode | no | |
coBoFirstName |
varchar | co-borrower's first name | no | |
coBoLastName |
varchar | co-borrower's last name | no | |
coBoPhonePrimary |
varchar | co-borrower's primary phone, with or without separating dashes | no | |
coBoPhoneSecondary |
varchar | co-borrower's secondary phone, with or without separating dashes | no | |
coBoEmail |
varchar | co-borrower's email | no | |
coBoDOB |
varchar | 01/15/1980, etc... | co-borrower's date of birth, properly formatted date | no |
coBoStatus |
varchar | Married, Unmarried | co-borrower's marital status | no |
coBoPrimaryAddressStreet |
varchar | co-borrower's address line | no | |
coBoPrimaryAddressCity |
varchar | co-borrower's address city | no | |
coBoPrimaryAddressState |
varchar | co-borrowers address state | no | |
coBoPrimaryAddressZipcode |
varchar | co-borrower's address zipcode | no | |
purchaseAddressStreet |
varchar | purchase address street | no | |
purchaseAddressCity |
varchar | purchase address city | no | |
purchaseAddressState |
varchar | purchase address state | no | |
purchaseAddressZipcode |
varchar | purchase address zipcode | no | |
wholesaleLoanID |
varchar | unique identifier | no | |
userTempPublicID |
varchar | unique identifier | no | |
borrowerUID |
varchar | unique identifier | no | |
businessChannel |
varchar | Wholesale, Correspondent | specifies TPO channel | no |
isHomeStyleEnergy |
bit | 0, 1 | specifies if Fannie Mae Homestyle Energy Loan, or FHA Wind & Solar | no |
currentLoanAmount |
double | current loan balance for a refinance | no | |
currentLoanRate |
double | current loan rate | no | |
currentMonthlyPayment |
double | current monthly payment (PI) | no | |
cashOut |
double | cash out amount | no | |
appType |
varchar | Application, Short, ShortAUS or Full | cash out amount | no |
isTBDLoanHardStop |
bit | 0, 1 | specifies if using TBD Hard Stop configuration | no |
solarCost |
double | cost of solar install | no | |
autoCheckTOUPP |
bit | 0, 1 | Automatically check the "terms and privacy policy" checkbox | no |
https://app.yourdomain.com/app/signup/partner/YOURUID?firstName=Sparky&
lastName=Testcase&phonePrimary=555-555-5555
Response will load the signup page whether successfully or not. You can tell if it's successful if throughout the loan application you see pre-populated data as expected
The /email-application
endpoint will email a borrower with a sign up URL. The generated URL is specific to a loan officer, and may also be linked to an optional "loan applied for" by passing in the loan
object. The borrower, who will receive the email, will be recognized based on publicID
parameter. If there is no publicID
, and new borrower will be created based on borrowers
parameter. 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 |
{
"company": {
"lenderID": "6SGKSI3X"
},
"user": {
"userUID": "Da4W7mNZ"
},
"publicID": "ABC1223",
"borrowers" : [
{
"borrowerUID" : "12001",
"firstName" : "Charles",
"lastName" : "Cooper",
"dob" : "10/22/1968",
"phonePrimary" : "7142458223",
"phoneSecondary" : "7142357114",
"status" : "Married",
"marriedToBorrowerUID" : "12002",
"primaryAddressStreet1" : "16892 Bolsa Chica St",
"primaryAddressStreet2" : "#201",
"primaryAddressCity" : "Huntington Beach",
"primaryAddressState" : "CA",
"primaryAddressZipcode" : "92649",
"email" : "charlescooper@mail.com",
"isPrimary": 1
},
{
"borrowerUID" : "12002",
"firstName" : "Mary",
"lastName" : "Cooper",
"dob" : "10/22/1974",
"phonePrimary" : "7146067748",
"phoneSecondary" : "7149902021",
"status" : "Married",
"marriedToBorrowerUID" : "12001",
"primaryAddressStreet1" : "16892 Bolsa Chica St",
"primaryAddressStreet2" : "#201",
"primaryAddressCity" : "Huntington Beach",
"primaryAddressState" : "CA",
"primaryAddressZipcode" : "92649",
"email" : "marycooper@mail.com",
"isPrimary": 0
}
],
"loan": {
"loanID": "LQCT0AK8",
"subjectPropertyAddressStreet1" : "5361 Bonanza Dr",
"subjectPropertyAddressStreet2" : "",
"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",
"rate": "4.500",
"apr": "4.552",
"monthlyPayment": "1315.84",
"discountPointPercent": "-1.00",
"discountPoint": "-2600.00",
"businessChannel": "Wholesale"
}
}
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 | |
user.userUID |
varchar | User unique identifier | yes | |
publicID |
varchar | BeSmartee UID for a lead. It's the same lead ID returned by create-lead API. | no | |
borrower.borrowerUID |
varchar | borrower unique identifier | yes | |
borrower.firstName |
varchar | first name, and middle name if applicable | yes | |
borrower.lastName |
varchar | last name | yes | |
borrower.dob |
date | date of birth | yes | |
borrower.phonePrimary |
varchar | phone number with no other characters | yes | |
borrower.phoneSecondary |
varchar | phone number with no other characters | no | |
borrower.status |
varchar | Married, Unmarried | marital status | no |
borrower.marriedToBorrowerUID |
varchar | borrower unique id of the spouse, if they're also included in the loan | no | |
borrower.primaryAddressStreet1 |
varchar | address line 1 | no | |
borrower.primaryAddressStreet2 |
varchar | address line 2 | 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 | yes | |
borrower.isPrimary |
bit | 0, 1 | set this flag to 1 for main borrower, 0 for coborrower | yes |
loan |
json | json data for the chosen loan if applicable.
If loan is not set then the borrower will receive a general application link. |
no | |
loan.loanID |
varchar | loan identifier | yes | |
loan.subjectProperty |
varchar | subject property address 1 | no | |
loan.subjectProperty |
varchar | subject property address 2 | 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 | no |
loan.lockPeriod |
integer | number of days the loan is locked | no | |
loan.homePrice |
double | home price | no | |
loan.downPayment |
double | down payment if loan.loanPurpose is Purchase,current loan balance if loan.loanPurpose is Refinance or RefinanceCashOut |
no | |
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 | no |
loan.occupancyType |
varchar | PrimaryResidence, SecondHome, Investor |
occupancy type | no |
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 | no |
loan.loanAmortizationType |
varchar | Fixed, AdjustableRate |
loan amortization type | no |
loan.loanAmortization |
integer | loan amortization (number of years) | no | |
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.rate |
double | rate | no | |
loan.apr |
double | APR | no | |
loan.monthlyPayment |
double | monthly payment | no | |
loan.discountPointPercent |
double | discount point percent | no | |
loan.discountPoint |
double | negative value: lender credit, positive value: loan discount points |
no | |
loan.businessChannel |
varchar | Wholesale, Correspondent | specifies TPO channel | 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/lender/email-application" );
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.
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. |
501 | Broker has not been set up. |
The /update-headshot
endpoint allows you to add or update user headshots. This endpoint requires the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing base64-encoded headshot photos | yes |
{
"company": {
"lenderID": "6SGKSI3X"
},
"users": [{
"userUID": "Da4W7mNZ",
"headshot": {
"imageFormat": "jpg",
"base64": "\/9j\/4Q+eRXhpZgAATU0AKgAA...AEAE2\/9k="
}
}, {
"userUID": "G2bdThp9",
"headshot": {
"imageFormat": "jpg",
"base64": "\/9j\/4AAQSkZJRgABAQEAS9yq...OJTGf\/\/Z"
}
}]
}
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 | |
users.userUID |
varchar | User unique identifier | yes | |
users.headshot |
json | user headshot data | yes | |
users.headshot.imageFormat |
varchar | png, jpg | headshot format | yes |
users.headshot.base64 |
varchar | base64-encoded headshot | 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/lender/update-headshot" );
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.
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. |
501 | Array users cannot be empty. |
501 | Parameter lenderID invalid. |
501 | Parameter userUID users.userUID invalid. |
The /set-account-status
endpoint allows you to deactivate or activate any one or more valid lender(s) and/or user(s). If you deactivate or activate a lender, all users linked to that lender will also be deactivated or activated. This endpoint requires the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing lenders and/or users | yes |
{
"companies": [
{
"lenderID": "6SGKSI3X",
"status": "Deactivate"
},
{
"lenderID": "IHX4SFKS",
"status": "Deactivate"
}
],
"users": [
{
"userUID": "H92dE5b9",
"status": "Deactivate"
},
{
"userUID": "7t9D2MeE",
"status": "Deactivate"
},
{
"userUID": "5tXx2rEG2",
"status": "Activate"
}
]
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
companies.lenderID |
varchar | BeSmartee identifier | yes | |
companies.status |
varchar | Deactivate or Activate | Status/action to set | yes |
users.userUID |
varchar | User unique identifier | yes | |
users.status |
varchar | Deactivate or Activate | Status/action to set | 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/lender/set-account-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 return null 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. |
501 | Array companies and users cannot be empty. |
501 | Invalid status companies.status . |
501 | Invalid status users.status . |
501 | Parameter lenderID missing, invalid or mismatch. |
501 | Parameter userUID missing or invalid. |
501 | Parameter userUID mismatch. |
The /add-users
endpoint will add one or more users to a specified lender. If a user already exists (duplicate email) this endpoint will update that user. This endpoint also requires the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing data on broker company and users | yes |
{
"company": {
"lenderID": "6SGKSI3X"
},
"users": [{
"userUID": "Da4W7mNZ",
"timezone": "America/Los_Angeles",
"headshot": {
"imageFormat": "jpg",
"base64": "\/9j\/4Q+eRXhpZgAATU0AKgAA...AEAE2\/9k="
},
"firstName": "Adam",
"lastName": "Smith",
"phonePrimary": "714-235-7114",
"phoneExtension": "12345",
"email": "adam.smith@abcloans.com",
"role": "Admin",
"loanOfficer_nmls": "012345",
"primaryBranchID": "TIDHLHOP",
"secondaryBranchIDs": ["TYHAOPOK", "PQAMLALD"],
"licensing": [{
"state": "CA",
"licenseNum": "334455"
}, {
"state": "NV",
"licenseNum": "776655"
}, {
"state": "TX",
"licenseNum": "n/a"
}]
}, {
"userUID": "G2bdThp9",
"timezone": "America/Los_Angeles",
"firstName": "Samantha",
"lastName": "Jones",
"phonePrimary": "818-859-8285",
"phoneExtension": "12345",
"email": "samantha.jones@abcloans.com",
"role": "Admin/Loan Officer",
"loanOfficer_nmls": "010101",
"primaryBranchID": "PQAMLALD",
"secondaryBranchIDs": ["TYHAOPOK"],
"licensing": [{
"state": "CA",
"licenseNum": "224466"
}, {
"state": "NV",
"licenseNum": "997755"
}, {
"state": "TX",
"licenseNum": "n/a"
}]
}]
}
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 | |
users.userUID |
varchar | User unique identifier | yes | |
users.timezone |
varchar | Olson timezones: Pacific/Honolulu, America/Anchorage, America/Los_Angeles, America/Denver, America/Chicago, America/New_York | timezone | no |
users.headshot |
json | user headshot if available | no | |
users.headshot.imageFormat |
varchar | png, jpg | headshot format | yes, if users.headshot is provided |
users.headshot.base64 |
varchar | base64-encoded headshot | yes, if users.headshot is provided | |
users.firstName |
varchar | first name, and middle name if applicable | yes | |
users.lastName |
varchar | last name | yes | |
users.phonePrimary |
varchar | phone number with no other characters | yes | |
users.phoneExtension |
varchar | phone number extension no other characters | no | |
users.email |
varchar | email address | yes | |
users.role |
varchar | Choose the name of a role available to the lender | access role type | yes |
users.loanOfficer_nmls |
varchar | user NMLS number only if Loan Officer role | yes | |
users.primaryBranchID |
varchar | the primary branch id of user | no | |
users.secondaryBranchIDs |
varchar | the list of secondary branch ud | no | |
users.licensing.state |
varchar | loan officer license state | yes | |
users.licensing.licenseNum |
varchar | n/a, or license number | loan officer license number | 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/lender/add-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 will return the brokerUID of the input company, a list of your UIDs (userUID), BeSmartee's IDs (userID) for each user if successful. Response will return the root key error
if any error. See Error Codes and Handling.
{
"brokerUID": "aYF1VBsd46alkI3KD",
"users": [
{
"userID": "LTV1OH28",
"userUID": "Da4W7mNZ"
},
{
"userID": "HSQLSFD9",
"userUID": "G2bdThp9"
}
]
}
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. |
501 | Parameter [name] missing or invalid format. |
501 | Parameter [name] invalid format. |
501 | Invalid timezone users.timezone |
501 | Invalid user headshot image format users.headshot.imageFormat . |
501 | Invalid user role users.role . |
501 | Invalid license state licensing.state . |
501 | Array users.licensing cannot be empty. |
501 | Array users cannot be empty. |
501 | Parameter lenderID invalid. |
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 |
{
"userID": "[User ID]",
"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 |
---|---|---|---|---|
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/lender/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 /get-single-sign-on-url
endpoint will generate a single-sign-on URL for the input user. This single-sign-on URL will become invalid once user logs in via the URL. This endpoint requires the following parameters:
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing data on broker company and user | yes |
{
"company": {
"lenderID": "4G7230D6"
},
"user": {
"userID": "QZCJNMI2"
}
}
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 company identifier | yes | |
user.userID |
varchar | BeSmartee user 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/lender/get-single-sign-on-url" );
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 );
If the broker has not completed the set up process and the requesting user should continue the process, return URL to finish the process under the key signOnURL
.
If the broker has not completed the set up process, return null (empty string) for other users.
If the broker completed their set up process, response will return the single-sign-on URL under the key signOnURL
.
Response will return the root key error
if any error. See Error Codes and Handling.
{
"signOnURL": "https://www.besmartee.com/lender/single-sign-on/4oW41zt9xLb
oXjY8cWIeaxW8XD0wvVYJx7jT2zRa3BR2e"
}
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. |
501 | Parameter user.userID cannot be empty. |
501 | Parameter lenderID invalid. |
501 | Parameter user.userID invalid. |
The /get-apr-closing-costs
takes loan search criteria and loan products in order to figure out the APR and closing costs/fees for each loan product.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing search criteria and loan products | yes |
{
"options" : {
"isReturnSchedule" : false
},
"search" : {
"loanPurpose" : "Purchase",
"zipcode" : "92649",
"city" : "Huntington Beach",
"county" : "Orange",
"countyFips" : "06059",
"state" : "CA",
"homePrice" : "200000",
"downPayment" : "40000",
"loanAmount" : "160000",
"propertyType" : "SingleFamily",
"numUnits" : "1",
"buildingStatus" : "Existing",
"occupancyType" : "PrimaryResidence",
"noImpounds" : "1",
"streamline" : "0",
"financeUFMIP" : "0",
"financeVAFF" : "0",
"financeUSDAGuaranteeFee" : "0"
},
"products": [
{
"productProgram" : "Conventional",
"loanTerm" : "30",
"loanAmortizationType" : "Fixed",
"loanAmortization" : "3",
"interestOnly" : "0",
"lpmi" : "1",
"rates" : [
{
"rate" : "2.250",
"points" : "-1.750",
"isHPML" : "0"
},
{
"rate" : "3.500",
"points" : "0.00",
"isHPML" : "0"
},
{
"rate" : "4.500",
"points" : "2.00",
"isHPML" : "1"
}
]
},
{
"productProgram" : "Conventional",
"loanTerm" : "5",
"loanAmortizationType" : "AdjustableRate",
"loanAmortization" : "30",
"interestOnly" : "0",
"lpmi" : "0",
"armIndex" : "LIBOR",
"armIndexMargin" : "2.250",
"armFirstAdj" : "60",
"armFirstAdjCap" : "5",
"armPerAdj" : "12",
"armPerAdjCap" : "2",
"armLifeCap" : "5",
"rates" : [
{
"rate" : "3.500",
"points" : "-0.250",
"isHPML" : "0"
},
{
"rate" : "2.750",
"points" : "1.00",
"isHPML" : "0"
}
]
}
]
}
{
"search" : {
"loanPurpose" : "RefinanceCashOut",
"zipcode" : "92649",
"homePrice" : "600000",
"cashOut" : "50000",
"loanAmount" : "200000",
"propertyType" : "SingleFamily",
"numUnits" : "1",
"buildingStatus" : "Existing",
"occupancyType" : "PrimaryResidence",
"noImpounds" : "1",
"streamline" : "1",
"financeUFMIP" : "0",
"financeVAFF" : "1",
"financeUSDAGuaranteeFee" : "0"
},
"products": [
{
"productProgram" : "VA",
"loanTerm" : "30",
"loanAmortizationType" : "Fixed",
"loanAmortization" : "30",
"interestOnly" : "0",
"lpmi" : "1",
"rates" : [
{
"rate" : "2.250",
"points" : "1.250",
"isHPML" : "0"
},
{
"rate" : "3.000",
"points" : "0.00",
"isHPML" : "0"
},
{
"rate" : "4.500",
"points" : "-2.00",
"isHPML" : "1"
}
]
}
]
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
options.isReturnSchedule |
boolean | true, false | Indicator to return amortization schedule | no |
search.loanPurpose |
varchar | Purchase, Refinance, RefinanceCashOut |
Purpose of loan | yes |
search.zipcode |
varchar | Zipcode of subject property | yes | |
search.city |
varchar | City of subject property | no | |
search.county |
varchar | County of subject property | no | |
search.countyFips |
varchar | FIPS county code of subject property | no | |
search.state |
varchar | State of subject property | no | |
search.homePrice |
double | Estimated value of subject property | yes | |
search.downPayment |
double | Down payment if search.loanPurpose is Purchase |
no | |
search.loanAmount |
double | Loan amount. If search.loanPurpose is RefinanceCashOut, this should be the total of current principle balance and cash out amount. |
yes | |
search.propertyType |
varchar | SingleFamily, TwoToFourUnitProperty, Townhouse, Condominium, ManufacturedMobileHome, SiteCondo, Triplex, Cooperative, Duplex, Quadplex, HighRiseCondominium, DetachedCondominium, Land, PUD |
Subject property type | yes |
search.numUnits |
integer | Number of units in subject property | yes | |
search.buildingStatus |
varchar | Existing | Building status of subject property | yes |
search.occupancyType |
varchar |
PrimaryResidence, SecondHome, OwnerOccupied, Investor |
Borrower occupancy status for subject property | yes |
search.noImpounds |
integer | 0, 1 | No impounds? | yes |
search.streamline |
integer | 0, 1 | Is streamline? | yes |
search.financeUFMIP |
integer | 0, 1 | Finance UFMIP? | yes |
search.financeVAFF |
integer | 0, 1 | Finance VA Funding Fee? | yes |
search.financeUSDAGuaranteeFee |
integer | 0, 1 | Finance USDA Guarantee Fee? | yes |
products.productProgram |
varchar |
Conventional, FHA, VA, USDA |
Product program | yes |
products.loanTerm |
integer | Loan term (number of years) | yes | |
products.loanAmortizationType |
varchar | Fixed, AdjustableRate |
Loan amortization type | yes |
products.loanAmortization |
integer | Loan amortization (number of years) | yes | |
products.interestOnly |
integer | 0, 1 | Is an interest only loan | yes |
products.lpmi |
integer | 0, 1 | Lender-paid mortgage insurance? | yes |
products.armIndex |
varchar | OneYearTreasury, ThreeYearTreasury, LIBOR, EleventhDistrictCostOfFunds, MonthlyAverageConstantMaturingTreasury, WeeklyAveragePrimeRate |
ARM interest rate index required if products.loanAmortizationType is AdjustableRate |
no |
products.armIndexMargin |
double | ARM index margin, required if products.loanAmortizationType is AdjustableRate |
no | |
products.armFirstAdj |
integer | ARM first adjustment (number of months), required if products.loanAmortizationType is AdjustableRate |
no | |
products.armFirstAdjCap |
double | ARM first adjustment rate, required if products.loanAmortizationType is AdjustableRate |
no | |
products.armPerAdj |
integer | ARM per adjustment (number of months), required if products.loanAmortizationType is AdjustableRate |
no | |
products.armPerAdjCap |
double | ARM per adjustment rate, required if products.loanAmortizationType is AdjustableRate |
no | |
products.armLifeCap |
double | ARM life cap rate, required if products.loanAmortizationType is AdjustableRate |
no | |
rates.rate |
double | Quoted rate | yes | |
rates.points |
double | Quote points if any | yes | |
rates.isHPML |
integer | 0, 1 | Is higher-priced mortgage loan? | 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/lender/get-apr-closing-costs" );
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 every loan product that was sent in the request with a similar structure.
Each set of rates will include the calculated APR and each rate will include an array of fees products.rates.fees
.
Response will return the root key error
if any error. See Error Codes and Handling.
{
"status" : "success",
"products": [
{
"productProgram" : "Conventional",
"loanTerm" : "30",
"loanAmortizationType" : "Fixed",
"loanAmortization" : "30",
"interestOnly" : "0",
"lpmi" : 1,
"rates" : [
{
"rate" : "2.250",
"points" : "-1.750",
"isHPML" : "0",
"apr" : "4.050",
"fees" : [
{
"name" : "Origination Fee",
"fee" : "500.00",
"percent" : "",
"mismoType" : "LoanOriginationFee",
"mismoTypeOther" : "",
"leSection" : "A"
},
{
"name" : "Title - Tax Review Fee",
"fee" : "62.00",
"percent" : "",
"mismoType" : "Other",
"mismoTypeOther" : "",
"leSection" : "C"
},
{
"name" : "Appraisal",
"fee" : "515.00",
"percent" : "",
"mismoType" : "AppraisalFee",
"mismoTypeOther" : "",
"leSection" : "B"
}
]
},
{
"rate" : "3.500",
"points" : "0.00",
"isHPML" : "0",
"apr" : "3.790",
"fees" : [
{
"name" : "Origination Fee",
"fee" : "500.00",
"percent" : "",
"mismoType" : "LoanOriginationFee",
"mismoTypeOther" : "",
"leSection" : "A"
},
{
"name" : "Title - Tax Review Fee",
"fee" : "62.00",
"percent" : "",
"mismoType" : "Other",
"mismoTypeOther" : "",
"leSection" : "C"
},
{
"name" : "Appraisal fee",
"fee" : "515.00",
"percent" : "",
"mismoType" : "AppraisalFee",
"mismoTypeOther" : "",
"leSection" : "B"
}
]
},
{
"rate" : "4.500",
"points" : "2.00",
"isHPML" : "1",
"apr" : "4.750",
"fees" : [
{
"name" : "Origination Fee",
"fee" : "500.00",
"percent" : "",
"mismoType" : "LoanOriginationFee",
"mismoTypeOther" : "",
"leSection" : "A"
},
{
"name" : "Title - Tax Review Fee",
"fee" : "62.00",
"percent" : "",
"mismoType" : "Other",
"mismoTypeOther" : "",
"leSection" : "C"
},
{
"name" : "Appraisal fee",
"fee" : "515.00",
"percent" : "",
"mismoType" : "AppraisalFee",
"mismoTypeOther" : "",
"leSection" : "B"
}
]
}
]
},
{
"productProgram" : "Conventional",
"loanTerm" : 5,
"loanAmortizationType" : "AdjustableRate",
"loanAmortization" : "30",
"interestOnly" : "0",
"lpmi" : "0",
"armIndex" : "LIBOR",
"armIndexMargin" : "2.250",
"armFirstAdj" : "60",
"armFirstAdjCap" : "5",
"armPerAdj" : "12",
"armPerAdjCap" : "2",
"armLifeCap" : "5",
"rates" : [
{
"rate" : "3.500",
"points" : "-0.250",
"isHPML" : "0",
"apr" : "3.800",
"fees" : [
{
"name" : "Loan Origination Fee",
"fee" : "500.00",
"percent" : "",
"mismoType" : "LoanOriginationFee",
"mismoTypeOther" : "",
"leSection" : "A"
},
{
"name" : "Title - Tax Review Fee",
"fee" : "62.00",
"percent" : "",
"mismoType" : "Other",
"mismoTypeOther" : "",
"leSection" : "C"
},
{
"name" : "Appraisal fee",
"fee" : "515.00",
"percent" : "",
"mismoType" : "AppraisalFee",
"mismoTypeOther" : "",
"leSection" : "B"
}
]
},
{
"rate" : "2.750",
"points" : "1.00",
"isHPML" : "0",
"apr" : "3.450",
"fees" : [
{
"name" : "Loan Origination Fee",
"fee" : "500.00",
"percent" : "",
"mismoType" : "LoanOriginationFee",
"mismoTypeOther" : "",
"leSection" : "A"
},
{
"name" : "Title - Tax Review Fee",
"fee" : "62.00",
"percent" : "",
"mismoType" : "Other",
"mismoTypeOther" : "",
"leSection" : "C"
},
{
"name" : "Appraisal",
"fee" : "515.00",
"percent" : "",
"mismoType" : "AppraisalFee",
"mismoTypeOther" : "",
"leSection" : "B"
}
]
}
]
}
]
}
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. |
501 | Parameter search cannot be empty. |
501 | Parameter products cannot be empty. |
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/lender/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. |
The /rate-watch
endpoint will help a consumer can subcribe/unsubcribe a rate-watch from your product & pricing engine (PPE).
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing parameters to subcribe/unsubcribe a rate watch | yes |
{
"action": "subscribe",
"searchID": "PYQB8F",
"firstName": "Charles",
"lastName": "Cooper",
"email": "charlescooper@mail.com",
"phone": "817-501-6587",
"type": "REGULAR",
"frequency": "DAILY",
"duration": "ONE_WEEK",
"productNames": [
"Conventional 10 Year Fixed",
"Conventional 15 Year Fixed"
]
}
{
"action": "subscribe",
"searchID": "PYQB8F",
"firstName": "Charles",
"lastName": "Cooper",
"email": "charlescooper@mail.com",
"phone": "817-501-6587",
"type": "RATE_TARGET",
"rateTargets": [
{
"productName": "Conventional 10 Year Fixed",
"desiredRate": "4%"
},
{
"productName": "Conventional 15 Year Fixed",
"desiredRate": "3.50%"
}
]
}
{
"action": "unsubscribe",
"token": "6qjoEOCXYhlD7HnK9kN8gII4tuermNntGbvRqbpMtw1STLGomiy6tYLQhPh9",
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
action |
varchar | subcribe, unsubcribe | Action to subscribe or unsubcribe a rate-watch | yes |
token |
varchar | token to unsubcribe, returned when calling /rate-watch with action = subcribe |
yes, if action = unsubcribe |
|
searchID |
varchar | searchID code> return from /get-ppe-anonymous |
yes, if action = subcribe |
|
firstName |
varchar | first name of consumer | yes, if action = subcribe |
|
lastName |
varchar | last name of consumer | yes, if action = subcribe |
|
email |
varchar | email of consumer | yes, if action = subcribe |
|
phone |
varchar | phone of consumer | no | |
type |
varchar | REGULAR, RATE_TARGET | type of rate watch | yes, if action = subcribe |
frequency |
varchar | DAILY, WEEKLY, MONTHLY | frequency of rate watch | yes, if type = REGULAR |
duration |
varchar | ONE_WEEK, ONE_MONTH, THREE_MONTHS, SIX_MONTHS, UNTIL_CANCEL | duration of rate watch | yes, if type = REGULAR |
productNames |
array | array of product names | yes, if type = REGULAR |
|
rateTargets |
array | array of rate targets | yes, if type = RATE_TARGET |
|
rateTargets.productName |
varchar | product name of a rate target | yes, if type = RATE_TARGET |
|
rateTargets.desiredRate |
varchar | desired rate of a rate target | yes, if type = RATE_TARGET |
$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/lender/rate-watch" );
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 return details of rate watch you register to subscribe. Response will return the root key error
if any error. See Error Codes and Handling.
{
"status": "success",
"rateWatch": {
"firstName": "Charles",
"lastName": "Cooper",
"email": "charlescooper@mail.com",
"phone": "817-501-6587",
"type": "RATE_TARGET",
"frequency": "DAILY",
"expiration": 1577518614,
"date": 1561966614,
"unsubscribeToken": "2bOLcpdL0HDvLJQQBJtMSacDPmwKngzqvPjIai02lr9A1SLwCxoILmfcGHwD"
}
Below, you'll find details on the data types of the response payload.
Parameter | Type | Possible Values |
---|---|---|
status |
varchar | success, error |
rateWatch |
array | |
rateWatch.firstName |
varchar | |
rateWatch.lastName |
varchar | |
rateWatch.email |
varchar | |
rateWatch.phone |
varchar | |
rateWatch.type |
varchar | |
rateWatch.frequency |
varchar | |
rateWatch.expiration |
timestamp | |
rateWatch.date |
timestamp | |
rateWatch.unsubscribeToken |
varchar |
Error Code | Description |
---|---|
400 | Your lender does not allow to register Rate Watch. |
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. |
501 | Parameter searchID not found. |
501 | Parameter token not found (action = unsubscribe ). |
The /get-list-loans
endpoint will return a list of loans. By default, return list is limited to 1,000 loans. If you need a higher return limit, please contact your Account Manager with a business case for an increase request. 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 |
{
"isActive" : "true",
"action" : "DateRange",
"dateFrom" : "01/01/2017",
"dateTo" : "01/31/2017",
"userID" : "ABCD1234",
"sortBy" : "desc",
"limit" : 1000,
"offset" : 1,
"userEmail" : "john.smith@gmail.com",
"filter": {
"status": {
"archived": {
"since": 240
},
"withdrawn": {
"since": 240
}
},
"property": {
"state": "CA"
},
"wholesaleLenderUID" : "TVDG4JDI",
"loanOfficer": {
"loanOfficerUID": "EYKSHL3G"
},
"timestampLastModified" : 1735718400
},
"withBorrower": [
"email",
"ssoID",
"firstName",
"middleName",
"lastName",
"isPrimary"
]
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
isActive |
varchar | true, false | indicator to return active or inactive loans | yes |
action |
varchar | DateRange | loan search type | no |
dateFrom |
date | 01/01/2017, etc... | start date | yes, if action = DateRange |
dateTo |
date | 01/31/2017, etc... | end date | yes, if action = DateRange |
userID |
varchar | ABCD1234 | 8 character unique identifier for user | no |
sortBy |
varchar | [asc,desc] | type order by | no |
limit |
integer | 1,2,3,...,1000 | limit (Min value is 1. Max value is 1000.) | no (Default value is 1000) |
offset |
integer | 1,2,3,... | offset (Min value is 0. There’s no max value.) | no (Default value is 0.) |
userEmail |
varchar | john.smith@gmail.com | User email | no |
filter |
array | array of filter | no | |
filter.status |
array | status of Loan | no | |
filter.property |
array | subject property info | no | |
filter.property.state |
varchar | CA or LA, etc... | subject property state | yes, if filter.property is provided |
filter.wholesaleLenderUID |
varchar | BSM wholesale lender’s public ID | no | |
filter.loanOfficer.loanOfficerUID |
varchar | represents Besmartee’s LO public ID | no | |
filter.loanOfficer.loanOfficerLOSUID |
varchar | represents the LO LOS ID if it has one | no | |
filter.timestampLastModified |
timestamp | filter loans that were modified on or after this input timestamp. | no | |
withBorrower |
array | [firstName, middleName, lastName, email, ssoID, isPrimary] | add-on to the response | no |
loanViews |
array | [name, userID, time] | add-on to the response | 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/lender/get-list-loans" );
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 list of loans if successful. Response will return the root key error
if any error. See Error Codes and Handling.
{
"totalCount": 10
"loans": [
{
"date" : 1543222451,
"ID" : "NINWCRRA",
"statusDate" : 1543223044,
"systemMainStatus" : "Loan Approval",
"systemSubStatus" : "Submitted Application",
"lenderMainStatus" : "Submitted to LOS",
"lenderSubStatus" : "Ran AUS",
"borrowerMainStatus" : "Submitted to LOS",
"borrowerSubStatus" : "Ran AUS",
"closingDate": null,
"loanPurpose":"Purchase",
"productProgram":"Conventional",
"occupancyType" : "PrimaryResidence",
"propertyType": "SingleFamily",
"homePrice":"200000",
"loanAmount" : "160000",
"totalBorrowersMonthlyIncome": "5000.00",
"totalBorrowersLiabilities": "50000.00",
"subjectPropertyStreet": "16892 Bolsa Chica Street",
"subjectPropertyStreet2": "#201",
"subjectPropertyCity": "Huntington Beach",
"subjectPropertyState": "CA",
"subjectPropertyZipcode": "92649",
"loanOfficerFirstName": "Adam",
"loanOfficerLastName": "Smith",
"loanOfficerEmail": "adam@besmartee.com",
"loanOfficerUID": "EHDN323A",
"borrowers": [{
"firstName": "Charles",
"middleName": "Peter",
"lastName" : "Cooper",
"email": "charlescooper@mail.com",
"ssoID": "324213434"
"isPrimary":true,
}],
"loanViews": [{
"name": "Bryan Adams",
"userID": "ABCD1234"
"time": 1722390680,
}],
},
{
"date" : 1543215505,
"ID" : "CZM1EV5F",
"statusDate" : 1543215601,
"systemMainStatus" : "Loan Approval",
"systemSubStatus" : "Chose Loan",
"lenderMainStatus" : "Submitted to LOS",
"lenderSubStatus" : "Chose Loan",
"borrowerMainStatus" : "Submitted to LOS",
"borrowerSubStatus" : "Chose Loan",
"closingDate": 1545243063,
"loanPurpose":"Purchase",
"productProgram":"Conventional",
"occupancyType" : "PrimaryResidence",
"propertyType": "SingleFamily",
"homePrice":"200000",
"loanAmount" : "160000",
"totalBorrowersMonthlyIncome": "5000.00",
"totalBorrowersLiabilities": "50000.00",
"subjectPropertyStreet": "16892 Bolsa Chica Street",
"subjectPropertyStreet2": "#201",
"subjectPropertyCity": "Huntington Beach",
"subjectPropertyState": "CA",
"subjectPropertyZipcode": "92649",
"loanOfficerFirstName": "Adam",
"loanOfficerLastName": "Smith",
"loanOfficerEmail": "adam@besmartee.com",
"loanOfficerUID": "EHDN323A",
"borrowers": [{
"firstName": "Charles",
"middleName": "Peter",
"lastName" : "Cooper",
"email": "charlescooper@mail.com",
"ssoID": "324213434",
"isPrimary":false,
}],
"loanViews": [{
"name": "John Smith",
"userID": "GHIJ3456"
"time": 1722390680,
}],
}
]
}
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. |
501 | Parameter [name] missing or invalid format. |
501 | Parameter [name] invalid format. |
The /create-notifications
endpoint will receive a list of event notifications from the CRM and return a list of statuses. 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 |
[
{
"crmEventID": "2000084422",
"actionList": [
{
"actionType": "createTask",
"crmID": "22112183",
"actionData": {
"taskCRMID": "6df8be86-21c5-4e00-ba76-404625c80bd5",
"taskCode": "RequestAction",
"taskTargetType": "LenderUser",
"taskAssigneeCRMID": "U12345",
"taskRequestedByUserCRMID": "U45678",
"taskDescription": "Discuss LPA options with the client"
}
},
{
"actionType": "createAlert",
"crmID": "22112183",
"actionData": {
"alertCRMID": "a6e84b98-e295-4efd-868b-f644a1a2a6ce",
"alertCode": "RequestAction",
"alertTargetType": "Loan",
"alertTargetRoles": [
"LoanOfficer",
"LoanOfficerAssistant"
],
"alertMessage": "Discuss LPA options with the client",
"alertSeverity": "Low"
}
},
{
"actionType": "archiveEmail",
"crmID": "22102183",
"actionData": {
"emailCRMID": "6df8be86-21c5-4e00-ba76-404625c80bd5",
"emailCode": "completionNotificationToLO",
"emailTargetType": "LenderUser",
"emailSenderAddress": "smartmortgage@test.com",
"emailSenderName": "Smart Mortgage",
"emailTimestamp": 1566262068,
"emailRecipients": {
"toEmailAddresses": [
"lo@test.com"
],
"ccEmailAddresses": [],
"bccEmailAddresses": [],
"replytoAddress": [
"smartmortgage@test.com"
]
},
"emailSubject": "New Loan Application from Alice Firstimer",
"emailBody": "<p>Hi LoanOfficer<p><p>You have a new loan application.<p>"
}
},
{
"actionType": "sendEmail",
"crmID": "22102183",
"actionData": {
"emailCRMID": "6df8be86-21c5-4e00-ba76-404625c80bd5",
"emailCode": "completionNotificationToLO",
"emailTargetType": "LenderUser",
"emailSenderAddress": "smartmortgage@test.com",
"emailSenderName": "Smart Mortgage",
"emailRecipients": {
"toEmailAddresses": [
"lo@test.com"
],
"ccEmailAddresses": [],
"bccEmailAddresses": [],
"replytoAddress": [
"smartmortgage@test.com"
]
},
"emailSubject": "New Loan Application from Alice Firstimer",
"emailBody": "<p>Hi LoanOfficer<p><p>You have a new loan application.<p>"
}
},
{
"actionType": "sendSMS",
"crmID": "22102183",
"actionData": {
"smsCRMID": "a6e84b98-e295-4efd-868b-f644a1a2a6ce",
"smsCode": "completionNotificationToLO",
"smsTargetType": "LenderUser",
"smsTargetUserCRMID": "NV38953",
"smsToNumber": "9998887777",
"smsBody": "New Loan Application from Alice Firstimer"
}
}
]
}
]
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
crmEventID |
varchar | EventID in the CRM | yes | |
actionList |
array | A list of actions for our system | yes | |
actionList.actionType |
enum | createTask, createAlert, archiveEmail, sendSMS, sendEmail | Archive email means the email has been sent out by the CRM and our system will only store the email content | yes |
actionList.crmID |
varchar | CRM ID for the existing Loan/Lead in our system | yes, if actionType=createTask, createAlert, sendSMS, archiveEmail | |
actionList.actionData |
array | An associative array with necessary data for creating the action | yes |
Below, you'll find details on all required parameters of actionData when actionType=createTask to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
taskCRMID |
varchar | Task ID in CRM | no | |
taskCode |
varchar | Unique string to identify the type of task in CRM | no | |
taskTargetType |
enum | Lender, LenderUser | yes | |
taskAssigneeCRMID |
varchar | New task will be assigned to this User | yes, if taskAssigneeLevel=LenderUser | |
taskRequestedByUserCRMID |
varchar | User who requested the task | no | |
taskDescription |
varchar | yes |
Below, you'll find details on all required parameters of actionData when actionType=createAlert to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
alertCRMID |
varchar | Alert ID in CRM | no | |
alertCode |
varchar | Unique string to identify the type of alert in CRM | no | |
alertTargetType |
enum | Loan, LenderUser | yes, if alertTargetType=LenderUser then actionList.crmID is not required | |
alertTargetRoles |
array | Possible array values: All, LoanOfficer, LoanOfficerAssistant, Processor, Underwriter, JuniorUnderwriter, DocDrawer, Opener, Funder, Closer | A list of roles on the loan who will see this alert | yes, if alertTargetType=Loan |
alertTargetUserCRMID |
varchar | CRM ID of the only user who will see this alert | yes, if alertTargetType=LenderUser | |
alertMessage |
varchar | HTML content of the alert message | yes | |
alertSeverity |
enum | Low, High | no, default is Low |
Below, you'll find details on all required parameters of actionData when actionType=archiveEmail to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
emailCRMID |
varchar | Email ID in CRM | no | |
emailCode |
varchar | Unique string to identify the email template in CRM | no | |
emailTargetType |
enum | Consumer, LenderUser | User type of the email recipients | yes |
emailSenderAddress |
varchar | Email address of the sender | yes | |
emailSenderName |
varchar | Name of the sender | no | |
emailTimestamp |
timestamp | Timestamp when email was sent | yes | |
emailRecipients |
array | An associative array with recipient email addresses | yes | |
emailRecipients.toEmailAddresses |
array | A list of email addresses in the "To:" field | yes | |
emailRecipients.ccEmailAddresses |
array | A list of email addresses in the "Cc:" field | no | |
emailRecipients.bccEmailAddresses |
array | A list of email addresses in the "Bcc:" field | no | |
emailRecipients.replytoAddress |
array | no | ||
emailSubject |
varchar | no | ||
emailBody |
varchar | HTML content of the email body | no |
Below, you'll find details on all required parameters of actionData when actionType=sendEmail to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
emailCRMID |
varchar | Email ID in CRM | no | |
emailCode |
varchar | Unique string to identify the email template in CRM | no | |
emailTargetType |
enum | Consumer, LenderUser | User type of the email recipients | yes |
emailSenderAddress |
varchar | Email address of the sender | yes | |
emailSenderName |
varchar | Name of the sender | no | |
emailRecipients |
array | An associative array with recipient email addresses | yes | |
emailRecipients.toEmailAddresses |
array | A list of email addresses in the "To:" field | yes | |
emailRecipients.ccEmailAddresses |
array | A list of email addresses in the "Cc:" field | no | |
emailRecipients.bccEmailAddresses |
array | A list of email addresses in the "Bcc:" field | no | |
emailRecipients.replytoAddress |
array | no | ||
emailSubject |
varchar | no | ||
emailBody |
varchar | HTML content of the email body | no |
Below, you'll find details on all required parameters of actionData when actionType=sendSMS to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
smsCRMID |
varchar | SMS ID in CRM | no | |
smsCode |
varchar | Unique string to identify the SMS template in CRM | no | |
smsTargetType |
enum | Consumer, LenderUser | User type of the SMS recipient | yes, if smsTargetType=LenderUser then actionList.crmID is not required |
smsTargetUserCRMID |
varchar | CRM ID of the lender user who will receive the SMS | yes, if smsTargetType=LenderUser | |
smsToNumber |
varchar | Phone number of the recipient | yes | |
smsBody |
varchar | Plain text content of the SMS | 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/lender/create-notifications"
);
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 list of notifications if successful.Response will return the root key
error
if any error. See Error Codes and Handling.
[
{
"status": "success",
"crmEventID": "2000084422"
},
{
"status": "success",
"crmEventID": "2000084423"
}
]
Error Response
[
{
"status": "error",
"crmEventID": "2000084422",
"errorMessage": "Parameter emailTimestamp missing."
}
]
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. |
501 | Parameter [name] missing or invalid format. |
501 | Parameter [name] invalid format. |
The /get-internal-users
endpoint will return a list of the internal users from your organization based on the user's sub-role. 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 |
{
"subRole" : "Loan Officer",
"branchID" : "4IITBI1P",
"licensed" : ["CA", "TX"],
"assignable": 1
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
subRole |
varchar | Admin, Loan Officer, Loan Officer Assistant, Processor, Underwriter, Account Executive, Account Manager, Closer, Representative, Sales Manager | sub-role name | yes |
branchID |
varchar | ABCD1234 | Branch ID | no |
licensed |
array/varchar | CA 2 letter USPS State Abbreviations |
Applicable only if subrole is Loan Officer .
Will check if the user has at least 1 state licensing available for passed in state(s).
|
no |
assignable |
bit | 0, 1 |
Applicable only if subrole is Loan Officer .
Will check if the user is included in Company Assignment Rule.
Will check if the user is included in Branch Assignment Rule if branchID is passed in.
|
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/lender/get-internal-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 will list of loans if successful. Response will return the root key error
if any error. See Error Codes and Handling.
[
{
"firstName": "John",
"firstNamePreferred": "Jeff",
"middleName": null,
"lastName": "Person",
"phonePrimary": "800-111-2222",
"email": "jeff@besmartee.com",
"nmls": "010101",
"userID": "ABCD1234",
"headshotURL": "http://www.besmartee.com/images/..."
},
{
"firstName": "Dennis",
"firstNamePreferred": Charlie,
"middleName": null,
"lastName": "Human",
"phonePrimary": "888-432-1234",
"email": "person@besmartee.com",
"nmls": "10101101",
"userID": "QWERASDF",
"headshotURL": "http://www.besmartee.com/images/..."
}
]
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. |
501 | Parameter [name] missing or invalid format. |
501 | Parameter [name] invalid format. |
The /custom-ppe/update-rates-points
endpoint allows you to update rates, points, indexes and margins
of your available loan products for specific lender.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
format |
varchar | json, xml | Format of response you want to get back | yes |
apiID |
varchar | Your API ID | yes | |
apiKey |
varchar | Your API Key | yes | |
accessToken |
varchar | unique identifier | yes | |
data |
json | payload containing request parameters | yes |
{
"company": {
"lenderID": "4G7230D6"
},
"products": [
{
"publicID": "TYNA12RT",
"productCode": "HELOC-1ST",
"armIndex": 5.5,
"armIndexMargin": -0.25,
"ratesAndPoints": [
{
"rate": 4,
"point": 99.256,
"lockPeriod": 30
},
{
"rate": 4.125,
"point": 99.971,
"lockPeriod": 30
},
{
"rate": 4.25,
"point": 100.125,
"lockPeriod": 30
},
{
"rate": 4.375,
"point": 101.021,
"lockPeriod": 30
},
{
"rate": 4,
"point": 100.372,
"lockPeriod": 45
},
{
"rate": 4.125,
"point": 100.896,
"lockPeriod": 45
},
{
"rate": 4.25,
"point": 101.452,
"lockPeriod": 45
},
{
"rate": 4.375,
"point": 102.121,
"lockPeriod": 45
}
]
},
{
"publicID": "KITH19Y6",
"productCode": "HELOAN-2ND",
"armIndex": "",
"armIndexMargin": "",
"ratesAndPoints": [
{
"rate": 4,
"point": 99.256,
"lockPeriod": 30
},
{
"rate": 4.125,
"point": 99.971,
"lockPeriod": 30
},
{
"rate": 4.25,
"point": 100.125,
"lockPeriod": 30
},
{
"rate": 4.375,
"point": 101.021,
"lockPeriod": 30
},
{
"rate": 4,
"point": 100.372,
"lockPeriod": 45
},
{
"rate": 4.125,
"point": 100.896,
"lockPeriod": 45
},
{
"rate": 4.25,
"point": 101.452,
"lockPeriod": 45
},
{
"rate": 4.375,
"point": 102.121,
"lockPeriod": 45
}
]
}
]
}
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 company identifier | yes, if lender is NOT retail lender | |
products.publicID |
varchar | BeSmartee product identifier | yes, if productCode is not provided |
|
products.productCode |
varchar | Code of loan product | yes, if publicID is not provided |
|
products.armIndex |
float | Index | ||
products.armIndexMargin |
float | Index margin | ||
products.ratesAndPoints.rate |
float | yes | ||
products.ratesAndPoints.point |
float | yes | ||
products.ratesAndPoints.lockPeriod |
integer | 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/lender/custom-ppe/update-rates-points" );
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 all loan products updated. List of products is same to the products in your request.
Response will return the root key error
if any error. See Error Codes and Handling.
{
"status": "success",
"products": [
{
"publicID": "TYNA12RT",
"productCode": "HELOC-1ST",
"armIndex": 5.5,
"armIndexMargin": -0.25,
"ratesAndPoints": [
{
"rate": 4,
"point": 99.256,
"lockPeriod": 30
},
{
"rate": 4.125,
"point": 99.971,
"lockPeriod": 30
},
{
"rate": 4.25,
"point": 100.125,
"lockPeriod": 30
},
{
"rate": 4.375,
"point": 101.021,
"lockPeriod": 30
},
{
"rate": 4,
"point": 100.372,
"lockPeriod": 45
},
{
"rate": 4.125,
"point": 100.896,
"lockPeriod": 45
},
{
"rate": 4.25,
"point": 101.452,
"lockPeriod": 45
},
{
"rate": 4.375,
"point": 102.121,
"lockPeriod": 45
}
]
},
{
"publicID": "KITH19Y6",
"productCode": "HELOAN-2ND",
"armIndex": "",
"armIndexMargin": "",
"ratesAndPoints": [
{
"rate": 4,
"point": 99.256,
"lockPeriod": 30
},
{
"rate": 4.125,
"point": 99.971,
"lockPeriod": 30
},
{
"rate": 4.25,
"point": 100.125,
"lockPeriod": 30
},
{
"rate": 4.375,
"point": 101.021,
"lockPeriod": 30
},
{
"rate": 4,
"point": 100.372,
"lockPeriod": 45
},
{
"rate": 4.125,
"point": 100.896,
"lockPeriod": 45
},
{
"rate": 4.25,
"point": 101.452,
"lockPeriod": 45
},
{
"rate": 4.375,
"point": 102.121,
"lockPeriod": 45
}
]
}
]
}
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. |
501 | Parameter [name] missing or invalid format. |
501 | Parameter [name] invalid format. |
The /create-loan
endpoint will create a new URLA 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 |
{
"losLoanID": "[LOS LOAN ID]",
"mismo34": "[MISMO 3.4]",
"inviteBorrowers": 0,
"losMiscLoanData": {
"loanStatusMain": "Start Application",
"loanStatusSub": "Signed Up"
}
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
losLoanID |
varchar | Loan LOS unique identifier | yes | |
mismo34 |
varchar | Industry standard Loan data formats MISMO 3.4 | yes | |
inviteBorrowers |
bit | 0, 1 | The default value will be 1 meaning we send out all emails by default. If the API user specifies 0, then we will prevent the emails from going out. | no |
losMiscLoanData |
array | Show status list | Extension data | 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/lender/create-loan" );
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 public loan ID, and return the root key error
if not. See
Error Codes and Handling.
{
"publicID": "UU473IOJ"
}
The /import-loan
endpoint will create a new URLA 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 |
{
"loanGUID": "[LOAN GUID]",
"loanLOSID": "[LOS LOAN ID]",
"notifyBorrowers": 0,
"loanOfficerEmail": "loanofficer@besmartee.com"
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
loanLOSID |
varchar | Loan LOS unique identifier | yes | |
loanGUID |
varchar | Loan GUID unique identifier | no | |
notifyBorrowers |
bit | 0, 1 | The default value will be 0 meaning we don't send out all emails by default. If the API user specifies 0, then we will prevent the emails from going out. | no |
loanOfficerEmail |
varchar | The BeSmartee email of loan officer. | 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/lender/import-loan" );
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 public loan ID, and return the root key error
if not. See
Error Codes and Handling.
{
"publicID": "UU473IOJ"
}
The /download-documents
endpoint will download a requested document. 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 |
{
"docID": "[LOAN DOC PUBLIC ID]",
"loanPublicID": "[LOAN PUBLIC ID]",
"docTypes": [
"initial disclosures"
]
}
Below, you will find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
docID |
varchar | loan docs publicID | can null if use loanPublicID and docTypes | |
loanPublicID |
varchar | Loan Public Identifier | can null if use docID | |
docTypes |
array | Array of documents being requested | can null if use docID |
$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/lender/download-documents" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, http_build_query($parameters) );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
echo $response;
The response will output the document, and return the root key error
if not.
See
Error Codes and Handling.
Document Types | Additional Notes |
---|---|
additional info request | |
approval letter | |
aus | |
closing | |
closing disclosures | |
closing disclosures electronic consent | |
closing disclosures electronic evidence summary | |
closing electronic consent | |
closing electronic evidence summary | |
condition | |
condition electronic consent | |
condition electronic evidence summary | |
credit | |
decline letter | |
fee worksheet | |
initial disclosures | |
initial disclosures audit | |
initial disclosures electronic consent | |
initial disclosures electronic evidence summary | |
initial disclosures mailed | |
misc | |
payment certificate | |
payment certificate electronic consent | |
payment certificate electronic evidence summary | |
preapproval | |
prequalification | |
prequalification (no aus) | |
prequalification (yes aus) | |
prior to docs | |
prior to final funding | |
prior to funding | |
redisclosures | |
redisclosures electronic consent | |
redisclosures electronic evidence summary | |
tpo submitted | |
verification of assets | |
withdrawal letter |
The /upload-documents
endpoint will upload a requested document. 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 |
{
"loanPublicID": "[LOAN PUBLIC ID]",
"documents": [
{
"fileName": "Initial Disclosures",
"fileFormat": "pdf",
"fileContent": "[Base64EncodedString]",
"documentType": "LoanDoc",
"loanDocType": "initial disclosures"
},
{
"fileName": "W2",
"fileFormat": "pdf",
"fileContent": "[Base64EncodedString]",
"documentType": "LoanConditionDocument",
"conditionID": "[CONDITION PUBLIC ID]",
"autoSatisfyCondition": true
}
]
}
Below, you will find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
loanPublicID |
varchar | Loan Public ID | yes | |
uploads[index].fileName |
varchar | File Name | yes | |
uploads[index].fileName |
varchar | File Name | yes | |
uploads[index].fileFormat |
varchar | File format | ||
uploads[index].fileContent |
base64EncodedString | File content | yes | |
uploads[index].documentType |
varchar | LoanDoc,LoanConditionDocument | Document Type | yes |
uploads[index].loanDocType |
varchar | Array of documents being requested | yes if documentType = LoanDoc | |
uploads[index].conditionID |
varchar | Loan Condition Public ID | yes if documentType = LoanConditionDocument | |
uploads[index].autoSatisfyCondition |
boolean | true,false | Set status Loan condition | 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/lender/upload-documents" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, http_build_query($parameters) );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
echo $response;
The response will output the document, and return the root key error
if not.
See
Error Codes and Handling.
Document Types | Additional Notes |
---|---|
additional info request | |
approval letter | |
aus | |
closing | |
closing disclosures | |
closing disclosures electronic consent | |
closing disclosures electronic evidence summary | |
closing electronic consent | |
closing electronic evidence summary | |
condition | |
condition electronic consent | |
condition electronic evidence summary | |
credit | |
decline letter | |
fee worksheet | |
initial disclosures | |
initial disclosures audit | |
initial disclosures electronic consent | |
initial disclosures electronic evidence summary | |
initial disclosures mailed | |
misc | |
payment certificate | |
payment certificate electronic consent | |
payment certificate electronic evidence summary | |
preapproval | |
prequalification | |
prequalification (no aus) | |
prequalification (yes aus) | |
prior to docs | |
prior to final funding | |
prior to funding | |
redisclosures | |
redisclosures electronic consent | |
redisclosures electronic evidence summary | |
tpo submitted | |
verification of assets | |
withdrawal letter |
The /download-condition-documents
endpoint will download a requested condition document. 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 |
{
"loanConditionPublicID": "[LOAN CONDITION PUBLIC ID]"
}
Below, you will find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
loanConditionPublicID |
varchar | loan condition publicID | 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/lender/download-condition-documents" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, http_build_query($parameters) );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );
echo $response;
The response will output the document, and return the root key error
if not.
See
Error Codes and Handling.
The response will output the document or a zip file if multiple documents were requested, and return the root key error
if not. See
Error Codes and Handling.
Any request with multiple documents included will be packaged and returned as a .zip
file.