Loan Endpoints

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.

URI Format

All API calls must be made to:

https://www.besmartee.com/api/loan/{endpoint}

Required Parameters

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

POST /set-esign-url

The /set-esign-url endpoint will receive and store esign URLs, then email the borrower and coborrowers (if any) and loan officer (if specified) to let them know the initial disclosures are ready to sign.

This endpoint also requires the following parameters:

Parameter Type Possible Values Description Required
accessToken varchar unique identifier yes
data json payload containing data on esign data yes

JSON Payload Example

{ "lenderID" : "ETKXMO6C", "loanID": "KZ8UXDKY", "docVendor": "Docutech", "loanOfficer": { "esignURL": "https://esignurl.com", "esignURLExpirationDate": "1483120275", "status": "ESignReady" }, "borrowers" : [ { "borrowerUID" : "12345", "esignURL" : "https://esignurl.com", "esignURLExpirationDate" : "1483120275", "status" : "ESignReady" }, { "borrowerUID" : "98765", "esignURL" : "https://esignurl.com", "esignURLExpirationDate" : "1483120275", "status" : "ESignReady" } ] }

Below, you'll find details on all required parameters to be included in the JSON payload.

Parameter Type Possible Values Description Required
lenderID varchar BeSmartee identifier yes
loanID varchar your loan identifier yes
docVendor varchar Docutech, DocMagic, IDS default value is in lender's configurations no
loanOfficer.esignURL varchar esign URL for the loanOfficer. Required if loanOfficer.status=ESignReady. no
loanOfficer.esignURLExpirationDate unix timestamp date/time esign URL will expire. Required if loanOfficer.status=ESignReady. no
loanOfficer.status varchar ESignReady, ESignComplete loanOfficer ESign status no
borrower.borrowerUID varchar borrower unique identifier yes
borrower.esignURL varchar esign URL for the borrower. Required if status=ESignReady. no
borrower.esignURLExpirationDate unix timestamp date/time esign URL will expire. Required if status=ESignReady. no
borrower.status varchar ESignReady, ESignComplete ESign status yes

Example Request

$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/loan/set-esign-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 Format

If docVendor is Docutech or IDS, response will return null (empty string) if successful.

If docVendor is DocMagic, response will return each borrower's redirectURL and loan officer's redirectURL (if specified) for DocMagic.

{ "loanID": "KZ8UXDKY", "borrowers": [ { "borrowerUID": "12345", "redirectURL": "https://url.com/redirect" }, { "borrowerUID": "98765", "redirectURL": "https://url.com/redirect" } ], "loanOfficer": { "loanOfficerUID": "56789", "redirectURL": "https://url.com/redirect" } }

Response will return the root key error if any error. See Error Codes and Handling.

POST /add-coborrowers

The /add-coborrowers endpoint will add coborrowers to an existing loan, then email the new coborrowers so they can start their application. If the coborrower already exists, their information will be updated, and if the email has changed then the coborrower will receive a new email to start their application.

Additionally, this endpoint may be used to delete an existing coborrower.

This endpoint also requires the following parameters:

Parameter Type Possible Values Description Required
accessToken varchar unique identifier yes
data json payload containing coborrower data yes

JSON Payload Example

{ "lenderID" : "3WWPGZDC", "loanID": "LSLPFMRJ", "borrowers" : [ { "borrowerUID": "9973989", "firstName" : "Charles", "lastName" : "Cooper", "dob" : "10/22/1968", "phonePrimary" : "714-245-8223", "phoneSecondary" : "714-235-7114", "status" : "Married", "marriedToBorrowerUID" : "1234", "primaryAddressStreet1" : "16892 Bolsa Chica St", "primaryAddressStreet2" : "#201", "primaryAddressCity" : "Huntington Beach", "primaryAddressState" : "CA", "primaryAddressZipcode" : "92649", "email" : "charlescooper@mail.com" } ] }

Below, you'll find details on all required parameters to be included in the JSON payload.

Parameter Type Possible Values Description Required
lenderID varchar BeSmartee identifier yes
loanID varchar your loan identifier yes
borrower.isDelete boolean true or false indicator 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 no
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 yes
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

