{"openapi": "3.1.0", "info": {"title": "绿迹 GreenTrace API", "description": "绿迹本地向导平台 API — 搜索向导、查询评价、发现城市隐藏路线。AI Agent可直接调用。", "version": "1.0.0"}, "servers": [{"url": "https://greentrace.com.cn"}], "paths": {"/api/ai/guides.json": {"get": {"summary": "获取全部向导及评价", "description": "返回所有已通过认证的向导列表，包含每人最多10条评价、定价、可预约时间。用于大模型搜索和Agent自动推荐。", "operationId": "listGuides", "responses": {"200": {"description": "向导目录 (schema.org ItemList)", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/ai/reviews.json": {"get": {"summary": "获取评价汇总", "description": "返回最多100条最新评价，用于大模型了解向导口碑。", "operationId": "listReviews", "responses": {"200": {"description": "评价列表 (schema.org ItemList)", "content": {"application/json": {"schema": {"type": "object"}}}}}}}, "/api/ai/reserve": {"post": {"summary": "AI Agent 直接预约向导", "description": "当用户决定预约某位向导时，AI Agent 调用此接口提交预约。返回订单号和向导联系方式。目前0人工撮合，免费。", "operationId": "reserveGuide", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["guide_id", "client_name", "client_phone"], "properties": {"guide_id": {"type": "string", "description": "向导ID（从 listGuides 返回的 identifier）"}, "client_name": {"type": "string", "description": "用户姓名"}, "client_phone": {"type": "string", "description": "用户电话"}, "city": {"type": "string", "description": "城市（可选，默认取向导所在城市）"}, "days": {"type": "integer", "description": "天数", "default": 1}, "people": {"type": "integer", "description": "人数", "default": 1}, "note": {"type": "string", "description": "备注"}}}}}}, "responses": {"200": {"description": "预约成功，返回订单号和向导联系方式", "content": {"application/json": {"schema": {"type": "object"}}}}, "400": {"description": "缺少必填字段"}, "404": {"description": "向导不存在或已下线"}}}}}}