Beta APIs

[beta] Update a technician shift

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.

patch/maintenance/technician-shifts

Request

  • Base URL
    https://api.samsara.com
  • Auth
    HTTP bearer

Query parameters

includeExternalIdsboolean

Include nonempty shift and technician external-ID maps. Defaults to false.

idstring required

Shift UUID or key:value alias.

Request body

clockInAtTimestring date-time

Corrected shift start.

clockOutAtTimestring date-time

Shift end, strictly after start.

externalIdsobject

External identifiers, with at most 30 pairs.

placeIdstring

Maintenance-shop Place ID.

versioninteger required

Expected revision from the last response; stale material changes return 409.

Example request

{
  "clockInAtTime": "2026-09-10T15:00:00Z",
  "clockOutAtTime": "2026-09-10T15:00:00Z",
  "externalIds": {
    "hrisShiftId": "SHIFT-9001"
  },
  "placeId": "281474976710658",
  "version": 1
}

Response

OK response.

Example response

{
  "data": {
    "clockInAtTime": "2026-09-10T15:00:00Z",
    "clockInSource": "api",
    "clockOutAtTime": "2026-09-10T15:00:00Z",
    "clockOutSource": "api",
    "createdAtTime": "2026-09-10T15:00:00Z",
    "driverId": "281474976710657",
    "externalIds": {
      "hrisShiftId": "SHIFT-9001"
    },
    "externalTechnicianIds": {
      "hrisShiftId": "SHIFT-9001"
    },
    "id": "27df219c-2e98-4c4d-9c1f-11dfe40f46ed",
    "placeId": "281474976710658",
    "status": "inProgress",
    "updatedAtTime": "2026-09-10T15:00:00Z",
    "userId": "281474976710656",
    "version": 1
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.