{"service":"Territory Mapping Pro API","status":"Active","version":"2.0 - REFACTORED ARCHITECTURE","architecture":"Single Source of Truth - WordPress manages all customer\/tier data","timestamp":"2026-04-09 10:08:24","features":{"\u2705 WordPress Integration":"Complete customer and subscription management","\u2705 Single Source of Truth":"No dual-tier management conflicts","\u2705 Real-time Tier Resolution":"All tier data from live WordPress queries","\u2705 Clean API Architecture":"api_keys table links to customers only","\u2705 Admin Dashboard":"Professional interface with real-time data","\u2705 Security":"JWT authentication with comprehensive input validation","\u2705 Rate Limiting":"Tier-based rate limiting with usage analytics and monitoring"},"endpoints":{"POST \/auth\/token":"Get JWT token with API key","GET \/state-by-coordinates":"Get state by lat\/lon coordinates [API KEY REQUIRED]","GET \/county-by-coordinates":"Get county by lat\/lon coordinates [API KEY REQUIRED]","GET \/zipcode-by-coordinates":"Get ZIP code by lat\/lon coordinates [API KEY REQUIRED]","GET \/?action=dashboard_stats":"Admin dashboard statistics [ADMIN AUTH REQUIRED]","GET \/?action=list_api_keys":"List all API keys with WordPress tier data [ADMIN AUTH REQUIRED]","GET \/?action=list_customers":"List all WordPress customers [ADMIN AUTH REQUIRED]","GET \/?action=list_subscription_plans":"List subscription plans from WordPress [ADMIN AUTH REQUIRED]","POST \/?action=create_api_key":"Create API key linked to customer [ADMIN AUTH REQUIRED]","POST \/?action=create_api_key_for_customer":"Create API key for customer from WordPress [WORDPRESS AUTH REQUIRED]","POST \/?action=change_customer_subscription":"Change customer subscription plan [ADMIN AUTH REQUIRED]","GET \/?action=get_rate_limit_status&api_key_id=X":"Get rate limit status and usage history [ADMIN AUTH REQUIRED]","POST \/?action=reset_rate_limit":"Reset rate limit for API key [ADMIN AUTH REQUIRED]","GET \/?action=get_usage_analytics&hours=24":"Get usage analytics for all API keys [ADMIN AUTH REQUIRED]","GET \/?action=get_log_analytics&hours=24":"Get system log analytics and performance metrics [ADMIN AUTH REQUIRED]"},"refactoring_notes":{"REMOVED":"Dual-tier management anti-pattern","ADDED":"Clean customer-linked API key system"}}