W33DEV API Documentation v1.1
Welcome to the W33DEV API documentation. This comprehensive RESTful API provides access to user authentication, project management, services management, W33Keys integration, and administrative functions.
🎉 Latest Updates (Juli 2025)
- • Services Management API - Full CRUD operations with real database integration
- • Schema-Compatible API - Frontend-to-database field mapping with robust error handling
- • Advanced Service Categories - Real database enum mapping (web_development, app_development, design, consulting, maintenance)
- • Flexible Pricing System - Support for different price types and currencies
- • Enhanced Search & Filtering - Debounced search with category and status filters
- • W33Keys API Integration - Comprehensive API key management
- • Multiple API Variants - Test, Debug, and Compatible versions for development flexibility
- • Enhanced Authentication - 30-minute sessions with robust token handling
- • Debug & Diagnostic Tools - Comprehensive API testing suite with step-by-step diagnostics
- • Production-Ready Deployment - Live on w33dev.net with CORS support
Base URL
https://w33dev.net/api
Version
v1
Content Type
application/json
🚀 Quick API Test
Test API endpoints directly from this documentation
🔐 Authentication
All dashboard API endpoints require JWT token authentication. Include the token in the Authorization header.
Authorization: Bearer YOUR_JWT_TOKEN
/auth.php
Login
Authenticate and receive JWT token
Request Body:
{ "email": "admin@w33dev.net", "password": "your_password" }
Response:
{ "success": true, "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", "user": { "user_id": 1, "email": "admin@w33dev.net", "role": "admin" } }
/register.php
Register
Create new user account
Request Body:
{ "email": "user@example.com", "password": "securepassword", "username": "username" }
📊 Dashboard API
Administrative endpoints for managing projects, templates, services, and API keys.
Base path: /api/dashboard.php
📂 Projects
/dashboard.php/projects
Get All Projects
Retrieve list of all projects
Response:
[ { "id": 1, "name": "Website Redesign", "description": "Complete website overhaul", "status": "in_progress", "priority": "high", "start_date": "2024-01-01", "end_date": "2024-03-01", "client_name": "Client Name", "budget": 15000.00, "created_at": "2024-01-01T00:00:00Z" } ]
/dashboard.php/projects
Create Project
Create a new project
Request Body:
{ "name": "New Project", "description": "Project description", "status": "planning", "priority": "medium", "start_date": "2024-01-01", "end_date": "2024-06-01", "client_name": "Client Name", "budget": 10000.00 }
/dashboard.php/projects/{id}
Update Project
Update existing project
/dashboard.php/projects/{id}
Delete Project
Remove project from system
🔧 Services Management
Complete CRUD operations for services management with real database integration.
Base path: /api/services-compatible.php
📊 Database Schema
Services table structure with frontend-to-database field mapping:
Frontend Fields:
- •
id
- Service ID - •
name
- Service name - •
description
- Service description - •
category
- Service category - •
status
- Service status - •
price
- Service price - •
duration
- Estimated duration
Database Fields:
- •
id
- Primary key - •
name
- Service name - •
description
- Service description - •
category
- ENUM (web_development, app_development, design, consulting, maintenance) - •
is_active
- Boolean (maps to status) - •
base_price
- DECIMAL(10,2) - •
duration_estimate
- VARCHAR(100) - •
price_type
- ENUM ('hourly', 'project', 'monthly') - •
currency
- VARCHAR(3) (default: EUR) - •
created_at
- Timestamp - •
updated_at
- Timestamp
/api/services-compatible.php
Get All Services
Retrieve list of all services with optional filtering
Query Parameters:
- •
category
- Filter by category (web, mobile, design, consulting, maintenance) - •
status
- Filter by status (active, inactive) - •
search
- Search in name and description
Response:
{ "success": true, "data": [ { "id": 1, "name": "Website Development", "description": "Complete website development service", "category": "web", "status": "active", "price": 2500.00, "duration": "4-6 weeks", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } ], "count": 1, "filters": { "category": null, "status": null, "search": null } }
/api/services-compatible.php/{id}
Get Single Service
Retrieve a specific service by ID
Response:
{ "success": true, "data": { "id": 1, "name": "Website Development", "description": "Complete website development service", "category": "web", "status": "active", "price": 2500.00, "duration": "4-6 weeks", "created_at": "2024-01-01T00:00:00Z", "updated_at": "2024-01-01T00:00:00Z" } }
/api/services-compatible.php
Create Service
Create a new service
Request Body:
{ "name": "Mobile App Development", "description": "iOS and Android app development", "category": "mobile", "status": "active", "price": 5000.00, "duration": "8-12 weeks" }
Response (201 Created):
{ "success": true, "data": { "id": 2, "name": "Mobile App Development", "description": "iOS and Android app development", "category": "mobile", "status": "active", "price": 5000.00, "duration": "8-12 weeks", "created_at": "2024-07-01T10:30:00Z", "updated_at": "2024-07-01T10:30:00Z" } }
/api/services-compatible.php/{id}
Update Service
Update existing service (partial updates supported)
Request Body:
{ "price": 5500.00, "duration": "10-14 weeks", "status": "active" }
Response:
{ "success": true, "data": { "id": 2, "name": "Mobile App Development", "description": "iOS and Android app development", "category": "mobile", "status": "active", "price": 5500.00, "duration": "10-14 weeks", "created_at": "2024-07-01T10:30:00Z", "updated_at": "2024-07-01T11:15:00Z" } }
/api/services-compatible.php/{id}
Delete Service
Remove service from system
Response:
{ "success": true, "message": "Service deleted successfully", "data": { "deleted_id": 2, "deleted_at": "2024-07-01T11:20:00Z" } }
🔀 API Variants
Multiple API endpoints for different development needs:
✅ Compatible API (Recommended)
/api/services-compatible.php
Production-ready with real database integration and field mapping
🧪 Test API
/api/services-test.php
Mock data for frontend development and testing
🔧 Debug API
/api/services-debug.php
Diagnostic information and step-by-step debugging
🔑 W33Keys API Management
Comprehensive API key management system with role-based access control.
Base path: /api/w33keys.php
/api/w33keys.php
Get All API Keys
Retrieve list of all API keys with usage statistics
Response:
{ "success": true, "data": [ { "id": 1, "key_name": "Frontend API Key", "key_prefix": "w33k_****", "permissions": ["read", "write"], "status": "active", "last_used": "2024-07-01T10:00:00Z", "usage_count": 1247, "created_at": "2024-01-01T00:00:00Z" } ] }
/api/w33keys.php
Generate API Key
Create new API key with specified permissions
Request Body:
{ "key_name": "Mobile App API Key", "permissions": ["read", "write"], "description": "API key for mobile application" }
/dashboard.php/templates
Create Template
Add new template to library
🛠️ Services
/dashboard.php/services
Get All Services
Retrieve list of all services
Response:
[ { "id": 1, "name": "Web Development", "category": "web", "description": "Full-stack web development services", "price": 1500.00, "duration": 40, "status": "active", "created_at": "2024-01-01T00:00:00Z" } ]
/dashboard.php/services
Create Service
Add new service offering
🔑 W33Keys API Management
/dashboard.php/w33keys
Get All API Keys
Retrieve list of all managed API keys
Response:
[ { "id": 1, "api_name": "OpenAI API", "endpoint_url": "https://api.openai.com/v1/", "description": "AI model API access", "status": "active", "rate_limit": 1000, "usage_count": 245, "last_used": "2024-01-15T10:30:00Z", "created_at": "2024-01-01T00:00:00Z" } ]
/dashboard.php/w33keys
Add New API Key
Register new API key for management
⚠️ Error Codes
400 - Bad Request
Invalid request parameters or missing required fields
401 - Unauthorized
Invalid or missing authentication token
403 - Forbidden
Insufficient permissions for requested action
404 - Not Found
Requested resource does not exist
429 - Rate Limited
Too many requests, rate limit exceeded
500 - Server Error
Internal server error occurred
💡 Usage Examples
JavaScript Fetch Example
const token = localStorage.getItem('adminToken'); // Get all projects const response = await fetch('/api/dashboard.php/projects', { method: 'GET', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' } }); const projects = await response.json(); console.log(projects);
Create New Project Example
const newProject = { name: "E-commerce Platform", description: "Full-featured online store with payment integration", status: "planning", priority: "high", start_date: "2024-02-01", end_date: "2024-08-01", client_name: "RetailCorp", budget: 25000.00 }; const response = await fetch('/api/dashboard.php/projects', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify(newProject) }); const result = await response.json(); console.log('Project created:', result);