Pre-Populate Loan Applications

Pre-Populate Loan Applications in Online Portal Now.

Overview

  1. Obtain list of available products
  2. Start Application for borrower
  3. Add in Primary Borrower on Application to pre-populate loan application data

Obtain list of available products

  1. Make a POST request to https://auth.sageworks.com/connect/token with client_id, client_secret, and grant_typeof client credentials specified in the body
  2. Get the Bearer Token (access_token) from the response
  3. Then GET https://api.sageworks.com/v1/proposed-productsto get a list of valid products that are supported in the Online Portal Now instance. Take note of the id and the applicationTypes as these will be necessary to start an application.

Sample Products Response

{
    "items": [

        {
            "id": 1377,
            "name": "Auto Loan",
            "customerFacingName": "",
            "paymentType": "fixedPayment",
            "rateSheetsId": 21,
            "calculateEvaluatedCreditScore": true,
            "evaluatedCreditScoreCreditBureaus": [
                "equifax",
                "experian",
                "transunion"
            ],
            "creditBureauSelectionStrategy": "highest",
            "loanRoleSelectionStrategy": "highest",
            "applicationTypes": [
                "person"
            ],
            "evaluatedCreditScoreLoanRoleTypes": [
                {
                    "id": 2670,
                    "description": "Co-Borrower",
                    "isDirectRole": true
                },
                {
                    "id": 2672,
                    "description": "Primary Borrower",
                    "isDirectRole": true
                }
            ],
            "applicationTemplates": [
                {
                    "id": 786,
                    "name": "Auto Loan",
                    "active": true,
                    "type": "person",
                    "proposedProducts": null
                }
            ]
        },
       
        {
            "id": 1761,
            "name": "C&I",
            "customerFacingName": "",
            "paymentType": "fixedPayment",
            "rateSheetsId": 86,
            "calculateEvaluatedCreditScore": false,
            "evaluatedCreditScoreCreditBureaus": [],
            "creditBureauSelectionStrategy": null,
            "loanRoleSelectionStrategy": null,
            "applicationTypes": [
                "business"
            ],
            "evaluatedCreditScoreLoanRoleTypes": [],
            "applicationTemplates": [
                {
                    "id": 2352,
                    "name": "Best Practice Business Template (4.20.22)",
                    "active": true,
                    "type": "business",
                    "proposedProducts": null
                }
            ]
        },
        
    ]
}

Start Application for borrower

πŸ“˜

To successfully complete this section, you will need a new client_id and client_secret with a grant_type of "Online_Portal_Token". These need to be issued directly by the Abrigo product team.

  1. First follow the steps in the Launch Online Portal Now Guide to obtain a valid Online Portal User Token.
  2. Then obtain a Sageworks Access Token that is specific to accessing data within Online Portal Now. You can do this by sending POST https://auth.sageworks.com/connect/tokenand passing in the client_id, client_secret, grant_type, online_portal_token and subdomain parameters per the request sample below.
    1. Note that the client id and secret will need to be issued directly to you from the Abrigo product team
    2. The grant_type will be "Online_Portal_Token
    3. The online_portal_token will be derived from step 1.
    4. The subdomain will be specific to your financial institution
  3. Upon a successful request you will get an access token like seen in the below sample response.
  4. Now you are ready to start an application. To do this, POST https://api.sageworks.com/v1/online-portal/loan-applications/start-application/{appType}/{proposedProductsId}

Sample Access Token Request/Response

