> For the complete documentation index, see [llms.txt](https://docs.imperialcad.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imperialcad.app/api-and-integrations/api-integrations/civilian-endpoints/create-advanced-vehicle.md).

# Create Advanced Vehicle

This endpoint allows you to create a vehicle with miscellaneous information.

{% hint style="warning" %}
This endpoint requires **an Advanced** ImperialCAD subscription or higher.
{% endhint %}

### CreateAdvancedVehicle(data, callback)

<mark style="color:green;">`POST`</mark> `https://imperialcad.app/api/1.1/wf/createadvancedvehicle`

***

#### Request Body

Vehicle Data = \[]

| Name         | Type    | Description                         |
| ------------ | ------- | ----------------------------------- |
| `ssn`        | string  | Social Security Number of Civilian  |
| `plate`      | string  | License Plate                       |
| `model`      | string  | Model                               |
| `color`      | string  | Color                               |
| `year`       | string  | Year                                |
| `make`       | string  | Make                                |
| `regState`   | string  | Registration State                  |
| `regStatus`  | string  | Registration Status                 |
| `regExpDate` | string  | Registration Expiration Date        |
| `vin`        | string  | VIN (Vehicle Identification Number) |
| `stolen`     | boolean | Is Vehicle Stolen?                  |

vehicleInsurance = \[]

| Name                 | Type    | Description                  |
| -------------------- | ------- | ---------------------------- |
| `hasInsurance`       | boolean | Does vehicle have insurance? |
| `insuranceStatus`    | string  | Insurance Status             |
| `insurancePolicyNum` | string  | Insurance Policy Number      |

vehicleOwner = \[]

| Name             | Type   | Description                    |
| ---------------- | ------ | ------------------------------ |
| `ownerSSN`       | string | Owner's Social Security Number |
| `ownerFirstName` | string | Owner's First Name             |
| `ownerLastName`  | string | Owner's Last Name              |
| `ownerGender`    | string | Owner's Gender                 |
| `ownerAddress`   | string | Owner's Address                |
| `ownerCity`      | string | Owner's City                   |

***

{% tabs %}
{% tab title="Example" %}

```lua
exports["ImperialCAD"]:CreateVehicleAdvanced({
    vehicleData = {
      plate = "XYZ123",
      model = "Sultan RS",
      Make = "Karin",
      color = "Gray",
      year = "2021",
      regState = "SA",
      regStatus = "Valid",
      regExpDate = "2025-05-01",
      vin = "1HGCM82633A004352",
      stolen = false
    },
    vehicleInsurance = {
      hasInsurance = true,
      insuranceStatus = "Active",
      insurancePolicyNum = "INS234"
    },
    vehicleOwner = {
      ownerSSN = "JD321",
      ownerFirstName = "Jane",
      ownerLastName = "Smith",
      ownerGender = "Female",
      ownerAddress = "123 Main St",
      ownerCity = "Los Santos"
    }
  }, function(success, res)
    if success then print("Vehicle registered.") else print("Failed:", res) end
end)
```

{% endtab %}

{% tab title="Response of Example" %}

```lua
    "vin": "Z57SM7X7WKLW8AM0Z"
  }
}
```

{% endtab %}
{% endtabs %}
