Overview

The Pre-Approval API is designed to revolutionize the vehicle financing process by enabling quick, efficient, and customer-friendly pre-approval for auto loans.

This API provides a seamless way to perform soft pulls on credit scores, offering customers and businesses a fast path to understanding financing options with no Social Securtity Number (SSN) requirements and no impact to credit scores.


Making a Request

Submit a pre-approval to https://commerce.driv.ly/api/preApprovals with a POST request.

Below is a breakdown of the required and optional data fields, supplemented with example requests for your applications.

Required Fields

Required fields must be provided with every request:

FieldTypeDescriptionFormat Example
firstNameStringCustomer’s first nameJohn
middleInitialStringCustomer’s middle initialA
lastNameStringCustomer’s last nameDoe
addressStringCustomer’s physical address123 Elm St
cityStringCity of the addressSpringfield
stateStringState of the addressIL
zipStringZip code of the address62704
phoneStringCustomer’s phone number555-1234
emailStringCustomer’s email addressjohn.doe@example.com

Optional Fields

Optional fields can be included based on specific requirements:

FieldTypeDescriptionFormat Example
incomeStringCustomer’s income monthly income$15,000
ipAddressStringIP address of the customer making the request192.168.1.1
userAgentStringUser agent of the customer’s browserMozilla/5.0
ispStringInternet Service Provider of the customerComcast

Fetch API Example

This function createPreApproval sends the pre-approval data to the API endpoint using fetch with a POST method.

It waits for the response asynchronously, converts the response to JSON, and logs it to the console. If an error occurs during the request or while handling the response, it catches the error and logs it, which is crucial for debugging and user feedback in real applications.

To execute the function, simply call createPreApproval() from your JavaScript code.

This example is meant to be a basic demonstration. In production, you might want to handle errors more gracefully and provide user feedback based on the result of the API call.


Successful Response

Upon successful submission, the API returns a response containing the following generated values:

FieldTypeDescriptionExample
idStringUnique identifier for the pre-approval12345
customerStringCustomer’s unique identifier67890
segmentationBandStringCredit score bandExcellent (750-900)
leadStringUnique identifier for the lead generatedabc123
statusEnumCurrent status of the pre-approvalProcessing
estimatedInterestRateStringEstimated interest rate for the loan (percentage)3.5%
estimatedLoanTermStringEstimated term for the loan (months)60 mo
updatedAtStringTimestamp of the last update (ISO 8601 format)2022-01-01T12:00:00Z
createdAtStringTimestamp when the pre-approval was created (ISO 8601 format)2022-01-01T00:00:00Z

The response will contain the same values as the request, along with the generated values. The response will also include the status of the pre-approval, which can be used to track the progress of the request.

The status will be one of the following: Processing, Error, Processed, Needs Info.

Example Response
{
  "id": "12034631b86bb45g202071a1",
  "title": "Danny Turner (dannyt@gmail.com)",
  "firstName": "Danny",
  "middleInitial": "",
  "lastName": "Turner",
  "suffix": null,
  "address": "241 Main St",
  "city": "Juno Beach",
  "state": "FL",
  "zip": "33408",
  "phone": "+15615551234",
  "email": "dannyt@gmail.com",
  "sessionId": "",
  "createdAt": "2024-03-26T22:03:29.685Z",
  "updatedAt": "2024-03-26T22:04:01.175Z",
  "status": "Processed",
  "income": "$15,000",
  "AppId": 154422063,
  "customer": "12ab3d1241567b12d2ga12c1",
  "segmentationBand": "Good (700-749)"
}

Next Steps

Now that you have a better understanding of how the Pre-Approval API works, you can start integrating it into your application.