RESTful API documentation for developers
The RetailMind AI API is a RESTful JSON API. All endpoints are prefixed with /api/v1/.
All responses are in JSON format. List endpoints return paginated results with 20 items per page by default.
{
"count": 50,
"next": "https://...?page=2",
"previous": null,
"results": [...]
}
The API uses JWT (JSON Web Tokens) for authentication. Include the token in the Authorization header.
/api/v1/auth/login/
Authenticate and receive JWT tokens.
Request Body:
{
"email": "[email protected]",
"password": "your_password"
}
Response:
{
"access": "eyJ0eXAi...",
"refresh": "eyJ0eXAi...",
"user": { "id": "...", "email": "...", "role": "..." },
"must_change_password": false
}
/api/v1/auth/register/
Register a new business owner account. Creates an organization automatically.
Request Body:
{
"organization_name": "My Business",
"first_name": "John",
"last_name": "Doe",
"email": "[email protected]",
"phone_number": "+233201234567",
"password": "securepassword"
}
/api/v1/auth/forgot-password/
{"email": "..."}/api/v1/auth/reset-password/
{"token": "...", "new_password": "...", "new_password_confirm": "..."}/api/v1/token/refresh/
Refresh an expired access token using a valid refresh token.
/api/v1/users/
/api/v1/users/me/
/api/v1/users/create-staff/
/api/v1/shops/
/api/v1/shops/
/api/v1/shops/{id}/
/api/v1/shops/{id}/
/api/v1/products/
/api/v1/products/
/api/v1/products/categories/
/api/v1/products/suppliers/
/api/v1/inventory/
/api/v1/inventory/low-stock/
/api/v1/inventory/adjustments/
/api/v1/transactions/
/api/v1/transactions/
/api/v1/transactions/{id}/receipt/
/api/v1/staff/
/api/v1/staff/
/api/v1/fraud/alerts/
/api/v1/fraud/risk-profiles/
/api/v1/fraud/alerts/dashboard/
/api/v1/analytics/dashboard/overview/
/api/v1/analytics/dashboard/revenue-chart/
/api/v1/analytics/dashboard/shop-comparison/
/api/v1/payments/paystack/initialize/
/api/v1/payments/paystack/verify/{reference}/
Product
Print this QR code and paste it on the product for POS scanning
Enable Two-Factor Authentication (2FA) to protect your account from unauthorized access.