API Documentation
Build on top of M-Duka. Our REST and GraphQL APIs power the next generation of African commerce.
Getting Started
Interactive Swagger docs — explore all REST endpoints with live examples.
GraphQL Playground
Run GraphQL queries interactively against the live M-Duka API.
Webhooks
Subscribe to events like order.placed and payment.completed. Contact us to register.
Authentication
JWT-based auth. Use the /auth/login endpoints to get your access token.
GraphQL Schema
Full type-safe GraphQL API. Use the playground schema explorer to browse all types.
REST API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/products | List all products with pagination and filters. |
| GET | /api/v1/products/:id | Get detailed information about a specific product. |
| POST | /api/v1/orders | Create a new order. |
| GET | /api/v1/orders/:id | Retrieve order details and status. |
| GET | /api/v1/vendors | List verified vendors. |
| POST | /api/v1/webhooks | Register a webhook for real-time events. |
Live Base URL (local): http://localhost:8001
Production Base URL: https://api.m-duka.tz
All endpoints require a JWT Bearer token obtained from POST /api/auth/login/password. See the Swagger playground for interactive documentation.
Need help integrating? Contact our developer support team.