---
title: "Update a warranty"
method: PATCH
path: "/maintenance/warranties"
tags: ["Maintenance"]
---

# Update a warranty

`PATCH /maintenance/warranties`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/maintenance/warranties`
- Auth: HTTP bearer

Updates an existing warranty for the organization.

 <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Write Warranties** under the Work Orders category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

## Query parameters

- `id` string, required

## Request body

- EntityWarrantiesServiceUpdateWarrantyRequestBody: Request body for updating a Warranty
  - `baseCoverage` UpdateWarrantyEntityWarrantyWarrantyCoverageInputTypeRequestBody: WarrantyCoverage object
    - `description` string: Description of what this coverage group covers.
    - `durationDays` integer: Coverage length in days. Mutually exclusive with duration in months.
    - `durationMonths` integer: Coverage length in months. Mutually exclusive with duration in days.
    - `engineDurationHours` integer: Coverage length by engine hours since the coverage start.
    - `exclusions` UpdateWarrantyEntityWarrantyWarrantyCoverageItemInputTypeRequestBody[]: Items explicitly excluded from this coverage group.
      - `id` string: Identifier of the covered item. For a service task item this is the service task definition key. For a VMRS code item supply vmrsCode instead, or this internal VMRS code ID.
      - `itemType` 'unknown' | 'vmrsCode' | 'serviceTask', required: Kind of covered item, indicating how the ID should be interpreted (VMRS code or service task). Valid values: `unknown`, `vmrsCode`, `serviceTask`
      - `vmrsCode` string: Dotted VMRS code path (e.g. 034-005-001). Use with itemType vmrsCode instead of id.
    - `inclusions` UpdateWarrantyEntityWarrantyWarrantyCoverageItemInputTypeRequestBody[]: Items explicitly covered by this coverage group.
      - `id` string: Identifier of the covered item. For a service task item this is the service task definition key. For a VMRS code item supply vmrsCode instead, or this internal VMRS code ID.
      - `itemType` 'unknown' | 'vmrsCode' | 'serviceTask', required: Kind of covered item, indicating how the ID should be interpreted (VMRS code or service task). Valid values: `unknown`, `vmrsCode`, `serviceTask`
      - `vmrsCode` string: Dotted VMRS code path (e.g. 034-005-001). Use with itemType vmrsCode instead of id.
    - `isOdometerDistanceUnlimited` boolean: When true, the coverage never expires by mileage and the odometer distance is ignored.
    - `name` string, required: Name of the coverage group.
    - `notes` string: Free-form notes about this coverage group.
    - `odometerDistanceMeters` integer: Coverage length by distance travelled since the coverage start. Measured in meters.
    - `startEngineHours` integer: Engine hours at the start of this coverage.
    - `startOdometerMeters` integer: Odometer reading at the start of this coverage. Measured in meters.
    - `startTime` string: Start time of this coverage.
  - `coverages` UpdateWarrantyEntityWarrantyWarrantyCoverageInputTypeRequestBody[]: Additional coverage groups defined on this warranty.
    - `description` string: Description of what this coverage group covers.
    - `durationDays` integer: Coverage length in days. Mutually exclusive with duration in months.
    - `durationMonths` integer: Coverage length in months. Mutually exclusive with duration in days.
    - `engineDurationHours` integer: Coverage length by engine hours since the coverage start.
    - `exclusions` UpdateWarrantyEntityWarrantyWarrantyCoverageItemInputTypeRequestBody[]: Items explicitly excluded from this coverage group.
      - `id` string: Identifier of the covered item. For a service task item this is the service task definition key. For a VMRS code item supply vmrsCode instead, or this internal VMRS code ID.
      - `itemType` 'unknown' | 'vmrsCode' | 'serviceTask', required: Kind of covered item, indicating how the ID should be interpreted (VMRS code or service task). Valid values: `unknown`, `vmrsCode`, `serviceTask`
      - `vmrsCode` string: Dotted VMRS code path (e.g. 034-005-001). Use with itemType vmrsCode instead of id.
    - `inclusions` UpdateWarrantyEntityWarrantyWarrantyCoverageItemInputTypeRequestBody[]: Items explicitly covered by this coverage group.
      - `id` string: Identifier of the covered item. For a service task item this is the service task definition key. For a VMRS code item supply vmrsCode instead, or this internal VMRS code ID.
      - `itemType` 'unknown' | 'vmrsCode' | 'serviceTask', required: Kind of covered item, indicating how the ID should be interpreted (VMRS code or service task). Valid values: `unknown`, `vmrsCode`, `serviceTask`
      - `vmrsCode` string: Dotted VMRS code path (e.g. 034-005-001). Use with itemType vmrsCode instead of id.
    - `isOdometerDistanceUnlimited` boolean: When true, the coverage never expires by mileage and the odometer distance is ignored.
    - `name` string, required: Name of the coverage group.
    - `notes` string: Free-form notes about this coverage group.
    - `odometerDistanceMeters` integer: Coverage length by distance travelled since the coverage start. Measured in meters.
    - `startEngineHours` integer: Engine hours at the start of this coverage.
    - `startOdometerMeters` integer: Odometer reading at the start of this coverage. Measured in meters.
    - `startTime` string: Start time of this coverage.
  - `description` string: Description of the warranty.
  - `durationDays` integer: Warranty length in days. Mutually exclusive with duration in months.
  - `durationMonths` integer: Warranty length in months. Mutually exclusive with duration in days.
  - `engineDurationHours` integer: Warranty length by engine hours since the warranty start.
  - `externalIds` UpdateWarrantyEntityWarrantyWarrantyExternalIdInputTypeRequestBody[]: Customer-supplied external identifiers for the warranty, interchangeable with id in filters. Only included in the response when includeExternalIds is set.
    - `key` string, required: Name of the external ID namespace, for example a source system identifier.
    - `value` string, required: The external ID value within the given key's namespace.
  - `name` string: Name of the warranty.
  - `odometerDistanceMeters` integer: Warranty length by distance travelled since the warranty start. Measured in meters.
  - `vendorId` string: ID of the vendor that provides this warranty.
  - `warrantyType` 'unknown' | 'manufacturer' | 'extended' | 'other': Type of warranty, for example manufacturer, extended, other, or unknown. Valid values: `unknown`, `manufacturer`, `extended`, `other`

## Response `200`

OK response.

- EntityWarrantiesServiceUpdateWarrantyResponseBody
  - `data` EntityUpdateWarrantyTypeResponseBody, required: Warranty object
    - `baseCoverage` UpdateWarrantyEntityWarrantyWarrantyCoverageTypeResponseBody: WarrantyCoverage object
      - `description` string: Description of what this coverage group covers.
      - `durationDays` integer: Coverage length in days. Mutually exclusive with duration in months.
      - `durationMonths` integer: Coverage length in months. Mutually exclusive with duration in days.
      - `engineDurationHours` integer: Coverage length by engine hours since the coverage start.
      - `exclusions` UpdateWarrantyEntityWarrantyWarrantyCoverageItemTypeResponseBody[]: Items explicitly excluded from this coverage group.
        - `id` string: Identifier of the covered item. For a service task item this is the service task definition key. For a VMRS code item supply vmrsCode instead, or this internal VMRS code ID.
        - `itemType` 'unknown' | 'vmrsCode' | 'serviceTask': Kind of covered item, indicating how the ID should be interpreted (VMRS code or service task). Valid values: `unknown`, `vmrsCode`, `serviceTask`
        - `vmrsCode` string: Dotted VMRS code path (e.g. 034-005-001). Use with itemType vmrsCode instead of id.
      - `inclusions` UpdateWarrantyEntityWarrantyWarrantyCoverageItemTypeResponseBody[]: Items explicitly covered by this coverage group.
        - `id` string: Identifier of the covered item. For a service task item this is the service task definition key. For a VMRS code item supply vmrsCode instead, or this internal VMRS code ID.
        - `itemType` 'unknown' | 'vmrsCode' | 'serviceTask': Kind of covered item, indicating how the ID should be interpreted (VMRS code or service task). Valid values: `unknown`, `vmrsCode`, `serviceTask`
        - `vmrsCode` string: Dotted VMRS code path (e.g. 034-005-001). Use with itemType vmrsCode instead of id.
      - `isOdometerDistanceUnlimited` boolean: When true, the coverage never expires by mileage and the odometer distance is ignored.
      - `name` string: Name of the coverage group.
      - `notes` string: Free-form notes about this coverage group.
      - `odometerDistanceMeters` integer: Coverage length by distance travelled since the coverage start. Measured in meters.
      - `startEngineHours` integer: Engine hours at the start of this coverage.
      - `startOdometerMeters` integer: Odometer reading at the start of this coverage. Measured in meters.
      - `startTime` string: Start time of this coverage.
    - `coverages` UpdateWarrantyEntityWarrantyWarrantyCoverageTypeResponseBody[]: Additional coverage groups defined on this warranty.
      - `description` string: Description of what this coverage group covers.
      - `durationDays` integer: Coverage length in days. Mutually exclusive with duration in months.
      - `durationMonths` integer: Coverage length in months. Mutually exclusive with duration in days.
      - `engineDurationHours` integer: Coverage length by engine hours since the coverage start.
      - `exclusions` UpdateWarrantyEntityWarrantyWarrantyCoverageItemTypeResponseBody[]: Items explicitly excluded from this coverage group.
        - `id` string: Identifier of the covered item. For a service task item this is the service task definition key. For a VMRS code item supply vmrsCode instead, or this internal VMRS code ID.
        - `itemType` 'unknown' | 'vmrsCode' | 'serviceTask': Kind of covered item, indicating how the ID should be interpreted (VMRS code or service task). Valid values: `unknown`, `vmrsCode`, `serviceTask`
        - `vmrsCode` string: Dotted VMRS code path (e.g. 034-005-001). Use with itemType vmrsCode instead of id.
      - `inclusions` UpdateWarrantyEntityWarrantyWarrantyCoverageItemTypeResponseBody[]: Items explicitly covered by this coverage group.
        - `id` string: Identifier of the covered item. For a service task item this is the service task definition key. For a VMRS code item supply vmrsCode instead, or this internal VMRS code ID.
        - `itemType` 'unknown' | 'vmrsCode' | 'serviceTask': Kind of covered item, indicating how the ID should be interpreted (VMRS code or service task). Valid values: `unknown`, `vmrsCode`, `serviceTask`
        - `vmrsCode` string: Dotted VMRS code path (e.g. 034-005-001). Use with itemType vmrsCode instead of id.
      - `isOdometerDistanceUnlimited` boolean: When true, the coverage never expires by mileage and the odometer distance is ignored.
      - `name` string: Name of the coverage group.
      - `notes` string: Free-form notes about this coverage group.
      - `odometerDistanceMeters` integer: Coverage length by distance travelled since the coverage start. Measured in meters.
      - `startEngineHours` integer: Engine hours at the start of this coverage.
      - `startOdometerMeters` integer: Odometer reading at the start of this coverage. Measured in meters.
      - `startTime` string: Start time of this coverage.
    - `createdAtTime` string: When the warranty was created.
    - `description` string: Description of the warranty.
    - `durationDays` integer: Warranty length in days. Mutually exclusive with duration in months.
    - `durationMonths` integer: Warranty length in months. Mutually exclusive with duration in days.
    - `engineDurationHours` integer: Warranty length by engine hours since the warranty start.
    - `externalIds` UpdateWarrantyEntityWarrantyWarrantyExternalIdTypeResponseBody[]: Customer-supplied external identifiers for the warranty, interchangeable with id in filters. Only included in the response when includeExternalIds is set.
      - `key` string: Name of the external ID namespace, for example a source system identifier.
      - `value` string: The external ID value within the given key's namespace.
    - `id` string: Samsara ID for the warranty.
    - `name` string: Name of the warranty.
    - `odometerDistanceMeters` integer: Warranty length by distance travelled since the warranty start. Measured in meters.
    - `updatedAtTime` string: When the warranty was last updated.
    - `vendor` EntityUpdateWarrantyVendorRefTypeResponseBody: Reference to a Vendor
      - `id` string, required: The ID of the referenced Vendor.
    - `warrantyType` 'unknown' | 'manufacturer' | 'extended' | 'other': Type of warranty, for example manufacturer, extended, other, or unknown. Valid values: `unknown`, `manufacturer`, `extended`, `other`

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request response.

---

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