Skip to main content

Drivly’s Credit Application API is designed for the submission of credit applications for vehicle purchases and loan payoffs. It interfaces with the RouteOne system for processing these applications, ensuring a streamlined approach for credit checks, approvals, and financing options.


Benefits of Using the Credit Application API

Integrating the Credit Application API into your vehicle financing workflows offers key benefits:

Enhanced Efficiency

  • RouteOne Integration: Direct integration with RouteOne accelerates the credit check and approval process.
  • Automated Processing: Minimizes manual data entry and expedites decision-making, essential for high-performance applications.

Improved Customer Experience

  • Faster Decision Times: Quicker credit decisions improve user satisfaction, crucial for apps aiming to maintain high engagement.
  • Convenience: Enables a more convenient application process, as customers can apply anytime and anywhere without the need for in-person visits.

Reduced Errors

  • Data Validation: The API validates application data automatically, reducing errors and ensuring data integrity.
  • Consistency: Uniform processing of applications enhances the quality of loan services offered through your application.

Competitive Edge

  • Loan Payoff Integration: Supports loan payoff requests, providing a comprehensive financing solution within your app.
  • Innovative Offering: Sets your business apart by utilizing cutting-edge technology to process credit applications.

Authentication

To securely use this endpoint:
  1. Sign up for a Drivly account
  2. Create a DRIVLY_API_KEY.
The key should be included in the header of each request.
headers: {
  'Authorization': '<api-key>',
  'Content-Type': 'application/json'
}

API Best Practices

Learn how to keep your API key secure and prevent unauthorized access.

Making a Credit Application Request

Submit a credit application to https://commerce.driv.ly/api/creditApplications with a POST request. Below is a breakdown of the required and optional data fields, supplemented with example requests for your applications.

Required Fields

  • primaryApplicant: The applicant’s information.
  • applicationType: The type of application (e.g., PURCHASE, REFINANCE, LEASE_BUYOUT).
  • vehicle: The vehicle information being financed.
  • hasCoApplicant: Whether the application includes a co-applicant (e.g., true, false).
  • environment: The environment to use (e.g., Production, Development).
  • financeAmount: The amount to finance (e.g., 35000).
  • sendTo: The system to send the application to (e.g., RouteOne, TSG).
  • preApproval: The pre-approval ID.

Optional Fields

  • coApplicant: The co-applicant’s information (if applicable).
  • trades: Trade-in vehicle information (if applicable).

JSON Request Body

Example

{
  "title": "Credit Application",
  "sendTo": "RouteOne",
  "state": "DRAFT",
  "environment": "Production",
  "preApproval": "123456789",
  "applicationType": "REFINANCE",
  "financeAmount": 35000,
  "downPayment": 5000,
  "primaryApplicant": {
    "firstName": "Danny",
    "lastName": "Turner",
    "birthDate": "06/24/1995",
    "emailAddress": "[email protected]",
    "cellPhone": "561-775-1234",
    "ssn": "123-45-6789",
    "relationshipType": "SPOUSE",
    "currentResidence": {
      "monthlyPaymentAmount": 123,
      "monthsAtResidence": 36,
      "ownershipStatus": "OWN",
      "address": {
        "lineOne": "123 Main St",
        "lineTwo": "Apt 2",
        "city": "Miami",
        "state": "FL",
        "postalCode": "33101"
      }
    },
    "currentEmployment": {
      "yearlyIncomeAmount": 123,
      "monthsAtEmployer": 36,
      "employmentType": "FULL_TIME",
      "employerName": "ABC Corp",
      "employmentPosition": "Manager",
      "employmentAddress": {
        "lineOne": "1525 Flamingo Ave",
        "lineTwo": "Suite 100",
        "city": "Miami",
        "state": "FL",
        "postalCode": "33101"
      }
    },
    "additionalIncomeAmount": 123,
    "additionalIncomeFrequency": "WEEKLY",
    "additionalIncomeSource": "Part-time job",
    "terms": {
      "agreeToTerms": true,
      "agreeIP": "150.80.15.220",
      "agreeUserAgent": "Mozilla/5.0"
    }
  },
  "hasCoApplicant": false,
  "vehicle": {
    "vin": "W1NKM4HB4RF139674",
    "year": 2024,
    "make": "Mercedes-Benz",
    "model": "GLC",
    "trim": "GLC 300 4MATIC",
    "mileage": 20,
    "lien": {
      "lienHolder": "ABC Bank",
      "monthlyPaymentAmount": 800,
      "payoffAmount": 30000,
      "initialTerm": 72,
      "remainingTerm": 36,
      "originalAmount": 60000,
      "apr": 4.5
    }
  }
}

