Skip to main content

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.
These docs are optimized for AI-assisted development. Copy any page into your IDE’s AI assistant (Cursor, Copilot, etc.) for accurate code generation against the MechZie API.

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

AreaEndpointsKey Features
Auth4Firebase OTP → JWT, token refresh, admin invites
Jobs13Full lifecycle, line items, state machine
Mechanics6Registration, availability, location, documents
Payments6Razorpay orders, verification, webhooks, fees
Tracking1 + 9 Socket.io eventsLive GPS, ETA, dispatch offers
Notifications4FCM push, in-app list, mark read
Uploads1S3 presigned URLs
Ratings3Two-way ratings, 7-day window
Admin13Dashboard, mechanic verification, refunds

Client SDK Requirements

Your Flutter app needs these packages to integrate with the API:
PackagePurpose
firebase_authPhone OTP authentication
socket_io_clientReal-time events (NOT raw WebSocket)
razorpay_flutterPayment checkout
firebase_messagingPush notifications
flutter_secure_storageToken storage