> ## Documentation Index
> Fetch the complete documentation index at: https://docs.driv.ly/llms.txt
> Use this file to discover all available pages before exploring further.

# Credit Application

> Learn about how Credit Applications work with Drivly's Commerce API.

export const CustomCallout = ({children, variant, icon}) => <>
    {variant === 'tip' && <div className="my-4 px-5 py-4 overflow-hidden rounded-xl border border-emerald-500/20 bg-emerald-50/50 dark:border-emerald-500/30 dark:bg-emerald-500/10">
        <div className="flex items-start space-x-3">
          {icon && <div className="mt-0.5 w-4">
              <svg width="11" height="14" viewBox="0 0 11 14" fill="currentColor" xmlns="http://www.w3.org/2000/svg" className="text-emerald-600 dark:text-emerald-400/80 w-3.5 h-auto" aria-label="CustomTip">
                <path d="M3.12794 12.4232C3.12794 12.5954 3.1776 12.7634 3.27244 12.907L3.74114 13.6095C3.88471 13.8248 4.21067 14 4.46964 14H6.15606C6.41415 14 6.74017 13.825 6.88373 13.6095L7.3508 12.9073C7.43114 12.7859 7.49705 12.569 7.49705 12.4232L7.50055 11.3513H3.12521L3.12794 12.4232ZM5.31288 0C2.52414 0.00875889 0.5 2.26889 0.5 4.78826C0.5 6.00188 0.949566 7.10829 1.69119 7.95492C2.14321 8.47011 2.84901 9.54727 3.11919 10.4557C3.12005 10.4625 3.12175 10.4698 3.12261 10.4771H7.50342C7.50427 10.4698 7.50598 10.463 7.50684 10.4557C7.77688 9.54727 8.48281 8.47011 8.93484 7.95492C9.67728 7.13181 10.1258 6.02703 10.1258 4.78826C10.1258 2.15486 7.9709 0.000106649 5.31288 0ZM7.94902 7.11267C7.52078 7.60079 6.99082 8.37878 6.6077 9.18794H4.02051C3.63739 8.37878 3.10743 7.60079 2.67947 7.11294C2.11997 6.47551 1.8126 5.63599 1.8126 4.78826C1.8126 3.09829 3.12794 1.31944 5.28827 1.3126C7.2435 1.3126 8.81315 2.88226 8.81315 4.78826C8.81315 5.63599 8.50688 6.47551 7.94902 7.11267ZM4.87534 2.18767C3.66939 2.18767 2.68767 3.16939 2.68767 4.37534C2.68767 4.61719 2.88336 4.81288 3.12521 4.81288C3.36705 4.81288 3.56274 4.61599 3.56274 4.37534C3.56274 3.6515 4.1515 3.06274 4.87534 3.06274C5.11719 3.06274 5.31288 2.86727 5.31288 2.62548C5.31288 2.38369 5.11599 2.18767 4.87534 2.18767Z"></path>
              </svg>
            </div>}
          <div className="flex-1 text-sm prose text-wrap text-emerald-900 dark:text-emerald-200">
            {children}
          </div>
        </div>
      </div>}
    {variant === 'note' && <div className="my-4 px-5 py-4 overflow-hidden rounded-xl border border-sky-500/20 bg-sky-50/50 dark:border-sky-500/30 dark:bg-sky-500/10">
        <div className="flex items-start space-x-3">
          {icon && <div className="mt-0.5 w-4">
              <svg width="14" height="14" viewBox="0 0 14 14" fill="currentColor" xmlns="http://www.w3.org/2000/svg" className="w-4 h-4 text-sky-500" aria-label="CustomNote">
                <path fill-rule="evenodd" clip-rule="evenodd" d="M7 1.3C10.14 1.3 12.7 3.86 12.7 7C12.7 10.14 10.14 12.7 7 12.7C5.48908 12.6974 4.0408 12.096 2.97241 11.0276C1.90403 9.9592 1.30264 8.51092 1.3 7C1.3 3.86 3.86 1.3 7 1.3ZM7 0C3.14 0 0 3.14 0 7C0 10.86 3.14 14 7 14C10.86 14 14 10.86 14 7C14 3.14 10.86 0 7 0ZM8 3H6V8H8V3ZM8 9H6V11H8V9Z"></path>
              </svg>
            </div>}
          <div className="flex-1 text-sm prose text-wrap text-sky-900 dark:text-sky-200">
            {children}
          </div>
        </div>
      </div>}
    {variant === 'info' && <div className="my-4 px-5 py-4 overflow-hidden rounded-xl border border-zinc-500/20 bg-zinc-50/50 dark:border-zinc-500/30 dark:bg-zinc-500/10">
        <div className="flex items-start space-x-3">
          {icon && <div className="mt-0.5 w-4">
              <svg viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" className="flex-none w-5 h-5 text-zinc-400 dark:text-zinc-300" aria-label="CustomInfo">
                <path d="M8 0C3.58125 0 0 3.58125 0 8C0 12.4187 3.58125 16 8 16C12.4187 16 16 12.4187 16 8C16 3.58125 12.4187 0 8 0ZM8 14.5C4.41563 14.5 1.5 11.5841 1.5 8C1.5 4.41594 4.41563 1.5 8 1.5C11.5844 1.5 14.5 4.41594 14.5 8C14.5 11.5841 11.5844 14.5 8 14.5ZM9.25 10.5H8.75V7.75C8.75 7.3375 8.41563 7 8 7H7C6.5875 7 6.25 7.3375 6.25 7.75C6.25 8.1625 6.5875 8.5 7 8.5H7.25V10.5H6.75C6.3375 10.5 6 10.8375 6 11.25C6 11.6625 6.3375 12 6.75 12H9.25C9.66406 12 10 11.6641 10 11.25C10 10.8359 9.66563 10.5 9.25 10.5ZM8 6C8.55219 6 9 5.55219 9 5C9 4.44781 8.55219 4 8 4C7.44781 4 7 4.44687 7 5C7 5.55313 7.44687 6 8 6Z"></path>
              </svg>
            </div>}
          <div className="flex-1 text-sm prose text-wrap text-zinc-900 dark:text-zinc-200">
            {children}
          </div>
        </div>
      </div>}
    {variant === 'warning' && <div className="my-4 px-5 py-4 overflow-hidden rounded-xl border border-amber-500/20 bg-amber-50/50 dark:border-amber-500/30 dark:bg-amber-500/10">
        <div className="flex items-start space-x-3">
          {icon && <div className="mt-0.5 w-4">
              <svg className="flex-none w-5 h-5 text-amber-400 dark:text-amber-300/80" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2" aria-label="CustomWarning">
                <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"></path>
              </svg>
            </div>}
          <div className="flex-1 text-sm prose text-wrap text-amber-900 dark:text-amber-200">
            {children}
          </div>
        </div>
      </div>}
    {variant === 'check' && <div className="my-4 px-5 py-4 overflow-hidden rounded-xl border border-emerald-500/20 bg-emerald-50/50 dark:border-emerald-500/30 dark:bg-emerald-500/10">
        <div className="flex items-start space-x-3">
          {icon && <div className="mt-0.5 w-4">
              <svg className="text-green-600 dark:text-green-400/80 w-3.5 h-auto" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" aria-label="CustomCheck">
                <path d="M438.6 105.4C451.1 117.9 451.1 138.1 438.6 150.6L182.6 406.6C170.1 419.1 149.9 419.1 137.4 406.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4C21.87 220.9 42.13 220.9 54.63 233.4L159.1 338.7L393.4 105.4C405.9 92.88 426.1 92.88 438.6 105.4H438.6z"></path>
              </svg>
            </div>}
          <div className="flex-1 text-sm prose text-wrap text-emerald-900 dark:text-emerald-200">
            {children}
          </div>
        </div>
      </div>}
  </>;

