Shifts

Copy shifts (asynchronous)

Copies shifts to new target dates. Supports two patterns: 1) Copy by date range and areas, 2) Copy specific shift IDs. This is an asynchronous API that returns immediately with a job ID in the response data.jobId field. Use the job ID to poll the /management/v2/shifts/copy/job/{jobId} endpoint to check completion status and retrieve results. The operation processes copying in the background.

post/management/v2/shifts:copy

Request

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

Request body

startDatestring

Start date of the shifts to copy. Format: YYYY-MM-DD (e.g., "2023-03-11"). Required for pattern 1.

endDatestring

End date of the shifts to copy (inclusive). Format: YYYY-MM-DD (e.g., "2023-03-18"). Required for pattern 1.

areasinteger[]

Array of area IDs to filter shifts for copying. If empty, all areas are included. Used for pattern 1.

targetDatesstring[]

Target dates to copy shifts to. Format: YYYY-MM-DD. Each date will receive copies of the source shifts. Mutually exclusive with dayOffsets.

viewType'DAILY' | 'DAILY_EMP' | 'WEEKLY' | 'WEEKLY_EMPLOYEE' | 'FORTNIGHTLY' | 'FORTNIGHTLY_EMP' | 'MONTHLY_EMPLOYEE' | 'FOURWEEKLY_EMP' | 'MONTHLY'
shiftIdsinteger[]

Array of specific shift IDs to copy. Used for pattern 2. If provided, startDate, endDate, and areas are ignored.

dayOffsetsinteger[]

Day offsets for copying shifts. Each value is the number of days to offset from source shift dates. Mutually exclusive with targetDates. When provided, viewType is not required.

Response

A successful response.

successboolean

Indicates whether the copy request was accepted.

Changes

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