InventoryManagementSystem API

Session-based internal API for inventory, analytics, and admin controls.

Authentication

Login first, then reuse the session cookie for all protected endpoints.

curl -sS -c cookie.txt -X POST https://inventory.ahmaddalao.com/api/auth/login \
  -H 'Content-Type: application/json' \
  -d '{"email":"admin@ahmaddalao.com","password":"YOUR_PASSWORD"}'

Endpoint Index

MethodPathDescription
GET/api/healthHealth check
POST/api/auth/loginLogin
POST/api/auth/logoutLogout
GET/api/auth/meCurrent user
GET/api/meta/optionsItems, storage areas, settings, capabilities
GET/api/dashboard/summaryKPI summary + low stock
GET/api/dashboard/analyticsTrend and analysis datasets
GET/api/settingsRead settings
PATCH/api/settingsUpdate settings (site, theme, notifications, policy)
GET/api/trashList deleted items and storage areas (owner/manager)
POST/api/trash/{entity}/{id}/restoreRestore deleted item/storage area
DELETE/api/trash/{entity}/{id}Owner-only permanent delete from trash
GET/api/audit-logsOwner-only write audit trail
GET/api/admin/usersList users (owner). Filters: search, role, limit
POST/api/admin/usersCreate user (owner)
PATCH/api/admin/users/{id}Update user (owner)
GET/api/storage-areasList storage areas
POST/api/storage-areasCreate storage area
PATCH/api/storage-areas/{id}Update storage area
DELETE/api/storage-areas/{id}Delete storage area
GET/api/itemsList items
POST/api/itemsCreate item
PATCH/api/items/{id}Update item
DELETE/api/items/{id}Delete item
GET/api/inventory/levelsInventory matrix
GET/api/inventory/movementsMovement history
POST/api/inventory/movementsApply movement

Create Item Example

curl -sS -b cookie.txt -X POST https://inventory.ahmaddalao.com/api/items \
  -H 'Content-Type: application/json' \
  -d '{
    "sku":"PRD-1001",
    "name":"Thermal Paper Roll",
    "category":"Supplies",
    "unit":"roll",
    "reorder_level":30,
    "is_active":true
  }'

Apply Transfer Example

curl -sS -b cookie.txt -X POST https://inventory.ahmaddalao.com/api/inventory/movements \
  -H 'Content-Type: application/json' \
  -d '{
    "movement_type":"transfer",
    "item_id":1,
    "from_storage_area_id":1,
    "to_storage_area_id":2,
    "quantity":12,
    "reference":"TR-2026-004",
    "note":"Rebalance for showroom"
  }'