All Systems Operational
⚡ v1.0.0 · FastAPI · Supabase

Blue Technology
Backend API

Production-grade REST API powering the BlueTech e-commerce platform and electronics repair booking system. Built for speed, security, and scale.

📖 Interactive Docs (Swagger) 📄 ReDoc Reference
25+
Endpoints
JWT
Auth Method
M-Pesa
Payments
SMS
Notifications
Points
Loyalty System
KES
Currency
API Reference
Available Endpoints
🔐
Admin Authentication

Dedicated admin-only auth. Role-based JWT with superadmin controls. Completely separate from client auth.

POST/api/v1/admin/auth/login
GET/api/v1/admin/auth/me
POST/api/v1/admin/auth/logout
POST/api/v1/admin/auth/change-password
POST/api/v1/admin/auth/create-admin
PUT/api/v1/admin/auth/deactivate/{id}
GET/api/v1/admin/auth/list
PUT/api/v1/admin/auth/users/{id}/toggle-active
👤
Client Authentication

Customer registration with referral code support, login, phone OTP verification, and password reset via SMS.

POST/api/v1/auth/signup
POST/api/v1/auth/login
POST/api/v1/auth/verify-phone
POST/api/v1/auth/forgot-password
POST/api/v1/auth/reset-password
POST/api/v1/auth/resend-code
📦
Products

Product catalog — public read, admin-guarded writes. Supports search and active-only filtering.

GET/api/v1/products
GET/api/v1/products/{id}
POST/api/v1/products 🔒 Admin
PUT/api/v1/products/{id} 🔒 Admin
DEL/api/v1/products/{id} 🔒 Admin
🛒
Orders

E-commerce order lifecycle. Supports loyalty points redemption and referral codes at checkout. Points awarded on delivery.

POST/api/v1/orders
GET/api/v1/orders
GET/api/v1/orders/{id}
PUT/api/v1/orders/{id}/status 🔒 Admin
GET/api/v1/orders/track/{phone}
🔧
Repair Bookings

Device repair job management. Status updates trigger SMS to customer at key stages.

POST/api/v1/bookings
GET/api/v1/bookings
GET/api/v1/bookings/{id}
PUT/api/v1/bookings/{id}/status 🔒 Admin
PUT/api/v1/bookings/{id}/cost 🔒 Admin
GET/api/v1/bookings/track/{phone}
💳
M-Pesa Payments

Safaricom M-Pesa STK push — initiate payment, receive Safaricom webhook callback, poll payment status.

POST/api/v1/payments/mpesa/initiate
POST/api/v1/payments/mpesa/callback
GET/api/v1/payments/mpesa/status/{id}
Loyalty & Referrals

Earn 10% of subtotal as points on delivery. 50 pts per referral. Redeem 1000+ pts for KES discount (delivery fee always charged).

GET/api/v1/points/me
GET/api/v1/points/history
POST/api/v1/points/redeem
GET/api/v1/points/admin/user/{id} 🔒 Admin
POST/api/v1/points/admin/award/{id} 🔒 Admin
🛠️
Repair Services

Repair services catalog with category filtering. Used for cost reference in booking workflow.

GET/api/v1/repair-services
GET/api/v1/repair-services/categories
GET/api/v1/repair-services/{id}
🗺️
Delivery Zones

Active delivery zones and their fees. Used at checkout to calculate order total.

GET/api/v1/delivery-zones
GET/api/v1/track/{phone}
❤️
Health & System

API and database health checks. Use for uptime monitoring and deployment verification.

GET/health
GET/health/db
GET/docs
GET/redoc

🔐 Admin Panel Access

Authenticate via /api/v1/admin/auth/login to receive a JWT token with role claims. All admin write operations require a valid admin Bearer token.

View Admin Docs →