Example Request

$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/loan/add-coborrowers" );
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 Format

Response will return null (empty string) if successful. Response will return the root key error if any error. See Error Codes and Handling.

POST /get-loan-data

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

JSON Payload Example (search by loan identifier)

{ "loanID": "GZ3WWPDC", "classes" : [ "Loan", "LoanTerm", "LoanProperty", "Message", "MISMO34", "DataCredit", "DataCreditRawResponse", "LoanAUSFinding", "LoanAUSFindingRawResponse" ] }

JSON Payload Example (search by loan LOS identifier)

{ "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

Example Request

$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/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 Format

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", }, "LoanAssignment": { "internalUsers": [ { "type": "loanOfficer", "firstName": "John", "lastName": "Doe", "email": "testLO@bsmbank.com", "phone": "444-555-6633" } ], "externalUsers": [ { "type": "buyerAgent", "firstName": "Suzi", "lastName": "Test", "company": "DreamHome", "license": "1459242", "phone": "421-445-442", "email": "test@dreamhome.com" } ] } }

Below, you'll find more detail about response format

key Type Possible Values
LoanAssignment.internalUsers.type string loanOfficer, loanOfficerAssistant, closer, admin, processor, underwriter, customerServiceRepresentative
LoanAssignment.externalUsers.type string buyerAttorney, buyerAgent, sellerAgent, hoiAgent, titleAgent

POST /get-loan-borrower-data

The /get-loan-borrower-data endpoint will return specified data per loan borrower 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

JSON Payload Example

{ "loanID": "VOWKVHTZ", "borrowerUID" : "AED6AMZW", "classes" : [ "LoanBorrower", "LoanBorrowerEmployer", "LoanBorrowerPair" ] }

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 yes
borrowerUID varchar borrower unique identifier yes
classes array Show list name of classes to be returned yes

Example Request

$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/loan/get-loan-borrower-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 Format

Response will return specified data per borrower requested. Response will return the root key error if any error. See Error Codes and Handling.

{ "LoanBorrower": [ { "isBorrower": 1, "isActive": 1, "firstName": "Alice", "middleName": null, "lastName": "Firstimer", "homePhone": "714-245-8223", "presentAddressStreet": "16892 Bolsa Chica St", "presentAddressCity": "Huntington Beach", "presentAddressState": "CA", "presentAddressZipcode": "92649", "presentAddress_status": "Rent", "presentAddress_years": "2.00", "mailingAddressSame": 0, "mailingAddressStreet1": "16892 Bolsa Chica St", "mailingAddressStreet2": "#201", "mailingAddressCity": "Huntington Beach", "mailingAddressState": "CA", "mailingAddressZipcode": "92649", "publicID": "AED6AMZW", ... } ], "LoanBorrowerEmployer": [ { "isActive": 1, "isCurrent": 1, "isPrimary": 1, ... } ] }

POST /create-lead

The /create-lead endpoint will create a lead (or update a lead or loan), which will then pre-populate the consumer and loan officer application experience. This endpoint also requires the following parameters:

Parameter Type Possible Values Description Required
accessToken varchar unique identifier yes
data json payload containing request parameters yes

JSON Payload Example

{ "losID" : "t5D7HgV3", "loanOfficerUID" : "11DfK59L", "borrowerUID" : "h0HyE55e", "leadURL" : "https://www.salesforce.com/lead", "salesforceOpportunityID" : "0061I00000Ev5dUQAR", "crmLeadID" : "1009103310", "firstName" : "Alice", "lastName" : "Firstimer", "dob" : "01/01/2017", "ssn" : "991919991", "status" : "Unmarried", "phonePrimary" : "7142357114", "email" : "borrower@besmartee.com", "primaryAddressStreet" : "16892 Bolsa Chica St #201", "primaryAddressCity" : "Huntington Beach", "primaryAddressState" : "CA", "primaryAddressZipcode" : "92649", "subjectPropertyAddressStreet" : "1234 Any Street", "subjectPropertyAddressCity" : "Anytown", "subjectPropertyAddressState" : "CA", "subjectPropertyAddressZipcode" : "55555", "homePrice" : 500000, "loanPurpose" : "Purchase", "cashOut": 10000, "propertyType" : "SingleFamily", "productType" : "MortgageLoan", "autoCheckTOUPP" : "0" "leadSource" : "Lending Tree", "referralPersonName" : "Joe Teller", "referralPersonID" : "8Q3nGlf3", "referralBranchName" : "Branch 12-1212", "referralBranchID" : "g9Dv5H74", "campaignPrimaryName" : "New Account Opening Special", "campaignPrimaryID" : "K3t4Bp5F", "offerPrimary" : "", "offerPrimaryPurpose" :"", "offerSecondary" : "", "offerSecondaryPurpose" : "", "segment" : "" }

Below, you'll find details on all parameters that can be included in the JSON payload.

Parameter Type Possible Values Description Required
update bit 0, 1 set to 1 to update lead or loan, default is 0 no
publicID varchar BeSmartee UID for lead or loan, returned during original create-lead yes, if update = 1
losID varchar LOS unique identifier (may be used for any source) no
loanOfficerUID varchar loan officer unique identifier yes, if loanOfficerLOSUID or loanOfficerCRMUID is not provided
loanOfficerLOSUID varchar loan officer LOS unique identifier yes, if loanOfficerUID or loanOfficerCRMUID is not provided
loanOfficerCRMUID varchar loan officer CRM unique identifier yes, if loanOfficerUID or loanOfficerLOSUID is not provided
loanOfficerAssistantUID varchar loan officer assistant unique identifier no
loanOfficerAssistantLOSUID varchar loan officer assistant LOS unique identifier no
loanOfficerAssistantCRMUID varchar loan officer assistant CRM unique identifier no
csrID varchar customer service representative unique identifier no
borrowerUID varchar borrower unique identifier no
leadURL varchar lead URL (usually for CRM) no
salesforceOpportunityID varchar Salesforce Opportunity ID no
crmLeadID varchar Lead ID in your CRM no
firstName varchar first name yes
middleName varchar middle name no
lastName varchar last name yes
suffixName varchar suffix name no
dob date date of birth no
ssn varchar social security with no other characters no
status varchar Married, Unmarried, Separated marital status no
phonePrimary varchar phone number with no other characters no
phoneSecondary varchar phone number with no other characters no
email varchar email address no
primaryAddressStreet varchar address line no
primaryAddressCity varchar address city no
primaryAddressState varchar address state no
primaryAddressZipcode varchar address zip code no
subjectPropertyAddressStreet varchar address line no
subjectPropertyAddressCity varchar address city no
subjectPropertyAddressState varchar address state no
subjectPropertyAddressZipcode varchar address zip code no
homePrice double sales price if purchase, or estimated value if refinance no
loanPurpose varchar Purchase,
Refinance,
RefinanceCashOut
purpose for loan no
cashOut double cash out if loanPurpose is RefinanceCashOut yes if
loanPurpose is
RefinanceCashOut
propertyType varchar SingleFamily,
Condominium,
DetachedCondominium,
Duplex,
Triplex,
Quadplex,
ManufacturedMobileHome,
PUD
type of property no
productType varchar MortgageLoan, SolarLoan type of loan yes
autoCheckTOUPP bit 0, 1 flag to auto check agreement no
leadSource varchar name of lead source no
referralPersonName varchar name of referring person no
referralPersonID varchar ID of referring person no
referralBranchName varchar name of referring branch no
referralBranchID varchar ID of referring branch no
campaignPrimaryName varchar primary campaign name no
campaignPrimaryID varchar primary campaign ID no
campaignSecondaryName varchar secondary campaign name no
campaignSecondaryID varchar secondary campaign ID no
offer1 varchar offer 1 no
offer1Purpose varchar offer 1 purpose no
offer2 varchar offer 2 no
offer2Purpose varchar offer 2 purpose no

Example Request

$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/loan/create-lead" );
curl_setopt( $curl, CURLOPT_POST, count( $parameters ) );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $parameters );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, false );
$response = curl_exec( $curl );
curl_close( $curl );