## Overview

Drivly's Credit Application API is designed for the submission of credit applications for vehicle
purchases and loan payoffs.

It interfaces with financial lenders for processing these applications, ensuring a streamlined approach for credit checks, approvals, and financing options.

***

## Making a 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

Required fields must be provided with every application:

| Field              | Description                                                        | Format Example                                         |
| ------------------ | ------------------------------------------------------------------ | ------------------------------------------------------ |
| `primaryApplicant` | The applicant’s information                                        | `{ "name": "John Doe", "ssn": "123-45-6789" }`         |
| `applicationType`  | The type of application (e.g., PURCHASE, REFINANCE, LEASE\_BUYOUT) | "PURCHASE"                                             |
| `vehicle`          | The vehicle information being financed                             | `{ "make": "Toyota", "model": "Camry", "year": 2020 }` |
| `hasCoApplicant`   | Whether the application includes a co-applicant                    | true                                                   |
| `environment`      | The environment to use                                             | "Production"                                           |
| `financeAmount`    | The amount to finance                                              | 35000                                                  |
| `sendTo`           | The system to send the application to                              | "RouteOne"                                             |
| `preApproval`      | The pre-approval ID                                                | "PA123456"                                             |

### Optional Fields

Optional fields can be included based on specific requirements:

| Field         | Description                    | Format Example                                       |
| ------------- | ------------------------------ | ---------------------------------------------------- |
| `coApplicant` | The co-applicant’s information | `{ "name": "Jane Doe", "ssn": "987-65-4321" }`       |
| `trades`      | Trade-in vehicle information   | `{ "make": "Ford", "model": "Focus", "year": 2018 }` |

