Battery Management System
🟢 API Server Running
👋 Welcome

Welcome to the LithoVolt API Backend! This RESTful API provides comprehensive endpoints for managing lithium battery inventory, orders, warranties, and user accounts. The API uses JWT authentication for secure access to protected resources.

🔐 Authentication Endpoints
POST
/api/auth/login/
Authenticate user with email and password to receive JWT tokens.
POST
/api/auth/register/
Register a new user account with email, password, and phone.
GET
/api/auth/profile/
Retrieve the authenticated user's profile information.
POST
/api/auth/refresh/
Refresh an expired access token using the refresh token.
POST
/api/auth/logout/
Invalidate the current JWT token and logout the user.
POST
/api/auth/otp/send/
Send an OTP code to the user's phone number.
📦 Inventory Management
GET
/api/inventory/models/
List all available battery models.
GET
/api/inventory/serials/
Manage battery serial numbers and allocation.
GET
/api/inventory/accessories/
View available battery accessories and components.
💼 Business Operations
GET
/api/orders/
Manage customer orders and order details.
GET
/api/warranties/
Handle warranty registration and verification.
GET
/api/warranty-claims/
Process warranty claims and manage claim status.
🚀 Getting Started

1. Authentication: Send a POST request to /api/auth/login/ with your email and password to receive JWT tokens (access and refresh).

2. Authorization: Include the access token in the Authorization header: Authorization: Bearer YOUR_TOKEN

3. Headers: Always include Accept: application/json header with your requests.

4. Token Refresh: When your access token expires, use the refresh token to obtain a new one from /api/auth/refresh/.