# Admin Frontend Features - Testing Checklist

**Last Updated:** 2026-01-08
**Total Endpoints:** 178
**Status:** All Working

---

## 1. Authentication

### Login
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| Admin login with valid credentials | `/api/v1/admin/auth/login` | POST | Working |
| Admin logout | `/api/v1/admin/auth/logout` | POST | Working |
| Invalid credentials error handling | `/api/v1/admin/auth/login` | POST | Working |

**Form Fields:**
- username (required)
- password (required)

---

## 2. Dashboard & Analytics

### Dashboard Overview
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| Load dashboard with metrics | `/api/v1/admin/dashboard` | GET | Working |
| Get comprehensive statistics | `/api/v1/admin/dashboard/stats` | GET | Working |
| Get platform statistics | `/api/v1/admin/dashboard/stats/platform` | GET | Working |
| Get marketplace breakdown | `/api/v1/admin/dashboard/stats/marketplace` | GET | Working |

**Metrics Displayed:**
- [ ] Total users, active users, pending users
- [ ] Total vendors, verified vendors, pending vendors
- [ ] Recent vendors list
- [ ] Recent import jobs

---

## 3. User Management

### User List & CRUD
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List all users with pagination | `/api/v1/admin/users` | GET | Working |
| Search users by username/email | `/api/v1/admin/users?search=` | GET | Working |
| Filter by role | `/api/v1/admin/users?role=` | GET | Working |
| Filter by active status | `/api/v1/admin/users?is_active=` | GET | Working |
| Create new user | `/api/v1/admin/users` | POST | Working |
| Get user statistics | `/api/v1/admin/users/stats` | GET | Working |
| Search users (autocomplete) | `/api/v1/admin/users/search?q=` | GET | Working |
| Get user details | `/api/v1/admin/users/{user_id}` | GET | Working |
| Update user | `/api/v1/admin/users/{user_id}` | PUT | Working |
| Toggle user status | `/api/v1/admin/users/{user_id}/status` | PUT | Working |
| Delete user | `/api/v1/admin/users/{user_id}` | DELETE | Working |

**Create User Form Fields:**
- [ ] email (required)
- [ ] username (required)
- [ ] password (required)
- [ ] first_name
- [ ] last_name
- [ ] role (required)

---

## 4. Company Management

### Company List & CRUD
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List all companies | `/api/v1/admin/companies` | GET | Working |
| Search companies | `/api/v1/admin/companies?search=` | GET | Working |
| Filter by active status | `/api/v1/admin/companies?is_active=` | GET | Working |
| Filter by verified status | `/api/v1/admin/companies?is_verified=` | GET | Working |
| Create new company | `/api/v1/admin/companies` | POST | Working |
| Get company details | `/api/v1/admin/companies/{company_id}` | GET | Working |
| Update company | `/api/v1/admin/companies/{company_id}` | PUT | Working |
| Verify company | `/api/v1/admin/companies/{company_id}/verification` | PUT | Working |
| Toggle company status | `/api/v1/admin/companies/{company_id}/status` | PUT | Working |
| Transfer ownership | `/api/v1/admin/companies/{company_id}/transfer-ownership` | POST | Working |
| Delete company (no vendors) | `/api/v1/admin/companies/{company_id}?confirm=true` | DELETE | Working |

**Create Company Form Fields:**
- [ ] name (required)
- [ ] description
- [ ] owner_email (required)
- [ ] contact_email (required)
- [ ] contact_phone
- [ ] website
- [ ] business_address
- [ ] tax_number

---

## 5. Vendor Management