***

### 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).

<Accordion title="Example Request" defaultOpen="true">
  ```json theme={null}
  {
    "title": "Credit Application",
    "sendTo": "RouteOne",
    "state": "DRAFT",
    "environment": "Production",
    "preApproval": "123456789",
    "applicationType": "REFINANCE",
    "financeAmount": 65000,
    "downPayment": 5000,
    "primaryApplicant": {
      "firstName": "Danny",
      "lastName": "Turner",
      "birthDate": "06/24/1995",
      "emailAddress": "dannyt@gmail.com",
      "cellPhone": "561-775-1234",
      "ssn": "123-45-6789",
      "currentResidence": {
        "monthlyPaymentAmount": 3000,
        "monthsAtResidence": 36,
        "ownershipStatus": "OWN",
        "address": {
          "lineOne": "123 Main St",
          "lineTwo": "Apt 2",
          "city": "Miami",
          "state": "FL",
          "postalCode": "33101"
        }
      },
      "currentEmployment": {
        "yearlyIncomeAmount": 95000,
        "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": 1000,
      "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
      }
    }
  }
  ```
</Accordion>

### Fetch API Example

We will assume that the `createCreditApplication` function and the `Promise` is called with the required data fields.

<CodeGroup>
  ```javascript Async/Await theme={null}
  export async function createCreditApp(data) {
    try {
      const res = await fetch('https://commerce.driv.ly/api/creditApplications', {
        method: 'POST',
        headers: {
          Authorization: '<api-key>',
          'Content-Type': 'application/json',
        },
        body: JSON.stringify(data),
      })

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

  ```javascript Promises theme={null}
  fetch('https://commerce.driv.ly/api/creditApplications', {
    method: 'POST',
    headers: {
      Authorization: '<api-key>',
      'Content-Type': 'application/json',
    },
    body: JSON.stringify(data),
  })
    .then((res) => res.json())
    .then((data) => console.log(data))
    .catch((error) => console.error('Error:', error))
  ```
</CodeGroup>

***

## 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.

<Accordion title="Example Response" defaultOpen="true">
  ```json theme={null}
  {
    "id": "65f4c43aa86cc23f4013cfc8",
    "sendTo": "RouteOne",
    "state": "DRAFT",
    "environment": "Production",
    "requiredFields": [],
    "preApproval": {
      "id": "12034631b86bb45g202071a1",
      "title": "Danny Turner (dannyt@gmail.com)",
      "firstName": "Danny",
      "middleInitial": "",
      "lastName": "Turner",
      "suffix": null,
      "address": "123 Main St Apt 2",
      "city": "Miami",
      "state": "FL",
      "zip": "33101",
      "phone": "+15617751234",
      "email": "dannyt@gmail.com",
      "sessionId": "",
      "createdAt": "2024-03-26T22:04:01.175Z",
      "updatedAt": "2024-03-26T22:04:01.175Z",
      "status": "Processed",
      "AppId": 154422063,
      "customer": {
        "id": "12ab3d1241567b12d2ga12c1",
        "leads": ["65ea2c8130784a03c8fd39c9"],
        "address": "65ea2c8130784a03c8fd39c9",
        "email": "dannyt@gmail.com",
        "phone": "+15617551234",
        "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)",
      "income": "$12,000" // monthly income
    },
    "primaryApplicant": {
      "firstName": "Danny",
      "lastName": "Turner",
      "birthDate": "06/24/1995",
      "emailAddress": "dannyt@gmail.com",
      "cellPhone": "561-775-1234",
      "ssn": "123-45-6789",
      "currentResidence": {
        "monthlyPaymentAmount": 3000,
        "monthsAtResidence": 36,
        "ownershipStatus": "OWN",
        "address": {
          "lineOne": "123 Main St",
          "lineTwo": "Apt 2",
          "city": "Miami",
          "state": "FL",
          "postalCode": "33101"
        }
      },
      "currentEmployment": {
        "yearlyIncomeAmount": 95000,
        "monthsAtEmployer": 36,
        "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": 1000,
      "additionalIncomeFrequency": "WEEKLY",
      "additionalIncomeSource": "Part-time job",
      "terms": {
        "agreeToTerms": true,
        "agreeIP": "150.80.15.220",
        "agreeUserAgent": "Mozilla/5.0"
      }
    },
    "coApplicant": {
      "currentResidence": { "address": {} },
      "currentEmployment": { "employmentAddress": {} },
      "previousResidence": { "address": {} },
      "previousEmployment": { "employmentAddress": {} },
      "terms": {}
    },
    "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
      }
    },
    "createdAt": "2024-03-15T21:58:48.032Z",
    "updatedAt": "2024-03-15T21:58:48.032Z",
    "logs": [],
    "missingFields": {},
    "passesChecklist": true,
    "rates": [],
    "title": "[DRAFT] Danny Turner - $65,000.00",
    "applicationType": "REFINANCE",
    "meta": {
      "refinanceType": "REMOVE SOMEONE",
      "term": "60 months",
      "sellTrade": "No"
    },
    "downPayment": 5000,
    "financeAmount": 65000,
    "trades": [],
    "hasCoApplicant": false
  }
  ```
</Accordion>

***

## Form Integration (UI)

We have RouteOne Certified Form Integration available. This allows you to submit credit applications directly to RouteOne for processing.

To use this feature:

* Use `https://credit.driv.ly?tenant={RouteOneDealerId}` with the RouteOne Dealer ID.
* Host the form on custom domain with the RouteOne API integration.

