Warranties

Update Warranty

Changed on

Updates an existing Warranty on the Vehicle in the path.

patch/vehicles/{vehicle_id}/warranties/{id}

Request

Path parameters

vehicle_idstring required
idstring required

Request body

namestring

The name of this Warranty. Must be unique per Vehicle, ignoring case.

descriptionstring nullable

A description of what this Warranty covers.

contract_numberstring nullable

The contract number for this Warranty.

coverage_type'standard' | 'extended' nullable

Indicates whether this Warranty is standard or extended coverage.

manufacturer_namestring nullable

The name of the manufacturer providing this Warranty.

start_datestring date

The date on which this Warranty's coverage begins.

end_datestring 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_meternumber 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_meternumber 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_meternumber 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_meternumber 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_distanceinteger 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_unlimitedboolean

Indicates whether this Warranty's primary meter coverage is unlimited.

secondary_meter_distanceinteger 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_unlimitedboolean

Indicates whether this Warranty's secondary meter coverage is unlimited.

term_duration_unit'months' | 'years'

The unit of time in which this Warranty's term is measured.

term_duration_valueinteger

The length of this Warranty's term, in term_duration_unit units.

vendor_idinteger nullable
vendor_warranties_urlstring nullable

A link to the Vendor's warranty information.

Example request

{
  "start_date": "2023-03-14",
  "end_date": "2024-03-14"
}

Response

OK

idinteger required
vehicle_idinteger required
namestring required

The name of this Warranty. Must be unique per Vehicle, ignoring case.

descriptionstring nullable

A description of what this Warranty covers.

contract_numberstring nullable

The contract number for this Warranty.

coverage_type'standard' | 'extended' nullable

Indicates whether this Warranty is standard or extended coverage.

manufacturer_namestring nullable

The name of the manufacturer providing this Warranty.

start_datestring date required

The date on which this Warranty's coverage begins.

end_datestring date nullable

The date on which this Warranty's coverage ends.

start_primary_meterstring nullable

The primary meter reading at which this Warranty's coverage begins, as a decimal value.

end_primary_meterstring nullable

The primary meter reading at which this Warranty's coverage ends, as a decimal value.

start_secondary_meterstring nullable

The secondary meter reading at which this Warranty's coverage begins, as a decimal value.

end_secondary_meterstring nullable

The secondary meter reading at which this Warranty's coverage ends, as a decimal value.

primary_meter_distanceinteger nullable

The number of primary meter units this Warranty covers.

secondary_meter_distanceinteger nullable

The number of secondary meter units this Warranty covers.

primary_meter_unlimitedboolean required

Indicates whether this Warranty's primary meter coverage is unlimited.

secondary_meter_unlimitedboolean 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_valueinteger required

The length of this Warranty's term, in term_duration_unit units.

vendor_idinteger nullable
vendor_namestring nullable

The name of the Vendor for this Warranty.

vendor_warranties_urlstring 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_atstring date-time required

The date and time at which this record was created.

updated_atstring date-time required

The date and time at which this record was most recently updated.

Example response

{
  "start_date": "2023-03-14",
  "end_date": "2024-03-14",
  "created_at": "2023-03-14T13:46:27-06:00",
  "updated_at": "2023-03-14T13:46:27-06:00"
}

Changes