---
title: "Save mileage"
method: POST
path: "/v6/mileage"
tags: ["Mileage"]
---

# Save mileage

`POST /v6/mileage`

Save new (or update existing) mileage records

## Request body

- MultiParamMileagePostDto
  - `data` MileagePostDto[], required
    - `id` string — Id of the mileage record, required when updating an existing mileage record
    - `date` string, date — Date of the mileage record
    - `status` 'ACTIVE' | 'INACTIVE' | 'REMOVED' — Status of the mileage record
    - `mileageStatus` 'PENDING' | 'BUSINESS' | 'PERSONAL' — Trip classification status of the mileage record
    - `description` string — Description of the mileage trip
    - `notes` string — Notes for the mileage record
    - `customerId` string, nullable — Id of the customer assigned to this mileage record
    - `dimensionValueIds` string[], nullable
    - `distance` MileageDistancePostDto — Distance of the mileage trip
      - `type` 'MILE' | 'KILOMETER' — The unit of distance
      - `value` string — The distance value
    - `start` MileageLocationPostDto — End location of the mileage trip
      - `time` string, date-time — The time of the location point
      - `lat` string — The latitude of the location point
      - `lng` string — The longitude of the location point
      - `locationId` string, nullable — Id of the favorite location associated with this mileage location point
      - `address` AddressPostDto — Address of the vendor
        - `state` string — State/Province of the address
        - `city` string — City of the address
        - `zip` string — Zip/Postal code of the address
        - `phoneWork` string — The US/CA phone number in E.164 format (e.g., +14155551234)
        - `address1` string — First line of the address
        - `address2` string — Second line of the address
    - `end` MileageLocationPostDto — End location of the mileage trip
      - `time` string, date-time — The time of the location point
      - `lat` string — The latitude of the location point
      - `lng` string — The longitude of the location point
      - `locationId` string, nullable — Id of the favorite location associated with this mileage location point
      - `address` AddressPostDto — Address of the vendor
        - `state` string — State/Province of the address
        - `city` string — City of the address
        - `zip` string — Zip/Postal code of the address
        - `phoneWork` string — The US/CA phone number in E.164 format (e.g., +14155551234)
        - `address1` string — First line of the address
        - `address2` string — Second line of the address
    - `duration` integer — The duration of this mileage, in milliseconds
    - `deduction` MileageDeductionPostDto — Tax deduction associated with this mileage record
      - `amount` integer — The deduction amount in cents
    - `carId` string, nullable — Id of the car associated with this mileage record
    - `customData` JsonNode, nullable — Custom JSON in which you can store any data with max length of 2000 characters
      - `empty` boolean
      - `array` boolean
      - `null` boolean
      - `object` boolean
      - `float` boolean
      - `string` boolean
      - `number` boolean
      - `missingNode` boolean
      - `valueNode` boolean
      - `nodeType` 'ARRAY' | 'BINARY' | 'BOOLEAN' | 'MISSING' | 'NULL' | 'NUMBER' | 'OBJECT' | 'POJO' | 'STRING'
      - `pojo` boolean
      - `integralNumber` boolean
      - `floatingPointNumber` boolean
      - `short` boolean
      - `int` boolean
      - `long` boolean
      - `double` boolean
      - `bigDecimal` boolean
      - `bigInteger` boolean
      - `textual` boolean
      - `boolean` boolean
      - `binary` boolean
      - `container` boolean
      - `embeddedValue` boolean

## Response `200`

Success

