Schedule Shifts API
Imported schedule data from external systems
Deprecated upstream. This endpoint described the legacy analytics_api HTTP surface.
Production schedule data is written by the sync-schedule-from-7shifts Vercel cron via
@repo/sevenshifts into management_shifts. See
Scheduling and ADR-0058.
Overview
This compatibility reference describes a legacy read-only schedule-shift view. It does not synchronize data, write schedules, create lineup assignments, or seed compliance rosters. Production writes come from the sync-schedule-from-7shifts Vercel cron; imported shifts are consumed as a read model by scheduling surfaces.
Endpoint
GET /api/schedule/{location_slug}
Authentication
Legacy: Required an ANALYTICS_API_KEY via the Authorization: Bearer header on the
decommissioned analytics_api service. Production uses @repo/sevenshifts + Vercel cron.
Query Parameters
| Name | Type | Description |
|---|---|---|
location_slug | string | Location slug in the path |
start_date | date | Start date for the range, defaults to yesterday |
end_date | date | End date for the range, defaults to start_date + 6 days |
employee_key | string | Optional employee filter |
department | string | Optional department filter: FOH, BOH, or Other |
daypart | string | Optional daypart filter: Lunch, Dinner, or LateNight |
include_draft | boolean | Include draft shifts, defaults to false |
limit | integer | Maximum shifts per page, defaults to 100 |
offset | integer | Pagination offset, defaults to 0 |
Response
{
"location_slug": "cobbsmchenry",
"location_name": "D.C. Cobb's McHenry",
"start_date": "2026-05-18",
"end_date": "2026-05-24",
"shifts": [
{
"shift_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"business_date": "2026-05-18",
"employee_name": "Jane Doe",
"employee_key": "abc123def456",
"role": "Server",
"department": "FOH",
"daypart": "Dinner",
"start_at": "2026-05-18T16:00:00-05:00",
"end_at": "2026-05-18T23:00:00-05:00",
"hours_worked": "7.0",
"hourly_wage": "12.50",
"is_draft": false
}
],
"total_count": 1,
"limit": 100,
"offset": 0,
"generated_at": "2026-05-17T06:15:00Z"
}