TeamCopilot API overview
Authentication
All API routes require a valid Shopify App Bridge session token. Set theAuthorization: Bearer <token> header. Token exchange is handled by the requireShopSession() middleware. Route-level authorization uses teamMemberAccess, teamManagerAccess, or teamAdminAccess middleware backed by shop_staff_access.
Paid API routes require an active subscription and use requireFreshShopEntitlement() middleware.
Health check
{ ok: true, app: "team-ops", release: "<sha>", origin: "<url>" }. No authentication required.
Setup
key, title, description, href, complete, and blocked properties.
{"intent": "skip_setup"}. Persists setup dismissal per installation generation.
Team members
{ shopifyStaffGid?, name, email?, phone?, role, hourlyRateCents, pin, defaultLocationGid?, availability? }. PIN must be 4-8 digits. Requires idempotency-key header.
pin and status (active/inactive).
Locations
{ shopifyLocationGid, name, address?, latitude?, longitude?, geofenceMeters?, timezone?, active? }.
Shifts
{ teamMemberId?, role, locationGid, startsAt, endsAt, breakMinutes?, status?, notes?, laborBudgetCents? }. Detects overlap conflicts (409).
{ shiftIds: [...], notify?: boolean }. Sends email/SMS to assigned team members. Returns 207 for partial notification delivery.
Shift templates
{ name, role, locationGid, startsAt, endsAt, breakMinutes?, targetHeadcount? }.
Time clock
{ teamMemberId, pin, shiftId?, locationGid?, latitude?, longitude?, deviceFingerprint? }. Returns time entry and integrity evaluation. Rate-limited: 30 requests per 60 seconds per IP.
{ teamMemberId, pin, breakMinutes?, managerNote? }. Rate-limited: 30 requests per 60 seconds per IP.
Exceptions
Checklists
{ name, locationGid?, role?, cadence (daily|weekly|per_shift), items: [{ label, requiresPhoto?, sortOrder? }] }.
{ templateId, shiftId?, dueAt, locationGid? }.
{ teamMemberId, note?, assetBase64? }.
Commissions
{ name, ruleType (fixed_percent|fixed_amount|goal_bonus), rateBps?, amountCents?, goalThresholdCents?, productQuery?, startsOn?, endsOn?, active? }.
Billing
POS extension
The POS time-clock extension targetspos.home.tile.render (Tile.tsx) and pos.home.modal.render (Modal.tsx). It calls POST /api/time-clock/clock-in and POST /api/time-clock/clock-out with a bearer token from shopify.session.getSessionToken(). Request timeout: 15 seconds.
Webhooks
Webhook API version:
2026-04.
For the full externally reachable surface, see the source route definitions in src/routes.ts.
Pcnaid Documentation › Shopify Ecosystem › TeamCopilot › Developer