Pre-Approval
Learn about how Pre-Approvals work with Drivly APIs.
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:
Field | Type | Description | Format Example |
---|---|---|---|
firstName | String | Customer’s first name | John |
middleInitial | String | Customer’s middle initial | A |
lastName | String | Customer’s last name | Doe |
address | String | Customer’s physical address | 123 Elm St |
city | String | City of the address | Springfield |
state | String | State of the address | IL |
zip | String | Zip code of the address | 62704 |
phone | String | Customer’s phone number | 555-1234 |
email | String | Customer’s email address | john.doe@example.com |
Optional Fields
Optional fields can be included based on specific requirements:
Field | Type | Description | Format Example |
---|---|---|---|
income | String | Customer’s income monthly income | $15,000 |
ipAddress | String | IP address of the customer making the request | 192.168.1.1 |
userAgent | String | User agent of the customer’s browser | Mozilla/5.0 |
isp | String | Internet Service Provider of the customer | Comcast |
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.
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:
Field | Type | Description | Example |
---|---|---|---|
id | String | Unique identifier for the pre-approval | 12345 |
customer | String | Customer’s unique identifier | 67890 |
segmentationBand | String | Credit score band | Excellent (750-900) |
lead | String | Unique identifier for the lead generated | abc123 |
status | Enum | Current status of the pre-approval | Processing |
estimatedInterestRate | String | Estimated interest rate for the loan (percentage) | 3.5% |
estimatedLoanTerm | String | Estimated term for the loan (months) | 60 mo |
updatedAt | String | Timestamp of the last update (ISO 8601 format) | 2022-01-01T12:00:00Z |
createdAt | String | Timestamp 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
.
Next Steps
Now that you have a better understanding of how the Pre-Approval API works, you can start integrating it into your application.