Authentication
Admin login and session management
Loading API documentation…
Version 1.0.0
RESTful API for the Chinni Treasure — Little Love luxury e-commerce platform. Supports product catalog browsing, order placement and tracking, admin dashboard analytics, and secure JWT-based administrator authentication.
/api/auth/loginAuthentication
adminLoginapplication/jsonAdmin username
Admin password
{
"username": "admin",
"password": "your-password"
}Login successful. Sets HttpOnly session cookie.
Missing required fields
Invalid credentials
Rate limited — 5 attempts per minute per IP
/api/auth/logoutAuthentication
adminLogoutSession cookie cleared
/api/auth/meAuthentication
getSessionUser is authenticated
No valid session
/api/productsProducts
listProductsArray of active products with category info
/api/productsProducts
createProductAdmin session requiredapplication/jsonStock keeping unit
Product name
Product price
Product created successfully
Name and price are required
Unauthorized
/api/products/{id}Products
updateProductAdmin session requiredapplication/jsonProduct updated
Unauthorized
/api/products/{id}Products
deleteProductAdmin session requiredProduct deactivated
Unauthorized
/api/ordersOrders
listOrdersAdmin session requiredPaginated list of orders
Unauthorized
/api/ordersOrders
createOrderapplication/json10-digit phone
2-letter Indian state code
6-digit PIN
Order created successfully
Missing required fields or insufficient stock
Product not found
Conflict — retry your order
/api/orders/{id}Orders
getOrderFull order with items and status history
Order not found
/api/orders/{id}/statusOrders
updateOrderStatusAdmin session requiredapplication/jsonRequired when status is 'shipped'
For optimistic concurrency control
Order status updated
Tracking ID required for shipped, or invalid transition
Unauthorized
Order not found
Version conflict — order was modified by another request
/api/statsAnalytics
getDashboardStatsAdmin session requiredDashboard stats, chart data, and product sales
Unauthorized
/api/trackTracking
trackOrderMatching orders with item details
Provide orderId or phone parameter