{
"client_id": "XXX",
"client_secret": "XXXX",
"grant_type": "Online_Portal_Token",
"online_portal_token": "XXX",
"subdomain": "appDemo"
}
{
    "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjZBMEM5NEE3Q0Y735QjcyNDBCQzc5OEM3OTA4Q0REQjdFQTkwMjRFOTIiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJhZ3lVcDgtYmNrQzhlWXg1Q00zYmZxa0NUcEkifQ.eyJuYmYiOjE2OTMyNDAwOTksImV4cCI6MTY5MzI0MDk5OSwiaXNzIjoiaHR0cHM6Ly9hdXRoLnNhZ2V3b3Jrcy5jb20iLCJhdWQiOlsiaHR0cHM6Ly9hdXRoLnNhZ2V3b3Jrcy5jb20vcmVzb3VyY2VzIiwiU2FnZXdvcmtzQXBpIiwiT25saW5lUG9ydGFsQXBpIl0sImNsaWVudF9pZCI6IjE4NjQwOWFkZDE2NjRlNzk4ZTUyNTk2NTM3MWMxYjkxIiwic3ViIjoiNDQ5MTgwIiwiYXV0aF90aW1lIjoxNjkzMjQwMDk5LCJpZHAiOiJsb2NhbCIsIkN1c3RvbWVyc0lEIjoiNTIwMDMiLCJCYW5rQ3VzdG9tZXJVc2Vyc0lEIjoiNDQ5MTgwIiwiRGV2aWNlSWRlbnRpZmllciI6IjkxNjcwMzQyLTBlMjItNGQ0OC1iMWM4LTU1Zjk2OWEwMTFiNCIsInNjb3BlIjpbIk9ubGluZVBvcnRhbEFwaUFjY2VzcyIsIk9ubGluZVBvcnRhbFdlYkFwaUFjY2VzcyJdLCJhbXIiOlsib25saW5lX3BvcnRhbF90b2tlbiJdfQ.HwjcCNpP4Jd357vSYJUjpM-hd4CoIbHpBLJMRz3lLQi4_1zcJHCy7gdx08tNZCgb_J1vjzv6pV-cqF8jDqNNhoyyaCIKfy-u8SwwiwPmw5i1k7b4Cu6vpaX2PjDchqx_rwduqENnhqcCFaZtyceg-l-0C-zcKJ4JtomDkwXCC1OvjwgKR6yRw5oqQs_9GF2dlGSr5JtEUFSm86fQFV8pVrSYxLpRygVjaTVvVtmgpN_7HrQV6zHpXS3p6NsIwxwW72fRbzk07r229DxEEfZ1GV1wrkX2mL8BdLP3xPdWhE0JIP1XoP2svum55fWQDop7lfmDct5Nc7C4CABatizMRQ",
    "expires_in": 900,
    "token_type": "Bearer"
}

Sample Start Application Request

{
  "loanAmount": 20000
}
{
    "id": 1013956,
    "applicationNumber": 4023,
    "createdDate": "2023-08-28",
    "lastModifiedDate": "2023-08-28",
    "submittedDate": null,
    "type": "personal",
    "isDynamicApplication": true,
    "agreedToTerms": false,
    "agreedToTermsDate": null,
    "agreedToTermsUsername": null,
    "applicationStatus": "new",
    "lockedDate": null,
    "bankLoanOfficerID": 0
}

Add in Primary Borrower on Application

πŸ“˜

Revert back to using the client id & client secret with grant_type = client_credentials for the this section

  1. Before you add a Primary Borrower on the application, you will want to check that the customer does not already exist in Sageworks to avoid avoid adding a duplicate customers.
    1. You can do so by checking GET /v1/customers and passing in either the taxId or uniqueidentifier. . The unique identifier is typically fed from a customers core on a daily basis, so we recommend this as the first option.
    2. If you get a match, then take note of that customer id. You can skip creating a new customer.
    3. If you do not get a match, then you will create a new customer as a next step.
  2. If no customer exists, POST /v1/customers to create a new customer
  3. Next, find the proposed loan id for your application. by GET https://api.sageworks.com/v1/loan-application-proposed-loan-mappingsand passing in your loanApplicationNumber.
  4. Finally add in your customer as the primary borrower by POST https://api.sageworks.com/v1/loan-roles

Sample Add Customer Request