print_r( $response );

Response Format

Response will return a unique publicID, if successful. If a lead is converted into a loan, the publicID will remain unchanged. Response will return the root key error, if any error. See Error Codes and Handling.

{ "publicID": "UU473IOJ" }

POST /add-conditions

The /add-conditions endpoint will add (or update) an array of conditions for a 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

JSON Payload Example

{ "loanID": "VOWKVHTZ", "conditions" : [ { "losUID" : "3K12FDT3", "viewableByBorrower" : "1", "dateDue" : "1483120275", "type" : "PTD", "category" : "Income", "docType" : "Income", "description" : "Provide copy of last two month W-2s.", "status" : "New" }, { "losUID" : "R8FDK17B", "loanConditionUID" : "PLY22UVG", "loanBorrowerUID" : "15FGKDRY", "viewableByBorrower" : "1", "type" : "PTD", "category" : "Application", "docType" : "Misc", "description" : "Provide letter explaining gap in employment.", "status" : "Satisfied" } ] }

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 yes
conditions.borrowerAssignType varchar AllBorrowers, PrimaryBorrower, BorrowerSpecific Assign condition for borrower no
conditions.losUID varchar LOS UID for condition yes, if loanConditionUID is not provided
conditions.loanConditionUID varchar BeSmartee UID for condition yes, if losUID is not provided
conditions.loanBorrowerUID varchar BeSmartee UID for LoanBorrower no
conditions.viewableByBorrower bit 0, 1 flag to expose condition to borrower yes
conditions.dateDue unix timestamp due date no
conditions.type varchar custom mapping type yes
conditions.category varchar custom mapping category no
conditions.docType varchar custom mapping doc type no
conditions.description varchar description yes
conditions.status varchar New, In Process, Satisfied, Uploaded, Removed status yes