Fetch API Example

We will assume that the createCreditApplication function and the Promise is called with the required data fields.
export async function createCreditApp(data) {
  try {
    const response = await fetch('https://commerce.driv.ly/api/creditApplications', {
      method: 'POST',
      headers: {
        Authorization: '<api-key>',
        'Content-Type': 'application/json',
      },
      body: JSON.stringify(data),
    })

    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`)
    }

    const responseData = await response.json()
    console.log('Credit Application Response:', responseData)
  } catch (error) {
    console.error('Error during the API request:', error)
  }
}

Successful Response

A successful response will have a 200 status code and a JSON object with the following fields:
  • id: The application ID.
  • title: The application title.
  • status: The application status.
  • sendTo: The system the application is sent to.
  • state: The application state.
  • environment: The environment used.
  • preApproval: The pre-approval ID.
  • applicationType: The application type.
  • financeAmount: The financed amount.
  • downPayment: The down payment amount.
  • primaryApplicant: The primary applicant’s information.
  • hasCoApplicant: Whether the application has a co-applicant.
  • vehicle: The vehicle information.
  • createdAt: The application creation date.
  • updatedAt: The application update date.

Example Response

{
  "id": "65f4c43aa86cc23f4013cfc8",
  "sendToTSG": false,
  "state": "DRAFT",
  "environment": "Production",
  "requiredFields": [],
  "preApproval": {
    "id": "12034631b86bb45g202071a1",
    "title": "Danny Turner ([email protected])",
    "firstName": "Danny",
    "middleInitial": "",
    "lastName": "Turner",
    "suffix": null,
    "address": "123 Main St Apt 2",
    "city": "Miami",
    "state": "FL",
    "zip": "33101",
    "phone": "+15615551234",
    "email": "[email protected]",
    "sessionId": "",
    "createdAt": "2024-03-26T22:04:01.175Z",
    "updatedAt": "2024-03-26T22:04:01.175Z",
    "status": "Processed",
    "income": "$15,000",
    "AppId": 154422063,
    "customer": {
      "id": "12ab3d1241567b12d2ga12c1",
      "leads": ["65ea2c8130784a03c8fd39c9"],
      "address": "65ea2c8130784a03c8fd39c9",
      "email": "[email protected]",
      "phone": "+15615551234",
      "consumerFirstName": "Danny",
      "consumerMiddleName": "",
      "consumerLastName": "Turner",
      "consumerSuffix": null,
      "consumerPreApprovals": ["12034631b86bb45g202071a1"],
      "consumerLeadSource": [],
      "companyType": [],
      "createdAt": "2024-03-26T22:03:29.685Z",
      "updatedAt": "2024-03-26T22:03:29.685Z",
    },
    "segmentationBand": "Good (700-749)"
  },
  "primaryApplicant": {
    "firstName": "Danny",
    "lastName": "Turner",
    "birthDate": "06/24/1995",
    "emailAddress": "[email protected]",
    "cellPhone": "561-775-1234",
    "currentResidence": {
      "monthlyPaymentAmount": 3500,
      "monthsAtResidence": 63,
      "ownershipStatus": "OWN",
      "address": {
        "lineOne": "123 Main St",
        "lineTwo": "Apt 2",
        "city": "Miami",
        "state": "FL",
        "postalCode": "33101"
      }
    },
    "currentEmployment": {
      "yearlyIncomeAmount": 125000,
      "monthsAtEmployer": 38,
      "employmentType": "FULL_TIME",
      "employerName": "ABC Corp",
      "employmentPosition": "Manager",
      "employmentAddress": {
        "lineOne": "1525 Flamingo Ave",
        "lineTwo": "Suite 100",
        "city": "Miami",
        "state": "FL",
        "postalCode": "33101"
      }
    },
    "previousResidence": { "address": {} },
    "previousEmployment": { "employmentAddress": {} },
    "additionalIncomeAmount": null,
    "additionalIncomeSource": "",
    "terms": {
      "agreeToTerms": true,
      "agreeIP": "150.80.15.220",
      "agreeUserAgent": "Mozilla/5.0"
    }
  },
  "coApplicant": {
    "currentResidence": { "address": {} },
    "currentEmployment": { "employmentAddress": {} },
    "previousResidence": { "address": {} },
    "previousEmployment": { "employmentAddress": {} },
    "terms": {}
  },
  "vehicle": {
    "vin": "5NPD84LF1JH392427",
    "year": 2018,
    "make": "hyundai",
    "model": "Elantra",
    "trim": "SEL 2.0L Auto (Alabama)",
    "mileage": 20000,
    "lien": {
      "lienHolder": "ABC Bank",
      "monthlyPaymentAmount": 300,
      "payoffAmount": 1,
      "initialTerm": 60,
      "remainingTerm": 12,
      "originalAmount": 4000,
      "apr": 5
    }
  },
  "createdAt": "2024-03-15T21:58:48.032Z",
  "updatedAt": "2024-03-15T21:58:48.032Z",
  "logs": [],
  "missingFields": {},
  "passesChecklist": true,
  "rates": [],
  "title": "[DRAFT] Danny Turner - $30,000.00",
  "applicationType": "REFINANCE",
  "meta": {
    "refinanceType": "REMOVE SOMEONE",
    "term": "60 months",
    "sellTrade": "No"
  },
  "downPayment": 5000,
  "financeAmount": 30000,
  "trades": [],
  "hasCoApplicant": false
}

Properties Reference

primaryApplicant | coApplicant
Applicant Object
firstName
string
lastName
string
birthDate
string
emailAddress
string
cellPhone
string
ssn
string
relationshipType
enum<string> | null
Available options: SPOUSE, RELATIVE, FRIEND, or null (for primary applicant)
currentResidence | previousResidence
Residence Object
If current monthsAtResidence < 24, previousResidence is REQUIRED
monthlyPaymentAmount
number
monthsAtResidence
number
ownershipStatus
enum<string>
Available options: RENT, OWN, RELATIVE_OWNED
address
Address Object
lineOne
string
lineTwo
string
city
string
state
enum<string>
Available options: AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY
postalCode
string
currentEmployment | previousEmployment
Employment Object
If currentEmployment monthsAtEmployer < 24, previousEmployment is REQUIRED
yearlyIncomeAmount
number
monthsAtEmployer
number
employmentType
enum<string>
Available options: FULL_TIME, PART_TIME, SELF_EMPLOYED, UNEMPLOYED, RETIRED
employerName
string
employmentPosition
string
employmentAddress
Address Object
lineOne
string
lineTwo
string
city
string
state
enum<string>
Available options: AL, AK, AZ, AR, CA, CO, CT, DE, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY
postalCode
string
additionalIncomeAmount
number | null
additionalIncomeFrequency
enum<string> | null
Available options: WEEKLY, BI_WEEKLY, TWICE_MONTHLY, MONTHLY, YEARLY
additionalIncomeSource
string | null
terms
Terms Object
agreeToTerms
boolean
agreeIP
string
agreeUserAgent
string
vehicle
Vehicle Object
vin
string
year
number
make
string
model
string
trim
string
mileage
number
lien
Lien Object
lienHolder
string | null
monthlyPaymentAmount
number | null
payoffAmount
number | null
initialTerm
number | null
remainingTerm
number | null
originalAmount
number | null
apr
number | null