{

  "isDeleted": false,
  "firstName": "Developer",
  "lastName": "Demo",
  "uniqueIdentifier": "12444",
  "addresses": [
    {
      "line1": "123 Main St",
      "line2": "Apt 4B",
      "city": "Example City",
      "state": "NY",
      "postalCode": "00101",
      "country": "US",
      "addressType": "primary"
    }
  ],
  "type": "person",
  "taxId": "111111111",
}
{
    "id": 110600113,
    "name": "",
    "dba": null,
    "firstName": "Developer",
    "middleInitial": "",
    "lastName": "Demo",
    "nameSuffix": "",
    "userDefinedFields": null,
    "creditScore": 0,
    "secondaryCreditScore": 0,
    "businessType": null,
    "dnbScore": null,
    "namePrefix": "",
    "jobTitle": "",
    "addresses": [
        {
            "line1": "123 Main St",
            "line2": "Apt 4B",
            "city": "Example City",
            "state": "NY",
            "postalCode": "00101",
            "country": "US",
            "addressType": "primary"
        }
    ],
    "phoneNumbers": [],
    "type": "person",
    "emailAddress": "",
    "industryCode": null,
    "isDeleted": false,
    "uniqueIdentifier": "12444",
    "taxId": "111111111",
    "branch": "",
    "department": "",
    "website": "",
    "description": null,
    "restricted": false,
    "checkingBalance": 0.0,
    "savingsBalance": 0.0,
    "cDsBalance": 0.0,
    "averageChecking": 0.0,
    "averageSavings": 0.0,
    "averageCDs": 0.0,
    "citizenshipStatus": null,
    "maritalStatus": null,
    "isActiveMiltaryDuty": null,
    "isDependentOfActiveMiltaryDuty": null,
    "civDescription": null,
    "employer": "",
    "numberOfYearsEmployed": 0.0,
    "ofacDesignation": "",
    "dateOfBirth": null,
    "idDescription": null,
    "idNumber": null,
    "idIssueDate": null,
    "idExpirationDate": null,
    "idIssuingAuthority": null,
    "comments": "",
    "msa": null,
    "stateCode": null,
    "countyCode": null,
    "tractCode": null,
    "longitude": null,
    "latitude": null,
    "medianHouseholdIncome": null,
    "metropolitanDivision": null,
    "metropolitanDivisionCode": null,
    "loanOfficer": null,
    "loanOfficerId": null,
    "loanAdministrator": null,
    "equifaxCreditScore": null,
    "equifaxCreditScoreDate": null,
    "experianCreditScore": null,
    "experianCreditScoreDate": null,
    "transunionCreditScore": null,
    "transunionCreditScoreDate": null,
    "ficoSbssCreditScore": null,
    "ficoSbssCreditScoreDate": null,
    "bankruptcies": null,
    "dateOfLastBankruptcy": null,
    "historical30DayDelinquencies": null,
    "historical60DayDelinquencies": null,
    "historical90DayDelinquencies": null,
    "historicalOtherDelinquencies": null,
    "currentMortgagePastDue": null,
    "currentInstallmentPastDue": null,
    "currentAutoPastDue": null,
    "currentEducationPastDue": null,
    "currentOpenPastDue": null,
    "currentRevolvingPastDue": null,
    "currentOtherPastDue": null,
    "currentTotalPastDue": null,
    "entryMethod": "operatingCompany",
    "professionalLLC": null,
    "yearFounded": 0,
    "businessRegistered": null,
    "farmRegistered": null,
    "stateOfFormation": null,
    "franchiseName": null,
    "franchiseLegalName": null,
    "franchiseStartDate": null,
    "sbaCode": null,
    "cityHQ": null,
    "stateHQ": null,
    "franchiseDataImportDate": null,
    "franchiseDataFinancialPeriod": null,
    "historicalSuccessRate": null,
    "systemSupportAndExpenseCommitment": null,
    "resaleActivityLevel": null,
    "mngmtExperienceStability": null,
    "averageUnitRevenueGrowth": null,
    "prospectScreening": null,
    "unitEconomics": null,
    "franchiseAgreementAssessment": null,
    "franchiseeRelationship": null,
    "projectedUnitSuccess": null,
    "recurringRevenueSelfSufficiency": null,
    "totalFundScore": null,
    "finStatementStrength": null,
    "franchisedUnits": null,
    "minInitial": null,
    "maxInitial": null,
    "avgInitial": null,
    "companyOwnedUnits": null,
    "projectedOpenings": null,
    "compoundAnnualUnitGrowthRate": null,
    "compoundedUnitSuccessRate": null,
    "experianDBT": null,
    "equifaxDBT": null,
    "dbdbt": null,
    "dbPaydex": null,
    "ansoniaCreditRating": null,
    "ansoniaRiskScore": null,
    "creditLogicScore": null,
    "dbViabilityRating": null,
    "lastReportRun": null,
    "bankruptciesCount": null,
    "collectionsCount": null,
    "judgmentsCount": null,
    "chargeOffsCount": null,
    "liensCount": null,
    "nsfChecksCount": null,
    "dataDepthScore": null,
    "underFormation": null,
    "dateBusinessEstablished": null,
    "loanBoardingIdentifier": null
}

Sample Add Customer Error if uniqueidentifier already exists

{
    "errorType": "invalidRequest",
    "message": "Input model for request is invalid",
    "modelErrors": [
        {
            "propertyName": "uniqueIdentifier",
            "message": "A customer with uniqueIdentifier '7463135' already exists"
        }
    ]
}

Sample Add Primary Borrower Loan Role

{

  "customerId": 110600113,
  "isDeleted": false,
  "proposedLoanId": 1882686,
  "roleType": "Primary Borrower"
}
{
    "id": 6256443,
    "customerId": 110600113,
    "portfolioLoanId": null,
    "proposedLoanId": 1882686,
    "percentResponsible": 0.0,
    "roleType": "Primary Borrower",
    "isDeleted": false
}

What’s Next