### Vendor List & CRUD
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List all vendors | `/api/v1/admin/vendors` | GET | Working |
| Search vendors | `/api/v1/admin/vendors?search=` | GET | Working |
| Filter by active status | `/api/v1/admin/vendors?is_active=` | GET | Working |
| Filter by verified status | `/api/v1/admin/vendors?is_verified=` | GET | Working |
| Create new vendor | `/api/v1/admin/vendors` | POST | Working |
| Get vendor statistics | `/api/v1/admin/vendors/stats` | GET | Working |
| Get vendor details (by ID) | `/api/v1/admin/vendors/{vendor_id}` | GET | Working |
| Get vendor details (by code) | `/api/v1/admin/vendors/{vendor_code}` | GET | Working |
| Update vendor | `/api/v1/admin/vendors/{vendor_identifier}` | PUT | Working |
| Verify vendor | `/api/v1/admin/vendors/{vendor_identifier}/verification` | PUT | Working |
| Toggle vendor status | `/api/v1/admin/vendors/{vendor_identifier}/status` | PUT | Working |
| Delete vendor (confirm) | `/api/v1/admin/vendors/{vendor_identifier}?confirm=true` | DELETE | Working |
| Export Letzshop CSV (download) | `/api/v1/admin/vendors/{vendor_identifier}/export/letzshop` | GET | Working |
| Export Letzshop CSV (to folder) | `/api/v1/admin/vendors/{vendor_identifier}/export/letzshop` | POST | Working |

**Create Vendor Form Fields:**
- [ ] name (required)
- [ ] description
- [ ] company_id (required)
- [ ] letzshop_csv_url_fr
- [ ] letzshop_csv_url_en
- [ ] letzshop_csv_url_de

---

## 6. Product Management

### Marketplace Products
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List marketplace products | `/api/v1/admin/products` | GET | Working |
| Search products | `/api/v1/admin/products?search=` | GET | Working |
| Filter by marketplace | `/api/v1/admin/products?marketplace=` | GET | Working |
| Filter by vendor | `/api/v1/admin/products?vendor_name=` | GET | Working |
| Filter by availability | `/api/v1/admin/products?availability=` | GET | Working |
| Get product statistics | `/api/v1/admin/products/stats` | GET | Working |
| List marketplaces | `/api/v1/admin/products/marketplaces` | GET | Working |
| List product vendors | `/api/v1/admin/products/vendors` | GET | Working |
| Copy products to vendor | `/api/v1/admin/products/copy-to-vendor` | POST | Working |
| Get product details | `/api/v1/admin/products/{product_id}` | GET | Working |

### Vendor Products
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List vendor products | `/api/v1/admin/vendor-products` | GET | Working |
| Get vendor product stats | `/api/v1/admin/vendor-products/stats` | GET | Working |
| List catalog vendors | `/api/v1/admin/vendor-products/vendors` | GET | Working |
| Get vendor product detail | `/api/v1/admin/vendor-products/{product_id}` | GET | Working |
| Create vendor product | `/api/v1/admin/vendor-products` | POST | Working |
| Update vendor product | `/api/v1/admin/vendor-products/{product_id}` | PATCH | Working |
| Delete vendor product | `/api/v1/admin/vendor-products/{product_id}` | DELETE | Working |

---

## 7. Order Management

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List all orders | `/api/v1/admin/orders` | GET | Working |
| Filter by vendor | `/api/v1/admin/orders?vendor_id=` | GET | Working |
| Filter by status | `/api/v1/admin/orders?status=` | GET | Working |
| Filter by channel | `/api/v1/admin/orders?channel=` | GET | Working |
| Search orders | `/api/v1/admin/orders?search=` | GET | Working |
| Get order statistics | `/api/v1/admin/orders/stats` | GET | Working |
| List vendors with orders | `/api/v1/admin/orders/vendors` | GET | Working |
| Get order details | `/api/v1/admin/orders/{order_id}` | GET | Working |
| Update order status | `/api/v1/admin/orders/{order_id}/status` | PATCH | Working |
| Mark order as shipped | `/api/v1/admin/orders/{order_id}/ship` | POST | Working |
| Get shipping label info | `/api/v1/admin/orders/{order_id}/shipping-label` | GET | Working |

---

## 8. Customer Management

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List all customers | `/api/v1/admin/customers` | GET | Working |
| Filter by vendor | `/api/v1/admin/customers?vendor_id=` | GET | Working |
| Search customers | `/api/v1/admin/customers?search=` | GET | Working |
| Filter by active status | `/api/v1/admin/customers?is_active=` | GET | Working |
| Get customer statistics | `/api/v1/admin/customers/stats` | GET | Working |
| Get customer details | `/api/v1/admin/customers/{customer_id}` | GET | Working |
| Toggle customer status | `/api/v1/admin/customers/{customer_id}/toggle-status` | PATCH | Working |

---

