---
title: "Create a shift"
method: POST
path: "/v1/shift"
tags: ["Shifts"]
---

# Create a shift

`POST /v1/shift`

Create a courier shift with start/end times and an assigned store location.

## Request body

- CreateShiftInputSerializer — Input for creating a shift.
  - `id` string, nullable — The ID of the shift.
  - `name` string, required — The name of the shift.
  - `plannedStart` string, required — The planned start timestamp of the shift.
  - `plannedEnd` string, required — The planned end timestamp of the shift.
  - `plannedBreakDuration` integer, nullable — The planned break duration of the shift.
  - `shiftMetadata` object, nullable — The metadata of the shift.
  - `optimizationParams` OptimizationParams — unresolved $ref
  - `status` string, nullable — The status of the shift.
  - `storeLocationId` string, nullable — The store location ID of the shift.
  - `externalStoreLocationId` string, nullable — The external store location ID of the shift.
  - `zoneIds` string[], nullable — The zone IDs of the shift.
  - `externalZoneIds` string[], nullable — The external zone IDs of the shift.

## Response `200`

OK

- ShiftResponse — Response for shift.
  - `id` string, required — The ID of the shift.
  - `name` string, required — The name of the shift.
  - `plannedStart` string, required — The planned start timestamp of the shift.
  - `plannedEnd` string, required — The planned end timestamp of the shift.
  - `plannedBreakDuration` integer, nullable — The planned break duration of the shift.
  - `shiftMetadata` object, nullable — The metadata of the shift.
  - `optimizationParams` OptimizationParams — unresolved $ref
  - `status` string, required — The status of the shift.
  - `storeLocationId` string, nullable — The store location ID of the shift.
  - `externalStoreLocationId` string, nullable — The external store location ID of the shift.
  - `zoneIds` string[], nullable — The zone IDs of the shift.
  - `externalZoneIds` string[], nullable — The external zone IDs of the shift.
  - `courierId` string, nullable — The courier ID of the shift.
  - `vehicleId` string, nullable — The vehicle ID of the shift.
  - `createdAt` string, required — The creation timestamp of the shift.
  - `updatedAt` string, required — The update timestamp of the shift.

## Other responses

- `422` — Unprocessable Content

---

[API](https://skmtc.dev/usenash/apis/nash-api.md) · [All operations](https://skmtc.dev/usenash/apis/nash-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/usenash/nash-api/revisions/09a23a95889b/schema)