- ResponseListMultiResponseMileageGetDto
  - `result` 'SUCCESS' | 'FAILURE' — The result of the action performed.
  - `data` MultiResponseMileageGetDto[] — The data generated by the action performed.
    - `result` 'SUCCESS' | 'FAILURE' — The result of the action performed.
    - `statusCode` 200 | 400 | 401 | 403 | 404 | 500 — The HTTP status code for the action performed.
    - `data` MileageGetDto — The data generated by the action performed.
      - `id` string, required — Id of the mileage record
      - `date` string, date, required — Date of the mileage record
      - `status` 'ACTIVE' | 'INACTIVE' | 'REMOVED', required — Status of the mileage record
      - `mileageStatus` 'PENDING' | 'BUSINESS' | 'PERSONAL', required — Trip classification status of the mileage record
      - `description` string, nullable, required — Description of the mileage trip
      - `notes` string, nullable, required — Notes for the mileage record
      - `customer` CustomerExpanded, nullable, required — Customer associated with this time entry
        - `id` string, required — Id of the customer
        - `name` string — Name of the customer
        - `email` string — Email of the customer
      - `dimensionValues` DimensionValueExpanded[], required
        - `id` string, required — Id of the dimension value
        - `dimension` DimensionExpanded — Dimension for this dimension value
          - `id` string, required — Id of the dimension
          - `name` string — Name of the dimension
          - `requiredness` 'REQUIRED' | 'NOT_REQUIRED' — Requiredness of the dimension
        - `name` string — Name of the dimension value
        - `child` ChildDimensionValue — Child dimension value, if applicable
          - `id` string, required — Id of the dimension value
          - `dimension` DimensionExpanded — Dimension for this dimension value
            - `id` string, required — Id of the dimension
            - `name` string — Name of the dimension
            - `requiredness` 'REQUIRED' | 'NOT_REQUIRED' — Requiredness of the dimension
          - `name` string — Name of the dimension value
          - `child` ChildDimensionValue — recursive
      - `distance` MileageDistanceGetDto, nullable, required — Distance of the mileage trip
        - `type` 'MILE' | 'KILOMETER', required — The unit of distance
        - `value` string, required — The distance value
      - `start` MileageLocationGetDto, nullable, required — End location of the mileage trip
        - `time` string, date-time, required — The time of the location point
        - `lat` string, required — The latitude of the location point
        - `lng` string, required — The longitude of the location point
        - `location` LocationExpanded, nullable, required — Favorite location associated with this mileage location point
          - `id` string, required — Id of the location
          - `name` string, required — Name of the location
        - `address` AddressGetDto, nullable, required — Address of the vendor
          - `countryCode` 'USA' | 'CAN' | 'GBR' — Country Code of the address
          - `state` string — State/Province of the address
          - `city` string — City of the address
          - `zip` string — Zip/Postal code of the address
          - `phoneWork` string — The phone number
          - `address1` string — First line of the address
          - `address2` string — Second line of the address
      - `end` MileageLocationGetDto, nullable, required — End location of the mileage trip
        - `time` string, date-time, required — The time of the location point
        - `lat` string, required — The latitude of the location point
        - `lng` string, required — The longitude of the location point
        - `location` LocationExpanded, nullable, required — Favorite location associated with this mileage location point
          - `id` string, required — Id of the location
          - `name` string, required — Name of the location
        - `address` AddressGetDto, nullable, required — Address of the vendor
          - `countryCode` 'USA' | 'CAN' | 'GBR' — Country Code of the address
          - `state` string — State/Province of the address
          - `city` string — City of the address
          - `zip` string — Zip/Postal code of the address
          - `phoneWork` string — The phone number
          - `address1` string — First line of the address
          - `address2` string — Second line of the address
      - `duration` integer, required — The duration of this mileage, in milliseconds
      - `deduction` MileageDeductionGetDto, nullable, required — Tax deduction associated with this mileage record
        - `amount` integer, required — The deduction amount in cents
      - `route` RouteExpanded, nullable, required — Route associated with this mileage record
        - `id` string, required — Id of the route
        - `waypoints` WaypointGetDto[], required
          - `lat` string, required — The latitude of the waypoint
          - `lng` string, required — The longitude of the waypoint
      - `car` CarExpanded, nullable, required — Car associated with this mileage record
        - `id` string, required — Id of the car
        - `name` string, nullable, required — Name of the car
        - `make` string, nullable, required — Make of the car
        - `model` string, nullable, required — Model of the car
      - `customData` JsonNode, nullable — Custom JSON in which you can store any data with max length of 2000 characters
        - `empty` boolean
        - `array` boolean
        - `null` boolean
        - `object` boolean
        - `float` boolean
        - `string` boolean
        - `number` boolean
        - `missingNode` boolean
        - `valueNode` boolean
        - `nodeType` 'ARRAY' | 'BINARY' | 'BOOLEAN' | 'MISSING' | 'NULL' | 'NUMBER' | 'OBJECT' | 'POJO' | 'STRING'
        - `pojo` boolean
        - `integralNumber` boolean
        - `floatingPointNumber` boolean
        - `short` boolean
        - `int` boolean
        - `long` boolean
        - `double` boolean
        - `bigDecimal` boolean
        - `bigInteger` boolean
        - `textual` boolean
        - `boolean` boolean
        - `binary` boolean
        - `container` boolean
        - `embeddedValue` boolean
    - `error` ErrorItem[]
      - `type` 'UNKNOWN_ERROR' | 'INVALID_TOKEN' | 'EXPIRED_TOKEN' | 'FORBIDDEN' | 'BAD_REQUEST' | 'JSON_ERROR' | 'DUPLICATE' | 'REQUIRED' | 'INVALID_VALUE' | 'NOT_MODIFIABLE' | 'INVALID_FORMAT' | 'NOT_FOUND' — The type of the error. Safe for programmatic use.
      - `message` string — A human-readable message providing more details about the error. Safe for displaying to a user.
      - `param` string — If the error is parameter-specific, the parameter related to the error. This can be used to display a message near the correct form field.
  - `error` ErrorItem[]
    - `type` 'UNKNOWN_ERROR' | 'INVALID_TOKEN' | 'EXPIRED_TOKEN' | 'FORBIDDEN' | 'BAD_REQUEST' | 'JSON_ERROR' | 'DUPLICATE' | 'REQUIRED' | 'INVALID_VALUE' | 'NOT_MODIFIABLE' | 'INVALID_FORMAT' | 'NOT_FOUND' — The type of the error. Safe for programmatic use.
    - `message` string — A human-readable message providing more details about the error. Safe for displaying to a user.
    - `param` string — If the error is parameter-specific, the parameter related to the error. This can be used to display a message near the correct form field.

## Other responses

- `207` — Some mileage records failed to save. See response body for error details.
- `400` — All mileage records failed to save.
- `401` — Not authenticated
- `403` — Not authorized
- `404` — Endpoint not found
- `500` — Internal server error

---

[API](https://skmtc.net/tight/apis/tight-api.md) · [All operations](https://skmtc.net/tight/apis/tight-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tight/tight-api/revisions/e9f0790a89af/schema)