## 9. Inventory Management

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List all inventory | `/api/v1/admin/inventory` | GET | Working |
| Filter by vendor | `/api/v1/admin/inventory?vendor_id=` | GET | Working |
| Filter by location | `/api/v1/admin/inventory?location=` | GET | Working |
| Filter low stock | `/api/v1/admin/inventory?low_stock=` | GET | Working |
| Get inventory statistics | `/api/v1/admin/inventory/stats` | GET | Working |
| Get low stock items | `/api/v1/admin/inventory/low-stock` | GET | Working |
| List vendors with inventory | `/api/v1/admin/inventory/vendors` | GET | Working |
| List inventory locations | `/api/v1/admin/inventory/locations` | GET | Working |
| Get vendor inventory | `/api/v1/admin/inventory/vendors/{vendor_id}` | GET | Working |
| Get product inventory | `/api/v1/admin/inventory/products/{product_id}` | GET | Working |
| Set inventory quantity | `/api/v1/admin/inventory/set` | POST | Working |
| Adjust inventory | `/api/v1/admin/inventory/adjust` | POST | Working |
| Update inventory entry | `/api/v1/admin/inventory/{inventory_id}` | PUT | Working |
| Delete inventory entry | `/api/v1/admin/inventory/{inventory_id}` | DELETE | Working |
| Import inventory (TSV/CSV) | `/api/v1/admin/inventory/import` | POST | Working |
| List inventory transactions | `/api/v1/admin/inventory/transactions` | GET | Working |
| Get transaction statistics | `/api/v1/admin/inventory/transactions/stats` | GET | Working |

---

## 10. Marketplace Imports

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List import jobs | `/api/v1/admin/marketplace-import-jobs` | GET | Working |
| Filter by marketplace | `/api/v1/admin/marketplace-import-jobs?marketplace=` | GET | Working |
| Filter by status | `/api/v1/admin/marketplace-import-jobs?status=` | GET | Working |
| Create import job | `/api/v1/admin/marketplace-import-jobs` | POST | Working |
| Get import statistics | `/api/v1/admin/marketplace-import-jobs/stats` | GET | Working |
| Get import job details | `/api/v1/admin/marketplace-import-jobs/{job_id}` | GET | Working |
| Get import job errors | `/api/v1/admin/marketplace-import-jobs/{job_id}/errors` | GET | Working |

---

## 11. Settings & Configuration

### General Settings
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| Get all settings | `/api/v1/admin/settings` | GET | Working |
| Filter by category | `/api/v1/admin/settings?category=` | GET | Working |
| Get setting categories | `/api/v1/admin/settings/categories` | GET | Working |
| Get single setting | `/api/v1/admin/settings/{key}` | GET | Working |
| Create setting | `/api/v1/admin/settings` | POST | Working |
| Update setting | `/api/v1/admin/settings/{key}` | PUT | Working |
| Upsert setting | `/api/v1/admin/settings/upsert` | POST | Working |
| Delete setting | `/api/v1/admin/settings/{key}?confirm=true` | DELETE | Working |

### Display Settings
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| Get rows per page | `/api/v1/admin/settings/display/rows-per-page` | GET | Working |
| Set rows per page | `/api/v1/admin/settings/display/rows-per-page?rows=` | PUT | Working |
| Get public display settings | `/api/v1/admin/settings/display/public` | GET | Working |

### Email Settings
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| Get email configuration status | `/api/v1/admin/settings/email/status` | GET | Working |
| Update email settings | `/api/v1/admin/settings/email/settings` | PUT | Working |
| Reset email settings | `/api/v1/admin/settings/email/settings` | DELETE | Working |
| Send test email | `/api/v1/admin/settings/email/test` | POST | Working |

---

## 12. Notifications & Alerts

### Notifications
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List notifications | `/api/v1/admin/notifications` | GET | Working |
| Create notification | `/api/v1/admin/notifications` | POST | Working |
| Get recent notifications | `/api/v1/admin/notifications/recent` | GET | Working |
| Get unread count | `/api/v1/admin/notifications/unread-count` | GET | Working |
| Mark as read | `/api/v1/admin/notifications/{notification_id}/read` | PUT | Working |
| Mark all as read | `/api/v1/admin/notifications/mark-all-read` | PUT | Working |
| Delete notification | `/api/v1/admin/notifications/{notification_id}` | DELETE | Working |

