---
title: "Update a vehicle's odometer reading."
url: "https://developers.vzconnect.com/apis/vehicle-api-v1/versions/3941fe83-a6d1-4bef-90e3-c94cadaf0d4d/operations/updateVehicleOdometer"
---

> Full API specification: https://developers.vzconnect.com/apis/vehicle-api-v1/versions/3941fe83-a6d1-4bef-90e3-c94cadaf0d4d.md

# Update a vehicle's odometer reading.

`PUT` `/cmd/v1/vehicles/{vehiclenumber}/odometer`

Operation ID: `updateVehicleOdometer`

Update a vehicle's current odometer, or odometer as of a given date. The As Of date must be less than 30 days in the past. The request body should include the Odometer (in kilometers) and the As Of date/timestamp.

## Path parameters

- `vehiclenumber` (string, required) - The Vehicle Number; the unique identifier used to reference the vehicle within the API.

## Request body

Content types: `application/json`

## Responses

- `204` - Odometer reading successfully updated.
- `400` - Bad request. No vehicle exists with the specified vehicle number (message: "The Client Vehicle ID specified was not a valid ID."), or the request body is invalid.
- `401` - Unauthorized. Authentication credentials are missing or invalid.
- `500` - Internal server error.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Vehicle API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /cmd/v1/vehicles/{vehiclenumber}/odometer:
    put:
      summary: Update a vehicle's odometer reading.
      description: Update a vehicle's current odometer, or odometer as of a given
        date. The As Of date must be less than 30 days in the past. The request
        body should include the Odometer (in kilometers) and the As Of
        date/timestamp.
      operationId: updateVehicleOdometer
      tags:
        - Vehicle API
      parameters:
        - name: vehiclenumber
          in: path
          required: true
          description: The Vehicle Number; the unique identifier used to reference the
            vehicle within the API.
          schema:
            type: string
            example: "890001"
      requestBody:
        description: Odometer data including the reading value and AsOf timestamp.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/OdometerUpdateRequest"
            example:
              Odometer: 47569
              AsOf: 2016-09-01T00:00:00
      responses:
        "204":
          description: Odometer reading successfully updated.
          content:
            application/json: {}
        "400":
          description: 'Bad request. No vehicle exists with the specified vehicle number
            (message: "The Client Vehicle ID specified was not a valid ID."), or
            the request body is invalid.'
          content:
            application/json: {}
        "401":
          description: Unauthorized. Authentication credentials are missing or invalid.
          content:
            application/json: {}
        "500":
          description: Internal server error.
          content:
            application/json: {}
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/cmd/v1/vehicles/[^/]+/odometer/?$
components:
  schemas:
    OdometerUpdateRequest:
      type: object
      description: Request body to update a vehicle's odometer as of a given date.
      required:
        - AsOf
      properties:
        Odometer:
          type: number
          format: double
          description: The odometer value, referenced in kilometers.
          example: 47569
        AsOf:
          type: string
          format: date-time
          description: The As Of date and timestamp for the odometer reading. Must be less
            than 30 days in the past.
          example: 2016-09-01T00:00:00
```
