T1 Electrical SolutionsT1 Platform Docs
API and Mobile

Mobile API V2

Mobile API V2

API v2 routes are stateless JWT routes under /api/v2. They use Auth0Authenticator and UserProvider through the api firewall.

Electrician API

Controller: app/src/Controller/Api/V2/ElectricianController.php

Base route: /api/v2/electrician

Important endpoints:

EndpointPurpose
GET /meCurrent electrician profile/context.
GET /clientsAssigned/scoped clients.
GET /projectsAssigned projects.
GET /projects/{id}Project detail.
POST /projects/{id}/distanceProject distance/geofence style check.
GET /projects/{id}/cost-codesCost-code list used for validation.
GET /timesheetsList timesheets.
POST /timesheetsCreate or update weekly timesheet from entries[].
POST/PATCH /timesheets/{id}Update existing timesheet.
GET /expensesList expenses.
POST /expensesCreate expense.
POST/PATCH /expenses/{id}Update expense.

Supervisor API

Controller: app/src/Controller/Api/V2/SupervisorController.php

Base route: /api/v2/supervisor

Important endpoints:

EndpointPurpose
GET /meCurrent supervisor profile/context.
GET /projectsSupervised projects.
GET /timesheetsTimesheets pending/available for review.
GET /expensesExpenses pending/available for review.
POST/PATCH /timesheets/{id}/approveApprove/accept timesheet.
POST/PATCH /timesheets/{id}/rejectReject timesheet.
POST/PATCH /timesheets/{id}/cost-codesUpdate cost-code data.
POST/PATCH /expenses/{id}/approveApprove/accept expense.
POST/PATCH /expenses/{id}/rejectReject expense.
POST/PATCH /expenses/{id}/resubmitResubmit expense where supported.

Payload notes

Timesheet V2 payloads use entries[]. Each entry can carry allowances, materials, work conditions, and material stock confirmation. Cost codes are validated against the selected project's client cost-code list.

When the project primary address has radius validation enabled, submitted timesheets must include locationMeta.latitude and locationMeta.longitude; submissions outside the configured radius return 422 and are not saved as submitted.

On this page