---
title: "Bulk patch shifts (asynchronous)"
method: POST
path: "/management/v2/shifts:bulkPatch"
tags: ["Shifts"]
---

# Bulk patch shifts (asynchronous)

`POST /management/v2/shifts:bulkPatch`

## Request

- Base URL: `https://your-subdomain.deputy.deputy.com/api`
- URL: `https://your-subdomain.deputy.deputy.com/api/management/v2/shifts:bulkPatch`
- Auth: API key in header `OAuth`

Partially updates multiple shifts in bulk using a patch mask. Only fields specified in the patchMask array will be updated. This is an asynchronous API that returns immediately with an operation ID in the response metadata.operation.id field. Use the operation ID to poll the /operations/v2/operations/{id} endpoint to check completion status. The operation processes patches in the background. Currently supports updating employee assignment and open shift status.

## Request body

- ScheduleShiftBulkPatchRequest: Request to patch (partially update) multiple shifts in bulk. Asynchronous API.
  - `data` BulkPatchRequestPatchData
    - `shiftIds` integer[]: Array of shift IDs to update.
    - `employee` integer: New employee ID to assign to the shifts (only applied if "employee" is in patchMask).
    - `isOpen` boolean: New open shift status (only applied if "isOpen" is in patchMask).
  - `patchMask` string[]: Array of field names to update. Only fields listed here will be modified (e.g., ["employee", "isOpen"]).

## Response `200`

A successful response.

- ScheduleShiftBulkPatchResponse: Response after initiating bulk patch operation. Asynchronous API - returns immediately with operation ID.
  - `success` boolean: Indicates whether the bulk patch request was accepted.
  - `metadata` ScheduleShiftBulkPatchResponseMetadata
    - `operation` ScheduleShiftOperation: Operation tracking information for asynchronous APIs.
      - `operationId` string: Unique identifier for the operation. Use this to poll /operations/v2/operations/{id} for status updates.
      - `locks` OperationLock[]: Virtual Locks held by this operation that prevent conflicting operations.
        - `kind` string
        - `ids` object

---

[API](https://skmtc.dev/deputy/apis/deputy-v2-api.md) - [All operations](https://skmtc.dev/deputy/apis/deputy-v2-api/llms.txt) - [OpenAPI document](https://skmtc.dev/deputy/apis/deputy-v2-api/revisions/78f0278f4608?raw)