### Alerts
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List platform alerts | `/api/v1/admin/notifications/alerts` | GET | Working |
| Create alert | `/api/v1/admin/notifications/alerts` | POST | Working |
| Resolve alert | `/api/v1/admin/notifications/alerts/{alert_id}/resolve` | PUT | Working |
| Get alert statistics | `/api/v1/admin/notifications/alerts/stats` | GET | Working |

---

## 13. Content Pages

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List platform default pages | `/api/v1/admin/content-pages/platform` | GET | Working |
| Create platform page | `/api/v1/admin/content-pages/platform` | POST | Working |
| Create vendor page | `/api/v1/admin/content-pages/vendor` | POST | Working |
| List all content pages | `/api/v1/admin/content-pages/` | GET | Working |
| Get page details | `/api/v1/admin/content-pages/{page_id}` | GET | Working |
| Update page | `/api/v1/admin/content-pages/{page_id}` | PUT | Working |
| Delete page | `/api/v1/admin/content-pages/{page_id}` | DELETE | Working |

---

## 14. Subscriptions & Billing

### Subscription Tiers
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List subscription tiers | `/api/v1/admin/subscriptions/tiers` | GET | Working |
| Get tier details | `/api/v1/admin/subscriptions/tiers/{tier_code}` | GET | Working |
| Create tier | `/api/v1/admin/subscriptions/tiers` | POST | Working |
| Update tier | `/api/v1/admin/subscriptions/tiers/{tier_code}` | PATCH | Working |
| Delete tier (soft) | `/api/v1/admin/subscriptions/tiers/{tier_code}` | DELETE | Working |

### Vendor Subscriptions
| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List vendor subscriptions | `/api/v1/admin/subscriptions` | GET | Working |
| Get subscription statistics | `/api/v1/admin/subscriptions/stats` | GET | Working |
| Get billing history | `/api/v1/admin/subscriptions/billing/history` | GET | Working |
| Create vendor subscription | `/api/v1/admin/subscriptions/{vendor_id}` | POST | Working |
| Get vendor subscription | `/api/v1/admin/subscriptions/{vendor_id}` | GET | Working |
| Update vendor subscription | `/api/v1/admin/subscriptions/{vendor_id}` | PATCH | Working |

---

## 15. Email Templates

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List email templates | `/api/v1/admin/email-templates` | GET | Working |
| Get template categories | `/api/v1/admin/email-templates/categories` | GET | Working |
| Get template | `/api/v1/admin/email-templates/{code}` | GET | Working |
| Get template language version | `/api/v1/admin/email-templates/{code}/{language}` | GET | Working |
| Update template | `/api/v1/admin/email-templates/{code}/{language}` | PUT | Working |
| Preview template | `/api/v1/admin/email-templates/{code}/preview` | POST | Working |
| Send test email | `/api/v1/admin/email-templates/{code}/test` | POST | Working |
| Get template logs | `/api/v1/admin/email-templates/{code}/logs` | GET | Working |

---

## 16. Logging & Monitoring

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| Get database logs | `/api/v1/admin/logs/database` | GET | Working |
| Get log statistics | `/api/v1/admin/logs/statistics` | GET | Working |
| Cleanup old logs | `/api/v1/admin/logs/database/cleanup?confirm=true` | DELETE | Working |
| Delete log entry | `/api/v1/admin/logs/database/{log_id}` | DELETE | Working |
| List log files | `/api/v1/admin/logs/files` | GET | Working |
| Get log file content | `/api/v1/admin/logs/files/{filename}` | GET | Working |
| Download log file | `/api/v1/admin/logs/files/{filename}/download` | GET | Working |
| Get log settings | `/api/v1/admin/logs/settings` | GET | Working |
| Update log settings | `/api/v1/admin/logs/settings` | PUT | Working |

---

## 17. Audit & Compliance

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List audit logs | `/api/v1/admin/audit/logs` | GET | Working |
| Get recent audit logs | `/api/v1/admin/audit/logs/recent` | GET | Working |
| Get my actions | `/api/v1/admin/audit/logs/my-actions` | GET | Working |
| Get actions by target | `/api/v1/admin/audit/logs/target/{target_type}/{target_id}` | GET | Working |

