Skip to main content
Authenticated API

This endpoint requires a valid JWT Bearer token. Accessible via the API gateway.

Workforce API

Manage employee schedules, track time entries, and generate labor reports.

Overview

AttributeValue
Base Path/api/v1/workforce
AuthenticationBearer Token
Required Rolesrestaurant_staff, manager, restaurant_manager, tenant_admin, platform_admin, system_admin, super_admin

Endpoints

List Schedules

Retrieve employee schedules.

GET /api/v1/workforce/schedules

Query Parameters

ParameterTypeDescription
location_iduuidFilter by location
staff_iduuidFilter by specific employee
start_datedateStart of date range
end_datedateEnd of date range
statusstringscheduled, in_progress, completed, cancelled
departmentstringFilter by department
pageintegerPage number
limitintegerResults per page

Response

{
"data": [
{
"id": "sched_001",
"staff_id": "staff_abc",
"staff_name": "Jane Smith",
"location_id": "loc_123",
"department": "Front of House",
"role": "Server",
"shift_start": "2026-01-25T11:00:00Z",
"shift_end": "2026-01-25T19:00:00Z",
"break_duration_minutes": 30,
"status": "scheduled",
"notes": ""
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45
}
}

Schedule Status Values

StatusDescription
scheduledUpcoming shift
in_progressCurrently working
completedShift completed
cancelledShift cancelled

List Time Entries

Retrieve time clock entries.

GET /api/v1/workforce/time-entries

Query Parameters

ParameterTypeDescription
location_iduuidFilter by location
staff_iduuidFilter by employee
start_datedateStart of date range
end_datedateEnd of date range
statusstringpending, active, completed, missed
pageintegerPage number
limitintegerResults per page

Response

{
"data": [
{
"id": "time_001",
"staff_id": "staff_abc",
"staff_name": "Jane Smith",
"location_id": "loc_123",
"schedule_id": "sched_001",
"clock_in": "2026-01-25T10:58:00Z",
"clock_out": "2026-01-25T19:05:00Z",
"breaks": [
{
"start": "2026-01-25T14:00:00Z",
"end": "2026-01-25T14:30:00Z",
"type": "meal"
}
],
"total_hours": 7.62,
"overtime_hours": 0,
"status": "completed",
"tips_declared": 125.50
}
]
}

Time Entry Status Values

StatusDescription
pendingScheduled but not clocked in
activeCurrently clocked in
completedClocked out
missedScheduled but never clocked in

Get Labor Report

Generate a labor cost report.

GET /api/v1/workforce/reports/labor

Query Parameters

ParameterTypeDescription
location_iduuidFilter by location
start_datedateReport start date
end_datedateReport end date
group_bystringday, week, employee, department

Response

{
"period": {
"start": "2026-01-20",
"end": "2026-01-26"
},
"location_id": "loc_123",
"summary": {
"total_hours": 542.5,
"regular_hours": 520.0,
"overtime_hours": 22.5,
"total_labor_cost": 8750.00,
"avg_hourly_rate": 16.12
},
"by_department": [
{
"department": "Front of House",
"hours": 320.5,
"cost": 5128.00,
"headcount": 12
},
{
"department": "Back of House",
"hours": 222.0,
"cost": 3622.00,
"headcount": 8
}
],
"labor_percentage": {
"of_revenue": 28.5,
"target": 30.0,
"status": "good"
}
}

Staff Endpoints

Get Staff Profile

Retrieve staff member details.

GET /api/v1/staff/{staff_id}

Response

{
"id": "staff_abc",
"first_name": "Jane",
"last_name": "Smith",
"email": "jane.smith@restaurant.com",
"phone": "+1234567890",
"role": "Server",
"department": "Front of House",
"locations": ["loc_123", "loc_456"],
"hire_date": "2025-03-15",
"hourly_rate": 16.00,
"status": "active",
"certifications": [
{"type": "food_handler", "expires": "2027-03-15"},
{"type": "alcohol_service", "expires": "2026-06-01"}
],
"schedule_preferences": {
"max_hours_per_week": 40,
"preferred_days": ["monday", "tuesday", "wednesday", "thursday", "friday"],
"unavailable_dates": ["2026-02-14", "2026-02-15"]
}
}

Clock In/Out

Clock In

POST /api/v1/workforce/clock-in

Request Body

{
"staff_id": "staff_abc",
"location_id": "loc_123",
"pin": "1234",
"photo_verification": "base64_image_optional"
}

Response

{
"time_entry_id": "time_002",
"staff_id": "staff_abc",
"clock_in": "2026-01-25T10:58:00Z",
"scheduled_start": "2026-01-25T11:00:00Z",
"early_clock_in_minutes": 2,
"location_id": "loc_123",
"status": "active"
}

Clock Out

POST /api/v1/workforce/clock-out

Request Body

{
"time_entry_id": "time_002",
"tips_declared": 125.50,
"cash_drop": 350.00
}

Break Management

Start Break

POST /api/v1/workforce/breaks/start

Request Body

{
"time_entry_id": "time_002",
"break_type": "meal"
}

End Break

POST /api/v1/workforce/breaks/end

Request Body

{
"time_entry_id": "time_002"
}

Break Types

TypeTypical Duration
meal30 minutes
rest10-15 minutes
paidVaries

Schedule Management

Create Schedule

POST /api/v1/workforce/schedules

Request Body

{
"staff_id": "staff_abc",
"location_id": "loc_123",
"shift_start": "2026-01-26T11:00:00Z",
"shift_end": "2026-01-26T19:00:00Z",
"department": "Front of House",
"role": "Server",
"notes": "Training new hire"
}

Update Schedule

PUT /api/v1/workforce/schedules/{schedule_id}

Delete Schedule

DELETE /api/v1/workforce/schedules/{schedule_id}

Webhooks

EventDescription
workforce.clock_inEmployee clocked in
workforce.clock_outEmployee clocked out
workforce.break_startBreak started
workforce.break_endBreak ended
workforce.schedule_createdNew schedule created
workforce.schedule_updatedSchedule modified
workforce.overtime_alertEmployee approaching overtime

Error Responses

StatusCodeDescription
400invalid_date_rangeEnd date before start date
400invalid_statusStatus value not recognized
401invalid_pinClock in PIN incorrect
403not_scheduledNo schedule for this time
404staff_not_foundStaff ID not found
409already_clocked_inStaff already has active entry