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

# Proof of Insurance Data

> Get proof of active insurance policy for a vehicle by VIN.

<Frame>
  <img src="https://mintcdn.com/drivly/26Ex-nQxnySgQw-c/images/data/Poi.png?fit=max&auto=format&n=26Ex-nQxnySgQw-c&q=85&s=d03c8e30cb00b4765baf8b06ba165897" width="3456" height="1600" data-path="images/data/Poi.png" />
</Frame>

## Overview

Provides proof of insurance data for customers. The data includes information about the customer's active insurance policy, insurance provider, policy number, and other related information. The APIs are designed to be easy to use and integrate with other systems.

| Capabilities                                             | Description                                                       |
| -------------------------------------------------------- | ----------------------------------------------------------------- |
| [Proof of Insurance](#get-proof-of-insurance)            | Retrieve proof of insurance for a vehicle by VIN.                 |
| [Insurance Account](#get-insurance-account-information)  | Get the insurance account information for a customer.             |
| [Insurance Policy](#get-linked-insurance-policy-details) | Get the linked insurance policy details for a customer.           |
| [Webhook Event](#recieve-a-webhook-event)                | Receive a webhook event when a customer verifies their insurance. |
| [White Labeled](#white-labeled)                          | Retrieve proof of insurance with your company's branding.         |

***

## Get Proof of Insurance

Users can retrieve proof of insurance by VIN.

Send the link [https://poi.vin/\{VIN}](https://poi.vin/\{VIN}) and replace `{VIN}` with the vehicle's VIN that the customer needs proof of insurance for.

After a few clicks, they will be prompted to connect their insurance account.

```bash theme={null}
GET https://poi.vin/{VIN}
```

***

## Get Insurance Account Information.

If a customer has gone through the initial step of verifying their insurance, you can retrieve their insurance account information.

```bash theme={null}
GET https://poi.vin/{VIN}/account/{customerId}
```

The JSON repsonse essentially contains the `customer`, `account` and the `policy` of that account.

### Customer

The `customer` object contains the following properties:

```json theme={null}
{
  "_id": "f12f2sa1f5e4r4t543t21gds2",
  "credentials": "crd__r341561r56f_aZJFRE",
  "accountId": "acc_f321sd56f1er65t41g333",
  "carrier": "geico",
  "email": null,
  "firstName": "JOHN",
  "lastName": "SMITH",
  "phone": null,
  "policyId": "pol_4561GT4G45145TG154",
  "searchedVin": {
    "insured": false,
    "vin": "1C4HJXEN5MW592818"
  },
  "status": "active",
  "updatedAt": "2023-05-15T18:01:39.975Z"
}
```

### Account

The `account` object contains the following properties:

```json theme={null}
{
  "id": "acc_f321sd56f1er65t41g333",
  "firstName": "JOHN",
  "lastName": "SMITH",
  "credentials": "crd__r341561r56f_aZJFRE",
  "carrier": "geico",
  "connection": {
    "status": "active",
    "updatedAt": "2023-05-15T18:01:39.975Z"
  },
  "createdAt": "2023-05-15T18:01:39.975Z",
  "modifiedAt": "2023-05-15T18:01:39.975Z",
  "refreshedAt": "2023-05-15T18:01:39.975Z",
  "policies": ["...policies"]
}
```

### Policy

The `policy` object contains the following properties:

<Accordion title="Policy Example" defaultOpen="true">
  ```json theme={null}
  {
    "id": "pol_4561GT4G45145TG154",
    "account": "acc_f321sd56f1er65t41g333",
    "type": "auto",
    "carrier": "geico",
    "policyNumber": "12345678 9514",
    "isActive": true,
    "effectiveDate": "2023-01-10T00:00:00.000Z",
    "expirationDate": "2023-07-10T00:00:00.000Z",
    "coverages": [
      {
        "limitPerPerson": 50000,
        "code": "BI",
        "label": "Bodily Injury",
        "limitPerAccident": 100000
      },
      {
        "limitPerPerson": 50000,
        "code": "UMBI",
        "label": "Uninsured Motorists Bodily Injury",
        "limitPerAccident": 100000
      },
      {
        "code": "PD",
        "label": "Property Damage",
        "limitPerAccident": 25000
      },
      {
        "code": "UMPD",
        "label": "Uninsured Motorists Property Damage",
        "limitPerAccident": 25000,
        "deductible": 200
      },
      {
        "property": "prp_hUSlbIgts8PneYfDeo6_Z",
        "code": "COMP",
        "label": "Comprehensive",
        "deductible": 1000
      },
      {
        "property": "prp_dSVD04Yb2Y3c9qiW_XtZa",
        "code": "COMP",
        "label": "Comprehensive",
        "deductible": 1000
      },
      {
        "property": "prp_tHpyE0S_u1SjfGg3FUhuj",
        "code": "COMP",
        "label": "Comprehensive",
        "deductible": 1000
      },
      {
        "property": "prp_nEThgQ41AOYhAUySWhjKV",
        "code": "COMP",
        "label": "Comprehensive",
        "deductible": 1000
      },
      {
        "property": "prp_hUSlbIgts8PneYfDeo6_Z",
        "code": "COLL",
        "label": "Collision",
        "deductible": 1000
      },
      {
        "property": "prp_dSVD04Yb2Y3c9qiW_XtZa",
        "code": "COLL",
        "label": "Collision",
        "deductible": 1000
      },
      {
        "property": "prp_tHpyE0S_u1SjfGg3FUhuj",
        "code": "COLL",
        "label": "Collision",
        "deductible": 1000
      },
      {
        "property": "prp_nEThgQ41AOYhAUySWhjKV",
        "code": "COLL",
        "label": "Collision",
        "deductible": 1000
      }
    ],
    "properties": [
      {
        "type": "vehicle",
        "data": {
          "vin": "1FTEF12345678f945",
          "model": "F-150 4X4",
          "year": "1988",
          "make": "FORD"
        },
        "id": "prp_1f6re51g6er15g6e_Z"
      },
      {
        "type": "vehicle",
        "data": {
          "vin": "1FMEE5DP1MLB04525",
          "model": "BRONCO ADV",
          "year": "2021",
          "make": "FORD"
        },
        "id": "prp_tHpyE0S_u1SjfGg3FUhuj"
      }
    ],
    "insureds": [
      {
        "property": "prp_hUSlbIgts8PneYfDeo6_Z",
        "firstName": "JOHN",
        "lastName": "SMITH",
        "type": "primary"
      },
      {
        "property": "prp_dSVD04Yb2Y3c9qiW_XtZa",
        "firstName": "JANE",
        "lastName": "SMITH",
        "type": "primary"
      }
    ],
    "createdAt": "2023-05-15T18:01:55.553Z",
    "modifiedAt": "2023-05-15T18:01:55.553Z",
    "refreshedAt": "2023-05-15T18:01:55.553Z"
  }
  ```
</Accordion>

***

## Get Linked Insurance Policy Details

If a customer has gone through the initial step of verifying their insurance, you can retrieve a their insurance policy details.

```bash Get Policies theme={null}
GET https://poi.vin/{VIN}/policy/{customerId}
```

If they have more than one policy your can also retrieve a Policy by ID.

```bash Get Policy by ID theme={null}
GET https://poi.vin/{VIN}/policy/{policyId}/{customerId}
```

The JSON repsonse essentially contains the `customer` and the `policy`.

<Info>
  NOTE: The `customer` object is the same as the one returned from the `https://poi.vin/{VIN}
      /account/{customerId}` endpoint.
</Info>

<br />

<Accordion title="Example Response" defaultOpen="true">
  ```json theme={null}
  {
    "id": "pol_4561GT4G45145TG154",
    "account": "acc_f321sd56f1er65t41g333",
    "type": "auto",
    "carrier": "geico",
    "policyNumber": "12345678 9514",
    "isActive": true,
    "effectiveDate": "2023-01-10T00:00:00.000Z",
    "expirationDate": "2023-07-10T00:00:00.000Z",
    "address": {
      "addressLine1": "123 Main St.",
      "addressLine2": "Unit 456",
      "state": "Georgia",
      "city": "Atlanta",
      "postalCode": "30315"
    },
    "coverages": [
      {
        "limitPerPerson": 250000,
        "code": "BI",
        "label": "Bodily Injury",
        "limitPerAccident": 500000
      },
      {
        "code": "PD",
        "label": "Property Damage",
        "limitPerAccident": 100000
      },
      {
        "limitPerPerson": 100000,
        "code": "UMBI",
        "label": "Uninsured Motorists Bodily Injury",
        "limitPerAccident": 300000
      },
      {
        "property": "prp_uSdzLVpi8c76H7kl6AQ-F",
        "code": "COMP",
        "label": "Comprehensive",
        "deductible": 375
      },
      {
        "property": "prp_uSdzLVpi8c76H7kl6AQ-F",
        "code": "COLL",
        "label": "Collision",
        "deductible": 375
      }
    ],
    "properties": [
      {
        "type": "vehicle",
        "data": {
          "vin": "1FTEF12345678f945",
          "model": "F-150 4X4",
          "year": "1988",
          "make": "FORD"
        },
        "id": "prp_1f6re51g6er15g6e_Z"
      },
      {
        "type": "vehicle",
        "data": {
          "vin": "1FMEE5DP1MLB04525",
          "model": "BRONCO ADV",
          "year": "2021",
          "make": "FORD"
        },
        "id": "prp_tHpyE0S_u1SjfGg3FUhuj"
      }
    ],
    "insureds": [
      {
        "property": "prp_hUSlbIgts8PneYfDeo6_Z",
        "firstName": "JOHN",
        "lastName": "SMITH",
        "type": "primary"
      },
      {
        "property": "prp_dSVD04Yb2Y3c9qiW_XtZa",
        "firstName": "JANE",
        "lastName": "SMITH",
        "type": "primary"
      }
    ],
    "thirdParties": [
      {
        "property": "prp_uSdzLVpi8c76H7kl6AQ-F",
        "name": "Super Credit Union",
        "address": {
          "addressLine1": "PO Box 123456",
          "state": "GA",
          "city": "Atlanta",
          "postalCode": "30348"
        },
        "type": "lienholder"
      },
      {
        "property": "prp_tmGUxLpgHjmW9r6M6WjhS",
        "name": "Super Leasing Trust",
        "address": {
          "addressLine1": "PO Box 123456",
          "state": "GA",
          "city": "Atlanta",
          "postalCode": "30348"
        },
        "type": "lessor"
      }
    ],
    "createdAt": "2023-01-01T00:00:00.000Z",
    "modifiedAt": "2023-05-02T16:00:37.540Z",
    "refreshedAt": "2023-03-15T09:14:57.273Z"
  }
  ```
</Accordion>

***

## Recieve a Webhook Event

When a webhook event is triggered, the event will be sent to the webhook URL specified in the inital searchParams when a Customer goes through the verification flow. The event will be sent as a POST request with a JSON body.

***

## White Labeled

<Info>
  NOTE: This feature is only available to paying customers and/or partners. Please reach out to
  [sales@driv.ly](mailto:sales@driv.ly) to learn more
</Info>

Retrieve proof of insurance with your company's branding by adding `?brand=<your company>` to the URL.

The experience will be the same as the default experience, but with your company's branding.

```bash theme={null}
GET https://poi.vin/{VIN}/?brand=acme
```