Example Request

$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/loan/add-conditions" );
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 Format

Response will return array of condition UIDs for all conditions requested. Response will return the root key error if any error. See Error Codes and Handling.

{ "conditions": [ { "losUID": "3K12FDT3", "loanConditionUID": "D6U1Y2V1" }, { "losUID": "R8FDK17B", "loanConditionUID": "PLY22UVG" } ] }

POST /update-loan-data

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

JSON Payload Example

{ "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", "losLoanUID": "123456789" } }

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

Rate Lock Sync (losMiscLoanData.rateLock)

Nebuloan loans may include an optional rateLock object to sync the LOS rate lock to BSM. The access token must belong to the lender that uses the Nebuloan LOS; a broker or other lender token is rejected, even for a loan whose wholesale lender uses Nebuloan. Rate lock sync is not available on the partner /api/partner/loan/update-loan-data endpoint. The LOS is the system of record: the event overwrites the BSM lock status and dates, supersedes any pending BSM lock or Reprice request, and is recorded in the loan lock history. losLoanOfficerUID remains required when rateLock is sent. Events are idempotent by lenderPrice.lockEventId; resending an applied event changes nothing in the rate lock, sends no alert, and succeeds (other data in the request is still imported).

The object is validated, and the event is pre-checked against the loan, before any other data in the request is imported; a failure there rejects the whole request. The rate lock is applied after the import. If the import returns errors, the rate lock is not applied: the response carries the import messages and rateLock.applied is false. A conflict can still occur after the import (for example, the loan changed in the meantime); the request then fails with the error below, the imported data is kept, and the rate lock is not applied, so the event can be resent.

Each applied event sends one loan alert to the loan officer (see the table below). The sync fires no rate lock or Reprice events and sends no webhooks. If the alert cannot be created, the rate lock is still applied and the request still succeeds.

{ "posLoanUID": "RC1YBIV5", "losLoanOfficerUID": "loan_officer@lender.com", "losMiscLoanData": { "rateLock": { "eventType": "InitialLock", "lockStatus": "Locked", "lockRequestDate": "2026-10-14T16:00:00Z", "lockApproveDate": "2026-10-14T16:05:00Z", "lockExpirationDate": "2026-11-13", "lockPeriod": 30, "selectedProduct": { "ppeID": "abc123", "productName": "30 Year Conventional Fixed", "investorName": "Example Investor", "productProgram": "Conventional", "loanAmortizationType": "Fixed", "loanAmortization": 30, "loanTerm": 30, "rate": 6.25, "apr": 6.4, "pointsCreditsPercent": 0.5 }, "lenderPrice": { "priceQuoteId": "6aca8622df4e82000148d4c6", "lockEventId": "6aca8623888d8500015b4f3d" } } } }