The form fields can be pre-filled using query parameters, making it easier to complete the application.

`https://credit.driv.ly/?[fieldName]={value}&[fieldName]={value}`

### Form Fields (UI)

<Accordion title="Primary Applicant (Required)">
  <ParamField query="firstName" type="string" required>
    The first name of the primary applicant (e.g., `John`)

    Min: 2 characters, Max: 30 characters
  </ParamField>

  <ParamField query="middleName" type="string">
    The middle initial of the primary applicant (e.g., `D`)

    Max: 3 characters
  </ParamField>

  <ParamField query="lastName" type="string" required>
    The last name of the primary applicant (e.g., `Smith`)

    Min: 2 characters, Max: 30 characters
  </ParamField>

  <ParamField query="phone" type="string" required>
    The phone number of the primary applicant (e.g., `5615551212`)
  </ParamField>

  <ParamField query="phoneType" type="enum<string>" required>
    The type of phone number (e.g., `MOBILE`, `HOME`, `WORK`)

    options: `MOBILE`, `HOME`, `WORK`
  </ParamField>

  <ParamField query="email" type="string" required>
    The email address of the primary applicant (e.g., `john@gmail.com`)
  </ParamField>

  <ParamField query="dateOfBirth" type="string" required>
    The date of birth of the primary applicant (e.g., `01/01/1990`)

    format: `MM/DD/YYYY`
  </ParamField>

  <ParamField query="ssn" type="string" required>
    The SSN of the primary applicant (e.g., `123456789`)

    Min: 9 characters
  </ParamField>

  <ParamField query="residenceTypeCode" type="enum<string>" required>
    The residence type of the primary applicant (e.g., `OWN=1`, `Rent=3`, `Live With Others=4`)

    options: `1`, `3`, `4`
  </ParamField>

  <ParamField query="addressLine1" type="string" required>
    The address line 1 of the primary applicant (e.g., `123 Main St`)

    Max: 200 characters
  </ParamField>

  <ParamField query="addressLine2" type="string">
    The address line 2 of the primary applicant (e.g., `Apt 2`)

    Max: 200 characters
  </ParamField>

  <ParamField query="city" type="string" required>
    The city of the primary applicant (e.g., `Miami`)

    Max: 30 characters
  </ParamField>

  <ParamField query="state" type="string" required>
    The state of the primary applicant (e.g., `FL`)

    Max: 2 characters
  </ParamField>

  <ParamField query="zipCode" type="string" required>
    The ZIP code of the primary applicant (e.g., `33101`)

    Max: 5 characters
  </ParamField>

  <ParamField query="addressYears" type="enum<string>" required>
    The number of years at the current address

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`
  </ParamField>

  <ParamField query="addressMonths" type="enum<string>">
    The number of months at the current address

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`
  </ParamField>

  <ParamField query="rentMortgagePaymentAmount" type="string" required>
    The monthly rent/mortgage payment of the primary applicant (e.g., `1500`)
  </ParamField>

  <ParamField query="prevAddressLine1" type="string">
    The address line 1 of the primary applicant (e.g., `123 Main St`)

    Required if `addressYears` is less than 2 years

    Max: 200 characters
  </ParamField>

  <ParamField query="prevAddressLine2" type="string">
    The address line 2 of the primary applicant (e.g., `Apt 2`)

    Required if `addressYears` is less than 2 years

    Max: 200 characters
  </ParamField>

  <ParamField query="prevCity" type="string">
    The city of the primary applicant (e.g., `Miami`)

    Required if `addressYears` is less than 2 years

    Max: 30 characters
  </ParamField>

  <ParamField query="prevState" type="string">
    The state of the primary applicant (e.g., `FL`)

    Required if `addressYears` is less than 2 years

    Max: 2 characters
  </ParamField>

  <ParamField query="prevZipCode" type="string">
    The ZIP code of the primary applicant (e.g., `33101`)

    Required if `addressYears` is less than 2 years

    Max: 5 characters
  </ParamField>

  <ParamField query="prevAddressYears" type="enum<string>">
    The number of years at the current address

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`

    Required if `addressYears` is less than 2 years
  </ParamField>

  <ParamField query="prevAddressMonths" type="enum<string>">
    The number of months at the current address

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`
  </ParamField>

  <ParamField query="prevRentMortgagePaymentAmount" type="string">
    The monthly rent/mortgage payment of the primary applicant (e.g., `1500`)

    Required if `addressYears` is less than 2 years
  </ParamField>

  <ParamField query="licenseNumber" type="string" required>
    The driver's license number of the primary applicant (e.g., `123456789`)
  </ParamField>

  <ParamField query="licenseState" type="string" required>
    The driver's license state of the primary applicant (e.g., `FL`)

    Max: 2 characters
  </ParamField>

  <ParamField query="employmentStatusCode" type="enum<string>" required>
    The employment status of the primary applicant (e.g., `Full Time`, `Military`, `Contract`)

    options: `Full Time`, `Military`, `Contract`, `Part Time`, `Temporary`, `Seasonal`, `Self-Employed`, `Retired`, `Not Applicable`
  </ParamField>

  <ParamField query="employerName" type="string" required>
    The employer name of the primary applicant (e.g., `ABC Corp`)

    Max: 40 characters
  </ParamField>

  <ParamField query="employerPhone" type="string" required>
    The employer phone number of the primary applicant (e.g., `5615551212`)
  </ParamField>

  <ParamField query="employmentTitle" type="string" required>
    The job title of the primary applicant (e.g., `Manager`)

    Max: 20 characters
  </ParamField>

  <ParamField query="timeOnJobYears" type="enum<string>" required>
    The number of years at the current job

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`
  </ParamField>

  <ParamField query="timeOnJobMonths" type="enum<string>">
    The number of months at the current job

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`
  </ParamField>

  <ParamField query="incomeAmount" type="string" required>
    The monthly income of the primary applicant (e.g., `5000`)
  </ParamField>

  <ParamField query="prevEmployerName" type="string">
    The employer name of the primary applicant (e.g., `ABC Corp`)

    Required if `timeOnJobYears` is less than 2 years

    Max: 40 characters
  </ParamField>

  <ParamField query="prevEmployerPhone" type="string">
    The employer phone number of the primary applicant (e.g., `5615551212`)

    Required if `timeOnJobYears` is less than 2 years
  </ParamField>

  <ParamField query="prevEmploymentTitle" type="string">
    The job title of the primary applicant (e.g., `Manager`)

    Required if `timeOnJobYears` is less than 2 years

    Max: 20 characters
  </ParamField>

  <ParamField query="prevTimeOnJobYears" type="enum<string>">
    The number of years at the current job

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`

    Required if `timeOnJobYears` is less than 2 years
  </ParamField>

  <ParamField query="prevTimeOnJobMonths" type="enum<string>">
    The number of months at the current job

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`
  </ParamField>

  <ParamField query="prevIncomeAmount" type="string">
    The monthly income of the primary applicant (e.g., `5000`)

    Required if `timeOnJobYears` is less than 2 years
  </ParamField>

  <ParamField query="otherIncomeSourceCode" type="enum<string>">
    The other income source of the primary applicant (e.g., `OTHCSTM`)

    options: `OTHCSTM`, `NO`
  </ParamField>

  <ParamField query="otherIncomeAmount" type="string">
    The other income monthly amount of the primary applicant (e.g., `1000`)
  </ParamField>

  <ParamField query="otherIncomeSourceDescription" type="string">
    The other income source description of the primary applicant (e.g., `Part-time job`)

    Max: 30 characters
  </ParamField>
