{"openapi":"3.1.0","info":{"title":"诸葛军师会员接口","version":"v1","description":"会员接口让企业会员的程序读取资料和任务、下外包单并验收交付、创建安卓受控执行草案、浏览商品并下采购单。\n\n认证：每个请求都要带 API 密钥（以 zhuge_live_ 开头）。推荐写法是请求头 X-Zhuge-API-Key: 你的密钥；也可以写成 Authorization: Bearer 你的密钥，两种写法等价，同时提供时优先使用 X-Zhuge-API-Key。\n\n权限：每个接口需要对应的权限（见各接口的 x-scope）。密钥自己和申请批准的权限里都要有，缺一不可。标为高风险的权限（发布并自动派单、发送返工要求、确认外包验收、发起外包争议、创建商务订单）需要人工审核批准后才会生效。\n\n限流：每个密钥每分钟最多 120 次请求，超过返回 429。每个成功响应带响应头 X-RateLimit-Limit（上限）和 X-Zhuge-Tenant（密钥绑定的企业编号）。\n\n租户隔离：所有请求都强制使用密钥绑定的企业和会员，客户端传入的租户参数不会被采用。\n\n错误：错误响应一般是 {\"detail\": {\"code\": \"...\", \"message\": \"...\"}}，可能多一个 details 对象。参数格式错误（422）是 FastAPI 的默认格式 {\"detail\": [...]}。\n\n幂等：外包的写操作和安卓执行草案必须带幂等键，商务下单也必须带；同一个幂等键加相同内容重复提交，会原样返回第一次的结果，不会重复执行。"},"servers":[{"url":"https://www.zhugejunshi.com/api/member-api/v1","description":"生产环境"}],"tags":[{"name":"账户与任务","description":"读取会员与企业资料、读取并创建企业任务、读取组织成员。"},{"name":"外包下单","description":"查看外包服务目录、预览方案、检查自动派单授权、保存草稿并发布派单。"},{"name":"外包订单与事件","description":"读取外包订单详情和状态事件。"},{"name":"外包交付验收","description":"读取交付记录和文件、生成交付检查、发送返工要求、确认验收。"},{"name":"安卓执行器","description":"读取受控安卓设备与任务，创建待主账号激活的执行草案，急停任务。"},{"name":"商品采购","description":"浏览允许程序下单的商家商品，创建并查询商务订单。"}],"security":[{"memberKey":[]}],"paths":{"/profile":{"get":{"operationId":"getProfile","tags":["账户与任务"],"summary":"读取会员与企业资料","description":"返回当前密钥所属会员和企业的基础资料。需要 profile:read 权限。密钥绑定的会员或企业不存在时返回 404（detail 为文字说明）。","x-scope":"profile:read","responses":{"200":{"description":"会员与企业资料。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"integer"},"username":{"type":["string","null"]},"nickname":{"type":["string","null"]},"real_name":{"type":["string","null"]},"email":{"type":["string","null"]},"mobile":{"type":["string","null"]}}},"enterprise":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":["string","null"]},"short_name":{"type":["string","null"]},"industry_type":{"type":["string","null"]},"business_type":{"type":["string","null"]}}}}},"tenant_id":{"type":"integer","description":"密钥绑定的企业编号。"}}},"example":{"data":{"user":{"id":20,"username":"demo_user","nickname":"示例会员","real_name":"示例姓名","email":"user@example.com","mobile":"13800000000"},"enterprise":{"id":10,"name":"示例企业有限公司","short_name":"示例企业","industry_type":"示例行业","business_type":"示例类型"}},"tenant_id":10}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/tasks":{"get":{"operationId":"listTasks","tags":["账户与任务"],"summary":"读取企业任务列表","description":"按任务编号倒序返回当前企业的任务。企业管理员（所有者或管理员）能看到全部任务，普通成员只能看到自己负责或被分派的任务。需要 tasks:read 权限。","x-scope":"tasks:read","parameters":[{"name":"status","in":"query","required":false,"description":"按任务状态筛选，不填返回全部；超过 20 个字符的部分会被截掉。","schema":{"type":"string","default":""}},{"name":"limit","in":"query","required":false,"description":"返回条数。","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"任务列表。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"description":{"type":["string","null"]},"priority":{"type":"string","description":"low、medium、high、urgent 之一。"},"status":{"type":"string","description":"任务状态，例如 todo、review。"},"owner_user_id":{"type":"integer","description":"负责人的会员编号，没有负责人时为 0。"},"due_time":{"type":["string","null"],"format":"date-time"},"requires_approval":{"type":"boolean"},"source_label":{"type":["string","null"],"description":"任务来源，经接口创建的为 member_api。"}}}},"tenant_id":{"type":"integer"},"limit":{"type":"integer"}}},"example":{"data":[{"id":3001,"title":"核对本周发货清单","description":"对照仓库记录核对。","priority":"medium","status":"todo","owner_user_id":20,"due_time":"2026-11-10T09:00:00","requires_approval":false,"source_label":"member_api"}],"tenant_id":10,"limit":50}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createTask","tags":["账户与任务"],"summary":"创建企业任务","description":"在当前企业创建任务，负责人必须是当前企业的有效成员。企业管理员可以指定任何成员为负责人，普通成员只能给自己创建（否则 403）。requires_approval 为 true 时任务进入 review 状态等待审批，否则为 todo。需要 tasks:write 权限。due_time 格式不对返回 400，负责人不是有效成员返回 400（这两种错误的 detail 是文字说明）。","x-scope":"tasks:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreateInput"},"example":{"title":"核对本周发货清单","description":"对照仓库记录核对。","priority":"medium","due_time":"2026-11-10T09:00:00+08:00","requires_approval":false}}}},"responses":{"200":{"description":"创建成功。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"status":{"type":"string","description":"todo 或 review。"},"owner_user_id":{"type":"integer"}}},"tenant_id":{"type":"integer"}}},"example":{"data":{"id":3002,"title":"核对本周发货清单","status":"todo","owner_user_id":20},"tenant_id":10}}}},"400":{"description":"due_time 不是 ISO 8601 日期时间，或负责人不是当前企业的有效成员。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextErrorResponse"},"example":{"detail":"任务负责人不是当前企业的有效成员。"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/organization/members":{"get":{"operationId":"listOrganizationMembers","tags":["账户与任务"],"summary":"读取组织成员","description":"返回当前企业状态为有效的成员及其部门、岗位。企业管理员能看到全部成员，普通成员只能看到自己。需要 organization:read 权限。","x-scope":"organization:read","responses":{"200":{"description":"成员列表。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer"},"name":{"type":"string","description":"真实姓名，没有则取昵称、再取用户名。"},"member_type":{"type":"string","description":"成员类型，例如 owner、admin、member。"},"department":{"type":["string","null"]},"position":{"type":["string","null"]},"position_code":{"type":["string","null"]},"employment_status":{"type":["string","null"]}}}},"tenant_id":{"type":"integer"}}},"example":{"data":[{"user_id":20,"name":"示例姓名","member_type":"owner","department":"运营部","position":"运营主管","position_code":"ops_lead","employment_status":"active"}],"tenant_id":10}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/catalog":{"get":{"operationId":"getOutsourcingCatalog","tags":["外包下单"],"summary":"读取外包服务目录","description":"返回外包服务类目、标准服务包、任务拆解方案和参考报价，创建预览或草稿时的 category、work_package_key 从这里取值。publish_requires_manual_scope_review 为 true，表示发布派单的权限需要人工审核。目录内部结构较深，这里只写到第二层。需要 outsourcing:catalog:read 权限。","x-scope":"outsourcing:catalog:read","responses":{"200":{"description":"外包服务目录。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"catalog_version":{"type":"string"},"taxonomy":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"服务类目树。"},"service_packages":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"标准服务包。"},"workflow":{"type":"array","items":{"type":"string"},"description":"推荐的调用顺序。"},"publish_requires_manual_scope_review":{"type":"boolean"}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"catalog_version":"2026-07-v1","taxonomy":[{"key":"example_category","name":"示例类目"}],"service_packages":[{"key":"example_package","name":"示例服务包"}],"workflow":["preview","create_draft","publish","track_events","inspect_delivery"],"publish_requires_manual_scope_review":true},"meta":{"request_id":"req-example-0001","tenant_id":10}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/preview":{"post":{"operationId":"previewOutsourcingPlan","tags":["外包下单"],"summary":"预览外包方案","description":"按提交的内容整理出外包方案、方案摘要和估算金额，不保存任何数据，也不会派单。title 或 category 为空返回 400。需要 outsourcing:catalog:read 权限。不接受未列出的字段。","x-scope":"outsourcing:catalog:read","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutsourcingPlanInput"},"example":{"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","requirement":"按模板整理商品资料，英文翻译需人工校对。","budget_amount":800,"currency":"CNY","delivery_hours":72,"acceptance_criteria":"表格字段完整，抽检 20 条无错译。","evidence_requirements":"提交完成的表格和抽检记录。"}}}},"responses":{"200":{"description":"方案预览。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/OutsourcingPlanPreview"},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"plan":{"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","requirement":"按模板整理商品资料，英文翻译需人工校对。","country":"","city":"","contact":"","budget_amount":800,"currency":"CNY","delivery_hours":72,"work_package_key":"example_package","work_package_name":"示例服务包","work_units":[],"acceptance_criteria":"表格字段完整，抽检 20 条无错译。","evidence_requirements":"提交完成的表格和抽检记录。","response_sla_minutes":30,"max_assignment_rounds":5,"project_key":"","project_name":"整理 200 条商品资料并翻译成英文","task_priority":"medium","contributor_pool_rate":0.2},"plan_digest":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","estimated_amount":800,"currency":"CNY","unit_count":0,"requires_publish_approval":true},"meta":{"request_id":"req-example-0001","tenant_id":10}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/automation/preflight":{"post":{"operationId":"preflightOutsourcingAutomation","tags":["外包下单"],"summary":"检查自动派单授权","description":"在发布前检查当前自动派单授权是否允许这张单（订单金额、每日预算、在途订单数、类目、币种）。只是参考结果，不创建也不预留任何东西，发布时会重新检查。授权额度由企业管理员在平台上设置，没有授权时 allowed 为 false 或返回 403。需要 outsourcing:dispatch:write 权限（高风险权限，需人工审核批准）。","x-scope":"outsourcing:dispatch:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutsourcingPlanInput"},"example":{"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","requirement":"按模板整理商品资料，英文翻译需人工校对。","budget_amount":800,"currency":"CNY","delivery_hours":72,"acceptance_criteria":"表格字段完整，抽检 20 条无错译。","evidence_requirements":"提交完成的表格和抽检记录。"}}}},"responses":{"200":{"description":"预检结果。automation_policy 的内容随授权类型变化，这里只写到对象这一层。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"preview":{"$ref":"#/components/schemas/OutsourcingPlanPreview"},"automation_policy":{"type":"object","additionalProperties":true,"description":"授权检查结果，含 allowed 以及超限项 violations 等。"},"advisory_only":{"type":"boolean","description":"始终为 true，表示只是参考。"},"reservation_created":{"type":"boolean","description":"始终为 false，预检不预留额度。"},"publish_recheck_required":{"type":"boolean"},"checked_dimensions":{"type":"array","items":{"type":"string"},"description":"已检查的维度。"},"unchecked_dimensions":{"type":"array","items":{"type":"string"},"description":"没有检查的维度，需调用方自行把关。"}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"preview":{"plan":{"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","requirement":"按模板整理商品资料，英文翻译需人工校对。","country":"","city":"","contact":"","budget_amount":800,"currency":"CNY","delivery_hours":72,"work_package_key":"example_package","work_package_name":"示例服务包","work_units":[],"acceptance_criteria":"表格字段完整，抽检 20 条无错译。","evidence_requirements":"提交完成的表格和抽检记录。","response_sla_minutes":30,"max_assignment_rounds":5,"project_key":"","project_name":"整理 200 条商品资料并翻译成英文","task_priority":"medium","contributor_pool_rate":0.2},"plan_digest":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","estimated_amount":800,"currency":"CNY","unit_count":0,"requires_publish_approval":true},"automation_policy":{"allowed":true,"violations":[]},"advisory_only":true,"reservation_created":false,"publish_recheck_required":true,"checked_dimensions":["order_amount","daily_budget","active_orders","category","currency"],"unchecked_dimensions":["project_scope","task_risk","sensitive_data","subcontracting"]},"meta":{"request_id":"req-example-0001","tenant_id":10}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/drafts":{"post":{"operationId":"createOutsourcingDraft","tags":["外包下单"],"summary":"保存外包草稿","description":"保存外包任务草稿，草稿 30 天内有效，不会自动派单。返回的 plan_digest 要在发布时原样回传确认。必须提供幂等键。需要 outsourcing:draft:write 权限。","x-scope":"outsourcing:draft:write","parameters":[{"name":"X-Idempotency-Key","in":"header","required":false,"description":"幂等键。本接口必须提供幂等键：放在这个请求头里（也接受 Idempotency-Key 请求头），或写在请求体的 idempotency_key 字段里；两处都写时必须一致。8 至 120 位，只能包含字母、数字、点、下划线、冒号和短横线，首位必须是字母或数字。相同幂等键加相同内容会原样返回上次结果（meta.idempotency_replayed 为 true），相同幂等键加不同内容返回 409。","schema":{"type":"string","minLength":8,"maxLength":120,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,119}$"},"example":"draft-20261107-0001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutsourcingDraftInput"},"example":{"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","requirement":"按模板整理商品资料，英文翻译需人工校对。","budget_amount":800,"currency":"CNY","delivery_hours":72,"acceptance_criteria":"表格字段完整，抽检 20 条无错译。","evidence_requirements":"提交完成的表格和抽检记录。","idempotency_key":"draft-20261107-0001"}}}},"responses":{"201":{"description":"草稿已保存。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"draft":{"type":"object","description":"外包草稿。","properties":{"draft_no":{"type":"string","description":"草稿号，发布时使用。"},"status":{"type":"string","description":"草稿状态：draft 表示可发布，published 表示已发布。"},"plan":{"type":"object","additionalProperties":true,"description":"后端整理后的外包方案，字段与预览返回的 plan 相同。"},"plan_digest":{"type":"string","description":"方案摘要（64 位十六进制）。发布时必须原样放进 decision_digest。"},"estimated_amount":{"type":"number"},"currency":{"type":"string"},"order_id":{"type":["integer","null"],"description":"发布后生成的订单 id，未发布时为 null。"},"version":{"type":"integer","description":"草稿版本，发布时放进 expected_version。"},"expires_at":{"type":["string","null"],"format":"date-time","description":"草稿过期时间，创建后 30 天。"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"draft":{"draft_no":"OD-20261107-0123456789abcdef","status":"draft","plan":{"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","requirement":"按模板整理商品资料，英文翻译需人工校对。","country":"","city":"","contact":"","budget_amount":800,"currency":"CNY","delivery_hours":72,"work_package_key":"example_package","work_package_name":"示例服务包","work_units":[],"acceptance_criteria":"表格字段完整，抽检 20 条无错译。","evidence_requirements":"提交完成的表格和抽检记录。","response_sla_minutes":30,"max_assignment_rounds":5,"project_key":"","project_name":"整理 200 条商品资料并翻译成英文","task_priority":"medium","contributor_pool_rate":0.2},"plan_digest":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","estimated_amount":800,"currency":"CNY","order_id":null,"version":1,"expires_at":"2026-12-07T08:00:00","created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"}},"meta":{"request_id":"req-example-0001","tenant_id":10,"idempotency_key":"draft-20261107-0001","idempotency_replayed":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"428":{"$ref":"#/components/responses/PreconditionRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/drafts/{draft_no}/publish":{"post":{"operationId":"publishOutsourcingDraft","tags":["外包下单"],"summary":"发布草稿并自动派单","description":"正式发布外包订单并启动外包商自动匹配，会产生真实订单。调用前提：草稿属于当前密钥、状态为 draft 且未过期；expected_version 与草稿当前版本一致；decision_digest 必须是草稿里完整的 plan_digest；企业管理员已设置自动派单授权且这张单没有超出授权额度。重复发布同一草稿会返回 already_published 为 true。需要 outsourcing:dispatch:write 权限，这是高风险权限，需要人工审核批准后才可使用。必须提供幂等键。","x-scope":"outsourcing:dispatch:write","parameters":[{"name":"draft_no","in":"path","required":true,"description":"草稿号，来自保存草稿接口返回的 draft.draft_no。","schema":{"type":"string"},"example":"OD-20261107-0123456789abcdef"},{"name":"X-Idempotency-Key","in":"header","required":false,"description":"幂等键。本接口必须提供幂等键：放在这个请求头里（也接受 Idempotency-Key 请求头），或写在请求体的 idempotency_key 字段里；两处都写时必须一致。8 至 120 位，只能包含字母、数字、点、下划线、冒号和短横线，首位必须是字母或数字。相同幂等键加相同内容会原样返回上次结果（meta.idempotency_replayed 为 true），相同幂等键加不同内容返回 409。","schema":{"type":"string","minLength":8,"maxLength":120,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,119}$"},"example":"draft-20261107-0001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutsourcingPublishInput"},"example":{"expected_version":1,"decision_digest":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","idempotency_key":"publish-20261107-0001"}}}},"responses":{"200":{"description":"发布结果。dispatch 与 automation_policy 的内部结构随业务变化，只写到对象这一层。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"draft":{"type":"object","description":"外包草稿。","properties":{"draft_no":{"type":"string","description":"草稿号，发布时使用。"},"status":{"type":"string","description":"草稿状态：draft 表示可发布，published 表示已发布。"},"plan":{"type":"object","additionalProperties":true,"description":"后端整理后的外包方案，字段与预览返回的 plan 相同。"},"plan_digest":{"type":"string","description":"方案摘要（64 位十六进制）。发布时必须原样放进 decision_digest。"},"estimated_amount":{"type":"number"},"currency":{"type":"string"},"order_id":{"type":["integer","null"],"description":"发布后生成的订单 id，未发布时为 null。"},"version":{"type":"integer","description":"草稿版本，发布时放进 expected_version。"},"expires_at":{"type":["string","null"],"format":"date-time","description":"草稿过期时间，创建后 30 天。"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"order":{"type":"object","description":"外包订单。","additionalProperties":true,"properties":{"id":{"type":"integer","description":"订单数字 id。"},"order_no":{"type":"string","description":"订单号。"},"demand_id":{"type":"string"},"enterprise_id":{"type":"integer"},"requester_user_id":{"type":"integer"},"task_id":{"type":"integer","description":"关联任务 id，没有时为 0。"},"vendor_id":{"type":"integer","description":"已匹配的外包商 id，尚未匹配时为 0。"},"title":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"work_units":{"type":"array","items":{"type":"object","additionalProperties":true}},"budget_amount":{"type":"number"},"currency":{"type":"string"},"delivery_hours":{"type":"integer"},"response_sla_minutes":{"type":"integer"},"assignment_round":{"type":"integer"},"max_assignment_rounds":{"type":"integer"},"status":{"type":"string","description":"订单状态，例如 open；状态值随业务流程扩展。"},"current_attempt_id":{"type":"integer"},"active_fulfillment_id":{"type":"integer"},"version":{"type":"integer","description":"订单版本号。状态变更类接口需要在 expected_version 里带上它。"},"delivery_due_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"billing_mode":{"type":"string","description":"计费方式，例如固定报价或收益分成。"},"quote_amount":{"type":"number"},"contributor_pool_rate":{"type":"number"},"estimated_share_bps":{"type":"integer"},"pricing_basis":{"type":"string"},"pricing_learning":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"订单附加信息，结构随业务变化，只写到这一层。"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"dispatch":{"type":"object","additionalProperties":true,"description":"派单启动结果。已发布过的草稿再次发布时没有该字段。"},"automation_policy":{"type":"object","additionalProperties":true,"description":"发布时使用的授权快照。已发布过的草稿再次发布时没有该字段。"},"already_published":{"type":"boolean"}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"draft":{"draft_no":"OD-20261107-0123456789abcdef","status":"published","plan":{"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","requirement":"按模板整理商品资料，英文翻译需人工校对。","country":"","city":"","contact":"","budget_amount":800,"currency":"CNY","delivery_hours":72,"work_package_key":"example_package","work_package_name":"示例服务包","work_units":[],"acceptance_criteria":"表格字段完整，抽检 20 条无错译。","evidence_requirements":"提交完成的表格和抽检记录。","response_sla_minutes":30,"max_assignment_rounds":5,"project_key":"","project_name":"整理 200 条商品资料并翻译成英文","task_priority":"medium","contributor_pool_rate":0.2},"plan_digest":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","estimated_amount":800,"currency":"CNY","order_id":1001,"version":2,"expires_at":"2026-12-07T08:00:00","created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:05:00"},"order":{"id":1001,"order_no":"OUT-20261107-0001","demand_id":"","enterprise_id":10,"requester_user_id":20,"task_id":0,"vendor_id":0,"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","description":"按模板整理商品资料，英文翻译需人工校对。","work_units":[],"budget_amount":800,"currency":"CNY","delivery_hours":72,"response_sla_minutes":30,"assignment_round":0,"max_assignment_rounds":5,"status":"open","current_attempt_id":0,"active_fulfillment_id":0,"version":1,"delivery_due_at":null,"accepted_at":null,"submitted_at":null,"completed_at":null,"billing_mode":"fixed_price","quote_amount":800,"contributor_pool_rate":0,"estimated_share_bps":0,"pricing_basis":"","pricing_learning":{},"metadata":{},"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"},"dispatch":{},"automation_policy":{},"already_published":false},"meta":{"request_id":"req-example-0001","tenant_id":10,"idempotency_key":"draft-20261107-0001","idempotency_replayed":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"428":{"$ref":"#/components/responses/PreconditionRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/orders":{"get":{"operationId":"listOutsourcingOrders","tags":["外包订单与事件"],"summary":"读取外包订单列表","description":"按订单 id 升序分页返回当前密钥所属会员创建的外包订单，用游标翻页：把返回的 meta.next_cursor 填进下一次的 cursor。没有更多数据时 next_cursor 等于传入的 cursor。需要 outsourcing:order:read 权限。","x-scope":"outsourcing:order:read","parameters":[{"name":"cursor","in":"query","required":false,"description":"游标：只返回 id 大于该值的记录，按 id 升序。第一次用 0，之后用上次返回的 meta.next_cursor。","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","required":false,"description":"每页条数。","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"status","in":"query","required":false,"description":"按订单状态筛选，不填返回全部。","schema":{"type":"string","maxLength":32,"default":""}}],"responses":{"200":{"description":"订单列表。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","description":"外包订单。","additionalProperties":true,"properties":{"id":{"type":"integer","description":"订单数字 id。"},"order_no":{"type":"string","description":"订单号。"},"demand_id":{"type":"string"},"enterprise_id":{"type":"integer"},"requester_user_id":{"type":"integer"},"task_id":{"type":"integer","description":"关联任务 id，没有时为 0。"},"vendor_id":{"type":"integer","description":"已匹配的外包商 id，尚未匹配时为 0。"},"title":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"work_units":{"type":"array","items":{"type":"object","additionalProperties":true}},"budget_amount":{"type":"number"},"currency":{"type":"string"},"delivery_hours":{"type":"integer"},"response_sla_minutes":{"type":"integer"},"assignment_round":{"type":"integer"},"max_assignment_rounds":{"type":"integer"},"status":{"type":"string","description":"订单状态，例如 open；状态值随业务流程扩展。"},"current_attempt_id":{"type":"integer"},"active_fulfillment_id":{"type":"integer"},"version":{"type":"integer","description":"订单版本号。状态变更类接口需要在 expected_version 里带上它。"},"delivery_due_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"billing_mode":{"type":"string","description":"计费方式，例如固定报价或收益分成。"},"quote_amount":{"type":"number"},"contributor_pool_rate":{"type":"number"},"estimated_share_bps":{"type":"integer"},"pricing_basis":{"type":"string"},"pricing_learning":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"订单附加信息，结构随业务变化，只写到这一层。"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}}}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"items":[{"id":1001,"order_no":"OUT-20261107-0001","demand_id":"","enterprise_id":10,"requester_user_id":20,"task_id":0,"vendor_id":0,"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","description":"按模板整理商品资料，英文翻译需人工校对。","work_units":[],"budget_amount":800,"currency":"CNY","delivery_hours":72,"response_sla_minutes":30,"assignment_round":0,"max_assignment_rounds":5,"status":"open","current_attempt_id":0,"active_fulfillment_id":0,"version":1,"delivery_due_at":null,"accepted_at":null,"submitted_at":null,"completed_at":null,"billing_mode":"fixed_price","quote_amount":800,"contributor_pool_rate":0,"estimated_share_bps":0,"pricing_basis":"","pricing_learning":{},"metadata":{},"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"}]},"meta":{"request_id":"req-example-0001","tenant_id":10,"cursor":0,"next_cursor":1001,"limit":50}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/orders/{order_id}":{"get":{"operationId":"getOutsourcingOrder","tags":["外包订单与事件"],"summary":"读取外包订单详情","description":"返回一张外包订单，以及派单轮次记录（attempts）和最近 100 条时效事件（sla_events，按时间正序）。attempts 里除下列字段外，还会带订单标题、计费说明等展示字段。只能读取当前密钥所属会员创建的订单。需要 outsourcing:order:read 权限。","x-scope":"outsourcing:order:read","parameters":[{"name":"order_id","in":"path","required":true,"description":"外包订单标识：订单数字 id 或订单号 order_no，最长 128 个字符。只能访问当前密钥所属会员创建的订单。","schema":{"type":"string","maxLength":128},"example":"OUT-20261107-0001"}],"responses":{"200":{"description":"订单详情。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"order":{"type":"object","description":"外包订单。","additionalProperties":true,"properties":{"id":{"type":"integer","description":"订单数字 id。"},"order_no":{"type":"string","description":"订单号。"},"demand_id":{"type":"string"},"enterprise_id":{"type":"integer"},"requester_user_id":{"type":"integer"},"task_id":{"type":"integer","description":"关联任务 id，没有时为 0。"},"vendor_id":{"type":"integer","description":"已匹配的外包商 id，尚未匹配时为 0。"},"title":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"work_units":{"type":"array","items":{"type":"object","additionalProperties":true}},"budget_amount":{"type":"number"},"currency":{"type":"string"},"delivery_hours":{"type":"integer"},"response_sla_minutes":{"type":"integer"},"assignment_round":{"type":"integer"},"max_assignment_rounds":{"type":"integer"},"status":{"type":"string","description":"订单状态，例如 open；状态值随业务流程扩展。"},"current_attempt_id":{"type":"integer"},"active_fulfillment_id":{"type":"integer"},"version":{"type":"integer","description":"订单版本号。状态变更类接口需要在 expected_version 里带上它。"},"delivery_due_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"billing_mode":{"type":"string","description":"计费方式，例如固定报价或收益分成。"},"quote_amount":{"type":"number"},"contributor_pool_rate":{"type":"number"},"estimated_share_bps":{"type":"integer"},"pricing_basis":{"type":"string"},"pricing_learning":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"订单附加信息，结构随业务变化，只写到这一层。"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"attempts":{"type":"array","items":{"type":"object","additionalProperties":true,"properties":{"id":{"type":"integer"},"offer_id":{"type":"string"},"order_id":{"type":"integer"},"vendor_id":{"type":"integer"},"round_no":{"type":"integer"},"match_score":{"type":"number"},"score_breakdown":{"type":"object","additionalProperties":true},"status":{"type":"string"},"invitation_expires_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"released_at":{"type":["string","null"],"format":"date-time"},"release_reason":{"type":"string"}}}},"sla_events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"event_type":{"type":"string"},"status":{"type":"string"},"vendor_id":{"type":["integer","null"]},"points_delta":{"type":"integer"},"note":{"type":"string"},"metadata":{"type":"object","additionalProperties":true},"occurred_at":{"type":["string","null"],"format":"date-time"}}}}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"order":{"id":1001,"order_no":"OUT-20261107-0001","demand_id":"","enterprise_id":10,"requester_user_id":20,"task_id":0,"vendor_id":0,"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","description":"按模板整理商品资料，英文翻译需人工校对。","work_units":[],"budget_amount":800,"currency":"CNY","delivery_hours":72,"response_sla_minutes":30,"assignment_round":0,"max_assignment_rounds":5,"status":"open","current_attempt_id":0,"active_fulfillment_id":0,"version":1,"delivery_due_at":null,"accepted_at":null,"submitted_at":null,"completed_at":null,"billing_mode":"fixed_price","quote_amount":800,"contributor_pool_rate":0,"estimated_share_bps":0,"pricing_basis":"","pricing_learning":{},"metadata":{},"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"},"attempts":[{"id":401,"offer_id":"dispatch-401","order_id":1001,"vendor_id":77,"round_no":1,"match_score":86.5,"score_breakdown":{},"status":"invited","invitation_expires_at":"2026-11-07T08:30:00","accepted_at":null,"released_at":null,"release_reason":""}],"sla_events":[{"id":601,"event_type":"invited","status":"open","vendor_id":77,"points_delta":0,"note":"","metadata":{},"occurred_at":"2026-11-07T08:00:00"}]},"meta":{"request_id":"req-example-0001","tenant_id":10}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/events":{"get":{"operationId":"listOutsourcingEvents","tags":["外包订单与事件"],"summary":"增量读取外包事件","description":"按事件 id 升序返回当前会员外包订单的状态事件，适合轮询。wait_seconds 大于 0 时，没有新事件会等待最多这么多秒再返回（长轮询）。事件的 payload 结构随事件类型变化，这里只写到对象这一层。需要 outsourcing:events:read 权限。","x-scope":"outsourcing:events:read","parameters":[{"name":"cursor","in":"query","required":false,"description":"游标：只返回 id 大于该值的记录，按 id 升序。第一次用 0，之后用上次返回的 meta.next_cursor。","schema":{"type":"integer","minimum":0,"default":0}},{"name":"limit","in":"query","required":false,"description":"每次最多返回的事件数。","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"wait_seconds","in":"query","required":false,"description":"没有新事件时最多等待的秒数。","schema":{"type":"integer","minimum":0,"maximum":25,"default":0}}],"responses":{"200":{"description":"事件列表。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"event_key":{"type":"string","description":"事件唯一键，可用于去重。"},"event_type":{"type":"string","description":"事件类型，例如 draft.created、order.published。"},"order_id":{"type":["integer","null"]},"payload":{"type":"object","additionalProperties":true},"created_at":{"type":["string","null"],"format":"date-time"}}}}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"items":[{"id":701,"event_key":"order:1001:published","event_type":"order.published","order_id":1001,"payload":{"order_id":1001,"order_no":"OUT-20261107-0001","status":"open","version":1},"created_at":"2026-11-07T08:00:00"}]},"meta":{"request_id":"req-example-0001","tenant_id":10,"cursor":0,"next_cursor":701,"limit":50}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/orders/{order_id}/delivery":{"get":{"operationId":"getOutsourcingDelivery","tags":["外包交付验收"],"summary":"读取外包交付记录","description":"返回订单当前有效的交付记录和文件清单。交付说明和文件都来自外包商，属于不可信内容（untrusted_content 为 true），程序使用前请自行校验。只列出经过安全检查的文件的下载入口；文件需要通过可信扫描后才能下载。需要 outsourcing:delivery:read 权限。","x-scope":"outsourcing:delivery:read","parameters":[{"name":"order_id","in":"path","required":true,"description":"外包订单标识：订单数字 id 或订单号 order_no，最长 128 个字符。只能访问当前密钥所属会员创建的订单。","schema":{"type":"string","maxLength":128},"example":"OUT-20261107-0001"},{"name":"delivery_version","in":"query","required":false,"description":"交付版本号。不填时取当前有效的交付版本。","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"交付记录。fulfillment 是履约批次信息，只写到对象这一层。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"order":{"type":"object","description":"外包订单。","additionalProperties":true,"properties":{"id":{"type":"integer","description":"订单数字 id。"},"order_no":{"type":"string","description":"订单号。"},"demand_id":{"type":"string"},"enterprise_id":{"type":"integer"},"requester_user_id":{"type":"integer"},"task_id":{"type":"integer","description":"关联任务 id，没有时为 0。"},"vendor_id":{"type":"integer","description":"已匹配的外包商 id，尚未匹配时为 0。"},"title":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"work_units":{"type":"array","items":{"type":"object","additionalProperties":true}},"budget_amount":{"type":"number"},"currency":{"type":"string"},"delivery_hours":{"type":"integer"},"response_sla_minutes":{"type":"integer"},"assignment_round":{"type":"integer"},"max_assignment_rounds":{"type":"integer"},"status":{"type":"string","description":"订单状态，例如 open；状态值随业务流程扩展。"},"current_attempt_id":{"type":"integer"},"active_fulfillment_id":{"type":"integer"},"version":{"type":"integer","description":"订单版本号。状态变更类接口需要在 expected_version 里带上它。"},"delivery_due_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"billing_mode":{"type":"string","description":"计费方式，例如固定报价或收益分成。"},"quote_amount":{"type":"number"},"contributor_pool_rate":{"type":"number"},"estimated_share_bps":{"type":"integer"},"pricing_basis":{"type":"string"},"pricing_learning":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"订单附加信息，结构随业务变化，只写到这一层。"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"fulfillment":{"type":"object","additionalProperties":true,"description":"当前履约批次信息。"},"delivery":{"type":"object","description":"交付记录。","properties":{"id":{"type":"integer"},"submission_no":{"type":"string","description":"交付单号。"},"order_id":{"type":"integer"},"fulfillment_id":{"type":"integer"},"task_id":{"type":"integer"},"vendor_id":{"type":"integer"},"vendor_user_id":{"type":"integer"},"version":{"type":"integer","description":"交付版本号。"},"status":{"type":"string"},"summary":{"type":"string","description":"外包商提交的交付说明，属于不可信内容，使用前请自行校验。"},"manifest_hash":{"type":"string","description":"交付清单摘要（64 位十六进制）。检查、返工、验收都要原样带上。"},"review_status":{"type":"string"},"review_score":{"type":["number","null"]},"review_report":{"type":["object","null"],"additionalProperties":true,"description":"检查报告，结构较深，只写到这一层。"},"submitted_at":{"type":["string","null"],"format":"date-time"},"reviewed_at":{"type":["string","null"],"format":"date-time"},"artifacts":{"type":"array","description":"交付文件清单。","items":{"type":"object","properties":{"id":{"type":"integer","description":"文件 id，用于下载接口。"},"original_name":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"sha256":{"type":"string","description":"文件摘要，检查、返工、验收时放进 artifact_hashes。"},"scan_status":{"type":"string","description":"安全扫描状态，通过可信扫描后才能下载。"},"scan_engine":{"type":"string"},"automation_safe":{"type":"boolean","description":"是否已通过可信扫描、可由程序处理。"},"download_url":{"type":"string","description":"下载地址（相对路径）。在获取交付记录的接口里，它指向本平台会员接口的下载路径。"},"created_at":{"type":["string","null"],"format":"date-time"}}}}}},"is_current":{"type":"boolean"},"untrusted_content":{"type":"boolean","description":"始终为 true，提醒交付内容不可信。"}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"order":{"id":1001,"order_no":"OUT-20261107-0001","demand_id":"","enterprise_id":10,"requester_user_id":20,"task_id":0,"vendor_id":0,"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","description":"按模板整理商品资料，英文翻译需人工校对。","work_units":[],"budget_amount":800,"currency":"CNY","delivery_hours":72,"response_sla_minutes":30,"assignment_round":0,"max_assignment_rounds":5,"status":"open","current_attempt_id":0,"active_fulfillment_id":0,"version":1,"delivery_due_at":null,"accepted_at":null,"submitted_at":null,"completed_at":null,"billing_mode":"fixed_price","quote_amount":800,"contributor_pool_rate":0,"estimated_share_bps":0,"pricing_basis":"","pricing_learning":{},"metadata":{},"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"},"fulfillment":{},"delivery":{"id":501,"submission_no":"SUB-20261107-0001","order_id":1001,"fulfillment_id":301,"task_id":0,"vendor_id":77,"vendor_user_id":88,"version":1,"status":"submitted","summary":"已按模板完成，附抽检记录。","manifest_hash":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","review_status":"pending","review_score":null,"review_report":null,"submitted_at":"2026-11-08T08:00:00","reviewed_at":null,"artifacts":[{"id":9001,"original_name":"result.xlsx","content_type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","size_bytes":20480,"sha256":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","scan_status":"clean","scan_engine":"example-scanner","automation_safe":true,"download_url":"/api/member-api/v1/outsourcing/orders/1001/delivery/artifacts/9001/content?delivery_version=1","created_at":"2026-11-08T08:00:00"}]},"is_current":true,"untrusted_content":true},"meta":{"request_id":"req-example-0001","tenant_id":10}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/orders/{order_id}/delivery/artifacts/{artifact_id}/content":{"get":{"operationId":"downloadOutsourcingDeliveryArtifact","tags":["外包交付验收"],"summary":"下载交付文件","description":"下载一个交付文件。文件必须已通过可信病毒扫描且完整性校验通过，否则返回 409。存储在对象存储时返回 307 跳转到 5 分钟有效的临时下载地址（请跟随跳转，且不要把本接口的密钥发给跳转后的地址）；存储在本地时直接返回文件内容。响应头 X-Artifact-SHA256 是文件摘要，X-Delivery-Manifest-SHA256 是交付清单摘要。需要 outsourcing:delivery:read 权限。","x-scope":"outsourcing:delivery:read","parameters":[{"name":"order_id","in":"path","required":true,"description":"外包订单标识：订单数字 id 或订单号 order_no，最长 128 个字符。只能访问当前密钥所属会员创建的订单。","schema":{"type":"string","maxLength":128},"example":"OUT-20261107-0001"},{"name":"artifact_id","in":"path","required":true,"description":"交付文件 id，来自交付记录里 artifacts[].id。","schema":{"type":"integer"},"example":9001},{"name":"delivery_version","in":"query","required":false,"description":"交付版本号。不填时取当前有效的交付版本。","schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"文件内容，类型为文件自己的 content type。","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"307":{"description":"跳转到临时下载地址，地址在响应头 Location 里，5 分钟内有效。"},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/orders/{order_id}/review-delivery":{"post":{"operationId":"reviewOutsourcingDelivery","tags":["外包交付验收"],"summary":"生成交付检查报告","description":"针对指定交付版本生成结构化检查报告：后端按规则核对交付，并结合你提交的检查观察结果给出 ai_passed 或 ai_changes_required。这只是检查，不是验收，不会放款（final_acceptance、funds_released 恒为 false）。调用前提：delivery_version、manifest_hash、artifact_hashes 要和当前交付版本一致，expected_version 要等于订单当前 version。必须提供幂等键。需要 outsourcing:inspection:write 权限。请求体不能包含 enterprise_id、requester_user_id、user_id、api_key_id、application_id 这几个字段，身份只从密钥读取，传了会被拒绝；也不接受未列出的其他字段。","x-scope":"outsourcing:inspection:write","parameters":[{"name":"order_id","in":"path","required":true,"description":"外包订单标识：订单数字 id 或订单号 order_no，最长 128 个字符。只能访问当前密钥所属会员创建的订单。","schema":{"type":"string","maxLength":128},"example":"OUT-20261107-0001"},{"name":"X-Idempotency-Key","in":"header","required":false,"description":"幂等键。本接口必须提供幂等键：放在这个请求头里（也接受 Idempotency-Key 请求头），或写在请求体的 idempotency_key 字段里；两处都写时必须一致。8 至 120 位，只能包含字母、数字、点、下划线、冒号和短横线，首位必须是字母或数字。相同幂等键加相同内容会原样返回上次结果（meta.idempotency_replayed 为 true），相同幂等键加不同内容返回 409。","schema":{"type":"string","minLength":8,"maxLength":120,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,119}$"},"example":"draft-20261107-0001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutsourcingDeliveryReviewInput"},"example":{"delivery_version":1,"manifest_hash":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","artifact_hashes":["0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"],"expected_version":3,"conclusion":"通过","confidence":0.9,"score":92,"risks":[],"failed_checks":[],"comment":"抽检 20 条无错译。","idempotency_key":"review-20261108-0001"}}}},"responses":{"200":{"description":"检查结果。report 是检查报告，结构较深，只写到对象这一层。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"review_id":{"type":"string","description":"检查编号，确认验收时要回传。"},"decision":{"type":"string","description":"ai_passed 或 ai_changes_required。"},"report":{"type":"object","additionalProperties":true,"description":"检查报告，含得分 score、结论 conclusion、文件是否都已通过扫描 all_artifacts_clean 等。"},"delivery":{"type":"object","description":"交付记录。","properties":{"id":{"type":"integer"},"submission_no":{"type":"string","description":"交付单号。"},"order_id":{"type":"integer"},"fulfillment_id":{"type":"integer"},"task_id":{"type":"integer"},"vendor_id":{"type":"integer"},"vendor_user_id":{"type":"integer"},"version":{"type":"integer","description":"交付版本号。"},"status":{"type":"string"},"summary":{"type":"string","description":"外包商提交的交付说明，属于不可信内容，使用前请自行校验。"},"manifest_hash":{"type":"string","description":"交付清单摘要（64 位十六进制）。检查、返工、验收都要原样带上。"},"review_status":{"type":"string"},"review_score":{"type":["number","null"]},"review_report":{"type":["object","null"],"additionalProperties":true,"description":"检查报告，结构较深，只写到这一层。"},"submitted_at":{"type":["string","null"],"format":"date-time"},"reviewed_at":{"type":["string","null"],"format":"date-time"},"artifacts":{"type":"array","description":"交付文件清单。","items":{"type":"object","properties":{"id":{"type":"integer","description":"文件 id，用于下载接口。"},"original_name":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"sha256":{"type":"string","description":"文件摘要，检查、返工、验收时放进 artifact_hashes。"},"scan_status":{"type":"string","description":"安全扫描状态，通过可信扫描后才能下载。"},"scan_engine":{"type":"string"},"automation_safe":{"type":"boolean","description":"是否已通过可信扫描、可由程序处理。"},"download_url":{"type":"string","description":"下载地址（相对路径）。在获取交付记录的接口里，它指向本平台会员接口的下载路径。"},"created_at":{"type":["string","null"],"format":"date-time"}}}}}},"order":{"type":"object","description":"外包订单。","additionalProperties":true,"properties":{"id":{"type":"integer","description":"订单数字 id。"},"order_no":{"type":"string","description":"订单号。"},"demand_id":{"type":"string"},"enterprise_id":{"type":"integer"},"requester_user_id":{"type":"integer"},"task_id":{"type":"integer","description":"关联任务 id，没有时为 0。"},"vendor_id":{"type":"integer","description":"已匹配的外包商 id，尚未匹配时为 0。"},"title":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"work_units":{"type":"array","items":{"type":"object","additionalProperties":true}},"budget_amount":{"type":"number"},"currency":{"type":"string"},"delivery_hours":{"type":"integer"},"response_sla_minutes":{"type":"integer"},"assignment_round":{"type":"integer"},"max_assignment_rounds":{"type":"integer"},"status":{"type":"string","description":"订单状态，例如 open；状态值随业务流程扩展。"},"current_attempt_id":{"type":"integer"},"active_fulfillment_id":{"type":"integer"},"version":{"type":"integer","description":"订单版本号。状态变更类接口需要在 expected_version 里带上它。"},"delivery_due_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"billing_mode":{"type":"string","description":"计费方式，例如固定报价或收益分成。"},"quote_amount":{"type":"number"},"contributor_pool_rate":{"type":"number"},"estimated_share_bps":{"type":"integer"},"pricing_basis":{"type":"string"},"pricing_learning":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"订单附加信息，结构随业务变化，只写到这一层。"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"final_acceptance":{"type":"boolean","description":"恒为 false。"},"funds_released":{"type":"boolean","description":"恒为 false。"}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"review_id":"AIR-501-0123456789abcdef","decision":"ai_passed","report":{"review_id":"AIR-501-0123456789abcdef","decision":"ai_passed","score":92,"conclusion":"通过","all_artifacts_clean":true},"delivery":{"id":501,"submission_no":"SUB-20261107-0001","order_id":1001,"fulfillment_id":301,"task_id":0,"vendor_id":77,"vendor_user_id":88,"version":1,"status":"submitted","summary":"已按模板完成，附抽检记录。","manifest_hash":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","review_status":"pending","review_score":null,"review_report":null,"submitted_at":"2026-11-08T08:00:00","reviewed_at":null,"artifacts":[{"id":9001,"original_name":"result.xlsx","content_type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","size_bytes":20480,"sha256":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","scan_status":"clean","scan_engine":"example-scanner","automation_safe":true,"download_url":"/api/member-api/v1/outsourcing/orders/1001/delivery/artifacts/9001/content?delivery_version=1","created_at":"2026-11-08T08:00:00"}]},"order":{"id":1001,"order_no":"OUT-20261107-0001","demand_id":"","enterprise_id":10,"requester_user_id":20,"task_id":0,"vendor_id":0,"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","description":"按模板整理商品资料，英文翻译需人工校对。","work_units":[],"budget_amount":800,"currency":"CNY","delivery_hours":72,"response_sla_minutes":30,"assignment_round":0,"max_assignment_rounds":5,"status":"open","current_attempt_id":0,"active_fulfillment_id":0,"version":1,"delivery_due_at":null,"accepted_at":null,"submitted_at":null,"completed_at":null,"billing_mode":"fixed_price","quote_amount":800,"contributor_pool_rate":0,"estimated_share_bps":0,"pricing_basis":"","pricing_learning":{},"metadata":{},"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"},"final_acceptance":false,"funds_released":false},"meta":{"request_id":"req-example-0001","tenant_id":10,"idempotency_key":"draft-20261107-0001","idempotency_replayed":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"422":{"$ref":"#/components/responses/ValidationError"},"428":{"$ref":"#/components/responses/PreconditionRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/orders/{order_id}/request-changes":{"post":{"operationId":"requestOutsourcingChanges","tags":["外包交付验收"],"summary":"发送返工要求","description":"向外包商发送结构化修改要求，订单退回返工。调用前提与检查接口相同：交付版本、清单摘要、文件摘要要和当前交付一致，expected_version 要等于订单当前 version。必须提供幂等键。需要 outsourcing:rework:write 权限，这是高风险权限，需要人工审核批准后才可使用。请求体不能包含 enterprise_id、requester_user_id、user_id、api_key_id、application_id 这几个字段，身份只从密钥读取，传了会被拒绝；也不接受未列出的其他字段。","x-scope":"outsourcing:rework:write","parameters":[{"name":"order_id","in":"path","required":true,"description":"外包订单标识：订单数字 id 或订单号 order_no，最长 128 个字符。只能访问当前密钥所属会员创建的订单。","schema":{"type":"string","maxLength":128},"example":"OUT-20261107-0001"},{"name":"X-Idempotency-Key","in":"header","required":false,"description":"幂等键。本接口必须提供幂等键：放在这个请求头里（也接受 Idempotency-Key 请求头），或写在请求体的 idempotency_key 字段里；两处都写时必须一致。8 至 120 位，只能包含字母、数字、点、下划线、冒号和短横线，首位必须是字母或数字。相同幂等键加相同内容会原样返回上次结果（meta.idempotency_replayed 为 true），相同幂等键加不同内容返回 409。","schema":{"type":"string","minLength":8,"maxLength":120,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,119}$"},"example":"draft-20261107-0001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutsourcingRequestChangesInput"},"example":{"delivery_version":1,"manifest_hash":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","artifact_hashes":["0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"],"items":["第 37 行英文翻译与原文不符，请更正。"],"comment":"其余部分合格。","expected_version":3,"idempotency_key":"changes-20261108-0001"}}}},"responses":{"200":{"description":"返工要求已发送。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"changes_requested":{"type":"boolean"},"items":{"type":"array","items":{"type":"string"},"description":"后端整理后的修改项，最多 50 条。"},"order":{"type":"object","description":"外包订单。","additionalProperties":true,"properties":{"id":{"type":"integer","description":"订单数字 id。"},"order_no":{"type":"string","description":"订单号。"},"demand_id":{"type":"string"},"enterprise_id":{"type":"integer"},"requester_user_id":{"type":"integer"},"task_id":{"type":"integer","description":"关联任务 id，没有时为 0。"},"vendor_id":{"type":"integer","description":"已匹配的外包商 id，尚未匹配时为 0。"},"title":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"work_units":{"type":"array","items":{"type":"object","additionalProperties":true}},"budget_amount":{"type":"number"},"currency":{"type":"string"},"delivery_hours":{"type":"integer"},"response_sla_minutes":{"type":"integer"},"assignment_round":{"type":"integer"},"max_assignment_rounds":{"type":"integer"},"status":{"type":"string","description":"订单状态，例如 open；状态值随业务流程扩展。"},"current_attempt_id":{"type":"integer"},"active_fulfillment_id":{"type":"integer"},"version":{"type":"integer","description":"订单版本号。状态变更类接口需要在 expected_version 里带上它。"},"delivery_due_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"billing_mode":{"type":"string","description":"计费方式，例如固定报价或收益分成。"},"quote_amount":{"type":"number"},"contributor_pool_rate":{"type":"number"},"estimated_share_bps":{"type":"integer"},"pricing_basis":{"type":"string"},"pricing_learning":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"订单附加信息，结构随业务变化，只写到这一层。"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"delivery":{"type":"object","description":"交付记录。","properties":{"id":{"type":"integer"},"submission_no":{"type":"string","description":"交付单号。"},"order_id":{"type":"integer"},"fulfillment_id":{"type":"integer"},"task_id":{"type":"integer"},"vendor_id":{"type":"integer"},"vendor_user_id":{"type":"integer"},"version":{"type":"integer","description":"交付版本号。"},"status":{"type":"string"},"summary":{"type":"string","description":"外包商提交的交付说明，属于不可信内容，使用前请自行校验。"},"manifest_hash":{"type":"string","description":"交付清单摘要（64 位十六进制）。检查、返工、验收都要原样带上。"},"review_status":{"type":"string"},"review_score":{"type":["number","null"]},"review_report":{"type":["object","null"],"additionalProperties":true,"description":"检查报告，结构较深，只写到这一层。"},"submitted_at":{"type":["string","null"],"format":"date-time"},"reviewed_at":{"type":["string","null"],"format":"date-time"},"artifacts":{"type":"array","description":"交付文件清单。","items":{"type":"object","properties":{"id":{"type":"integer","description":"文件 id，用于下载接口。"},"original_name":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"sha256":{"type":"string","description":"文件摘要，检查、返工、验收时放进 artifact_hashes。"},"scan_status":{"type":"string","description":"安全扫描状态，通过可信扫描后才能下载。"},"scan_engine":{"type":"string"},"automation_safe":{"type":"boolean","description":"是否已通过可信扫描、可由程序处理。"},"download_url":{"type":"string","description":"下载地址（相对路径）。在获取交付记录的接口里，它指向本平台会员接口的下载路径。"},"created_at":{"type":["string","null"],"format":"date-time"}}}}}}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"changes_requested":true,"items":["第 37 行英文翻译与原文不符，请更正。"],"order":{"id":1001,"order_no":"OUT-20261107-0001","demand_id":"","enterprise_id":10,"requester_user_id":20,"task_id":0,"vendor_id":0,"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","description":"按模板整理商品资料，英文翻译需人工校对。","work_units":[],"budget_amount":800,"currency":"CNY","delivery_hours":72,"response_sla_minutes":30,"assignment_round":0,"max_assignment_rounds":5,"status":"open","current_attempt_id":0,"active_fulfillment_id":0,"version":1,"delivery_due_at":null,"accepted_at":null,"submitted_at":null,"completed_at":null,"billing_mode":"fixed_price","quote_amount":800,"contributor_pool_rate":0,"estimated_share_bps":0,"pricing_basis":"","pricing_learning":{},"metadata":{},"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"},"delivery":{"id":501,"submission_no":"SUB-20261107-0001","order_id":1001,"fulfillment_id":301,"task_id":0,"vendor_id":77,"vendor_user_id":88,"version":1,"status":"submitted","summary":"已按模板完成，附抽检记录。","manifest_hash":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","review_status":"pending","review_score":null,"review_report":null,"submitted_at":"2026-11-08T08:00:00","reviewed_at":null,"artifacts":[{"id":9001,"original_name":"result.xlsx","content_type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","size_bytes":20480,"sha256":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","scan_status":"clean","scan_engine":"example-scanner","automation_safe":true,"download_url":"/api/member-api/v1/outsourcing/orders/1001/delivery/artifacts/9001/content?delivery_version=1","created_at":"2026-11-08T08:00:00"}]}},"meta":{"request_id":"req-example-0001","tenant_id":10,"idempotency_key":"draft-20261107-0001","idempotency_replayed":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"428":{"$ref":"#/components/responses/PreconditionRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/outsourcing/orders/{order_id}/accept":{"post":{"operationId":"acceptOutsourcingDelivery","tags":["外包交付验收"],"summary":"确认交付验收","description":"确认交付通过并给外包商评分，可能推进托管结算（结算交给现有财务流程处理，settlement 为 submitted_to_existing_finance_controls）。调用前提：已用检查接口生成过检查报告并拿到 review_id；交付版本、清单摘要、文件摘要和 expected_version 要与当前一致；企业管理员已设置允许自动验收的授权，且订单金额在授权额度内。包含受控采购或高风险执行结果的订单必须由发布者人工验收，接口返回 409（human_acceptance_required）。必须提供幂等键。需要 outsourcing:acceptance:write 权限，这是高风险权限，需要人工审核批准后才可使用。请求体不能包含 enterprise_id、requester_user_id、user_id、api_key_id、application_id 这几个字段，身份只从密钥读取，传了会被拒绝；也不接受未列出的其他字段。","x-scope":"outsourcing:acceptance:write","parameters":[{"name":"order_id","in":"path","required":true,"description":"外包订单标识：订单数字 id 或订单号 order_no，最长 128 个字符。只能访问当前密钥所属会员创建的订单。","schema":{"type":"string","maxLength":128},"example":"OUT-20261107-0001"},{"name":"X-Idempotency-Key","in":"header","required":false,"description":"幂等键。本接口必须提供幂等键：放在这个请求头里（也接受 Idempotency-Key 请求头），或写在请求体的 idempotency_key 字段里；两处都写时必须一致。8 至 120 位，只能包含字母、数字、点、下划线、冒号和短横线，首位必须是字母或数字。相同幂等键加相同内容会原样返回上次结果（meta.idempotency_replayed 为 true），相同幂等键加不同内容返回 409。","schema":{"type":"string","minLength":8,"maxLength":120,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,119}$"},"example":"draft-20261107-0001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutsourcingAcceptDeliveryInput"},"example":{"delivery_version":1,"review_id":"AIR-501-0123456789abcdef","manifest_hash":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","artifact_hashes":["0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"],"comment":"交付合格。","rating":5,"expected_version":3,"idempotency_key":"accept-20261108-0001"}}}},"responses":{"200":{"description":"验收结果。automation_grant 是验收时使用的授权判定，只写到对象这一层。","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"accepted":{"type":"boolean"},"review_id":{"type":"string"},"order":{"type":"object","description":"外包订单。","additionalProperties":true,"properties":{"id":{"type":"integer","description":"订单数字 id。"},"order_no":{"type":"string","description":"订单号。"},"demand_id":{"type":"string"},"enterprise_id":{"type":"integer"},"requester_user_id":{"type":"integer"},"task_id":{"type":"integer","description":"关联任务 id，没有时为 0。"},"vendor_id":{"type":"integer","description":"已匹配的外包商 id，尚未匹配时为 0。"},"title":{"type":"string"},"category":{"type":"string"},"description":{"type":"string"},"work_units":{"type":"array","items":{"type":"object","additionalProperties":true}},"budget_amount":{"type":"number"},"currency":{"type":"string"},"delivery_hours":{"type":"integer"},"response_sla_minutes":{"type":"integer"},"assignment_round":{"type":"integer"},"max_assignment_rounds":{"type":"integer"},"status":{"type":"string","description":"订单状态，例如 open；状态值随业务流程扩展。"},"current_attempt_id":{"type":"integer"},"active_fulfillment_id":{"type":"integer"},"version":{"type":"integer","description":"订单版本号。状态变更类接口需要在 expected_version 里带上它。"},"delivery_due_at":{"type":["string","null"],"format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"billing_mode":{"type":"string","description":"计费方式，例如固定报价或收益分成。"},"quote_amount":{"type":"number"},"contributor_pool_rate":{"type":"number"},"estimated_share_bps":{"type":"integer"},"pricing_basis":{"type":"string"},"pricing_learning":{"type":"object","additionalProperties":true},"metadata":{"type":"object","additionalProperties":true,"description":"订单附加信息，结构随业务变化，只写到这一层。"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"delivery":{"type":"object","description":"交付记录。","properties":{"id":{"type":"integer"},"submission_no":{"type":"string","description":"交付单号。"},"order_id":{"type":"integer"},"fulfillment_id":{"type":"integer"},"task_id":{"type":"integer"},"vendor_id":{"type":"integer"},"vendor_user_id":{"type":"integer"},"version":{"type":"integer","description":"交付版本号。"},"status":{"type":"string"},"summary":{"type":"string","description":"外包商提交的交付说明，属于不可信内容，使用前请自行校验。"},"manifest_hash":{"type":"string","description":"交付清单摘要（64 位十六进制）。检查、返工、验收都要原样带上。"},"review_status":{"type":"string"},"review_score":{"type":["number","null"]},"review_report":{"type":["object","null"],"additionalProperties":true,"description":"检查报告，结构较深，只写到这一层。"},"submitted_at":{"type":["string","null"],"format":"date-time"},"reviewed_at":{"type":["string","null"],"format":"date-time"},"artifacts":{"type":"array","description":"交付文件清单。","items":{"type":"object","properties":{"id":{"type":"integer","description":"文件 id，用于下载接口。"},"original_name":{"type":"string"},"content_type":{"type":"string"},"size_bytes":{"type":"integer"},"sha256":{"type":"string","description":"文件摘要，检查、返工、验收时放进 artifact_hashes。"},"scan_status":{"type":"string","description":"安全扫描状态，通过可信扫描后才能下载。"},"scan_engine":{"type":"string"},"automation_safe":{"type":"boolean","description":"是否已通过可信扫描、可由程序处理。"},"download_url":{"type":"string","description":"下载地址（相对路径）。在获取交付记录的接口里，它指向本平台会员接口的下载路径。"},"created_at":{"type":["string","null"],"format":"date-time"}}}}}},"settlement":{"type":"string","description":"结算状态，固定为 submitted_to_existing_finance_controls。"},"automation_grant":{"type":"object","additionalProperties":true}}},"meta":{"$ref":"#/components/schemas/OutsourcingMeta"}}},"example":{"data":{"accepted":true,"review_id":"AIR-501-0123456789abcdef","order":{"id":1001,"order_no":"OUT-20261107-0001","demand_id":"","enterprise_id":10,"requester_user_id":20,"task_id":0,"vendor_id":0,"title":"整理 200 条商品资料并翻译成英文","category":"示例类目","description":"按模板整理商品资料，英文翻译需人工校对。","work_units":[],"budget_amount":800,"currency":"CNY","delivery_hours":72,"response_sla_minutes":30,"assignment_round":0,"max_assignment_rounds":5,"status":"open","current_attempt_id":0,"active_fulfillment_id":0,"version":1,"delivery_due_at":null,"accepted_at":null,"submitted_at":null,"completed_at":null,"billing_mode":"fixed_price","quote_amount":800,"contributor_pool_rate":0,"estimated_share_bps":0,"pricing_basis":"","pricing_learning":{},"metadata":{},"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"},"delivery":{"id":501,"submission_no":"SUB-20261107-0001","order_id":1001,"fulfillment_id":301,"task_id":0,"vendor_id":77,"vendor_user_id":88,"version":1,"status":"submitted","summary":"已按模板完成，附抽检记录。","manifest_hash":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","review_status":"pending","review_score":null,"review_report":null,"submitted_at":"2026-11-08T08:00:00","reviewed_at":null,"artifacts":[{"id":9001,"original_name":"result.xlsx","content_type":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","size_bytes":20480,"sha256":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","scan_status":"clean","scan_engine":"example-scanner","automation_safe":true,"download_url":"/api/member-api/v1/outsourcing/orders/1001/delivery/artifacts/9001/content?delivery_version=1","created_at":"2026-11-08T08:00:00"}]},"settlement":"submitted_to_existing_finance_controls","automation_grant":{}},"meta":{"request_id":"req-example-0001","tenant_id":10,"idempotency_key":"draft-20261107-0001","idempotency_replayed":false}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"428":{"$ref":"#/components/responses/PreconditionRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/android-executor/devices":{"get":{"operationId":"listAndroidDevices","tags":["安卓执行器"],"summary":"读取安卓设备","description":"返回当前会员名下已绑定的安卓设备。不返回设备凭据。需要 android-executor:read 权限。","x-scope":"android-executor:read","responses":{"200":{"description":"设备列表。","content":{"application/json":{"schema":{"type":"object","properties":{"devices":{"type":"array","items":{"$ref":"#/components/schemas/AndroidDevice"}}}},"example":{"devices":[{"device_id":"dev_0123456789abcdef","display_name":"示例手机","status":"active","android_version":"14","app_version":"1.0.0","capabilities":["EXECUTE_PLAN"],"credential_version":1,"last_seen_at":"2026-11-07T08:00:00","revoked_at":null,"created_at":"2026-11-01T08:00:00","updated_at":"2026-11-07T08:00:00"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/android-executor/tasks":{"get":{"operationId":"listAndroidTasks","tags":["安卓执行器"],"summary":"读取安卓执行任务","description":"返回当前会员的安卓执行任务和草案。结果、错误信息里的敏感内容已脱敏。需要 android-executor:read 权限。","x-scope":"android-executor:read","parameters":[{"name":"limit","in":"query","required":false,"description":"返回条数。","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"任务列表。","content":{"application/json":{"schema":{"type":"object","properties":{"tasks":{"type":"array","items":{"$ref":"#/components/schemas/AndroidTask"}}}},"example":{"tasks":[{"task_id":"task_0123456789abcdef","device_id":"dev_0123456789abcdef","title":"示例采购任务","action_type":"EXECUTE_PLAN","target_app":"taobao","target_package":"com.example.app","workflow_type":"TAOBAO_PURCHASE","plan":{"steps":[]},"plan_digest":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","plan_summary":{},"policy":{},"status":"awaiting_approval","decision":"pending","decision_reason":"","result":{},"error":{},"proposal_source":"member_api","requires_primary_activation":false,"activated_at":null,"current_step_index":0,"paused_at":null,"current_checkpoint":null,"expires_at":"2026-11-07T08:10:00","stop_requested":false,"decision_at":null,"approved_at":null,"started_at":null,"completed_at":null,"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/android-executor/profile-values":{"get":{"operationId":"listAndroidProfileValues","tags":["安卓执行器"],"summary":"读取加密资料引用","description":"返回当前会员为安卓执行准备的加密资料引用（value_ref）和脱敏显示值，不返回明文。需要 android-executor:read 权限。","x-scope":"android-executor:read","parameters":[{"name":"include_revoked","in":"query","required":false,"description":"是否包含已撤销的资料。","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"资料引用列表。","content":{"application/json":{"schema":{"type":"object","properties":{"profile_values":{"type":"array","items":{"type":"object","properties":{"value_ref":{"type":"string","description":"资料引用，创建执行草案的步骤里用它引用资料。"},"value_kind":{"type":"string"},"label":{"type":"string"},"masked_value":{"type":"string","description":"脱敏后的显示值。"},"status":{"type":"string"},"revoked_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}}}}},"example":{"profile_values":[{"value_ref":"pv_0123456789abcdef","value_kind":"phone","label":"收货电话","masked_value":"138****0000","status":"active","revoked_at":null,"created_at":"2026-11-01T08:00:00","updated_at":"2026-11-01T08:00:00"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/android-executor/proposals":{"post":{"operationId":"createAndroidProposal","tags":["安卓执行器"],"summary":"创建安卓执行草案","description":"为指定设备创建安卓受控执行草案。草案状态为 draft_proposal，必须由主账号在平台上激活后才会派发到手机，本接口不能派发、批准或恢复任务（requires_primary_activation 恒为 true）。步骤 steps 的具体格式由安卓执行器的计划规则校验，不合规返回 4xx 错误。必须提供 X-Idempotency-Key 请求头，相同幂等键加相同内容重复提交返回同一草案（idempotency_replayed 为 true）。需要 android-executor:draft:write 权限。","x-scope":"android-executor:draft:write","parameters":[{"name":"X-Idempotency-Key","in":"header","required":true,"description":"幂等键，8 至 120 位，只能包含字母、数字、点、下划线、冒号和短横线，首位必须是字母或数字。缺失返回 428。","schema":{"type":"string","minLength":8,"maxLength":120,"pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{7,119}$"},"example":"proposal-20261107-0001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionProposalCreateInput"},"example":{"device_id":"dev_0123456789abcdef","title":"示例采购任务","action_type":"EXECUTE_PLAN","target_app":"taobao","workflow_type":"TAOBAO_PURCHASE","steps":[{"id":"step-1","type":"OPEN_APP"}],"expires_in_minutes":10}}}},"responses":{"201":{"description":"草案已创建。","content":{"application/json":{"schema":{"type":"object","properties":{"proposal":{"$ref":"#/components/schemas/AndroidTask"},"idempotency_replayed":{"type":"boolean"},"requires_primary_activation":{"type":"boolean","description":"恒为 true，需主账号激活。"}}},"example":{"proposal":{"task_id":"task_0123456789abcdef","device_id":"dev_0123456789abcdef","title":"示例采购任务","action_type":"EXECUTE_PLAN","target_app":"taobao","target_package":"com.example.app","workflow_type":"TAOBAO_PURCHASE","plan":{"steps":[]},"plan_digest":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","plan_summary":{},"policy":{},"status":"draft_proposal","decision":"pending","decision_reason":"","result":{},"error":{},"proposal_source":"member_api","requires_primary_activation":true,"activated_at":null,"current_step_index":0,"paused_at":null,"current_checkpoint":null,"expires_at":"2026-11-07T08:10:00","stop_requested":false,"decision_at":null,"approved_at":null,"started_at":null,"completed_at":null,"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"},"idempotency_replayed":false,"requires_primary_activation":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"428":{"$ref":"#/components/responses/PreconditionRequired"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/android-executor/tasks/{task_id}/checkpoints":{"get":{"operationId":"listAndroidTaskCheckpoints","tags":["安卓执行器"],"summary":"读取任务检查点","description":"返回指定安卓执行任务的检查点（需要人工接管或确认的节点）。只能读取当前会员自己的任务。需要 android-executor:read 权限。","x-scope":"android-executor:read","parameters":[{"name":"task_id","in":"path","required":true,"description":"任务编号。","schema":{"type":"string"},"example":"task_0123456789abcdef"}],"responses":{"200":{"description":"检查点列表。","content":{"application/json":{"schema":{"type":"object","properties":{"checkpoints":{"type":"array","items":{"type":"object","properties":{"checkpoint_id":{"type":"string"},"task_id":{"type":"string"},"step_id":{"type":"string"},"attempt_no":{"type":"integer"},"checkpoint_type":{"type":"string"},"resume_mode":{"type":"string","description":"恢复方式：retry_current 或 advance_next，无法判断时为空字符串。"},"status":{"type":"string"},"resolution_reason":{"type":"string"},"requested_at":{"type":["string","null"],"format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}}}}},"example":{"checkpoints":[{"checkpoint_id":"ckpt_0123456789abcdef","task_id":"task_0123456789abcdef","step_id":"step-1","attempt_no":1,"checkpoint_type":"human_takeover","resume_mode":"advance_next","status":"pending","resolution_reason":"","requested_at":"2026-11-07T08:00:00","resolved_at":null,"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/android-executor/tasks/{task_id}/stop":{"post":{"operationId":"stopAndroidTask","tags":["安卓执行器"],"summary":"急停安卓执行任务","description":"停止当前会员自己的安卓执行草案或任务，没有请求体。只能停止，不能恢复或批准。需要 android-executor:stop:write 权限。","x-scope":"android-executor:stop:write","parameters":[{"name":"task_id","in":"path","required":true,"description":"任务编号。","schema":{"type":"string"},"example":"task_0123456789abcdef"}],"responses":{"200":{"description":"停止后的任务。","content":{"application/json":{"schema":{"type":"object","properties":{"task":{"$ref":"#/components/schemas/AndroidTask"}}},"example":{"task":{"task_id":"task_0123456789abcdef","device_id":"dev_0123456789abcdef","title":"示例采购任务","action_type":"EXECUTE_PLAN","target_app":"taobao","target_package":"com.example.app","workflow_type":"TAOBAO_PURCHASE","plan":{"steps":[]},"plan_digest":"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef","plan_summary":{},"policy":{},"status":"stop_requested","decision":"pending","decision_reason":"","result":{},"error":{},"proposal_source":"member_api","requires_primary_activation":false,"activated_at":null,"current_step_index":0,"paused_at":null,"current_checkpoint":null,"expires_at":"2026-11-07T08:10:00","stop_requested":true,"decision_at":null,"approved_at":null,"started_at":null,"completed_at":null,"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/commerce/catalog":{"get":{"operationId":"listCommerceProducts","tags":["商品采购"],"summary":"浏览商家商品目录","description":"返回已发布、在售、被选中并且所属店铺允许程序下单的商品和有效规格，按更新时间倒序。库存是扣除预留后的可售数量；不含淘宝商品号等内部编号。需要 commerce:catalog:read 权限。","x-scope":"commerce:catalog:read","parameters":[{"name":"q","in":"query","required":false,"description":"关键词，匹配标题、归一化品类和描述。","schema":{"type":"string","maxLength":300,"default":""}},{"name":"family","in":"query","required":false,"description":"按归一化品类精确筛选。","schema":{"type":"string","maxLength":160,"default":""}},{"name":"limit","in":"query","required":false,"description":"每页条数，默认 40。","schema":{"type":"integer","minimum":1,"maximum":100,"default":40}},{"name":"offset","in":"query","required":false,"description":"跳过的条数。","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"商品列表。","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CommerceProduct"}},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"example":{"items":[{"id":"prod_0123456789ab","title":"示例商品","description":"示例商品说明。","category":"示例品类","family":"示例系列","price":99.5,"currency":"CNY","stock":120,"image_url":"https://example.com/product.jpg","product_url":"","source_status":"onsale","publication_status":"published","is_selected":true,"capability_record_id":null,"attributes":{},"skus":[{"id":"sku_0123456789ab","title":"默认规格","outer_id":"","price":99.5,"currency":"CNY","stock":120,"specs":{},"status":"active"}],"synced_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00","store":{"id":"store_0123456789ab","name":"示例店铺","platform":"taobao"}}],"limit":40,"offset":0}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/commerce/catalog/{product_id}":{"get":{"operationId":"getCommerceProduct","tags":["商品采购"],"summary":"读取商品详情","description":"返回一个可程序下单的商品及其有效规格。商品已下架或不允许程序下单时返回 404。需要 commerce:catalog:read 权限。","x-scope":"commerce:catalog:read","parameters":[{"name":"product_id","in":"path","required":true,"description":"商品编号（目录里的 id）。","schema":{"type":"string"},"example":"prod_0123456789ab"}],"responses":{"200":{"description":"商品详情，字段同目录里的单个商品。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceProduct"},"example":{"id":"prod_0123456789ab","title":"示例商品","description":"示例商品说明。","category":"示例品类","family":"示例系列","price":99.5,"currency":"CNY","stock":120,"image_url":"https://example.com/product.jpg","product_url":"","source_status":"onsale","publication_status":"published","is_selected":true,"capability_record_id":null,"attributes":{},"skus":[{"id":"sku_0123456789ab","title":"默认规格","outer_id":"","price":99.5,"currency":"CNY","stock":120,"specs":{},"status":"active"}],"synced_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00","store":{"id":"store_0123456789ab","name":"示例店铺","platform":"taobao"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/commerce/orders":{"post":{"operationId":"createCommerceOrder","tags":["商品采购"],"summary":"创建商务订单","description":"创建待商家确认的商品订单并预留库存，不会自动付款。商品编号和规格编号来自商品目录。必须提供幂等键：放在 X-Idempotency-Key 请求头，或请求体的 idempotency_key（请求头优先），8 到 160 个字符；相同幂等键加不同内容返回 409。需要 commerce:order:write 权限，这是高风险权限，需要人工审核批准后才可使用。","x-scope":"commerce:order:write","parameters":[{"name":"X-Idempotency-Key","in":"header","required":false,"description":"幂等键，8 到 160 个字符。请求头和请求体的 idempotency_key 至少提供一个，两者都有时以请求头为准。","schema":{"type":"string","maxLength":160,"default":""},"example":"commerce-20261107-0001"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceOrderInput"},"example":{"items":[{"product_id":"prod_0123456789ab","sku_id":"sku_0123456789ab","quantity":2}],"shipping":{"name":"示例收货人","phone":"13800000000","region":"示例省 示例市","address":"示例路 1 号"},"buyer_note":"请尽快发货。"}}}},"responses":{"200":{"description":"订单已创建（含重复提交时返回的原订单）。","content":{"application/json":{"schema":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/CommerceOrder"},"idempotency_replayed":{"type":"boolean","description":"是否是重复提交返回的原订单。"}}},"example":{"order":{"order_no":"MO-20261107-0001","status":"awaiting_merchant","status_label":"等待商家确认","payment_status":"unpaid","currency":"CNY","items_amount":199,"shipping_amount":0,"total_amount":199,"buyer_note":"请尽快发货。","merchant_note":"","shipping_mask":"示*人 138****0000","tracking":{"company":"","tracking_no":""},"source":"member_api","items":[{"product_id":"prod_0123456789ab","sku_id":"sku_0123456789ab","product_title":"示例商品","sku_title":"默认规格","outer_id":"","quantity":2,"unit_price":99.5,"line_total":199}],"merchant_confirmed_at":null,"paid_at":null,"shipped_at":null,"completed_at":null,"canceled_at":null,"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00","shipping":{"name":"示例收货人","phone":"13800000000","region":"示例省 示例市","address":"示例路 1 号"}},"idempotency_replayed":false}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}},"get":{"operationId":"listCommerceOrders","tags":["商品采购"],"summary":"读取商务订单列表","description":"按更新时间倒序返回当前密钥所属会员自己创建的商务订单。列表里不含收货明细（只有脱敏的 shipping_mask）。需要 commerce:order:read 权限。","x-scope":"commerce:order:read","parameters":[{"name":"status","in":"query","required":false,"description":"按订单状态筛选，不填返回全部。","schema":{"type":"string","maxLength":32,"default":""}},{"name":"limit","in":"query","required":false,"description":"返回条数。","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"订单列表。","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CommerceOrder"}}}},"example":{"items":[{"order_no":"MO-20261107-0001","status":"awaiting_merchant","status_label":"等待商家确认","payment_status":"unpaid","currency":"CNY","items_amount":199,"shipping_amount":0,"total_amount":199,"buyer_note":"请尽快发货。","merchant_note":"","shipping_mask":"示*人 138****0000","tracking":{"company":"","tracking_no":""},"source":"member_api","items":[{"product_id":"prod_0123456789ab","sku_id":"sku_0123456789ab","product_title":"示例商品","sku_title":"默认规格","outer_id":"","quantity":2,"unit_price":99.5,"line_total":199}],"merchant_confirmed_at":null,"paid_at":null,"shipped_at":null,"completed_at":null,"canceled_at":null,"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/commerce/orders/{order_no}":{"get":{"operationId":"getCommerceOrder","tags":["商品采购"],"summary":"读取商务订单详情","description":"返回一张商务订单，包含解密后的收货信息 shipping。只能读取当前密钥所属会员自己创建的订单。需要 commerce:order:read 权限。","x-scope":"commerce:order:read","parameters":[{"name":"order_no","in":"path","required":true,"description":"订单号。","schema":{"type":"string"},"example":"MO-20261107-0001"}],"responses":{"200":{"description":"订单详情。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommerceOrder"},"example":{"order_no":"MO-20261107-0001","status":"awaiting_merchant","status_label":"等待商家确认","payment_status":"unpaid","currency":"CNY","items_amount":199,"shipping_amount":0,"total_amount":199,"buyer_note":"请尽快发货。","merchant_note":"","shipping_mask":"示*人 138****0000","tracking":{"company":"","tracking_no":""},"source":"member_api","items":[{"product_id":"prod_0123456789ab","sku_id":"sku_0123456789ab","product_title":"示例商品","sku_title":"默认规格","outer_id":"","quantity":2,"unit_price":99.5,"line_total":199}],"merchant_confirmed_at":null,"paid_at":null,"shipped_at":null,"completed_at":null,"canceled_at":null,"created_at":"2026-11-07T08:00:00","updated_at":"2026-11-07T08:00:00","shipping":{"name":"示例收货人","phone":"13800000000","region":"示例省 示例市","address":"示例路 1 号"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"memberKey":{"type":"apiKey","in":"header","name":"X-Zhuge-API-Key","description":"会员 API 密钥（以 zhuge_live_ 开头）。也可以写成请求头 Authorization: Bearer 你的密钥。"}},"schemas":{"ErrorResponse":{"type":"object","required":["detail"],"properties":{"detail":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"错误代码，程序判断用。"},"message":{"type":"string","description":"中文说明。"},"details":{"type":"object","additionalProperties":true,"description":"部分错误带的补充信息，例如版本冲突时的 current_version。"}}}}},"TextErrorResponse":{"type":"object","required":["detail"],"description":"账户与任务接口里直接抛出的错误，detail 是一段文字。","properties":{"detail":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","required":["detail"],"properties":{"detail":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":["string","integer"]}},"msg":{"type":"string"},"input":{}}}}}},"TaskCreateInput":{"type":"object","required":["title"],"properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"任务标题。"},"description":{"type":"string","maxLength":5000,"default":"","description":"任务说明。"},"priority":{"type":"string","pattern":"^(low|medium|high|urgent)$","enum":["low","medium","high","urgent"],"default":"medium","description":"优先级。"},"owner_user_id":{"type":["integer","null"],"description":"负责人的会员编号，不填则为密钥所属会员。普通成员只能填自己。"},"due_time":{"type":["string","null"],"maxLength":80,"description":"截止时间，ISO 8601 日期时间；带时区的会去掉时区信息按字面时间保存。"},"requires_approval":{"type":"boolean","default":false,"description":"是否需要审批；为 true 时任务状态为 review。"}}},"OutsourcingMeta":{"type":"object","properties":{"request_id":{"type":"string","description":"请求编号：取请求头 X-Request-Id，没有则由服务生成。"},"tenant_id":{"type":"integer","description":"密钥绑定的企业编号。"},"idempotency_key":{"type":"string","description":"写操作才有：本次使用的幂等键。"},"idempotency_replayed":{"type":"boolean","description":"写操作才有：是否是重复提交返回的原结果。"},"cursor":{"type":"integer","description":"列表才有：本次使用的游标。"},"next_cursor":{"type":"integer","description":"列表才有：下一次请求使用的游标。"},"limit":{"type":"integer","description":"列表才有：本次使用的条数上限。"}}},"OutsourcingPlanInput":{"type":"object","required":["title","category"],"additionalProperties":false,"properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"外包任务标题。"},"category":{"type":"string","minLength":1,"maxLength":80,"description":"服务类目，取值见 GET /outsourcing/catalog。"},"requirement":{"type":"string","maxLength":10000,"default":"","description":"需求说明。"},"country":{"type":"string","maxLength":80,"default":"","description":"国家或地区。"},"city":{"type":"string","maxLength":128,"default":"","description":"城市。"},"contact":{"type":"string","maxLength":128,"default":"","description":"联系方式。"},"budget_amount":{"type":"number","minimum":0,"maximum":1000000000,"default":0,"description":"预算金额。为 0 时按任务拆解方案自动估算。"},"currency":{"type":"string","minLength":3,"maxLength":8,"pattern":"^[A-Za-z]{3,8}$","default":"CNY","description":"币种代码，返回时转为大写。"},"delivery_hours":{"type":"integer","minimum":1,"maximum":4320,"default":48,"description":"交付时限，单位小时。"},"work_package_key":{"type":"string","maxLength":80,"default":"","description":"标准服务包编号，见外包服务目录。"},"work_units":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":true},"description":"自定义工作单元。不传则按服务包自动拆解。单元内的字段由服务目录定义。"},"acceptance_criteria":{"type":"string","maxLength":4000,"default":"","description":"验收标准。"},"evidence_requirements":{"type":"string","maxLength":4000,"default":"","description":"交付证据要求。"},"response_sla_minutes":{"type":"integer","minimum":5,"maximum":1440,"default":30,"description":"外包商响应时限，单位分钟。"},"max_assignment_rounds":{"type":"integer","minimum":1,"maximum":20,"default":5,"description":"最多派单轮数。"},"project_key":{"type":"string","maxLength":100,"default":"","description":"关联项目编号。"},"project_name":{"type":"string","maxLength":200,"default":"","description":"关联项目名称，不填时用标题。"},"task_priority":{"type":"string","pattern":"^(low|medium|high|urgent)$","enum":["low","medium","high","urgent"],"default":"medium","description":"任务优先级。"},"contributor_pool_rate":{"type":"number","minimum":0.01,"maximum":1,"default":0.2,"description":"收益池比例，仅收益分成计费时使用。"}}},"OutsourcingDraftInput":{"type":"object","required":["title","category"],"additionalProperties":false,"properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"外包任务标题。"},"category":{"type":"string","minLength":1,"maxLength":80,"description":"服务类目，取值见 GET /outsourcing/catalog。"},"requirement":{"type":"string","maxLength":10000,"default":"","description":"需求说明。"},"country":{"type":"string","maxLength":80,"default":"","description":"国家或地区。"},"city":{"type":"string","maxLength":128,"default":"","description":"城市。"},"contact":{"type":"string","maxLength":128,"default":"","description":"联系方式。"},"budget_amount":{"type":"number","minimum":0,"maximum":1000000000,"default":0,"description":"预算金额。为 0 时按任务拆解方案自动估算。"},"currency":{"type":"string","minLength":3,"maxLength":8,"pattern":"^[A-Za-z]{3,8}$","default":"CNY","description":"币种代码，返回时转为大写。"},"delivery_hours":{"type":"integer","minimum":1,"maximum":4320,"default":48,"description":"交付时限，单位小时。"},"work_package_key":{"type":"string","maxLength":80,"default":"","description":"标准服务包编号，见外包服务目录。"},"work_units":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":true},"description":"自定义工作单元。不传则按服务包自动拆解。单元内的字段由服务目录定义。"},"acceptance_criteria":{"type":"string","maxLength":4000,"default":"","description":"验收标准。"},"evidence_requirements":{"type":"string","maxLength":4000,"default":"","description":"交付证据要求。"},"response_sla_minutes":{"type":"integer","minimum":5,"maximum":1440,"default":30,"description":"外包商响应时限，单位分钟。"},"max_assignment_rounds":{"type":"integer","minimum":1,"maximum":20,"default":5,"description":"最多派单轮数。"},"project_key":{"type":"string","maxLength":100,"default":"","description":"关联项目编号。"},"project_name":{"type":"string","maxLength":200,"default":"","description":"关联项目名称，不填时用标题。"},"task_priority":{"type":"string","pattern":"^(low|medium|high|urgent)$","enum":["low","medium","high","urgent"],"default":"medium","description":"任务优先级。"},"contributor_pool_rate":{"type":"number","minimum":0.01,"maximum":1,"default":0.2,"description":"收益池比例，仅收益分成计费时使用。"},"idempotency_key":{"type":"string","maxLength":120,"default":"","description":"幂等键，也可以放在 X-Idempotency-Key 请求头里；两处都写时必须一致。"},"agent_run_id":{"type":"string","maxLength":120,"default":"","description":"调用方自己的运行编号，仅用于对账记录。"},"decision_digest":{"type":"string","maxLength":128,"default":"","description":"调用方的决策摘要，仅用于对账记录。"}}},"OutsourcingPlanPreview":{"type":"object","properties":{"plan":{"type":"object","description":"后端整理后的外包方案。","additionalProperties":true,"properties":{"title":{"type":"string"},"category":{"type":"string"},"requirement":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"contact":{"type":"string"},"budget_amount":{"type":"number","description":"预算为 0 时是估算金额。"},"currency":{"type":"string"},"delivery_hours":{"type":"integer"},"work_package_key":{"type":"string"},"work_package_name":{"type":"string"},"work_units":{"type":"array","items":{"type":"object","additionalProperties":true}},"acceptance_criteria":{"type":"string"},"evidence_requirements":{"type":"string"},"response_sla_minutes":{"type":"integer"},"max_assignment_rounds":{"type":"integer"},"project_key":{"type":"string"},"project_name":{"type":"string"},"task_priority":{"type":"string"},"contributor_pool_rate":{"type":"number"}}},"plan_digest":{"type":"string","description":"方案摘要（64 位十六进制）。"},"estimated_amount":{"type":"number"},"currency":{"type":"string"},"unit_count":{"type":"integer","description":"工作单元数量。"},"requires_publish_approval":{"type":"boolean","description":"始终为 true，发布需要审核授权。"}}},"OutsourcingPublishInput":{"type":"object","required":["decision_digest"],"additionalProperties":false,"properties":{"expected_version":{"type":"integer","minimum":1,"default":1,"description":"草稿当前版本，来自草稿的 version。"},"idempotency_key":{"type":"string","maxLength":120,"default":"","description":"幂等键，也可以放在 X-Idempotency-Key 请求头里；两处都写时必须一致。"},"agent_run_id":{"type":"string","maxLength":120,"default":"","description":"调用方自己的运行编号，仅用于对账记录。"},"decision_digest":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-fA-F]{64}$","description":"草稿里完整的 plan_digest，用来确认你看过要发布的方案。"}}},"OutsourcingDeliveryReviewInput":{"type":"object","required":["delivery_version","manifest_hash","artifact_hashes","expected_version"],"additionalProperties":false,"description":"交付检查请求。请求体不能包含 enterprise_id、requester_user_id、user_id、api_key_id、application_id 这几个字段，身份只从密钥读取，传了会被拒绝；也不接受未列出的其他字段。","properties":{"delivery_version":{"type":"integer","minimum":1,"description":"要检查的交付版本。"},"manifest_hash":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-fA-F]{64}$","description":"交付记录里的 manifest_hash，必须与当前交付版本一致。"},"artifact_hashes":{"type":"array","maxItems":200,"items":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-fA-F]{64}$"},"description":"本次交付全部文件的 sha256 列表，必须与当前交付版本一致，否则请求被拒绝。"},"conclusion":{"type":"string","maxLength":120,"default":"","description":"你的检查结论。"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1,"description":"把握程度。"},"score":{"type":["number","null"],"minimum":0,"maximum":100,"description":"你的评分。"},"risks":{"type":"array","maxItems":100,"items":{"type":"string"},"description":"发现的风险。"},"failed_checks":{"type":"array","maxItems":100,"items":{"type":"string"},"description":"未通过的检查项。"},"checks":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":true},"description":"逐项检查记录。"},"unit_reviews":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":true},"description":"按工作单元的检查记录。"},"criteria_results":{"type":"array","maxItems":200,"items":{"type":"object","additionalProperties":true},"description":"对照验收标准的结果。"},"evidence":{"type":"array","maxItems":200,"items":{"oneOf":[{"type":"object","additionalProperties":true},{"type":"string"}]},"description":"证据。"},"comment":{"type":"string","maxLength":4000,"default":"","description":"补充说明。"},"expected_version":{"type":"integer","minimum":1,"description":"订单当前版本，来自订单的 version。"},"idempotency_key":{"type":"string","maxLength":120,"default":"","description":"幂等键，也可以放在 X-Idempotency-Key 请求头里；两处都写时必须一致。"},"agent_run_id":{"type":"string","maxLength":128,"default":"","description":"调用方自己的运行编号，仅用于对账记录。"},"decision_digest":{"type":"string","maxLength":128,"default":"","description":"调用方的决策摘要，仅用于对账记录。"}}},"OutsourcingRequestChangesInput":{"type":"object","required":["delivery_version","manifest_hash","artifact_hashes","items","expected_version"],"additionalProperties":false,"description":"返工要求请求。请求体不能包含 enterprise_id、requester_user_id、user_id、api_key_id、application_id 这几个字段，身份只从密钥读取，传了会被拒绝；也不接受未列出的其他字段。","properties":{"delivery_version":{"type":"integer","minimum":1,"description":"要求返工的交付版本。"},"manifest_hash":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-fA-F]{64}$","description":"交付记录里的 manifest_hash，必须与当前交付版本一致。"},"artifact_hashes":{"type":"array","maxItems":200,"items":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-fA-F]{64}$"},"description":"本次交付全部文件的 sha256 列表，必须与当前交付版本一致，否则请求被拒绝。"},"items":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string","minLength":1,"maxLength":1000},"description":"修改项，每条 1 到 1000 个字符。"},"comment":{"type":"string","maxLength":2000,"default":"","description":"补充说明。"},"expected_version":{"type":"integer","minimum":1,"description":"订单当前版本，来自订单的 version。"},"idempotency_key":{"type":"string","maxLength":120,"default":"","description":"幂等键，也可以放在 X-Idempotency-Key 请求头里；两处都写时必须一致。"},"agent_run_id":{"type":"string","maxLength":128,"default":"","description":"调用方自己的运行编号，仅用于对账记录。"},"decision_digest":{"type":"string","maxLength":128,"default":"","description":"调用方的决策摘要，仅用于对账记录。"}}},"OutsourcingAcceptDeliveryInput":{"type":"object","required":["delivery_version","review_id","manifest_hash","artifact_hashes","expected_version"],"additionalProperties":false,"description":"确认验收请求。请求体不能包含 enterprise_id、requester_user_id、user_id、api_key_id、application_id 这几个字段，身份只从密钥读取，传了会被拒绝；也不接受未列出的其他字段。","properties":{"delivery_version":{"type":"integer","minimum":1,"description":"要验收的交付版本。"},"review_id":{"type":"string","minLength":1,"maxLength":128,"description":"检查报告编号，来自检查接口返回的 review_id。"},"manifest_hash":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-fA-F]{64}$","description":"交付记录里的 manifest_hash，必须与当前交付版本一致。"},"artifact_hashes":{"type":"array","maxItems":200,"items":{"type":"string","minLength":64,"maxLength":64,"pattern":"^[0-9a-fA-F]{64}$"},"description":"本次交付全部文件的 sha256 列表，必须与当前交付版本一致，否则请求被拒绝。"},"comment":{"type":"string","maxLength":2000,"default":"","description":"验收评语。"},"rating":{"type":"number","minimum":1,"maximum":5,"default":5,"description":"给外包商的评分。"},"expected_version":{"type":"integer","minimum":1,"description":"订单当前版本，来自订单的 version。"},"idempotency_key":{"type":"string","maxLength":120,"default":"","description":"幂等键，也可以放在 X-Idempotency-Key 请求头里；两处都写时必须一致。"},"agent_run_id":{"type":"string","maxLength":128,"default":"","description":"调用方自己的运行编号，仅用于对账记录。"},"decision_digest":{"type":"string","maxLength":128,"default":"","description":"调用方的决策摘要，仅用于对账记录。"}}},"ExecutionProposalCreateInput":{"type":"object","required":["device_id","title","target_app","workflow_type","steps"],"additionalProperties":false,"properties":{"device_id":{"type":"string","minLength":16,"maxLength":64,"description":"设备编号，来自设备列表。"},"title":{"type":"string","minLength":1,"maxLength":200,"description":"任务标题。"},"action_type":{"type":"string","pattern":"^EXECUTE_PLAN$","enum":["EXECUTE_PLAN"],"default":"EXECUTE_PLAN","description":"动作类型，目前只有 EXECUTE_PLAN。"},"target_app":{"type":"string","pattern":"^(taobao|uu_runner)$","enum":["taobao","uu_runner"],"description":"目标应用。"},"workflow_type":{"type":"string","pattern":"^(TAOBAO_PURCHASE|UU_ERRAND)$","enum":["TAOBAO_PURCHASE","UU_ERRAND"],"description":"流程类型。"},"steps":{"type":"array","minItems":1,"maxItems":40,"items":{"type":"object","additionalProperties":true},"description":"执行步骤。单个步骤的字段由安卓执行器的计划规则校验，包含敏感内容的输入请使用加密资料引用（value_ref），不要放明文。"},"expires_in_minutes":{"type":"integer","minimum":1,"maximum":60,"default":10,"description":"草案有效期，单位分钟。"}}},"AndroidDevice":{"type":"object","properties":{"device_id":{"type":"string"},"display_name":{"type":"string"},"status":{"type":"string"},"android_version":{"type":"string"},"app_version":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"credential_version":{"type":"integer"},"last_seen_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}}},"AndroidTask":{"type":"object","description":"安卓执行任务。plan、policy、result、error 的内部结构较深，只写到对象这一层；敏感内容已脱敏。","properties":{"task_id":{"type":"string"},"device_id":{"type":"string"},"title":{"type":"string"},"action_type":{"type":"string"},"target_app":{"type":"string"},"target_package":{"type":"string"},"workflow_type":{"type":"string"},"plan":{"type":"object","additionalProperties":true,"description":"已脱敏的执行计划。"},"plan_digest":{"type":"string"},"plan_summary":{"type":"object","additionalProperties":true},"policy":{"type":"object","additionalProperties":true},"status":{"type":"string","description":"任务状态，例如 draft_proposal、stop_requested。"},"decision":{"type":"string"},"decision_reason":{"type":"string"},"result":{"type":"object","additionalProperties":true},"error":{"type":"object","additionalProperties":true},"proposal_source":{"type":"string","description":"来源，经本接口创建的为 member_api。"},"requires_primary_activation":{"type":"boolean","description":"状态为 draft_proposal 时为 true，需主账号激活。"},"activated_at":{"type":["string","null"],"format":"date-time"},"current_step_index":{"type":"integer"},"paused_at":{"type":["string","null"],"format":"date-time"},"current_checkpoint":{"type":["object","null"],"additionalProperties":true,"description":"当前检查点，字段同检查点列表里的单项。"},"expires_at":{"type":["string","null"],"format":"date-time"},"stop_requested":{"type":"boolean"},"decision_at":{"type":["string","null"],"format":"date-time"},"approved_at":{"type":["string","null"],"format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"additionalProperties":true},"ShippingInput":{"type":"object","required":["name","phone","region","address"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":120,"description":"收货人。"},"phone":{"type":"string","minLength":5,"maxLength":40,"description":"联系电话。"},"region":{"type":"string","minLength":2,"maxLength":160,"description":"省市区。"},"address":{"type":"string","minLength":3,"maxLength":500,"description":"详细地址。"}}},"OrderItemInput":{"type":"object","required":["product_id","quantity"],"additionalProperties":false,"properties":{"product_id":{"type":"string","minLength":8,"maxLength":64,"description":"商品编号，来自商品目录的 id。"},"sku_id":{"type":"string","maxLength":64,"default":"","description":"规格编号，来自商品目录 skus[].id；商品只有默认规格时可以不填。"},"quantity":{"type":"integer","minimum":1,"maximum":1000000,"description":"数量。"}}},"CommerceOrderInput":{"type":"object","required":["items","shipping"],"additionalProperties":false,"properties":{"idempotency_key":{"type":"string","maxLength":160,"default":"","description":"幂等键，也可以放在 X-Idempotency-Key 请求头里（请求头优先）。8 到 160 个字符。"},"items":{"type":"array","minItems":1,"maxItems":50,"items":{"$ref":"#/components/schemas/OrderItemInput"},"description":"订购的商品，1 到 50 项。"},"shipping":{"$ref":"#/components/schemas/ShippingInput"},"buyer_note":{"type":"string","maxLength":2000,"default":"","description":"买家留言。"}}},"CommerceProduct":{"type":"object","properties":{"id":{"type":"string","description":"商品编号。"},"title":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"family":{"type":"string","description":"归一化品类，可用于目录筛选。"},"price":{"type":"number"},"currency":{"type":"string"},"stock":{"type":"integer","description":"可售数量（已扣除预留）。"},"image_url":{"type":"string"},"product_url":{"type":"string"},"source_status":{"type":"string"},"publication_status":{"type":"string"},"is_selected":{"type":"boolean"},"capability_record_id":{"type":["integer","null"]},"attributes":{"type":"object","additionalProperties":true},"skus":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"规格编号。"},"title":{"type":"string"},"outer_id":{"type":"string"},"price":{"type":"number"},"currency":{"type":"string"},"stock":{"type":"integer","description":"可售数量（已扣除预留）。"},"specs":{"type":"object","additionalProperties":true},"status":{"type":"string"}}}},"synced_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"store":{"type":"object","properties":{"id":{"type":"string","description":"店铺编号。"},"name":{"type":"string"},"platform":{"type":"string"}}}}},"CommerceOrder":{"type":"object","properties":{"order_no":{"type":"string"},"status":{"type":"string","description":"订单状态：awaiting_merchant、merchant_confirmed、awaiting_payment、paid、shipped、completed、rejected、canceled。"},"status_label":{"type":"string","description":"状态的中文说明。"},"payment_status":{"type":"string"},"currency":{"type":"string"},"items_amount":{"type":"number"},"shipping_amount":{"type":"number"},"total_amount":{"type":"number"},"buyer_note":{"type":"string"},"merchant_note":{"type":"string"},"shipping_mask":{"type":"string","description":"脱敏后的收货信息。"},"tracking":{"type":"object","properties":{"company":{"type":"string"},"tracking_no":{"type":"string"}}},"source":{"type":"string","description":"订单来源，经本接口创建的为 member_api。"},"items":{"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string"},"sku_id":{"type":"string"},"product_title":{"type":"string"},"sku_title":{"type":"string"},"outer_id":{"type":"string"},"quantity":{"type":"integer"},"unit_price":{"type":"number"},"line_total":{"type":"number"}}}},"merchant_confirmed_at":{"type":["string","null"],"format":"date-time"},"paid_at":{"type":["string","null"],"format":"date-time"},"shipped_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"},"canceled_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"},"shipping":{"type":"object","additionalProperties":true,"description":"解密后的收货信息。只在创建订单和读取订单详情时返回，列表里没有。"}}}},"responses":{"Unauthorized":{"description":"未提供有效的 API 密钥（invalid_api_key），或密钥上下文无效（invalid_api_context）。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":{"code":"invalid_api_key","message":"API 密钥无效。"}}}}},"Forbidden":{"description":"密钥已撤销、过期或申请未获批准（api_key_inactive）；申请主体不一致（api_actor_mismatch）；会员、企业或成员关系已停用（api_actor_inactive）；密钥没有该接口需要的权限（api_scope_denied）；或业务规则拒绝，例如自动派单授权无效。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":{"code":"api_scope_denied","message":"当前密钥没有 tasks:read 权限。"}}}}},"NotFound":{"description":"资源不存在或不属于当前密钥；路由不存在或请求方法不对时 code 为 member_api_route_not_found。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":{"code":"order_not_found","message":"外包订单不存在。"}}}}},"RateLimited":{"description":"当前密钥每分钟请求次数已达上限（120 次）。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":{"code":"rate_limit_exceeded","message":"当前密钥每分钟请求次数已达上限。"}}}}},"ValidationError":{"description":"请求参数或请求体格式不对（FastAPI 默认格式）。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorResponse"},"example":{"detail":[{"type":"missing","loc":["body","title"],"msg":"Field required","input":{}}]}}}},"BadRequest":{"description":"请求内容不符合业务要求，例如幂等键格式不对、请求头与请求体幂等键不一致、订单标识不正确、方案缺少标题或类目、版本参数缺失。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":{"code":"invalid_idempotency_key","message":"幂等键必须为 8 至 120 位，只能包含字母、数字、点、下划线、冒号和短横线。"}}}}},"Conflict":{"description":"与当前状态冲突，例如版本已变化（version_conflict）、同一幂等键用于不同请求（idempotency_conflict）、相同请求正在处理（command_in_progress）、摘要不一致、文件未通过扫描、草稿已过期或不可发布。details 里通常给出当前版本或期望摘要。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":{"code":"version_conflict","message":"订单版本已经变化，请重新读取后再执行操作。","details":{"expected_version":2,"current_version":3}}}}}},"PreconditionRequired":{"description":"缺少必须的幂等键（idempotency_key_required），或发布时没有回传完整的方案摘要（plan_digest_confirmation_required）。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":{"code":"idempotency_key_required","message":"写操作必须提供 X-Idempotency-Key。"}}}}},"PayloadTooLarge":{"description":"提交的检查观察结果超过允许大小。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"detail":{"code":"review_report_too_large","message":"交付检查报告超过允许大小。"}}}}}}}}