API Reference

SamTechy API

RESTful API reference for integrating SamTechy with your existing systems and workflows.

Base URL

https://api.samtechy.com/v2

All endpoints require Bearer token authentication. Include your API key in the Authorization header.

Authentication

POST
/auth/login

Authenticate with email/password or phone/password

POST
/auth/register

Create a new user account with role assignment

POST
/auth/otp/send

Send OTP to customer email for verification

POST
/auth/otp/verify

Verify OTP and return session token

POST
/auth/refresh

Refresh an expired authentication token

Tickets

GET
/tickets

List all tickets with filters (status, priority, date, engineer)

POST
/tickets

Create a new service ticket with machine and client details

PATCH
/tickets/:id/status

Update ticket status (Pending, Forwarded, Completed)

POST
/tickets/:id/photos

Upload service photos with compression

GET
/tickets/:id/timeline

Get full audit trail and status history

Users & Roles

GET
/users

List users filtered by role (admin, engineer, dealer, customer)

POST
/users

Create a new user with role and org assignment

GET
/engineers/:id/performance

Get engineer performance metrics and stats

GET
/dealers/:id/clients

List all clients under a dealer's portfolio

Machines

GET
/machines

List machines with warranty, model, and ownership filters

POST
/machines

Register a new machine with model, serial, and client link

GET
/machines/:id/history

Get full service history for a machine

Notifications

POST
/notifications/send

Send push notification to specific users or roles

GET
/notifications

List notification history for the authenticated user

Analytics

GET
/analytics/overview

High-level KPIs: tickets, resolution time, active machines

GET
/analytics/engineers

Per-engineer metrics and scorecards

GET
/analytics/expenses

Expense breakdowns by category and engineer

GET
/reports/export

Export reports as Excel or PDF with date range filtering