{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/workday-tracking-system/refs/heads/main/json-schema/scheduling-schedule-shifts-response-schema.json",
  "title": "ScheduleShiftsResponse",
  "description": "Paginated list of schedule shifts",
  "type": "object",
  "properties": {
    "total": { "type": "integer" },
    "offset": { "type": "integer" },
    "limit": { "type": "integer" },
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "A schedule shift assigned to a worker or position",
        "properties": {
          "id": { "type": "string", "description": "Unique Workday ID of the shift" },
          "workerId": { "type": "string", "description": "Worker assigned to this shift" },
          "organizationId": { "type": "string", "description": "Scheduling organization ID" },
          "shiftDate": { "type": "string", "format": "date", "description": "Date of the shift", "example": "2026-05-05" },
          "startTime": { "type": "string", "format": "time", "description": "Shift start time", "example": "08:00:00" },
          "endTime": { "type": "string", "format": "time", "description": "Shift end time", "example": "16:00:00" },
          "hours": { "type": "number", "format": "float", "description": "Scheduled hours for the shift", "example": 8.0 },
          "shiftType": { "type": "string", "description": "Type of shift", "enum": ["Regular", "Overtime", "OnCall", "Split"], "example": "Regular" },
          "status": { "type": "string", "description": "Shift status", "enum": ["Scheduled", "Confirmed", "Cancelled", "Completed"] },
          "notes": { "type": "string", "description": "Optional shift notes" }
        },
        "required": ["workerId", "shiftDate", "startTime", "endTime"]
      }
    }
  }
}
