---
title: "[beta] Update a technician shift"
method: PATCH
path: "/maintenance/technician-shifts"
tags: ["Beta APIs"]
---

# \[beta\] Update a technician shift

`PATCH /maintenance/technician-shifts`

## Request

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

Close or correct a shift using the last received version. An already-applied retry returns the current shift. External IDs fully replace the previous map; an empty object clears it.

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

To use this endpoint, select **Write Technician Shifts** 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

- `includeExternalIds` boolean
- `id` string, required

## Request body

- TechnicianShiftsPatchTechnicianShiftRequestBody: At least one change is required. Null and unsupported fields are rejected; omitted fields remain unchanged.
  - `clockInAtTime` string, date-time: Corrected shift start.
  - `clockOutAtTime` string, date-time: Shift end, strictly after start.
  - `externalIds` object: External identifiers, with at most 30 pairs.
  - `placeId` string: Maintenance-shop Place ID.
  - `version` integer, required: Expected revision from the last response; stale material changes return 409.

## Response `200`

OK response.

- TechnicianShiftsPatchTechnicianShiftResponseBody
  - `data` TechnicianShiftObjectResponseBody, required: A technician attendance shift.
    - `clockInAtTime` string, date-time, required: Shift start.
    - `clockInSource` 'api' | 'cloud' | 'mobile' | 'unknown', required: Surface that recorded clock-in. Valid values: `api`, `cloud`, `mobile`, `unknown`
    - `clockOutAtTime` string, date-time: Shift end; omitted while open.
    - `clockOutSource` 'api' | 'cloud' | 'mobile' | 'unknown': Surface that recorded clock-out; omitted while open. Valid values: `api`, `cloud`, `mobile`, `unknown`
    - `createdAtTime` string, date-time, required: Server-recorded creation time.
    - `driverId` string: Linked Driver captured when the shift was created.
    - `externalIds` object: External identifiers, with at most 30 pairs.
    - `externalTechnicianIds` object: External identifiers, with at most 30 pairs.
    - `id` string, uuid, required: Stable server-generated shift UUID.
    - `placeId` string: Maintenance-shop Place ID.
    - `status` 'inProgress' | 'completed' | 'unknown', required: Derived shift status. Valid values: `inProgress`, `completed`, `unknown`
    - `updatedAtTime` string, date-time, required: Last material shift update.
    - `userId` string: Samsara User captured when the shift was created.
    - `version` integer, required: Server-managed revision. Echo the received value on PATCH.

## Other responses

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `409`: Conflict 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)
