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

# F&I Products

> Get started with Drivly F&I Products with our step-by-step guide.

export const StoryBoard = ({children}) => <div className="p-6 bg-gray-100/50 dark:bg-gray-800/25 rounded">
    <p className="text-base py-2 leading-6">{children}</p>
  </div>;

export const HeroContent = ({children, withGrid}) => <div>
    <div className="not-prose relative bg-gray-50/50 rounded-xl overflow-hidden dark:bg-gray-800/25">
      {withGrid && <div className="absolute grid content-center inset-0 bg-grid-neutral-200/20 [mask-image:linear-gradient(0deg,#fff,rgba(255,255,255,0.6))] dark:bg-grid-white/5 dark:[mask-image:linear-gradient(0deg,rgba(255,255,255,0.1),rgba(255,255,255,0.5))]" style={{
  backgroundPosition: '10px 10px',
  color: '#070712'
}}></div>}
      <div className="relative rounded-xl overflow-hidden flex justify-center">{children}</div>
      <div className="absolute inset-0 pointer-events-none border border-black/5 rounded-xl dark:border-white/5"></div>
    </div>
  </div>;

<HeroContent>
  <img class="block" src="https://mintcdn.com/drivly/lS-LOhC8keZU5zBZ/images/services/VscCards.png?fit=max&auto=format&n=lS-LOhC8keZU5zBZ&q=85&s=f1fbe7d034a6455b17c260a60be45300" alt="Hero Dark" width="3456" height="1600" data-path="images/services/VscCards.png" />
</HeroContent>

## Prerequisites

Before diving into the integration process, ensure you have the following:

