Skip to main content
POST
Assign staff to shift

Authorizations

Authorization
string
header
required

JWT token authentication

Headers

NexSpace-Version
string

Pin the request to a dated API version (e.g. 2026-05-10). Applied by app-level middleware to every /api route (server/routes/index.ts → apiVersionMiddleware), which echoes the resolved value back in the NexSpace-Version response header. Omit to get the latest version. Discover the catalog at GET /.well-known/api-versions.

Pattern: ^\d{4}-\d{2}-\d{2}$
Idempotency-Key
string

Replay guard for write requests. Applied by app-level middleware to every /api route (server/routes/index.ts → idempotencyMiddleware), which only acts on POST/PUT/PATCH — GET, DELETE and OPTIONS ignore the header. Re-sending the same key with an identical body within 24 hours replays the original response; the same key with a different body returns 409.

Maximum string length: 255

Path Parameters

id
integer
required

Shift ID

Body

application/json
staffIds
integer[]
required

Array of staff IDs to assign

Response

Staff assigned successfully

id
integer

Unique shift identifier

facilityId
integer

Facility where the shift takes place

title
string

Shift title or description

date
string<date>

Shift date

startTime
string<time>

Shift start time

endTime
string<time>

Shift end time

department
string | null

Department for the shift

specialty
string | null

Required specialty

requiredWorkers
integer

Number of workers needed

assignedStaffIds
integer[]

IDs of assigned staff members

status
enum<string>

Current shift status

Available options:
open,
assigned,
in_progress,
completed,
cancelled
urgency
enum<string>

Shift urgency level

Available options:
low,
medium,
high,
critical
rate
number<decimal> | null

Pay rate for the shift

notes
string | null

Additional notes or requirements

createdAt
string<date-time>
updatedAt
string<date-time>