</Accordion>

<Accordion title="Co-Applicant Applicant">
  <ParamField query="joint" type="boolean">
    Joint application indicator
  </ParamField>

  <ParamField query="co_firstName" type="string" required>
    The first name of the primary applicant (e.g., `John`)

    Min: 2 characters, Max: 30 characters
  </ParamField>

  <ParamField query="co_middleName" type="string">
    The middle initial of the primary applicant (e.g., `D`)

    Max: 3 characters
  </ParamField>

  <ParamField query="co_lastName" type="string" required>
    The last name of the primary applicant (e.g., `Smith`)

    Min: 2 characters, Max: 30 characters
  </ParamField>

  <ParamField query="co_phone" type="string" required>
    The phone number of the primary applicant (e.g., `5615551212`)
  </ParamField>

  <ParamField query="co_phoneType" type="enum<string>" required>
    The type of phone number (e.g., `MOBILE`, `HOME`, `WORK`)

    options: `MOBILE`, `HOME`, `WORK`
  </ParamField>

  <ParamField query="co_email" type="string" required>
    The email address of the primary applicant (e.g., `john@gmail.com`)
  </ParamField>

  <ParamField query="co_dateOfBirth" type="string" required>
    The date of birth of the primary applicant (e.g., `01/01/1990`)

    format: `MM/DD/YYYY`
  </ParamField>

  <ParamField query="co_ssn" type="string" required>
    The SSN of the primary applicant (e.g., `123456789`)

    Min: 9 characters
  </ParamField>

  <ParamField query="co_residenceTypeCode" type="enum<string>" required>
    The residence type of the primary applicant (e.g., `OWN=1`, `Rent=3`, `Live With Others=4`)

    options: `1`, `3`, `4`
  </ParamField>

  <ParamField query="co_addressLine1" type="string" required>
    The address line 1 of the primary applicant (e.g., `123 Main St`)

    Max: 200 characters
  </ParamField>

  <ParamField query="co_addressLine2" type="string">
    The address line 2 of the primary applicant (e.g., `Apt 2`)

    Max: 200 characters
  </ParamField>

  <ParamField query="co_city" type="string" required>
    The city of the primary applicant (e.g., `Miami`)

    Max: 30 characters
  </ParamField>

  <ParamField query="co_state" type="string" required>
    The state of the primary applicant (e.g., `FL`)

    Max: 2 characters
  </ParamField>

  <ParamField query="co_zipCode" type="string" required>
    The ZIP code of the primary applicant (e.g., `33101`)

    Max: 5 characters
  </ParamField>

  <ParamField query="co_addressYears" type="enum<string>" required>
    The number of years at the current address

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`
  </ParamField>

  <ParamField query="co_addressMonths" type="enum<string>">
    The number of months at the current address

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`
  </ParamField>

  <ParamField query="co_rentMortgagePaymentAmount" type="string" required>
    The monthly rent/mortgage payment of the primary applicant (e.g., `1500`)
  </ParamField>

  <ParamField query="co_prevAddressLine1" type="string">
    The address line 1 of the primary applicant (e.g., `123 Main St`)

    Required if `co_addressYears` is less than 2 years

    Max: 200 characters
  </ParamField>

  <ParamField query="co_prevAddressLine2" type="string">
    The address line 2 of the primary applicant (e.g., `Apt 2`)

    Required if `co_addressYears` is less than 2 years

    Max: 200 characters
  </ParamField>

  <ParamField query="co_prevCity" type="string">
    The city of the primary applicant (e.g., `Miami`)

    Required if `co_addressYears` is less than 2 years

    Max: 30 characters
  </ParamField>

  <ParamField query="co_prevState" type="string">
    The state of the primary applicant (e.g., `FL`)

    Required if `co_addressYears` is less than 2 years

    Max: 2 characters
  </ParamField>

  <ParamField query="co_prevZipCode" type="string">
    The ZIP code of the primary applicant (e.g., `33101`)

    Required if `co_addressYears` is less than 2 years

    Max: 5 characters
  </ParamField>

  <ParamField query="co_prevAddressYears" type="enum<string>">
    The number of years at the current address

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`

    Required if `co_addressYears` is less than 2 years
  </ParamField>

  <ParamField query="co_prevAddressMonths" type="enum<string>">
    The number of months at the current address

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`
  </ParamField>

  <ParamField query="co_prevRentMortgagePaymentAmount" type="string">
    The monthly rent/mortgage payment of the primary applicant (e.g., `1500`)

    Required if `co_addressYears` is less than 2 years
  </ParamField>

  <ParamField query="co_licenseNumber" type="string" required>
    The driver's license number of the primary applicant (e.g., `123456789`)
  </ParamField>

  <ParamField query="co_licenseState" type="string" required>
    The driver's license state of the primary applicant (e.g., `FL`)

    Max: 2 characters
  </ParamField>

  <ParamField query="co_employmentStatusCode" type="enum<string>" required>
    The employment status of the primary applicant (e.g., `Full Time`, `Military`, `Contract`)

    options: `Full Time`, `Military`, `Contract`, `Part Time`, `Temporary`, `Seasonal`, `Self-Employed`, `Retired`, `Not Applicable`
  </ParamField>

  <ParamField query="co_employerName" type="string" required>
    The employer name of the primary applicant (e.g., `ABC Corp`)

    Max: 40 characters
  </ParamField>

  <ParamField query="co_employerPhone" type="string" required>
    The employer phone number of the primary applicant (e.g., `5615551212`)
  </ParamField>

  <ParamField query="co_employmentTitle" type="string" required>
    The job title of the primary applicant (e.g., `Manager`)

    Max: 20 characters
  </ParamField>

  <ParamField query="co_timeOnJobYears" type="enum<string>" required>
    The number of years at the current job

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`
  </ParamField>

  <ParamField query="co_timeOnJobMonths" type="enum<string>">
    The number of months at the current job

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`
  </ParamField>

  <ParamField query="co_incomeAmount" type="string" required>
    The monthly income of the primary applicant (e.g., `5000`)
  </ParamField>

  <ParamField query="co_prevEmployerName" type="string">
    The employer name of the primary applicant (e.g., `ABC Corp`)

    Required if `co_timeOnJobYears` is less than 2 years

    Max: 40 characters
  </ParamField>

  <ParamField query="co_prevEmployerPhone" type="string">
    The employer phone number of the primary applicant (e.g., `5615551212`)

    Required if `co_timeOnJobYears` is less than 2 years
  </ParamField>

  <ParamField query="co_prevEmploymentTitle" type="string">
    The job title of the primary applicant (e.g., `Manager`)

    Required if `co_timeOnJobYears` is less than 2 years

    Max: 20 characters
  </ParamField>

  <ParamField query="co_prevTimeOnJobYears" type="enum<string>">
    The number of years at the current job

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`

    Required if `co_timeOnJobYears` is less than 2 years
  </ParamField>

  <ParamField query="co_prevTimeOnJobMonths" type="enum<string>">
    The number of months at the current job

    options: `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`
  </ParamField>

  <ParamField query="co_prevIncomeAmount" type="string">
    The monthly income of the primary applicant (e.g., `5000`)

    Required if `co_timeOnJobYears` is less than 2 years
  </ParamField>

  <ParamField query="co_otherIncomeSourceCode" type="enum<string>">
    The other income source of the primary applicant (e.g., `OTHCSTM`)

    options: `OTHCSTM`, `NO`
  </ParamField>

  <ParamField query="co_otherIncomeAmount" type="string">
    The other income monthly amount of the primary applicant (e.g., `1000`)
  </ParamField>

  <ParamField query="co_otherIncomeSourceDescription" type="string">
    The other income source description of the primary applicant (e.g., `Part-time job`)

    Max: 30 characters
  </ParamField>
</Accordion>

<Accordion title="Vehicle (Required)">
  <ParamField query="vehicleVin" type="string" required>
    The vehicle's VIN (e.g., `5LM5J6WC1RGL07567`)

    Min: 17 characters
  </ParamField>

  <ParamField query="vehicleYear" type="string" required>
    The vehicle's year (e.g., `2024`)

    Min: 4 characters
  </ParamField>

  <ParamField query="vehicleMake" type="string" required>
    The vehicle's make (e.g., `Lincoln`)

    Min: 1 characters
  </ParamField>

  <ParamField query="vehicleModel" type="string" required>
    The vehicle's model (e.g., `Aviator`)

    Min: 1 characters
  </ParamField>

  <ParamField query="vehiclePrice" type="string" required>
    The vehicle's price (e.g., `55985`)

    Min: 1 characters
  </ParamField>

  <ParamField query="vehicleMileage" type="string" required>
    The vehicle's mileage (e.g., `7`)

    Min: 1 characters
  </ParamField>

  <ParamField query="vehicleCashDown" type="string">
    The cash down payment (e.g., `5000`)
  </ParamField>
</Accordion>

<Accordion title="Trade-In Vehicle">
  <ParamField query="tradeInVehicleIndicator" type="string" required>
    Trade-in vehicle indicator (e.g., `Y`)
  </ParamField>

  <ParamField query="tradeInVin" type="string">
    Trade-in vehicle VIN (e.g., `W1NKM4HB4RF139674`)

    Min: 17 characters
  </ParamField>

  <ParamField query="tradeInYear" type="string">
    Trade-in vehicle year (e.g., `2024`)

    Min: 4 characters
  </ParamField>

  <ParamField query="tradeInMake" type="string">
    Trade-in vehicle make (e.g., `Mercedes-Benz`)

    Min: 1 characters
  </ParamField>

  <ParamField query="tradeInModel" type="string">
    Trade-in vehicle model (e.g., `GLC 300`)

    Min: 1 characters
  </ParamField>

  <ParamField query="tradeInLienIndicator" type="string">
    Trade-in vehicle lien indicator (e.g., `Y`)
  </ParamField>
</Accordion>

<CustomCallout variant="info" icon>
  Requires a dealer account with RouteOne and company logo. Please [contact
  sales](mailto:sales@driv.ly) for more information.
</CustomCallout>

***

## Next Steps

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

<CardGroup cols={2}>
  <Card title="Credit Application Guide" icon="wpforms" href="/services/guides/credit-application">
    Getting Started with Credit Apps
  </Card>

  <Card icon="book" href="/services/reference/credit-app" title="Credit Application API Reference">
    Explore the Credit Application API
  </Card>
</CardGroup>