1. [Sign up](https://drivly.typeform.com/applyforaccess) for a Drivly account
2. Create a [DRIVLY\_API\_KEY](/developers/auth)
3. Have a basic understanding of REST APIs
4. A secure environment for handling sensitive data

<Warning>Always perform F\&I Prodcut operations server-side to secure API keys.</Warning>

***

## Overview

The F\&I API offers endpoints to retrieve vehicle-specific service contract details and update or customize packages according to customer needs. By integrating this API into your platform, you can provide customers with a seamless experience to purchase F\&I products directly.

Let's follow the exmaple scenario below:

<StoryBoard>
  Alex works for a large automotive sales platform, AutoHub. AutoHub wants to integrate the Vehicle
  Service Contract (VSC) API into their online services, allowing customers purchase various F\&I
  products without the need for an F\&I manager.
</StoryBoard>

To complete this scenario, you will need to:

1. Verify the API endpoint
2. Implement the feature
3. Allow customers to place an order
4. Handle errors gracefully
5. Add additional features

***

## Walkthrough

<Steps>
  <Step title="Verify API endpoint">
    Verify the API's ability to retrieve all VSC options for a specific VIN.

    ```json theme={null}
    {
      "endpoint": "/packages/1C4HJXEN5MW592818",
      "method": "GET",
      "headers": {
        "Authorization": "Bearer {DRIVLY_API_KEY}"
      }
    }
    ```

    Alex uses this endpoint to fetch all package options for the VIN `1C4HJXEN5MW592818` and successfully retrieves the data.
  </Step>

  <Step title="Implementation">
    With the data structure understood, Alex begins implementing the feature on AutoHub’s website. The example response from the API provides a comprehensive view of the VSC options:

    ```json theme={null}
    {
      "status": 200,
      "data": {
        "vin": "1C4HJXEN5MW592818",
        "make": "Jeep",
        "model": "Wrangler Unlimited",
        "year": 2021,
        "packages": {
          "Good": {
            "price": 350,
            "coverageDetails": ["Engine", "Transmission", "Drive Axle"],
            "termMonths": 36,
            "deductible": 100
          },
          "Better": {
            "price": 550,
            "coverageDetails": ["Engine", "Transmission", "Drive Axle", "Electrical", "Air Conditioning"],
            "termMonths": 48,
            "deductible": 50
          },
          "Best": {
            "price": 750,
            "coverageDetails": ["Engine", "Transmission", "Drive Axle", "Electrical", "Air Conditioning", "Suspension", "Brakes", "High-Tech Components"],
            "termMonths": 60,
            "deductible": 0
          }
        }
      }
    }
    ```
  </Step>

  <Step title="Placing an Order">
    After customers choose their desired VSC package, Alex needs to allow them to complete their purchase through the API. This process involves sending the selected package details along with customer and payment information to the VSC provider's system.

    ```json Order Request theme={null}
    {
      "endpoint": "/order",
      "method": "POST",
      "headers": {
        "Authorization": "Bearer {API_KEY}",
        "Content-Type": "application/json"
      },
      "body": {
        "vin": "1C4HJXEN5MW592818",
        "customerDetails": {
          "firstName": "Jane",
          "lastName": "Doe",
          "email": "jane.doe@email.com",
          "phone": "555-1234"
        },
        "packageType": "Best",
        "packageCost": 750,
        "paymentInfo": {
          "creditCardNumber": "1234567890123456",
          "expirationDate": "12/24",
          "cvv": "123"
        }
      }
    }
    ```
  </Step>

  <Step title="Error Handling">
    Alex implements error handling to manage situations where the VIN might not be found or the API key is missing. They simulate an error response:

    ```json theme={null}
    {
      "status": 404,
      "error": {
        "message": "The requested VIN '1C4HJXEN5MW592818' was not found in our database.",
        "code": "VIN_NOT_FOUND",
        "suggestion": "Please verify the VIN and try again."
      }
    }
    ```
  </Step>

  <Step title="Adding Additional Features">
    Alex wants to ensure that customers can update their VSC packages if they want additional coverage after initial viewing. They add functionality for updating package details:

    ```json theme={null}
    {
      "endpoint": "/packages/1C4HJXEN5MW592818/Best",
      "method": "PUT",
      "headers": {
        "Authorization": "Bearer {API_KEY}",
        "Content-Type": "application/json"
      },
      "body": {
        "newPrice": 800,
        "newTerms": {
          "termMonths": 72,
          "coverageDetails": ["Extended Engine Coverage", "Full Electrical", "GPS Navigation"]
        }
      }
    }
    ```
  </Step>
</Steps>

***

## FAQs

<Accordion title="Required Fields" defaultOpen="true">
  | Fields                                  | Options                                          | Required |
  | --------------------------------------- | ------------------------------------------------ | :------: |
  | VIN                                     | `1C4HJXEN5MW592818`                              |   True   |
  | Make                                    | `Jeep`                                           |   True   |
  | Model                                   | `Wrangler Unlimited`                             |   True   |
  | Year                                    | `2021`                                           |   True   |
  | Term (Months)                           | `12`, `24`, `36`, `48`, `60`, `72`, `84`         |   True   |
  | Deductible (USD)                        | `$0`, `$50`, `$100`                              |   True   |
  | Planned length of ownership (Years)     | `2`, `3`, `4`, `5`, `6`, `+7`                    |   True   |
  | Estimated miles driven per year (Miles) | `5,000`, `10,000`, `15,000`, `20,000`, `+25,000` |   True   |
</Accordion>

<Accordion title="What is a vehicle service contract?">
  A vehicle service contract is an optional agreement between you and the service contract provider,
  meant to cover the expenses of specific maintenance tasks and repairs for your vehicle. It
  typically goes beyond the manufacturer's warranty and provides additional protection, giving you
  peace of mind even after your warranty has expired.
</Accordion>

<Accordion title="How is a vehicle service contract different from a warranty?">
  A warranty is a guarantee provided by the manufacturer and is usually included in the initial
  purchase price of the vehicle. It covers repairs and defects for a specific period. A vehicle
  service contract, on the other hand, can be purchased separately and kicks in when your warranty
  expires. Unlike a warranty, it typically offers customizable coverage levels.
</Accordion>

<Accordion title="What does a vehicle service contract typically cover?">
  The coverage of a vehicle service contract varies depending on the level of protection you choose.
  Commonly covered components include engine, transmission, electrical systems, and air
  conditioning. However, some contracts offer more comprehensive coverage that may include luxury
  features and advanced technology. It is essential to read the contract thoroughly to understand
  what is included and excluded.
</Accordion>

<Accordion title="How much do F&I products cost, and is it worth it?">
  The cost of a VSC depends on factors such as the make and model of your car, its age and mileage,
  and the type of coverage you choose. The contract may be worth it if it protects you from
  expensive repairs after your warranty has expired. It is crucial to weigh the contract cost
  against the potential repair expenses and your peace of mind when deciding whether it's a good
  investment.
</Accordion>

<Accordion title="Can I cancel my vehicle service contract or transfer it to another owner?">
  Cancellation and transfer policies differ among service contract providers. Many contracts allow
  cancellations, often with a pro-rated refund, subject to specific terms and conditions.
  Additionally, most contracts are transferable to a new owner when you sell your vehicle, which
  could make your car more attractive to buyers. Check your specific contract for the applicable
  terms and restrictions.
</Accordion>

<Accordion title="How much do F&I products cost, and is it worth it?">
  The cost of a VSC depends on factors such as the make and model of your car, its age and mileage,
  and the type of coverage you choose. The contract may be worth it if it protects you from
  expensive repairs after your warranty has expired.
</Accordion>

<Accordion title="Is my vehicle eligible for a service contract?">
  Eligibility criteria for service contracts vary among providers. Generally, factors such as make,
  model, age, and mileage of your vehicle play a role.
</Accordion>

<Accordion title="What is the claim process for a vehicle service contract?">
  It's essential to understand this process, including where you can take your vehicle for repairs,
  whether pre-authorization is necessary, and the requirements for submitting a claim. Keep your
  service records well-maintained, as these might be necessary for claim validation.
</Accordion>

<Accordion title="Are there deductibles or out-of-pocket expenses in a vehicle service contract?">
  Depending on the provider, a vehicle service contract may require you to pay a deductible for each
  repair or service visit. Deductible amounts and out-of-pocket expenses can vary, so it's crucial
  to understand these costs before purchasing a contract.
</Accordion>

<Accordion title="Is a vehicle service contract available for electric vehicles (EVs) and hybrid vehicles?">
  Most service contract providers offer plans tailored for electric and hybrid vehicles. These
  contracts often cover electric drivetrain components, charging systems, batteries, and other
  unique features.
</Accordion>
