REST API
API overview

REST API

Use this page to orient an integration, then open the domain guide for endpoint details and examples. The registered routes in the API source (opens in a new tab) define what the service supports.

Start with the integration walkthrough, browse the complete endpoint catalog, or open interactive Swagger UI.

Base URL

EnvironmentBase URL
Local defaulthttp://localhost:8080/api/v1
Other environments<API origin><API_BASE_PATH>

The API listens on port 8080 and uses /api/v1 by default. Both are configurable (PORT, API_BASE_PATH); confirm the deployed origin and configuration with the service operator. Endpoint paths on this site are relative to that base URL.

Authentication

Most business routes require a bearer access token:

Authorization: Bearer <access_token>

Register or log in using the authentication endpoints. Public routes include health checks, onboarding metadata, public reviews, and subscription plan reads. Some authenticated routes also require owner permissions, pharmacy personnel access, or admin MFA; each guide calls out those restrictions.

Common conventions

ConventionBehavior
ResponseStandard JSON response envelope; see authentication and security (opens in a new tab).
IDsUUIDs for persisted records.
MoneyInteger values in Tanzanian shillings (TZS).
DatesDate-only inputs generally use YYYY-MM-DD; timestamp fields are RFC 3339. Check the endpoint contract.
PaginationMany list routes accept page and page_size; defaults and maximums can differ by route.
ScopeAuthenticated requests use organisation and active-store context from the token.

Do not assume every resource uses identical filters, pagination limits, or CRUD behavior. Read the domain guide before relying on a field or side effect.

Domain map

DomainGuideWhat it covers
Accounts and authenticationAuthenticationRegistration, OTP, login, token refresh, profile, organisation, users, store switching, MFA.
InventoryInventoryProducts, categories, units, stock adjustments, batches, pharmacy inventory.
Point of saleTransactionsCheckout, transaction history, refunds, voids, receipts, summaries.
CustomersCustomersCustomer records, credit customer listing, SMS.
Credit tabsCreditsBalances, payments, reminders, notes, write-offs.
SuppliersSuppliersSuppliers, deliveries, payments, purchase orders, reorder suggestions.
ExpensesExpensesExpense records, categories, summaries.
StaffStaffStaff management, permissions, activity, statistics.
StoresStoresStore management, status, staff, performance.
AnalyticsAnalyticsSales, products, customers, cash flow, dashboard.
ReportsReportsGenerated exports and scheduled reports.
SubscriptionsSubscriptionsPlans, payments, subscription status, store limits.
AI conversationsAIChat, conversation history, suggestions, usage.
NotificationsNotificationsIn-app notifications and read status.
NotebookNotebookStore notes.
File uploadsUploadsAuthenticated object upload and deletion.
Public reviewsReviewsPublic review listing and authenticated submission.
Onboarding metadataMetaBusiness types, regions, districts, outlet types.
Health checksHealth checksPublic liveness and dependency checks.
Platform administrationAdmin APIAdmin and monitoring routes protected by MFA.

Source documentation

For the complete route index and implementation notes, see the API repository’s API reference (opens in a new tab), business workflows (opens in a new tab), and configuration guide (opens in a new tab).

The downloadable OpenAPI JSON contract provides route and method discovery in Swagger UI. Domain guides remain the detailed source for request fields, validation, role requirements, side effects, and response behavior.