---

## 18. Messaging

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List conversations | `/api/v1/admin/messages` | GET | Working |
| Get unread count | `/api/v1/admin/messages/unread-count` | GET | Working |
| Get recipients list | `/api/v1/admin/messages/recipients` | GET | Working |
| Create conversation | `/api/v1/admin/messages` | POST | Working |
| Get conversation | `/api/v1/admin/messages/{conversation_id}` | GET | Working |
| Send message | `/api/v1/admin/messages/{conversation_id}/messages` | POST | Working |
| Close conversation | `/api/v1/admin/messages/{conversation_id}/close` | POST | Working |
| Reopen conversation | `/api/v1/admin/messages/{conversation_id}/reopen` | POST | Working |
| Mark as read | `/api/v1/admin/messages/{conversation_id}/read` | PUT | Working |
| Update preferences | `/api/v1/admin/messages/{conversation_id}/preferences` | PUT | Working |

---

## 19. Vendor Domains

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| Add domain | `/api/v1/admin/vendors/{vendor_id}/domains` | POST | Working |
| List vendor domains | `/api/v1/admin/vendors/{vendor_id}/domains` | GET | Working |
| Get domain detail | `/api/v1/admin/vendors/domains/{domain_id}` | GET | Working |
| Update domain | `/api/v1/admin/vendors/domains/{domain_id}` | PUT | Working |
| Delete domain | `/api/v1/admin/vendors/domains/{domain_id}` | DELETE | Working |
| Verify domain | `/api/v1/admin/vendors/domains/{domain_id}/verify` | POST | Working |
| Get verification instructions | `/api/v1/admin/vendors/domains/{domain_id}/verification-instructions` | GET | Working |

---

## 20. Vendor Themes

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| Get theme presets | `/api/v1/admin/vendor-themes/presets` | GET | Working |
| Get vendor theme | `/api/v1/admin/vendor-themes/{vendor_code}` | GET | Working |
| Update theme | `/api/v1/admin/vendor-themes/{vendor_code}` | PUT | Working |
| Apply preset | `/api/v1/admin/vendor-themes/{vendor_code}/preset/{preset_name}` | POST | Working |
| Delete theme (revert) | `/api/v1/admin/vendor-themes/{vendor_code}` | DELETE | Working |

---

## 21. Platform Health & Monitoring

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| Get platform health status | `/api/v1/admin/health` | GET | Working |
| Get capacity metrics | `/api/v1/admin/capacity` | GET | Working |
| Get subscription capacity | `/api/v1/admin/subscription-capacity` | GET | Working |
| Get growth trends | `/api/v1/admin/trends` | GET | Working |
| Get scaling recommendations | `/api/v1/admin/recommendations` | GET | Working |
| Create capacity snapshot | `/api/v1/admin/snapshot` | POST | Working |

---

## 22. Background Tasks

| Test Case | Route | Method | Status |
|-----------|-------|--------|--------|
| List background tasks | `/api/v1/admin/tasks` | GET | Working |
| Get task statistics | `/api/v1/admin/tasks/stats` | GET | Working |
| Get running tasks | `/api/v1/admin/tasks/running` | GET | Working |

---

## Summary

| Functional Area | Endpoints | Status |
|-----------------|-----------|--------|
| Authentication | 2 | Working |
| Dashboard & Analytics | 4 | Working |
| User Management | 11 | Working |
| Company Management | 10 | Working |
| Vendor Management | 14 | Working |
| Product Management | 14 | Working |
| Order Management | 7 | Working |
| Customer Management | 4 | Working |
| Inventory Management | 17 | Working |
| Marketplace Imports | 5 | Working |
| Settings & Configuration | 18 | Working |
| Notifications & Alerts | 11 | Working |
| Content Pages | 7 | Working |
| Subscriptions & Billing | 11 | Working |
| Email Templates | 8 | Working |
| Logging & Monitoring | 9 | Working |
| Audit & Compliance | 4 | Working |
| Messaging | 10 | Working |
| Vendor Domains | 7 | Working |
| Vendor Themes | 5 | Working |
| Platform Health | 6 | Working |
| Background Tasks | 3 | Working |
| **TOTAL** | **178** | **All Working** |
