Overview
Administrators have elevated permissions to manage the entire Iquea Commerce platform. This guide covers admin-specific features for product management, category organization, order processing, and inventory control.Admin Authentication
Admin users authenticate through the same login system but have elevated privileges:User Roles
| Role | Description | Permissions |
|---|---|---|
| CLIENTE | Regular customer | Browse, purchase, view own orders |
| ADMIN | Administrator | Full CRUD on products, categories, view all orders |
Admin status is determined by the
rol field in the user account. This is set at the database level and cannot be self-assigned.Managing Products
Administrators have full control over the product catalog through dedicated endpoints.Viewing All Products
View Product Grid
All products are displayed with:
- Product ID and SKU
- Name and description
- Category assignment
- Price (amount and currency)
- Dimensions (height × width × depth)
- Featured status (
es_destacado) - Current stock level
- Product image
Creating New Products
Add new items to the product catalog:Fill Required Fields
Complete all required product information:Basic Information
- SKU: Unique stock keeping unit code
- Name (
nombre): Product name - Description (
descripcion): Detailed product description
- Price Amount (
precioCantidad): Numeric price value - Currency (
precioMoneda): Currency symbol (e.g., ”€”)
- Height (
dimensionesAlto): Height in cm - Width (
dimensionesAncho): Width in cm - Depth (
dimensionesProfundo): Depth in cm
- Stock: Number of units available
- Featured (
es_destacado): Mark as featured product
- Image URL (
imagen_url): Product image URL
- Category: Select product category
Submit Product
Click “Create” to submit:
- POST request to
/api/productos - Product is validated and saved
- Returns created product with assigned ID
The SKU must be unique across all products. Duplicate SKUs will cause creation to fail.
Updating Products
Modify existing product information:Modify Fields
Update any product fields:
- Change price
- Update stock levels
- Toggle featured status
- Modify description
- Update dimensions
- Change category
- Update image URL
Deleting Products
Remove products from the catalog:Confirm Deletion
Confirm the deletion action in the dialog:
- DELETE request to
/api/productos/{id} - Product is permanently removed
Managing Categories
Organize products into logical categories for better navigation.Viewing All Categories
Access the category management interface:- View list of all categories
- See category name and slug
- Check number of products per category
Creating Categories
Enter Category Details
Fill in:
- Name (
nombre): Display name (e.g., “Salón”, “Dormitorio”) - Slug: URL-friendly identifier (e.g., “salon”, “dormitorio”)
Updating Categories
Modify existing category information:Deleting Categories
Viewing All Orders
Administrators can view and manage all customer orders.Order Management Interface
View All Orders
Unlike customers who see only their orders, admins see:
- All orders from all customers
- Order reference codes
- Customer information
- Order dates
- Current status
- Order totals
Updating Order Status
Admins can manually change order status:Change Status
Select new status from dropdown or buttons:
PENDIENTE→CONFIRMADOCONFIRMADO→ENVIADOENVIADO→ENTREGADO- Any status →
CANCELADO
Viewing Order Details
Admins have full access to all order information:- Complete customer information
- All line items with products
- Pricing details (unit price, quantity, subtotals)
- Order history and status changes
- Shipping information
Modifying Orders
Admins can update order details:Modify Order Details
Make changes:
- Add items: POST
/api/pedidos/{id}/detalles - Remove items: DELETE
/api/detalles/{id} - Update quantities: PUT
/api/detalles/{id}/cantidad?cantidad={qty}
Deleting Orders
Admins can permanently delete orders:- Click delete on order
- Confirm deletion
- DELETE request to
/api/pedidos/{id} - Order and all details are removed
Deletion is permanent and cannot be undone. Use cancellation status instead when possible.
Inventory Management
Control product stock levels and availability.Updating Stock Levels
Stock Visibility
- Stock > 0: Product available for purchase, shows “X unidades”
- Stock = 0: Product shows as “Agotado”, cannot be added to cart
Bulk Stock Updates
For updating multiple products:- Use product filters to find items needing updates
- Update each product individually via API
- Consider batch import/export for large inventory changes
The platform does not currently have automated stock deduction on order placement. Admins must manually adjust inventory after processing orders.
Product Search and Filtering
Admins have access to advanced search endpoints:Available Search Methods
| Endpoint | Description | Example |
|---|---|---|
/api/productos/buscar?nombre={text} | Search by name | nombre=sofá |
/api/productos/precio?min={min}&max={max} | Filter by price range | min=100&max=1000 |
/api/productos/sku/{sku} | Find by SKU | sku=SOFA-001 |
/api/productos/destacados | Get featured products | - |
/api/productos/categoria/{id} | Filter by category | categoria/5 |
Admin Best Practices
Verify Before Deletion
Always verify that products/categories are not actively referenced before deletion. Check for existing orders.
Maintain Stock Accuracy
Regularly update stock levels to reflect actual inventory. Set stock to 0 for unavailable items rather than deleting.
Use Featured Products Strategically
Mark high-quality or promotional items as featured. Limit to 6-8 products for optimal homepage display.
Process Orders Promptly
Update order statuses in a timely manner so customers can track their purchases accurately.
Maintain Category Structure
Keep category names consistent and logical. Use singular or plural consistently across all categories.
Security Considerations
Role-Based Access
Admin functions are protected:- Backend validates user role before allowing admin operations
- JWT tokens include role information
- Unauthorized access returns 403 Forbidden
Data Validation
All admin operations validate:- Required fields are present
- Data types are correct
- Unique constraints (SKU, category names)
- Referential integrity (categories exist)
API Reference Summary
Product Endpoints (Admin)
POST /api/productos- Create productPUT /api/productos/sku/{sku}- Update product by SKUDELETE /api/productos/{id}- Delete product
Category Endpoints (Admin)
POST /api/categorias- Create categoryPUT /api/categorias/{nombre}- Update categoryDELETE /api/categorias/{nombre}- Delete category
Order Endpoints (Admin)
GET /api/pedidos- List all ordersGET /api/pedidos/estado/{estado}- Filter by statusPUT /api/pedidos/{id}- Update orderDELETE /api/pedidos/{id}- Delete orderPOST /api/pedidos/{id}/detalles- Add order detailDELETE /api/detalles/{id}- Remove order detailPUT /api/detalles/{id}/cantidad- Update detail quantity
Troubleshooting
Cannot Access Admin Features
Problem: Admin options not visible Solution: Verify your account hasrol: ADMIN. Contact a system administrator to update your role.
Product Creation Fails
Problem: Cannot create new product Common Causes:- Duplicate SKU (must be unique)
- Missing required fields
- Invalid category reference
- Malformed image URL
Order Status Won’t Update
Problem: Order status update fails Solutions:- Verify order exists
- Check status is valid enum value
- Ensure you have admin permissions
Related Guides
- Shopping Guide - Customer shopping experience
- Cart and Checkout - Checkout process that creates orders
- Order Management - Customer order viewing