API Documentation

AI Knowledge Engine API — v0.1.0

Base URL

Base endpoint for all API requests

http://localhost:3000

Service Approval Flow

Draft
Needs Review
Approved
Published

Endpoints

כללי

GET/health

בדיקת תקינות השרת

סריקה

POST/scan

התחלת סריקת אתר חדשה

{ "url": "https://example.com", "maxPages": 30 }
GET/scan/:id

פרטי סריקה

GET/scan/:id/status

סטטוס סריקה

GET/scan/business/:businessId

כל הסריקות של עסק

שירותים

GET/services/business/:businessId

כל השירותים של עסק

GET/services/:id

פרטי שירות

GET/services/:id/profile

פרופיל מלא של שירות

PUT/services/:id

עריכת שירות

PUT/services/:id/status

עדכון סטטוס שירות

{ "status": "approved" }
GET/services/:id/scores

ניקוד שירות

קטלוג

GET/catalog/business/:businessId

קטלוג AI מלא (JSON)

GET/catalog/business/:businessId/markdown

קטלוג בפורמט Markdown

GET/catalog/business/:businessId/csv

קטלוג בפורמט CSV

סוכן AI

GET/agent/catalog/services

כל השירותים המפורסמים (לסוכני AI)

POST/agent/recommend

המלצה על שירותים לפי צורך משתמש

{ "userNeed": "אני צריך אתר חדש", "budget": "5000-10000" }
GET/agent/catalog/recommend?intent=

המלצה לפי כוונת חיפוש

GET/agent/catalog/evidence?serviceId=

חבילת הוכחות לשירות

Full Example — End-to-End Scan

# 1. Start a scan
curl -X POST http://localhost:3000/scan \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "maxPages": 30}'

# Response: { "scanId": "abc123", "businessId": "xyz", "status": "queued" }

# 2. Check status
curl http://localhost:3000/scan/abc123/status

# 3. Get services
curl http://localhost:3000/services/business/xyz

# 4. Get AI catalog
curl http://localhost:3000/catalog/business/xyz

# 5. Get AI agent recommendation
curl -X POST http://localhost:3000/agent/recommend \
  -H "Content-Type: application/json" \
  -d '{"userNeed": "I need a new website for my business"}'