801 lines
31 KiB
JSON
801 lines
31 KiB
JSON
{
|
||
"openapi": "3.0.0",
|
||
"info": {
|
||
"title": "Shipping Notice Tools",
|
||
"version": "1.0.0",
|
||
"description": "货代发货通知 Agent Tool API。仅导出适合 Dify AI 编排层使用的工具:通知理解、字段修订、库存映射建议、人工确认收口与状态查询;不包含由后台任务统一续跑的主推进工具,也不包含 RPA 回调。推进类 Tool 的统一约束如下:必须依赖 HXOPS 状态机校验,必须基于唯一 task_id 推进;模糊指代不能直接推进,必须先通过 reference_context、get_task_status 或其他 HXOPS Tool 解析到唯一任务。submit_decision、match_inventory、generate_shipment_excel、upload_to_freight、retry_task、confirm_inventory_source、confirm_customer 这类推进动作都必须根据 HXOPS Tool 返回结果解释,不能脱离 Tool 返回自行编造状态。若 Tool 返回 needs_human 或 failed,不得自行改写成完成、成功上传或已处理完毕。如果响应包含 action_buttons,Dify 只解释当前状态、业务原因和影响,不要在自然语言正文列出按钮清单或“推荐下一步”动作列表;可点击按钮由宿主系统根据 action_buttons 统一渲染。鉴权:Authorization Bearer 或 X-Integration-Key。"
|
||
},
|
||
"servers": [
|
||
{
|
||
"url": "http://192.168.100.192:8890/api/shipping-notice"
|
||
}
|
||
],
|
||
"paths": {
|
||
"/tools/get_order_extraction_context": {
|
||
"post": {
|
||
"operationId": "get_order_extraction_context",
|
||
"summary": "读取点击发送后完整订单抽取所需的邮件正文与附件文本",
|
||
"description": "仅在 refs.capability=order_extraction 分支调用。Tool 从 platform.session_id 反查当前用户,并返回 input_snapshot_hash、documents 与固定输出契约;禁止让 LLM 传 user_id。",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"agent_runtime_context": {
|
||
"type": "string",
|
||
"description": "HXOPS 注入的完整 agent_runtime_context JSON 字符串;必须原样透传,禁止由 LLM 构造或修改"
|
||
}
|
||
},
|
||
"required": [
|
||
"agent_runtime_context"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/submit_order_extraction": {
|
||
"post": {
|
||
"operationId": "submit_order_extraction",
|
||
"summary": "提交完整订单抽取结果,由 HXOPS 执行证据校验、订单级判重与自动建单",
|
||
"description": "只接受 get_order_extraction_context 的同一快照。HXOPS 仅在分类、SKU/Qty 置信度及原文证据均达标,且无阻断冲突/修订决策时自动建单;Reservation ID 允许缺失,订单行 Source Type 是可选路由线索。响应以持久化结果分别返回 created_count、opened_existing_count、pending_count、non_shipping_count;auto_created_count 仅为兼容字段且等于 created_count。",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"agent_runtime_context": {
|
||
"type": "string",
|
||
"description": "HXOPS 注入的完整 agent_runtime_context JSON 字符串;必须原样透传,禁止由 LLM 构造或修改"
|
||
},
|
||
"input_snapshot_hash": {
|
||
"type": "string",
|
||
"description": "get_order_extraction_context 返回的不可变输入快照 SHA-256"
|
||
},
|
||
"schema_version": {
|
||
"type": "string",
|
||
"description": "固定为 shipping-order-extraction-v1",
|
||
"enum": [
|
||
"shipping-order-extraction-v1"
|
||
]
|
||
},
|
||
"orders": {
|
||
"type": "array",
|
||
"description": "LLM 从一封或多封邮件中识别出的订单数组;一个附件可产生多个订单,非发货邮件可为空数组",
|
||
"maxItems": 50,
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"source_intake_no",
|
||
"primary_document_id",
|
||
"classification",
|
||
"classification_confidence",
|
||
"field_confidence",
|
||
"lines",
|
||
"evidence"
|
||
],
|
||
"properties": {
|
||
"source_intake_no": {
|
||
"type": "string",
|
||
"description": "来源 Intake 编号,必须来自上下文"
|
||
},
|
||
"primary_document_id": {
|
||
"type": "integer",
|
||
"description": "主来源 Document ID,必须来自上下文"
|
||
},
|
||
"candidate_key_hint": {
|
||
"type": "string",
|
||
"description": "可选稳定订单标识,如 PO/订单号;不得使用随机值"
|
||
},
|
||
"classification": {
|
||
"type": "string",
|
||
"description": "仅 shipping_request 可自动建单",
|
||
"enum": [
|
||
"shipping_request",
|
||
"non_shipping_request",
|
||
"uncertain"
|
||
]
|
||
},
|
||
"classification_confidence": {
|
||
"type": "number",
|
||
"minimum": 0,
|
||
"maximum": 1
|
||
},
|
||
"field_confidence": {
|
||
"type": "object",
|
||
"required": [
|
||
"sku",
|
||
"qty"
|
||
],
|
||
"properties": {
|
||
"sku": {
|
||
"type": "number",
|
||
"minimum": 0,
|
||
"maximum": 1
|
||
},
|
||
"qty": {
|
||
"type": "number",
|
||
"minimum": 0,
|
||
"maximum": 1
|
||
}
|
||
}
|
||
},
|
||
"po_number": {
|
||
"type": "string",
|
||
"description": "可为空的 PO/订单号"
|
||
},
|
||
"lines": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"sku",
|
||
"qty"
|
||
],
|
||
"properties": {
|
||
"sku": {
|
||
"type": "string",
|
||
"description": "SKU/料号"
|
||
},
|
||
"qty": {
|
||
"type": "number",
|
||
"exclusiveMinimum": 0
|
||
},
|
||
"reservation_id": {
|
||
"type": "string",
|
||
"description": "可为空,缺失时 Task 停在补字段门禁"
|
||
},
|
||
"source_type": {
|
||
"type": "string",
|
||
"description": "可选订单路由线索;仅在原文有可靠证据时填写,不代表任务通知来源或已确认的库存连接器类型"
|
||
}
|
||
},
|
||
"additionalProperties": true
|
||
}
|
||
},
|
||
"evidence": {
|
||
"type": "array",
|
||
"description": "至少分别提供 SKU 与 Qty 原文证据,元素含 field 与非空 quote",
|
||
"items": {
|
||
"type": "object",
|
||
"required": [
|
||
"field",
|
||
"quote"
|
||
],
|
||
"properties": {
|
||
"field": {
|
||
"type": "string",
|
||
"description": "证据字段,如 lines[0].sku 或 lines[0].qty"
|
||
},
|
||
"quote": {
|
||
"type": "string",
|
||
"description": "原文片段,禁止改写"
|
||
},
|
||
"document_id": {
|
||
"type": "integer",
|
||
"description": "证据来源 Document ID"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"conflicts": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
},
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
},
|
||
"required": [
|
||
"agent_runtime_context",
|
||
"input_snapshot_hash",
|
||
"schema_version",
|
||
"orders"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/parse_notice": {
|
||
"post": {
|
||
"operationId": "parse_notice",
|
||
"summary": "解析发货通知文本",
|
||
"description": "解析发货通知文本",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"raw_text": {
|
||
"type": "string",
|
||
"description": "待解析的发货通知全文"
|
||
},
|
||
"structured": {
|
||
"type": "object",
|
||
"description": "Dify LLM 解析后的结构化结果对象。若提供,后端优先使用该对象中的 lines/confidence/reservation_id 等字段落库。",
|
||
"additionalProperties": true
|
||
},
|
||
"lang": {
|
||
"type": "string",
|
||
"description": "可选语言代码:zh|en|th"
|
||
}
|
||
},
|
||
"required": [
|
||
"task_id"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/update_notice_fields": {
|
||
"post": {
|
||
"operationId": "update_notice_fields",
|
||
"summary": "更新解析后的发货通知单头字段,如客户、PO、交期、收货地",
|
||
"description": "更新解析后的发货通知单头字段,如客户、PO、交期、收货地",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"fields": {
|
||
"type": "object",
|
||
"description": "可更新字段:customer_name/customer_code/ship_to/po_number/required_date",
|
||
"additionalProperties": true
|
||
},
|
||
"comment": {
|
||
"type": "string",
|
||
"description": "修改备注(可选)"
|
||
}
|
||
},
|
||
"required": [
|
||
"task_id",
|
||
"fields"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/update_notice_line": {
|
||
"post": {
|
||
"operationId": "update_notice_line",
|
||
"summary": "更新解析结果中的某一行,如 SKU、Reservation ID、数量、交期",
|
||
"description": "更新解析结果中的某一行,如 SKU、Reservation ID、数量、交期",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"line_index": {
|
||
"type": "integer",
|
||
"description": "行下标,从 0 开始"
|
||
},
|
||
"patch": {
|
||
"type": "object",
|
||
"description": "可更新字段:sku/reservation_id/quantity/qty/required_date/uom/source_type;source_type 仅作为可选订单路由线索",
|
||
"additionalProperties": true
|
||
},
|
||
"comment": {
|
||
"type": "string",
|
||
"description": "修改备注(可选)"
|
||
}
|
||
},
|
||
"required": [
|
||
"task_id",
|
||
"line_index",
|
||
"patch"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/add_notice_line": {
|
||
"post": {
|
||
"operationId": "add_notice_line",
|
||
"summary": "向解析结果新增一行发货需求",
|
||
"description": "向解析结果新增一行发货需求",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"line": {
|
||
"type": "object",
|
||
"description": "新增行,至少包含 sku 和 qty/quantity",
|
||
"additionalProperties": true
|
||
},
|
||
"comment": {
|
||
"type": "string",
|
||
"description": "修改备注(可选)"
|
||
}
|
||
},
|
||
"required": [
|
||
"task_id",
|
||
"line"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/remove_notice_line": {
|
||
"post": {
|
||
"operationId": "remove_notice_line",
|
||
"summary": "删除解析结果中的某一行发货需求",
|
||
"description": "删除解析结果中的某一行发货需求",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"line_index": {
|
||
"type": "integer",
|
||
"description": "行下标,从 0 开始"
|
||
},
|
||
"comment": {
|
||
"type": "string",
|
||
"description": "修改备注(可选)"
|
||
}
|
||
},
|
||
"required": [
|
||
"task_id",
|
||
"line_index"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/get_inventory_schema_preview": {
|
||
"post": {
|
||
"operationId": "get_inventory_schema_preview",
|
||
"summary": "读取已上传库存 Excel 的表头与样例行(小 payload,供 LLM 推断列映射)",
|
||
"description": "读取已上传库存 Excel 的表头与样例行(小 payload,供 LLM 推断列映射)",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
}
|
||
},
|
||
"required": [
|
||
"task_id"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/apply_inventory_mapping": {
|
||
"post": {
|
||
"operationId": "apply_inventory_mapping",
|
||
"summary": "应用 LLM/人工列映射并解析完整库存文件;返回 field_alignment 等待用户确认,后续主流程由后台任务续跑",
|
||
"description": "应用 LLM/人工列映射并解析完整库存文件;返回 field_alignment 等待用户确认,后续主流程由后台任务续跑",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"map_json": {
|
||
"type": "string",
|
||
"description": "Dify Tool 参数使用 JSON 字符串,内容含 sku/reservation_id/available_qty;可选 match_rule(LLM 自然语言匹配说明)与 match_key(匹配键列表)。"
|
||
}
|
||
},
|
||
"required": [
|
||
"task_id",
|
||
"map_json"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/confirm_inventory_source": {
|
||
"post": {
|
||
"operationId": "confirm_inventory_source",
|
||
"summary": "在库存源人工检查点确认正式库存查询来源(仅提交 source_code)",
|
||
"description": "库存连接器门禁:稳定身份须同时具备 source_code、connector_type、site_id、warehouse_id,且 routing_fingerprint 与当前配置版本一致。Tool API 使用集成密钥鉴权,确认人审计由宿主会话内部链路写入,不接受外部 user_id。若返回 needs_human,说明身份未完整解析或需先完成解析确认。",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"source_code": {
|
||
"type": "string",
|
||
"description": "启用配置中的库存源编码,如 DSV360_AWSDU、CRANE;站点 site_id 与库位 warehouse_id 由后端根据配置与订单路由解析,禁止前端直传"
|
||
}
|
||
},
|
||
"required": [
|
||
"task_id",
|
||
"source_code"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/confirm_customer": {
|
||
"post": {
|
||
"operationId": "confirm_customer",
|
||
"summary": "在客户人工检查点确认标准客户(仅提交 customer_id)",
|
||
"description": "仅在 customer_review 检查点且用户已经明确选择标准客户后调用。禁止根据邮件中的不稳定客户名称自行猜测 customer_id;客户确认成功后由 HXOPS 决定后续流程。",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"customer_id": {
|
||
"type": "integer",
|
||
"description": "用户从 HXOPS 标准客户列表中明确选择的客户 ID"
|
||
}
|
||
},
|
||
"required": [
|
||
"task_id",
|
||
"customer_id"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/submit_decision": {
|
||
"post": {
|
||
"operationId": "submit_decision",
|
||
"summary": "人工复核决策。task_id 与 conversation_id 至少传一个;用户确认时禁止 create_task。决策提交后由后台任务统一续跑。",
|
||
"description": "人工复核决策入口。必须先定位到唯一 task_id 才能推进;若 conversation_id 对应多个任务,必须先追问或调用状态查询工具确认,禁止用模糊指代直接推进。本 Tool 的返回结果以 HXOPS 状态机为准,Dify 必须根据实际返回的 status、checkpoint、forbidden_next_tools、human_options 或 action_buttons 解释当前现场。若返回 needs_human 或 failed,不得自行宣布完成、不得改写为成功,也不要在正文列出按钮清单;按钮由 HXOPS 前端渲染。",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"conversation_id": {
|
||
"type": "string",
|
||
"description": "Dify 会话 ID;用户仅回复「确认」时用于定位任务"
|
||
},
|
||
"decision": {
|
||
"type": "string",
|
||
"description": "confirm=确认继续;reject=驳回;retry_rpa=重新获取库存(清理旧库存解析状态并重新触发 RPA);rematch=重新匹配;reparse=重新解析;confirm_inventory_mapping=确认库存字段对齐;correct_inventory_mapping=更正列映射;reparse_inventory=重新上传库存",
|
||
"enum": [
|
||
"confirm",
|
||
"confirm_parse",
|
||
"reject",
|
||
"retry_rpa",
|
||
"rematch",
|
||
"reparse",
|
||
"confirm_inventory_mapping",
|
||
"correct_inventory_mapping",
|
||
"reparse_inventory"
|
||
]
|
||
},
|
||
"comment": {
|
||
"type": "string",
|
||
"description": "备注(可选)"
|
||
}
|
||
},
|
||
"required": [
|
||
"decision"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/get_task_status": {
|
||
"post": {
|
||
"operationId": "get_task_status",
|
||
"summary": "查询任务当前状态与 human_options;响应含库存连接器独立字段与候选结构",
|
||
"description": "返回 inventory_source_code、inventory_connector_type、inventory_site_id、inventory_warehouse_id、inventory_source_status(unresolved|ambiguous|resolved|user_confirmed|invalid|conflicted)、inventory_source_method、inventory_source_config_version、inventory_routing_fingerprint、inventory_source_confirmed_by、inventory_source_confirmed_at,以及 step_payload.inventory_source_resolution.candidates。",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"description": "发货任务引用:技术任务号 SN-20260529-ABCD1234 或业务号 WYC26071501"
|
||
},
|
||
"conversation_id": {
|
||
"type": "string",
|
||
"description": "Dify 会话 ID"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tools/get_batch_status": {
|
||
"post": {
|
||
"operationId": "get_batch_status",
|
||
"summary": "查询批次当前状态、任务列表与当前聚焦任务",
|
||
"description": "查询批次当前状态、任务列表与当前聚焦任务",
|
||
"parameters": [],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"batch_no": {
|
||
"type": "string",
|
||
"description": "发货批次编号(batch id),如 SB-20260617-ABCD1234"
|
||
}
|
||
},
|
||
"required": [
|
||
"batch_no"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "Tool response (status: ok|running|needs_human|failed). May include checkpoint, human_options, action_buttons.",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
} |