Authentication
Most endpoints require authentication. Include the JWT token in the Authorization header:
Authorization: Bearer <your_jwt_token>
Authenticate and receive JWT tokens. Required fields: username, password
Refresh your access token using a refresh token.
Inventory Management
Products
List all products with filtering options. Supports pagination, search, and filtering by category, business, and more.
Create a new product. Required fields include name, price, category, and business.
Retrieve details of a specific product.
Update an existing product.
Warehouses & Storefronts
List all warehouses for the current business.
List all storefronts for the current business.
Get the current employee's assigned workspace (warehouse or storefront).
Stock Management
List stock levels across all locations. Supports filtering by product, location, and business.
Create a stock transfer request between locations.
List all transfer requests with filtering options.
Sales Management
List all sales transactions with filtering by date, location, payment type, and more.
Create a new sale transaction with line items.
Retrieve details of a specific sale including all line items.
Get the current user's shopping cart.
Add an item to the cart. Required fields: product_id, quantity
Reports & Analytics
Get sales summary with filters for date range, location, and grouping options.
Get inventory summary showing stock levels, valuation, and turnover.
Get reconciliation reports for cash and inventory.
Response Format
All API responses are in JSON format. List endpoints return paginated results with the following structure:
{
"count": 150,
"next": "http://api.example.com/endpoint/?page=2",
"previous": null,
"results": [...]
}