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

# Save mileage setup

`POST /v6/mileage/setup`

Save (or update) the mileage setup for the authenticated user

## Request body

- MileageSetupPostDto
  - `workHours` WorkHoursPostDto — Work hours configuration for automatic mileage trip classification
    - `enabled` boolean — Whether work hours filtering is enabled
    - `monday` TimeBlockPostDto[] — Work hour blocks for Monday
      - `startTime` string — Start time of the work block
      - `endTime` string — End time of the work block
    - `tuesday` TimeBlockPostDto[] — Work hour blocks for Tuesday
      - `startTime` string — Start time of the work block
      - `endTime` string — End time of the work block
    - `wednesday` TimeBlockPostDto[] — Work hour blocks for Wednesday
      - `startTime` string — Start time of the work block
      - `endTime` string — End time of the work block
    - `thursday` TimeBlockPostDto[] — Work hour blocks for Thursday
      - `startTime` string — Start time of the work block
      - `endTime` string — End time of the work block
    - `friday` TimeBlockPostDto[] — Work hour blocks for Friday
      - `startTime` string — Start time of the work block
      - `endTime` string — End time of the work block
    - `saturday` TimeBlockPostDto[] — Work hour blocks for Saturday
      - `startTime` string — Start time of the work block
      - `endTime` string — End time of the work block
    - `sunday` TimeBlockPostDto[] — Work hour blocks for Sunday
      - `startTime` string — Start time of the work block
      - `endTime` string — End time of the work block
  - `setupComplete` boolean — Whether the mileage setup has been completed

## Response `200`

Success

- SuccessResponseMileageSetupGetDto
  - `result` 'SUCCESS' | 'FAILURE' — The result of the action performed.
  - `data` MileageSetupGetDto — The data generated by the action performed.
    - `workHours` WorkHoursGetDto, required — Work hours configuration for automatic mileage trip classification
      - `enabled` boolean, required — Whether work hours filtering is enabled
      - `monday` TimeBlockGetDto[], required — Work hour blocks for Monday
        - `startTime` string, required — Start time of the work block
        - `endTime` string, required — End time of the work block
      - `tuesday` TimeBlockGetDto[], required — Work hour blocks for Tuesday
        - `startTime` string, required — Start time of the work block
        - `endTime` string, required — End time of the work block
      - `wednesday` TimeBlockGetDto[], required — Work hour blocks for Wednesday
        - `startTime` string, required — Start time of the work block
        - `endTime` string, required — End time of the work block
      - `thursday` TimeBlockGetDto[], required — Work hour blocks for Thursday
        - `startTime` string, required — Start time of the work block
        - `endTime` string, required — End time of the work block
      - `friday` TimeBlockGetDto[], required — Work hour blocks for Friday
        - `startTime` string, required — Start time of the work block
        - `endTime` string, required — End time of the work block
      - `saturday` TimeBlockGetDto[], required — Work hour blocks for Saturday
        - `startTime` string, required — Start time of the work block
        - `endTime` string, required — End time of the work block
      - `sunday` TimeBlockGetDto[], required — Work hour blocks for Sunday
        - `startTime` string, required — Start time of the work block
        - `endTime` string, required — End time of the work block
    - `setupComplete` boolean, required — Whether the mileage setup has been completed

## Other responses

- `400` — Bad request
- `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)
