---
title: "Create Warranty"
method: POST
path: "/vehicles/{vehicle_id}/warranties"
tags: ["Warranties"]
---

# Create Warranty

`POST /vehicles/{vehicle_id}/warranties`

## Request

- Base URL: `https://secure.fleetio.com/api`
- URL: `https://secure.fleetio.com/api/vehicles/{vehicle_id}/warranties`
- Auth: API key in header `Authorization` and API key in header `Account-Token`
- TypeScript: <https://skmtc.dev/fleetio/apis/fleetio-developer-api/docs/vehicles/:vehicle_id/warranties/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new Warranty on the Vehicle in the path.

A start reading on either the primary meter (`start_primary_meter`) or the
secondary meter (`start_secondary_meter`) is required.

## Path parameters

- `vehicle_id` string, required

## Request body

- object
  - `name` string, required: The name of this Warranty. Must be unique per Vehicle, ignoring case.
  - `description` string, nullable: A description of what this Warranty covers.
  - `contract_number` string, nullable: The contract number for this Warranty.
  - `coverage_type` 'standard' | 'extended', nullable: Indicates whether this Warranty is standard or extended coverage.
  - `manufacturer_name` string, nullable: The name of the manufacturer providing this Warranty.
  - `start_date` string, date, required: The date on which this Warranty's coverage begins.
  - `end_date` string, date, nullable: The date on which this Warranty's coverage ends. Accepted as given, not derived from `start_date` and the term duration.
  - `start_primary_meter` number, float, nullable: The primary meter reading at which this Warranty's coverage begins. A start reading on either the primary or the secondary meter is required.
  - `end_primary_meter` number, float, nullable: The primary meter reading at which this Warranty's coverage ends. Accepted as given, not derived from `start_primary_meter` and the term duration.
  - `start_secondary_meter` number, float, nullable: The secondary meter reading at which this Warranty's coverage begins. A start reading on either the primary or the secondary meter is required.
  - `end_secondary_meter` number, float, nullable: The secondary meter reading at which this Warranty's coverage ends. Accepted as given, not derived from `start_secondary_meter` and the term duration.
  - `primary_meter_distance` integer, nullable: The number of primary meter units this Warranty covers. Required unless `primary_meter_unlimited` is `true` or the Warranty is covered by the secondary meter.
  - `primary_meter_unlimited` boolean: Indicates whether this Warranty's primary meter coverage is unlimited.
  - `secondary_meter_distance` integer, nullable: The number of secondary meter units this Warranty covers. On Vehicles that track a secondary meter, required unless `secondary_meter_unlimited` is `true` or the Warranty is covered by the primary meter.
  - `secondary_meter_unlimited` boolean: Indicates whether this Warranty's secondary meter coverage is unlimited.
  - `term_duration_unit` 'months' | 'years', required: The unit of time in which this Warranty's term is measured.
  - `term_duration_value` integer, required: The length of this Warranty's term, in `term_duration_unit` units.
  - `vendor_id` integer, nullable
  - `vendor_warranties_url` string, nullable: A link to the Vendor's warranty information.

## Response `201`

OK

- Warranty: A Warranty covering a Vehicle for a term of time and a range of meter readings.
  - `id` integer, required
  - `vehicle_id` integer, required
  - `name` string, required: The name of this Warranty. Must be unique per Vehicle, ignoring case.
  - `description` string, nullable: A description of what this Warranty covers.
  - `contract_number` string, nullable: The contract number for this Warranty.
  - `coverage_type` 'standard' | 'extended', nullable: Indicates whether this Warranty is standard or extended coverage.
  - `manufacturer_name` string, nullable: The name of the manufacturer providing this Warranty.
  - `start_date` string, date, required: The date on which this Warranty's coverage begins.
  - `end_date` string, date, nullable: The date on which this Warranty's coverage ends.
  - `start_primary_meter` string, nullable: The primary meter reading at which this Warranty's coverage begins, as a decimal value.
  - `end_primary_meter` string, nullable: The primary meter reading at which this Warranty's coverage ends, as a decimal value.
  - `start_secondary_meter` string, nullable: The secondary meter reading at which this Warranty's coverage begins, as a decimal value.
  - `end_secondary_meter` string, nullable: The secondary meter reading at which this Warranty's coverage ends, as a decimal value.
  - `primary_meter_distance` integer, nullable: The number of primary meter units this Warranty covers.
  - `secondary_meter_distance` integer, nullable: The number of secondary meter units this Warranty covers.
  - `primary_meter_unlimited` boolean, required: Indicates whether this Warranty's primary meter coverage is unlimited.
  - `secondary_meter_unlimited` boolean, required: Indicates whether this Warranty's secondary meter coverage is unlimited.
  - `term_duration_unit` 'months' | 'years', required: The unit of time in which this Warranty's term is measured.
  - `term_duration_value` integer, required: The length of this Warranty's term, in `term_duration_unit` units.
  - `vendor_id` integer, nullable
  - `vendor_name` string, nullable: The name of the `Vendor` for this Warranty.
  - `vendor_warranties_url` string, nullable: A link to the Vendor's warranty information.
  - `status` 'active' | 'expiring_soon' | 'expired', nullable: The coverage status of this Warranty, derived from its end date and end meters against the Vehicle's current readings. Null when the Warranty has no end date, no end meters, and no unlimited meter coverage.
  - `created_at` string, date-time, required: The date and time at which this record was created.
  - `updated_at` string, date-time, required: The date and time at which this record was most recently updated.

## Other responses

- `401`: Request could not be authenticated
- `403`: Insufficient permission to perform this operation
- `404`: The requested resource could not be located
- `422`: Unprocessable Entity
- `500`: Something unexpected happened

## Changes

- **2026-11-06** `49558d744bd7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fleetio/apis/fleetio-developer-api/changes/vehicles/:vehicle_id/warranties/post.md)

---

[API](https://skmtc.dev/fleetio/apis/fleetio-developer-api.md) - [All operations](https://skmtc.dev/fleetio/apis/fleetio-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fleetio/apis/fleetio-developer-api/revisions/49558d744bd7?raw)
