---
title: "Get preview of shifts to be published"
method: POST
path: "/management/v2/shifts/publish/preview"
tags: ["PublishShifts"]
---

# Get preview of shifts to be published

`POST /management/v2/shifts/publish/preview`

## Request

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

Returns all areas with unpublished shifts (including micro shifts) for the specified date range and locations

## Request body

- PublishPreviewPreviewRequest
  - `locationIds` integer[]
  - `locationMode` 'ALL' | 'SELECTED': LocationMode specifies how location filtering should be applied. - ALL: Include all locations accessible by the current user (no filtering) - SELECTED: Filter to only selected locations (requires locationIds to be provided)
  - `startDate` string
  - `endDate` string
  - `status` 'UNPUBLISHED' | 'ALL'

## Response `200`

A successful response.

- PublishPreviewPublishPreviewResponse
  - `success` boolean
  - `data` PublishPreviewPublishPreviewData
    - `microShiftsCount` integer
    - `totalShiftsCount` integer
    - `shiftsRequiringConsentCount` integer
    - `locations` PublishPreviewLocationPreview[]
      - `locationId` integer
      - `locationName` string
      - `areas` PublishPreviewAreaPreview[]
        - `areaId` integer
        - `areaName` string
        - `shiftIds` integer[]

---

[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)
