DashboardSupportWelcome

👤 USER DOCS

Getting Started

Daily Operations

Shift Workspace & TasksPre-Shift SetupLine-Up CardsShift ReportsForms

Staff & Locations

Staff SchedulingManaging Locations

Oversight

Manager ReportsAnalyticsPre-Shift & Compliance

Incidents & Feedback

Incident ReportingAnonymous FeedbackMessages & Announcements

AI & Settings

AI ChatgearApp Settings

Administration

Dashboard & OnboardingAdmin

⚙️ DEVELOPER DOCS

Getting Started

Getting StartedDevelopmentDeployment Guide

Architecture

Architecture OverviewData FlowArchitecture Decision Records

Core Domain

Core DomainDatabase ReferenceLocations DomainAuth & RBACScheduling DomainReports DomainIncidents DomainNotifications DomainAudit Log & OptimizationDesign Audit Findings

Frontend

Frontend ArchitectureFormsLoading SkeletonsComponentsPWA & NotificationsimageScreenshots

API Reference

API Reference

Endpoints

POS Sales APIOptimization Data APISchedule Shifts APIEmployee Export APIReports APIIncidents APIAI Chat APIPush Notifications APIWebhooks APICron API

Contributing

ContributingcodeCode Examples

Security

Security & Compliance
Danvas IconDanvas
Danvas IconDanvas

Employee Export API

Employee data for import and bulk operations

Returns employee data for import operations, bulk invitations, and employee directory features.

The live API returns flat rows suitable for bulk provisioning and supports an optional location filter plus an include_all flag for inactive employees.

Endpoint

GET /api/analytics/employees/export

Query Parameters

ParameterTypeRequiredDescription
location_slugstring❌Filter by location
include_allboolean❌Include inactive employees as well (default: false)
limitinteger❌Maximum results (default: 500, max: 2000)

Response Schema

Schedule Shifts API

Imported schedule data from external systems

Reports API

Endpoints for submitting and retrieving shift and manager reports

On this page

EndpointQuery ParametersResponse SchemaEmployee FieldsExample RequestExample ResponseClient UsageError ResponsesRelated Files
Array<{
  employee_key: string;
  full_name: string;
  employee_type: string;
  first_name: string | null;
  last_name: string | null;
  active: boolean; // defaults to true
  email: string | null;
  phone: string | null;
  primary_location_slug




Employee Fields

FieldTypeNullableDefaultDescription
employee_keystringNo-Unique employee identifier
full_namestringNo-Employee full name
employee_typestringNo-Employee type (e.g., "Server")
first_namestringYesnullFirst name
last_namestringYesnullLast name
activebooleanNotrueEmployment status
emailstringYesnullEmail address
phonestringYesnullPhone number
primary_location_slugstringYesnullPrimary location
all_locationsstringYesnullComma-separated locations
primary_jobstringYesnullPrimary job role
primary_reporting_rolestringYesnullReporting role (e.g., "FOH")
all_jobsstringYesnullComma-separated job roles

Example Request

curl -X GET "https://analytics.example.com/api/analytics/employees/export?location_slug=downtown&include_all=false&limit=100" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

[
  {
    "employee_key": "emp-123",
    "full_name": "John Doe",
    "employee_type": "Server",
    "first_name": "John",
    "last_name": "Doe",
    "active": true,
    "email": "john@example.com",
    "phone": "555-1234"






Client Usage

import { getEmployeeExport } from '@repo/analytics/employee-client';

// Get all employees
const allEmployees = await getEmployeeExport();

// Get employees for specific location
const downtownEmployees = await getEmployeeExport({
  locationSlug: 'downtown'






Error Responses

StatusDescription
422Validation error

Related Files

FilePurpose
packages/analytics/employee-client.tsClient implementation with Zod schema
packages/database/src/schema/Employee-related database tables
:
string
|
null
;
all_locations: string | null;
primary_job: string | null;
primary_reporting_role: string | null;
all_jobs: string | null;
}>
,
"primary_location_slug": "downtown",
"all_locations": "downtown,midtown",
"primary_job": "Server",
"primary_reporting_role": "FOH",
"all_jobs": "Server,Host"
}
]
});
// Include all locations
const allEmployees = await getEmployeeExport({
includeAll: true,
limit: 500
});