Welcome to MechZie API
MechZie is an on-demand roadside mechanic dispatch service. This documentation covers the backend API for internal frontend developers building the Flutter customer and mechanic apps.Quickstart — First API Call in 5 Minutes
Firebase auth → JWT exchange → your first request.
Guides
Authentication
Firebase Phone OTP → JWT tokens, refresh flow, admin invites, role system.
Real-time Events
Socket.io setup, live mechanic tracking, dispatch offers, room management.
Job Lifecycle
State machine, dispatch tiers, line items, cancellation fees.
Payments
Razorpay integration, payment flow, webhooks, pricing in paisa.
Error Handling
Error codes, rate limits, pagination, validation errors.
File Uploads
S3 presigned URL flow for photos and documents.
Notifications
FCM push setup, in-app notifications, deep-linking.
Local Development
Clone, install, run the API locally with Docker.
API Reference
REST API Reference — 56 Endpoints
Interactive endpoint explorer with request/response examples. Covers auth, users, vehicles, jobs, mechanics, payments, ratings, notifications, uploads, admin, and super-admin.
API at a Glance
| Area | Endpoints | Key Features |
|---|---|---|
| Auth | 4 | Firebase OTP → JWT, token refresh, admin invites |
| Jobs | 13 | Full lifecycle, line items, state machine |
| Mechanics | 6 | Registration, availability, location, documents |
| Payments | 6 | Razorpay orders, verification, webhooks, fees |
| Tracking | 1 + 9 Socket.io events | Live GPS, ETA, dispatch offers |
| Notifications | 4 | FCM push, in-app list, mark read |
| Uploads | 1 | S3 presigned URLs |
| Ratings | 3 | Two-way ratings, 7-day window |
| Admin | 13 | Dashboard, mechanic verification, refunds |
Client SDK Requirements
Your Flutter app needs these packages to integrate with the API:| Package | Purpose |
|---|---|
firebase_auth | Phone OTP authentication |
socket_io_client | Real-time events (NOT raw WebSocket) |
razorpay_flutter | Payment checkout |
firebase_messaging | Push notifications |
flutter_secure_storage | Token storage |