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 API calls must be made to:
https://www.besmartee.com/api/partner/loan/{endpoint}
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 | response data format | yes |
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",
"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 |
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 |
$jsonPayload = {...};
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN,
'data' => $jsonPayload
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/loan/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.
{
"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,
}]
},
{
"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,
}]
}
]
}
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-loan-data
endpoint will return specified data per loan requested. 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 |
{
"loanID": "GZ3WWPDC",
"classes" : [
"Loan",
"LoanTerm",
"LoanProperty",
"Message",
"MISMO34",
"DataCredit",
"DataCreditRawResponse",
"LoanAUSFinding",
"LoanAUSFindingRawResponse"
]
}
{
"lenderLoanNum": "1234567890",
"classes" : [
"Loan",
"LoanTerm",
"LoanProperty",
"Message",
"MISMO34",
"DataCredit",
"DataCreditRawResponse",
"LoanAUSFinding",
"LoanAUSFindingRawResponse"
]
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
loanID |
varchar | Your loan identifier. This field will be prioritized to use if lenderLoanNum is also provided. |
Optional if lenderLoanNum is provided |
|
lenderLoanNum |
varchar | Your loan LOS identifier. This field will NOT be used if loanID is also provided. |
Optional if loanID is provided |
|
classes |
array | Show list | Name of classes to be returned | yes |
$jsonPayload = {...};
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN,
'data' => $jsonPayload
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL, "https://www.besmartee.com/api/partner/loan/get-loan-data" );
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 array of Loan classes requested if successful. Response will return the root key error
if any error. See Error Codes and Handling.
{
"Loan": {
"publicID": "NINWCRRA",
"losID": "TEST911900040788",
...
},
"LoanTerm": {
"mortAppliedFor": "Conventional",
"agencyCaseNum": "TEST911900040788",
...
},
"LoanProperty": {
"isBorrower": 1,
"subPropAddress1": "1234 Main Street",
...
},
"Messages": [
{
"id": "54715cd8dda91aa44e4942467fb2ebcd",
"message": "Hi Andy. Thanks for signing up!...",
...
},
{
"id": "95e08407662b9f5679d75543f49173f0",
"message": "Going on vacation this week...",
...
},
...
],
"MISMO34": "<?xml version=\"1.0\"?> <MESSAGE ... ",
"ResponseFull": {
"adjustmentID": null,
"apr": "4.776",
"rate": "4.750",
"pointsCreditsPercent": "1.578"
...,
"antiSteeringOptions": {
"lowestInterestRate": {
"adjustmentID": null,
"apr": "4.776",
"rate": "3.125",
"pointsCreditsPercent": "1.567",
...
},
"lowestInterestRateWithoutRiskyFeatures": {
"adjustmentID": null,
"apr": "4.776",
"rate": "3.125",
"pointsCreditsPercent": "1.567",
...
},
"lowestInterestRateWithoutRiskyFeatures": {
"adjustmentID": null,
"apr": "3.895",
"rate": "3.875",
"pointsCreditsPercent": "2.567",
...
}
}
},
"DataCredit": {
"CRAFannieProviderID": 3,
"CRAName": "Factual Data by CBC",
}
}
The /update-loan-data
endpoint will sync loan data from LOS to BSM. 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 |
{
"posLoanUID": "RC1YBIV5",
"losLoanOfficerUID": "loan_officer@lender.com",
"losLoanData": [
{
"dataFormat": "fnma",
"data": "[REQUIRED_FNMA_32_HERE]"
},
{
"dataFormat": "mismo33",
"data": "[OPTIONAL_XML_HERE]"
},
{
"dataFormat": "mismo34",
"data": "[REQUIRED_XML_HERE]"
}
],
"losMiscLoanData": {
"loanStatusMain": "Start Application",
"loanStatusSub": "Sign Up",
"programID": "123456"
}
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
posLoanUID |
varchar | Loan unique identifier | yes | |
losLoanOfficerUID |
varchar | Loan officer unique identifier | yes | |
losLoanData |
array | Industry standard Loan data formats (Fannie Mae 3.2, MISMO 3.3 and MISMO 3.4) | yes | |
losMiscLoanData |
array | Extension data | yes |
$jsonPayload = {...};
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN,
'data' => $jsonPayload
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL,
"https://www.besmartee.com/api/partner/loan/update-loan-data" );
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 /update-loan-fee
endpoint will return list fees in 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 |
{
"posLoanUID": "RC1YBIV5",
"fees": [
{
"action": "Update",
"feeID": 1663896,
"amountPaidByBorrower": 600
},
{
"action": "Update",
"feeID": 1663894,
"MISMOType": "HomeownersInsurancePrepaid",
"monthsCollected": 4,
"monthlyAmount": 63.73
},
{
"action": "Update",
"feeID": 1663894,
"MISMOType": "Other",
"MISMOTypeOtherDescription": "Title - Examination",
"name": "Title - Examination",
"amountPaidByBorrower": 290
}
]
}
Below, you'll find details on all required parameters to be included in the JSON payload.
Parameter | Type | Possible Values | Description | Required |
---|---|---|---|---|
posLoanUID |
varchar | Loan unique identifier | yes | |
fees |
array | List fee need to update | yes | |
fees.action |
string | Update | Action to interact with loan fees | yes |
fees.feeID |
varchar | feeID which get from /get-loan-data with "classes" : ["LoanCost"] |
yes | |
fees.mismoType |
varchar | no | ||
fees.mismoTypeOther |
varchar | yes, if mismoType is Other | ||
fees.amountPaidByBorrower |
double | no | ||
fees.monthsCollected |
integer | yes, if fee in section F or G |
||
fees.monthlyAmount |
double | yes, if fee in section F or G |
||
fees.name |
varchar | no |
$jsonPayload = {...};
$parameters = array(
'format' => "json",
'apiID' => YOUR_API_ID,
'apiKey' => YOUR_API_KEY,
'accessToken' => ACCESS_TOKEN,
'data' => $jsonPayload
);
$curl = curl_init();
curl_setopt( $curl, CURLOPT_URL,
"https://www.besmartee.com/api/partner/loan/update-loan-fee" );
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.