API v1.0 · Stable Release

Build on TechMart
Africa's Tech Commerce Platform

A complete REST API for integrating with TechMart Africa — Kenya's premier tech e-commerce marketplace. Manage products, orders, clients, wallets, blogs and more with a single, consistent API.

Endpoints
API Sections
REST
Architecture
JSON
Format
What You Can Build

Everything the platform offers

TechMart Africa's API gives you full programmatic access to the entire commerce platform — from auth to inventory to payments.

🔐
Dual Authentication
Separate auth flows for admin users (OTP-secured 2-step) and customers (single-step token). Social login via Google and LinkedIn also supported.
📦
Product Management
Full CRUD for products, categories, brands, colors, tags, and statuses. Supports bulk import and rich attribute management.
🛒
Order & Checkout
Manage the full order lifecycle — cart, checkout, order tracking, fulfillment status, and shipping address management.
💳
Wallet & Payments
Client wallet top-up, balance management, and transaction history. Designed for the Kenyan market with KES currency support.
📝
Blog & Content
Manage blog categories and articles. Drive SEO and content marketing directly through the API with structured content models.
🏢
Multi-Warehouse
Warehouse-aware inventory management. Admin users are scoped to specific warehouses with role-based access control.
Authentication

Two auth flows, one platform

TechMart uses different authentication strategies for admin users vs customers — both return a Bearer token for subsequent requests.

ADMIN / STAFF
1
Login with credentials
Send email, password and remember_me to receive an encrypted session ID and OTP to your registered contact.
POST /auth/login
2
Verify OTP
Submit the encrypted ID + OTP received. On success you receive your Bearer token, user profile, warehouse and company data.
POST /auth/verify-otp
3
Use Bearer token
Include the token in all subsequent admin requests.
Authorization: Bearer {token}
CUSTOMER / CLIENT
1
Login or Register
Customers authenticate in a single step. Register with personal + address details, or login with email and password.
POST /client-auth/login
POST /client-auth/register
2
Or use Social Login
Get a redirect URL for Google or LinkedIn OAuth and handle the callback automatically.
GET /redirect/google
GET /redirect/linkedin
3
Use Bearer token
Token is returned directly in the login/register response — no OTP step required for customers.
Authorization: Bearer {token}
Quickstart

Up and running in minutes

Follow these steps to make your first authenticated API call to TechMart Africa.

1
Get your credentialsContact the TechMart team to receive your admin account email and initial password.
2
AuthenticateCall /auth/login then /auth/verify-otp to receive your Bearer token.
3
Set base URLAll endpoints are relative to https://api.techmart.africa/api
4
Make your first callTry fetching all product categories to verify your token is working.
5
Explore the API ReferenceUse the API Reference tab to browse all available endpoints with live examples.
first-request.sh
# Step 1 — Login
curl -X POST https://api.techmart.africa/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "you@techmart.africa",
    "password": "yourpassword",
    "remember_me": true
  }'

# Step 2 — Verify OTP (use id from above)
curl -X POST https://api.techmart.africa/api/auth/verify-otp \
  -H "Content-Type: application/json" \
  -d '{
    "id": "{{encrypted_id}}",
    "otp": "123456",
    "is_login": true
  }'

# Step 3 — Use your token
curl https://api.techmart.africa/api/categories \
  -H "Authorization: Bearer {{your_token}}" \
  -H "Accept: application/json"
Error Handling

Standard HTTP status codes

All responses include a success boolean and a message field. Errors follow the same consistent envelope.

200
OK
Request succeeded. Data is in the data field.
201
Created
Resource created successfully.
400
Bad Request
Missing or invalid parameters in the request body.
401
Unauthorized
Missing, invalid or expired Bearer token.
403
Forbidden
Token valid but insufficient role permissions.
404
Not Found
The requested resource or UUID does not exist.
422
Unprocessable
Validation failed — check field formats and requirements.
500
Server Error
Internal error — contact the TechMart engineering team.
Error Response Envelope
{
  "success": false,
  "data": [],
  "message": "The given data was invalid.",
  "errors": {
    "email": ["The email field is required."]
  }
}
TechMart Africa Developer Platform
Built with Laravel · REST API · JSON · Kenya 🇰🇪
Contact: mikethecode12@gmail.com · Hotline: +254 716 002 152
TechMart API Reference
Browse the sidebar to explore endpoints. Click any request to see its body, parameters, and full example responses.