---
updatedAt: 2026-04-27T16:09:54.000Z
agentTools:
  projectIndex: https://developer.deputy.com/llms.txt
---

# Update an existing shift

Update an existing shift.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Deputy V2 API",
    "version": "1.0",
    "description": "\n\nFiltered to publicly-authenticated routes only (APIAuthenticator). Scoped-OAuth routes and internal JWT routes are excluded — see the separate \"Deputy V2 Scoped API\" spec for scoped endpoints."
  },
  "servers": [
    {
      "url": "https://{subdomain}.{region}.deputy.com/api",
      "description": "Deputy tenant",
      "variables": {
        "subdomain": {
          "default": "your-subdomain",
          "description": "Your Deputy tenant subdomain"
        },
        "region": {
          "default": "deputy",
          "enum": [
            "au",
            "eu",
            "na",
            "deputy"
          ],
          "description": "Deputy region: au, eu, na, or deputy (AU default)"
        }
      }
    }
  ],
  "components": {
    "schemas": {
      "modelBooleanField": {
        "type": "object",
        "properties": {
          "value": {
            "type": "boolean",
            "default": "false"
          }
        }
      },
      "modelFileField": {
        "type": "object",
        "properties": {
          "value": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "modelListField": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          }
        }
      },
      "modelMultiListField": {
        "type": "object",
        "properties": {
          "value": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "modelStringField": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string"
          }
        }
      },
      "tenantsharedv2modelCustomField": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "int64"
          },
          "booleanField": {
            "$ref": "#/components/schemas/modelBooleanField"
          },
          "stringField": {
            "$ref": "#/components/schemas/modelStringField"
          },
          "listField": {
            "$ref": "#/components/schemas/modelListField"
          },
          "multiListField": {
            "$ref": "#/components/schemas/modelMultiListField"
          },
          "fileField": {
            "$ref": "#/components/schemas/modelFileField",
            "title": "file id"
          },
          "employeeVisible": {
            "type": "boolean"
          }
        }
      },
      "ConsentConsentRecordType": {
        "type": "string",
        "enum": [
          "SHIFT",
          "TIMESHEET",
          "REGULAR_SCHEDULE"
        ],
        "default": "SHIFT"
      },
      "ConsentConsentStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "ACCEPTED",
          "DECLINED",
          "CANCELLED",
          "OVERRIDDEN_ACCEPTED"
        ],
        "default": "PENDING"
      },
      "modelConsent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "recordId": {
            "type": "string"
          },
          "recordType": {
            "$ref": "#/components/schemas/ConsentConsentRecordType"
          },
          "transactionId": {
            "type": "string"
          },
          "employeeId": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "$ref": "#/components/schemas/ConsentConsentStatus"
          },
          "description": {
            "type": "string"
          },
          "metadata": {
            "$ref": "#/components/schemas/modelShiftTypeConsentMetadata"
          },
          "creator": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "modelShiftTypeConsentMetadata": {
        "type": "object",
        "properties": {
          "comment": {
            "type": "string"
          },
          "extras": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ShiftConsentChangesetShiftConsentAction": {
        "type": "string",
        "enum": [
          "CREATE",
          "MODIFY",
          "DELETE"
        ],
        "default": "CREATE"
      },
      "ShiftConsentChangesetShiftConsentChangesetData": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          },
          "approvalRequired": {
            "type": "boolean"
          },
          "cost": {
            "type": "number",
            "format": "float"
          },
          "date": {
            "type": "string"
          },
          "employee": {
            "type": "integer",
            "format": "int32"
          },
          "mealbreakSlotsUnpaidMinutes": {
            "type": "number",
            "format": "float"
          },
          "mealbreakSlots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelBreak"
            }
          },
          "isOpen": {
            "type": "boolean"
          },
          "area": {
            "type": "integer",
            "format": "int32"
          },
          "duration": {
            "type": "number",
            "format": "float"
          },
          "location": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ShiftConsentChangesetShiftConsentStatus": {
        "type": "string",
        "enum": [
          "PENDING",
          "ACTIONED",
          "AUTO_ACTIONED"
        ],
        "default": "PENDING"
      },
      "modelBreak": {
        "type": "object",
        "properties": {
          "slotType": {
            "$ref": "#/components/schemas/modelSlotType",
            "title": "type of slot"
          },
          "start": {
            "type": "integer",
            "format": "int32",
            "title": "can start break after seconds passed after shift start"
          },
          "end": {
            "type": "integer",
            "format": "int32",
            "title": "can end break after seconds passed after shift start"
          },
          "state": {
            "$ref": "#/components/schemas/modelBreakState",
            "title": "Break state"
          },
          "canStartEarly": {
            "type": "boolean",
            "title": "[Deprecated] can employee start break early, override shift template"
          },
          "canEndEarly": {
            "type": "boolean",
            "title": "[Deprecated] can employee end break early, override shift template"
          },
          "isMandatory": {
            "type": "boolean",
            "title": "[Deprecated] is it mandatory to take this break, override shift template"
          },
          "type": {
            "$ref": "#/components/schemas/tenantsharedv2modelBreakType",
            "title": "type of break"
          },
          "typeLabel": {
            "type": "string",
            "title": "break type name in config"
          },
          "startDateTime": {
            "type": "string",
            "title": "format ISO8601 eg 2024-06-25T13:45:00+01:00"
          },
          "endDateTime": {
            "type": "string",
            "title": "format ISO8601 eg 2024-06-25T13:45:00+01:00"
          }
        }
      },
      "modelBreakState": {
        "type": "string",
        "enum": [
          "NOT_START",
          "IN_PROGRESS",
          "FINISHED",
          "DURATION_ONLY",
          "DURATION_FINISHED"
        ],
        "default": "NOT_START",
        "title": "Break States"
      },
      "modelConfirmationStatus": {
        "type": "string",
        "enum": [
          "ROSTER_CONFIRMATION_NOT_REQUIRED",
          "ROSTER_CONFIRMATION_REQUIRED",
          "ROSTER_CONFIRMATION_DONE",
          "ROSTER_CONFIRMATION_DECLINED"
        ],
        "default": "ROSTER_CONFIRMATION_NOT_REQUIRED"
      },
      "modelShiftConsentChangeset": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "shiftId": {
            "type": "integer",
            "format": "int32"
          },
          "consentTransactionId": {
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/ShiftConsentChangesetShiftConsentAction"
          },
          "status": {
            "$ref": "#/components/schemas/ShiftConsentChangesetShiftConsentStatus"
          },
          "newData": {
            "$ref": "#/components/schemas/ShiftConsentChangesetShiftConsentChangesetData"
          },
          "oldData": {
            "$ref": "#/components/schemas/ShiftConsentChangesetShiftConsentChangesetData"
          },
          "violatedRules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelViolatedRules"
            }
          },
          "creator": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "type": "string"
          },
          "modifiedAt": {
            "type": "string"
          },
          "consents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelConsent"
            }
          }
        }
      },
      "modelSlotType": {
        "type": "string",
        "enum": [
          "BREAK",
          "WORK",
          "CUSTOM"
        ],
        "default": "BREAK",
        "title": "Type of Slot"
      },
      "modelSwapStatus": {
        "type": "string",
        "enum": [
          "SWAP_STATUS_NOT_REQUIRED",
          "SWAP_STATUS_PENDING_OUT",
          "SWAP_STATUS_PENDING_IN",
          "SWAP_STATUS_PENDING_IN_OUT",
          "SWAP_STATUS_PENDING_APPROVAL",
          "SWAP_STATUS_APPROVED",
          "SWAP_STATUS_CANCELLED",
          "SWAP_STATUS_DECLINED"
        ],
        "default": "SWAP_STATUS_NOT_REQUIRED"
      },
      "modelViolatedRules": {
        "type": "object",
        "properties": {
          "ruleCode": {
            "type": "string"
          },
          "warning": {
            "$ref": "#/components/schemas/modelViolatedRulesWarning"
          },
          "ruleConfigs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelViolatedRulesRuleConfig"
            }
          }
        }
      },
      "modelViolatedRulesOperation": {
        "type": "string",
        "enum": [
          "NOT_SPECIFIED",
          "GREATER_THAN",
          "LESS_THAN",
          "GREATER_THAN_OR_EQUAL",
          "LESS_THAN_OR_EQUAL",
          "EQUAL",
          "NOT_EQUAL"
        ],
        "default": "NOT_SPECIFIED"
      },
      "modelViolatedRulesRuleConfig": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "title": "What field of roster is triggering the consent"
          },
          "operation": {
            "$ref": "#/components/schemas/modelViolatedRulesOperation",
            "title": "What operation is used for the consent checking"
          },
          "value": {
            "type": "string",
            "title": "The value of what is compared"
          },
          "gap": {
            "type": "integer",
            "format": "int32",
            "title": "How many days different between the shifts"
          },
          "space": {
            "type": "integer",
            "format": "int32",
            "title": "The duration from the next or previous shift to the current shift in seconds"
          }
        }
      },
      "modelViolatedRulesWarning": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "tenantschedulev2modelShift": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "title": "Shift ID"
          },
          "start": {
            "type": "string",
            "title": "Shift start time, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "end": {
            "type": "string",
            "title": "Shift end time, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "mealbreakDuration": {
            "type": "number",
            "format": "float",
            "title": "Shift mealbreak stored in minutes"
          },
          "mealbreakSlots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelBreak"
            },
            "title": "Shift break slots"
          },
          "duration": {
            "type": "number",
            "format": "float",
            "title": "Total hours of shift works excluding mealbreak"
          },
          "cost": {
            "type": "number",
            "format": "float",
            "title": "Shift total cost"
          },
          "area": {
            "type": "integer",
            "format": "int32",
            "title": "Area Id where shift is allocated"
          },
          "employee": {
            "type": "integer",
            "format": "int32",
            "title": "Employee ID the shift is assigned"
          },
          "note": {
            "type": "string",
            "title": "Notes or comments regarding the shift"
          },
          "warning": {
            "type": "string",
            "title": "Warning message"
          },
          "warningOverrideComment": {
            "type": "string",
            "title": "Details once warning message is overridden"
          },
          "isPublished": {
            "type": "boolean",
            "title": "If shift is published or not"
          },
          "timesheet": {
            "type": "integer",
            "format": "int32",
            "title": "Timesheet ID connected to the shift"
          },
          "isOpen": {
            "type": "boolean",
            "title": "If shift is open or not"
          },
          "approvalRequired": {
            "type": "boolean",
            "title": "If approval is required or not"
          },
          "confirmationStatus": {
            "$ref": "#/components/schemas/modelConfirmationStatus",
            "title": "Shift confirmation status"
          },
          "confirmationNote": {
            "type": "string",
            "title": "Message displayed on confirmation"
          },
          "confirmedByWhom": {
            "type": "integer",
            "format": "int32",
            "title": "Employee who confirmed the shift"
          },
          "confirmedAt": {
            "type": "string",
            "title": "Shift confirmation time, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "swapStatus": {
            "$ref": "#/components/schemas/modelSwapStatus",
            "title": "Shift swap status once shift is opened for swap"
          },
          "swapApprovedBy": {
            "type": "integer",
            "format": "int32",
            "title": "Shift Swap Manager ID"
          },
          "shiftTemplate": {
            "type": "integer",
            "format": "int32",
            "title": "Shift Template ID"
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/v2modelChildShift"
            },
            "title": "Child Shifts"
          },
          "canEdit": {
            "type": "boolean",
            "title": "Can edit this shift"
          },
          "customFields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tenantsharedv2modelCustomField"
            },
            "title": "Custom Fields"
          },
          "customFieldData": {
            "type": "integer",
            "format": "int32",
            "title": "Custom Field Data ID"
          },
          "creator": {
            "type": "integer",
            "format": "int32",
            "title": "Employee ID who created shift"
          },
          "createdAt": {
            "type": "string",
            "title": "When the shift was created, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "modifiedAt": {
            "type": "string",
            "title": "When the shift was modified, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "consentChangesets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/modelShiftConsentChangeset"
            },
            "title": "Consent changeset data"
          },
          "areaName": {
            "type": "string",
            "title": "Area name"
          },
          "location": {
            "type": "integer",
            "format": "int32",
            "title": "Location Id"
          },
          "locationName": {
            "type": "string",
            "title": "Location name"
          }
        },
        "title": "Shift"
      },
      "tenantsharedv2modelBreakType": {
        "type": "string",
        "enum": [
          "MEAL_BREAK",
          "REST_BREAK"
        ],
        "default": "MEAL_BREAK",
        "title": "Break Type"
      },
      "v2modelChildShift": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "title": "Shift ID"
          },
          "start": {
            "type": "string",
            "title": "Shift start time, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "end": {
            "type": "string",
            "title": "Shift end time, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "cost": {
            "type": "number",
            "format": "float",
            "title": "Shift total cost"
          },
          "area": {
            "type": "integer",
            "format": "int32",
            "title": "Area Id where shift is allocated"
          },
          "canEdit": {
            "type": "boolean",
            "title": "Can edit this shift"
          },
          "parentId": {
            "type": "integer",
            "format": "int32",
            "title": "Shift parent id"
          },
          "isOpen": {
            "type": "boolean",
            "title": "If shift is open or not"
          },
          "approvalRequired": {
            "type": "boolean",
            "title": "If approval is required or not"
          },
          "isPublished": {
            "type": "boolean",
            "title": "If shift is published or not"
          },
          "confirmationStatus": {
            "$ref": "#/components/schemas/modelConfirmationStatus",
            "title": "Child shift confirmation status"
          },
          "confirmedByWhom": {
            "type": "integer",
            "format": "int32",
            "title": "Employee who confirmed the child shift"
          },
          "confirmedAt": {
            "type": "string",
            "title": "Shift confirmation time, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "creator": {
            "type": "integer",
            "format": "int32",
            "title": "Employee ID who created shift"
          },
          "createdAt": {
            "type": "string",
            "title": "When the shift was created, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "modifiedAt": {
            "type": "string",
            "title": "When the shift was modified, format ISO8601 eg 2012-12-18T13:45:00+01:00"
          },
          "warning": {
            "type": "string"
          },
          "warningOverrideComment": {
            "type": "string"
          },
          "areaName": {
            "type": "string",
            "title": "Area name"
          },
          "location": {
            "type": "integer",
            "format": "int32",
            "title": "Location Id"
          },
          "locationName": {
            "type": "string",
            "title": "Location name"
          }
        },
        "title": "Child Shift"
      },
      "OperationLock": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "ids": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          }
        }
      },
      "ScheduleShiftOperation": {
        "type": "object",
        "properties": {
          "operationId": {
            "type": "string",
            "description": "Unique identifier for the operation. Use this to poll /operations/v2/operations/{id} for status updates."
          },
          "locks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OperationLock"
            },
            "description": "Virtual Locks held by this operation that prevent conflicting operations."
          }
        },
        "description": "Operation tracking information for asynchronous APIs."
      },
      "ScheduleShiftUpdateResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "$ref": "#/components/schemas/tenantschedulev2modelShift"
          },
          "metadata": {
            "$ref": "#/components/schemas/ScheduleShiftUpdateResponseMetadata",
            "description": "Optional metadata containing operation tracking information for asynchronous background jobs."
          }
        },
        "description": "Response after updating a shift. Synchronous API - shift update completes immediately.\nCost recalculation for affected shifts runs asynchronously in the background.\nIf cost recalculation is triggered, metadata.operation contains the operation ID for polling status."
      },
      "ScheduleShiftUpdateResponseMetadata": {
        "type": "object",
        "properties": {
          "operation": {
            "$ref": "#/components/schemas/ScheduleShiftOperation",
            "description": "Operation tracking information for background cost recalculation.\nOne operation tracks cost recalculation for all affected employees' shifts in the pay period."
          }
        }
      },
      "UpdateRequestUpdateData": {
        "type": "object",
        "properties": {
          "shift": {
            "$ref": "#/components/schemas/tenantschedulev2modelShift"
          },
          "override": {
            "$ref": "#/components/schemas/modelShiftOverride"
          }
        }
      },
      "modelCompliance": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/modelComplianceType"
          }
        }
      },
      "modelComplianceType": {
        "type": "string",
        "enum": [
          "ALL"
        ],
        "default": "ALL"
      },
      "modelShiftOverride": {
        "type": "object",
        "properties": {
          "shiftValidation": {
            "type": "boolean",
            "title": "Overrides soft validations like leave, stress & unavailability"
          },
          "publishValidation": {
            "type": "boolean"
          },
          "compliance": {
            "$ref": "#/components/schemas/modelCompliance"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiToken": {
        "type": "apiKey",
        "in": "header",
        "name": "OAuth"
      }
    }
  },
  "paths": {
    "/management/v2/shifts/{id}": {
      "put": {
        "summary": "Update an existing shift",
        "operationId": "ScheduleShiftV2Controller_update",
        "responses": {
          "200": {
            "description": "A successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleShiftUpdateResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "tags": [
          "Shifts"
        ],
        "description": "Update an existing shift.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRequestUpdateData"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiToken": []
    }
  ]
}
```