Parameter Type Possible Values Description Required
eventType varchar InitialLock, UpdateLock, LockExtension, Relock, CancelLock, SuspendLock, ResumeLock LOS rate lock event. Case-sensitive. yes
lockStatus varchar Locked, Lock Canceled, Lock Suspended Must match the status expected for eventType (see below). yes
lockExpirationDate date YYYY-MM-DD Sets the lock expiration and estimated lock expiration dates. for events that end Locked
lockRequestDate, lockApproveDate datetime ISO-8601 with a UTC offset Updated only when supplied. no
lockPeriod int 1-365 Lock period in days. Updated only when supplied. no
selectedProduct object ppeID, productName, investorName, productProgram, loanAmortizationType, loanAmortization (whole years, 1-50), loanTerm (whole years, 1-50), rate (percent, greater than 0 and at most 100), apr (percent, 0-100), pointsCreditsPercent (percent of the loan amount, -100 to 100; negative is a lender credit) Locked pricing terms. Applied only by events that end Locked; when any supplied term differs from the selected product, BSM selects a copy of that product carrying the LOS terms, including its fees and how each fee is split between payers. The copy's points amount is recalculated from the loan amount; when pointsCreditsPercent or that amount changes, its points fee is replaced with one Loan Discount Points (section A) or Lender Credit (section J) fee, the same fee BSM pricing produces, and the copy's fee totals change by the same difference; zero points gives a $0 Lender Credit. A pricing change requires a positive loan amount. Omitted terms keep their current values. rate for InitialLock and Relock
lenderPrice.lockEventId varchar(255) Unique LOS lock event identifier used for idempotency. yes
lenderPrice.priceQuoteId varchar(255) LenderPrice price quote. For LenderPrice lenders it replaces the stored quote identity. no
eventType Required lockStatus Effect Loan officer alert
InitialLock, RelockLockedLocks the loan and applies the dates and pricing terms.Warning: rate lock confirmed by the LOS, with the rate and expiration.
UpdateLockLockedUpdates the dates and any supplied pricing terms.Warning: locked pricing updated by the LOS, with the rate and expiration.
LockExtensionLockedUpdates the dates and any supplied pricing terms.Warning: rate lock extended to the new expiration, with the rate.
ResumeLockLockedRequires the loan to be Lock Suspended; then applies as UpdateLock.Warning: rate lock resumed by the LOS, with the rate and expiration.
CancelLockLock CanceledChanges only the lock status; dates and pricing are preserved.Error: rate lock canceled in the LOS.
SuspendLockLock SuspendedChanges only the lock status; dates and pricing are preserved.Error: rate lock suspended in the LOS.
Error code When
400The rateLock object is invalid (the message lists each invalid field), the access token's lender or the loan does not use the Nebuloan LOS, or the lender's LOS integration does not support rate lock sync.
400Loan not found. No loan matches posLoanUID (or losLenderLoanNum).
409The loan has no selected product, ResumeLock was sent for a loan that is not Lock Suspended, or selectedProduct changes the pricing but the loan has no positive loan amount.
500Can not update loan data. Please contact Administrator! An unexpected error. A failure while applying the rate lock rolls the rate lock back, so the event can be resent.

Example Request

$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/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 Format

Response will return null if successful, and return the root key error if not. See Error Codes and Handling.

When losMiscLoanData.rateLock is sent, the response also includes a rateLock block: applied (the event changed the rate lock), duplicate (the event was already applied), and lockStatus (the loan's lock status after the request). When the import returned errors, success is false, rateLock.applied is false, and messages lists the import errors.

{ "success": true, "rateLock": { "applied": true, "duplicate": false, "lockStatus": "Locked" } }

POST /update-loan-fee

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

JSON Payload Example

{ "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

Example Request

$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/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 Format

Response will return null if successful, and return the root key error if not. See Error Codes and Handling.