BUILD WITH DOOU
把客户数据,
接入你的应用。
从第一条请求到完整业务流程。在这里了解 DOOU 的认证方式、数据结构与调用规范,让你的系统与 AI 助手使用同一份业务上下文。
开放平台分阶段开放。本页描述当前接口契约,并不表示全部能力已在生产环境开放。请使用接入时提供的已验收环境地址及授权范围。
01 / AUTHENTICATION
认证与权限
在 DOOU 连接界面创建访问令牌,保存在调用方服务端的环境变量或密钥管理服务中。业务接口使用 Bearer 认证;浏览器前端不持有访问令牌。
Authorization: Bearer <DOOU_ACCESS_TOKEN>
Content-Type: application/jsonDOOU_BASE_URL 是获准环境的 origin,例如本地开发的 http://127.0.0.1:3003。用户和工作区由服务端根据凭据确定,无需在请求中传入。报价与确认使用同一访问凭据。
| 操作 | 所需 Scope |
|---|---|
| 读取已保存客户 | customers:read |
| 创建搜索草稿 | customer_searches:write |
| 报价与确认搜索 | customer_searches:execute |
| 读取运行 / 成果 | runs:read / artifacts:read |
| 读取用量回执 | usage:read |
按需申请权限。涉及付费执行、消息发送或其他写入的操作,还需完成对应的报价或审核确认。
02 / FIRST REQUEST
先读取一份已保存的名单
在服务端配置好 DOOU_BASE_URL 与 DOOU_ACCESS_TOKEN 后,使用拥有 customers:read 权限的令牌发起请求。
curl "$DOOU_BASE_URL/api/v1/customer-lists?limit=20&offset=0" \
-H "Authorization: Bearer $DOOU_ACCESS_TOKEN"REST 成功响应将业务结果放在 data,meta.requestId 用于排查请求。名单索引返回后,使用名单 ID 调用 GET /api/v1/customer-lists/{id} 读取企业明细。具体响应字段见下方对应接口。
文档中的 v1 与 v2 是公开协议版本。请使用目录列出的完整路径,不要自行替换版本号。发现入口 /api/v2、OpenAPI 和 Schema 索引无需业务令牌。
03 / CUSTOMER SEARCH
创建一次客户搜索
调用分成四步,报价与执行之间保留用户确认。以下示例为调用片段,需要由你的服务端保存草稿、报价与任务回执。
- 整理范围
- 获取报价
- 用户确认
- 读取成果
1. 创建范围草稿
产品和目标市场应明确,市场填写具体国家。首次创建提供 product 和 market;修改范围时传入上一版完整 draft 及变更字段。
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
draft | 按场景 | 服务端返回的完整范围草稿doou-customer-search-draft.v1 |
product | 按场景 | 目标产品或品类string · 至少 2 字符 · 至多 120 字符 |
market | 按场景 | 目标市场 / 国家string · 至少 2 字符 · 至多 100 字符 |
resultLimit | 按场景 | 希望交付的客户数量integer · 最小 1 · 最大 20 · 默认 10 |
customerTypes | 按场景 | 目标采购方类型array · 元素:string · 至少 2 字符 · 至多 60 字符 · 最多 5 项 |
contactRequirement | 按场景 | 联系渠道要求string · 可选:any_contact / email / phone · 默认 "any_contact" |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-customer-search-draft-request.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"anyOf": [
{
"required": [
"draft"
]
},
{
"required": [
"product",
"market"
]
}
],
"properties": {
"draft": {
"$ref": "https://doouai.com/api/v2/schemas/doou-customer-search-draft.v1.json"
},
"product": {
"type": "string",
"minLength": 2,
"maxLength": 120
},
"market": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"resultLimit": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 10
},
"customerTypes": {
"type": "array",
"maxItems": 5,
"items": {
"type": "string",
"minLength": 2,
"maxLength": 60
}
},
"contactRequirement": {
"type": "string",
"enum": [
"any_contact",
"email",
"phone"
],
"default": "any_contact"
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}为 DRAFT_KEY 生成并持久化一个 UUID。每一步使用不同的幂等键,同一步重试沿用原键。
curl -X POST "$DOOU_BASE_URL/api/v2/customer-searches/drafts" \
-H "Authorization: Bearer $DOOU_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $DRAFT_KEY" \
-d '{
"product": "stainless steel water bottles",
"market": "Germany",
"resultLimit": 10,
"customerTypes": ["distributor"],
"contactRequirement": "email"
}'2. 使用完整草稿获取报价
// Node.js 服务端;draft 为上一步响应的 data。
// 每个命令使用独立、已持久化的幂等键。
const response = await fetch(base + '/api/v2/customer-searches/quotes', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json',
'Idempotency-Key': quoteKey,
},
body: JSON.stringify({ draft }),
});
const body = await response.json();
if (!response.ok) throw new Error(body.error?.message ?? '报价失败');
const quote = body.data;
// 向用户展示 quote.draft、quote.pricing 和 confirmation.expiresAt。
// 保存报价,等待用户明确确认;此处不自动启动任务。3. 用户确认后启动任务
// 仅在用户确认当前报价后,由服务端执行。
const response = await fetch(base + '/api/v2/customer-searches', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json',
'Idempotency-Key': confirmKey,
},
body: JSON.stringify({ confirmationToken: quote.confirmation.token }),
});
const body = await response.json();
if (!response.ok) throw new Error(body.error?.message ?? '确认失败');
const receipt = body.data;
// 持久化 receiptId、workflowRunId、statusUrl、state。
// HTTP 202 表示命令已受理,任务成果需要继续读取。4. 读取任务状态与成果
使用回执提供的 statusUrl 观察状态;通过 GET /api/v1/workflow-runs/{id}/artifacts 读取任务快照和成果,或通过 GET /api/v2/artifacts?workflowRunId={id} 读取增量成果事件。空结果不代表任务结束。
04 / DATA DICTIONARY
可理解,也可校验的数据
字段结构使用版本化 JSON Schema 描述。下面是共享数据模型;具体接口可能返回名单投影或任务快照,请以该接口的响应 Schema 为准,勿将共享企业模型直接当作所有名单行的结构。
企业 Companycompany.v1
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
id | 是 | 资源唯一标识string · 至少 1 字符 · 至多 160 字符 |
name | 是 | 名称string · 至少 1 字符 · 至多 240 字符 |
legalName | 按场景 | 企业法定名称string · 至多 240 字符 |
aliases | 按场景 | array · 元素:string · 至多 240 字符 · 最多 20 项 |
domain | 按场景 | 企业域名string · 至多 240 字符 |
website | 按场景 | 企业网站string · uri · 至多 500 字符 |
identityStatus | 是 | string · 可选:verified / matched / candidate / conflicting |
industry | 按场景 | object |
firmographics | 按场景 | object |
location | 是 | object |
businessRoles | 是 | array · 元素:string · 可选:importer / distributor / wholesaler / retailer / brand / manufacturer / service_provider / other · 最多 20 项 |
relevance | 按场景 | object |
contactPoints | 是 | 联系渠道及各自的核验信息array · 元素:contact-point.v1 · 最多 50 项 |
socialProfiles | 是 | 社交平台资料array · 元素:social-profile.v1 · 最多 30 项 |
people | 是 | array · 元素:person.v1 · 最多 30 项 |
evidence | 是 | 支撑数据的来源证据array · 元素:evidence-reference.v1 · 最多 50 项 |
observedAt | 按场景 | 数据观察时间string · date-time · RFC 3339 timestamp in UTC. |
updatedAt | 是 | 最近更新时间string · date-time · RFC 3339 timestamp in UTC. |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/company.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "DOOU company",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"name",
"identityStatus",
"location",
"businessRoles",
"contactPoints",
"socialProfiles",
"people",
"evidence",
"updatedAt"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 240
},
"legalName": {
"type": "string",
"maxLength": 240
},
"aliases": {
"type": "array",
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"maxLength": 240
}
},
"domain": {
"type": "string",
"maxLength": 240
},
"website": {
"type": "string",
"format": "uri",
"maxLength": 500
},
"identityStatus": {
"type": "string",
"enum": [
"verified",
"matched",
"candidate",
"conflicting"
]
},
"industry": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"maxLength": 160
},
"codes": {
"type": "array",
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"maxLength": 40
}
}
}
},
"firmographics": {
"type": "object",
"additionalProperties": false,
"properties": {
"employeeCount": {
"type": "integer",
"minimum": 0
},
"employeeRange": {
"type": "string",
"maxLength": 80
},
"foundedYear": {
"type": "integer",
"minimum": 1000,
"maximum": 9999
},
"annualRevenue": {
"$ref": "https://doouai.com/api/v2/schemas/money.v1.json"
},
"fundingStage": {
"type": "string",
"maxLength": 80
},
"totalFunding": {
"$ref": "https://doouai.com/api/v2/schemas/money.v1.json"
}
}
},
"location": {
"type": "object",
"additionalProperties": false,
"properties": {
"countryCode": {
"type": "string",
"pattern": "^[A-Z]{2}$"
},
"country": {
"type": "string",
"maxLength": 120
},
"region": {
"type": "string",
"maxLength": 160
},
"city": {
"type": "string",
"maxLength": 160
}
}
},
"businessRoles": {
"type": "array",
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"importer",
"distributor",
"wholesaler",
"retailer",
"brand",
"manufacturer",
"service_provider",
"other"
]
}
},
"relevance": {
"type": "object",
"additionalProperties": false,
"properties": {
"status": {
"type": "string",
"enum": [
"matched",
"suspected",
"unknown",
"excluded"
]
},
"score": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"reasons": {
"type": "array",
"maxItems": 12,
"items": {
"type": "string",
"maxLength": 240
}
}
}
},
"contactPoints": {
"type": "array",
"maxItems": 50,
"items": {
"$ref": "https://doouai.com/api/v2/schemas/contact-point.v1.json"
}
},
"socialProfiles": {
"type": "array",
"maxItems": 30,
"items": {
"$ref": "https://doouai.com/api/v2/schemas/social-profile.v1.json"
}
},
"people": {
"type": "array",
"maxItems": 30,
"items": {
"$ref": "https://doouai.com/api/v2/schemas/person.v1.json"
}
},
"evidence": {
"type": "array",
"maxItems": 50,
"items": {
"$ref": "https://doouai.com/api/v2/schemas/evidence-reference.v1.json"
}
},
"observedAt": {
"type": "string",
"format": "date-time",
"description": "RFC 3339 timestamp in UTC."
},
"updatedAt": {
"type": "string",
"format": "date-time",
"description": "RFC 3339 timestamp in UTC."
}
}
}联系人 Personperson.v1
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
id | 是 | 资源唯一标识string · 至少 1 字符 · 至多 160 字符 |
name | 是 | 名称string · 至少 1 字符 · 至多 160 字符 |
companyId | 是 | 所属企业标识string · 至少 1 字符 · 至多 160 字符 |
title | 按场景 | 职务string · 至多 160 字符 |
department | 按场景 | 部门string · 至多 120 字符 |
seniority | 按场景 | 职级string · 至多 80 字符 |
requestedRole | 按场景 | string · 至多 120 字符 |
employmentStatus | 是 | 当前任职核验状态string · 可选:current_verified / current_candidate / unverified / former / conflicting |
verificationStatus | 是 | 实体或渠道核验状态string · 可选:verified / candidate / conflicting / expired |
confidence | 按场景 | 置信度number · 最小 0 · 最大 100 |
observedAt | 按场景 | 数据观察时间string · date-time · RFC 3339 timestamp in UTC. |
contactPoints | 是 | 联系渠道及各自的核验信息array · 元素:contact-point.v1 · 最多 20 项 |
socialProfiles | 是 | 社交平台资料array · 元素:social-profile.v1 · 最多 20 项 |
evidence | 是 | 支撑数据的来源证据array · 元素:evidence-reference.v1 · 最多 30 项 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/person.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "DOOU person",
"type": "object",
"additionalProperties": false,
"required": [
"id",
"name",
"companyId",
"employmentStatus",
"verificationStatus",
"contactPoints",
"socialProfiles",
"evidence"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"companyId": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"title": {
"type": "string",
"maxLength": 160
},
"department": {
"type": "string",
"maxLength": 120
},
"seniority": {
"type": "string",
"maxLength": 80
},
"requestedRole": {
"type": "string",
"maxLength": 120
},
"employmentStatus": {
"type": "string",
"enum": [
"current_verified",
"current_candidate",
"unverified",
"former",
"conflicting"
]
},
"verificationStatus": {
"type": "string",
"enum": [
"verified",
"candidate",
"conflicting",
"expired"
]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"observedAt": {
"type": "string",
"format": "date-time",
"description": "RFC 3339 timestamp in UTC."
},
"contactPoints": {
"type": "array",
"maxItems": 20,
"items": {
"$ref": "https://doouai.com/api/v2/schemas/contact-point.v1.json"
}
},
"socialProfiles": {
"type": "array",
"maxItems": 20,
"items": {
"$ref": "https://doouai.com/api/v2/schemas/social-profile.v1.json"
}
},
"evidence": {
"type": "array",
"maxItems": 30,
"items": {
"$ref": "https://doouai.com/api/v2/schemas/evidence-reference.v1.json"
}
}
}
}联系渠道 Contact pointcontact-point.v1
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
type | 是 | string · 可选:email / phone / whatsapp |
value | 是 | string · 至少 1 字符 · 至多 500 字符 |
label | 按场景 | string · 至多 80 字符 |
ownerType | 是 | 渠道归属主体string · 可选:company / person / unknown |
usage | 按场景 | 渠道用途string · 可选:general / sales / support / procurement / executive / personal / unknown |
verificationStatus | 是 | 实体或渠道核验状态string · 可选:verified / valid / accept_all / observed / unverified / risky / invalid / expired |
confidence | 按场景 | 置信度number · 最小 0 · 最大 100 |
observedAt | 按场景 | 数据观察时间string · date-time · RFC 3339 timestamp in UTC. |
evidence | 是 | 支撑数据的来源证据array · 元素:evidence-reference.v1 · 最多 20 项 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/contact-point.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "DOOU contact point",
"type": "object",
"additionalProperties": false,
"required": [
"type",
"value",
"ownerType",
"verificationStatus",
"evidence"
],
"properties": {
"type": {
"type": "string",
"enum": [
"email",
"phone",
"whatsapp"
]
},
"value": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"label": {
"type": "string",
"maxLength": 80
},
"ownerType": {
"type": "string",
"enum": [
"company",
"person",
"unknown"
]
},
"usage": {
"type": "string",
"enum": [
"general",
"sales",
"support",
"procurement",
"executive",
"personal",
"unknown"
]
},
"verificationStatus": {
"type": "string",
"enum": [
"verified",
"valid",
"accept_all",
"observed",
"unverified",
"risky",
"invalid",
"expired"
]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"observedAt": {
"type": "string",
"format": "date-time",
"description": "RFC 3339 timestamp in UTC."
},
"evidence": {
"type": "array",
"maxItems": 20,
"items": {
"$ref": "https://doouai.com/api/v2/schemas/evidence-reference.v1.json"
}
}
}
}来源与核验 Evidenceevidence-reference.v1
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
sourceName | 是 | 来源名称string · 至少 1 字符 · 至多 160 字符 |
sourceType | 按场景 | string · 可选:first_party / official_registry / structured_provider / public_web / user_supplied |
sourceUrl | 按场景 | 来源页面地址string · uri · 至多 500 字符 |
sourceRecordId | 按场景 | string · 至少 1 字符 · 至多 180 字符 |
observedAt | 是 | 数据观察时间string · date-time · RFC 3339 timestamp in UTC. |
retrievedAt | 按场景 | 数据获取时间string · date-time · RFC 3339 timestamp in UTC. |
validUntil | 按场景 | 有效期截止时间string · date-time · RFC 3339 timestamp in UTC. |
verificationState | 是 | 证据核验状态string · 可选:observed / verified / corroborated / conflicting / expired |
confidence | 按场景 | 置信度number · 最小 0 · 最大 100 |
supports | 按场景 | 该证据支持的字段或结论array · 元素:string · 至少 1 字符 · 至多 120 字符 · 最多 20 项 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/evidence-reference.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "DOOU evidence reference",
"type": "object",
"additionalProperties": false,
"required": [
"sourceName",
"observedAt",
"verificationState"
],
"properties": {
"sourceName": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"sourceType": {
"type": "string",
"enum": [
"first_party",
"official_registry",
"structured_provider",
"public_web",
"user_supplied"
]
},
"sourceUrl": {
"type": "string",
"format": "uri",
"maxLength": 500
},
"sourceRecordId": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"observedAt": {
"type": "string",
"format": "date-time",
"description": "RFC 3339 timestamp in UTC."
},
"retrievedAt": {
"type": "string",
"format": "date-time",
"description": "RFC 3339 timestamp in UTC."
},
"validUntil": {
"type": "string",
"format": "date-time",
"description": "RFC 3339 timestamp in UTC."
},
"verificationState": {
"type": "string",
"enum": [
"observed",
"verified",
"corroborated",
"conflicting",
"expired"
]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"supports": {
"type": "array",
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 120
}
}
}
}命令回执 Receiptworkflow-command-receipt.v1
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}同步数据时保留来源、采集时间与核验状态。候选联系人不等于已核验联系人;缺失字段保持缺失或契约允许的 null,不要补造业务事实。
05 / API REFERENCE
按业务能力查找接口
展开接口查看权限、输入字段与 data 结构。GET 输入映射为查询参数;路径中的 ID 放在路径。POST 输入放在 JSON 请求体,idempotencyKey 在 REST 中使用 Idempotency-Key 请求头。完整参数位置以 OpenAPI 为准。
products
已确认的用户产品与可复用产品资料。
GET/api/v2/products
权限 products:read
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
limit | 按场景 | 单页条数integer · 最小 1 · 最大 8 · 默认 8 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-product-profile-query.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 8,
"default": 8
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-product-profile-index.v1" |
profiles | 是 | array · 元素:object · 最多 8 项 |
summary | 是 | object |
meta | 是 | object |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-product-profile-index.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"profiles",
"summary",
"meta"
],
"properties": {
"schemaVersion": {
"const": "doou-product-profile-index.v1"
},
"profiles": {
"type": "array",
"maxItems": 8,
"items": {
"type": "object"
}
},
"summary": {
"type": "object"
},
"meta": {
"type": "object",
"additionalProperties": true,
"required": [
"liveProviderCalls",
"externalWrites"
],
"properties": {
"source": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"liveProviderCalls": {
"const": false
},
"externalWrites": {
"const": false
},
"modelCalls": {
"type": "boolean"
},
"fullBodyIncluded": {
"type": "boolean"
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · invalid_pagination · product_profile_storage_unavailable · product_profile_read_failed · internal_error
MCP 工具:doou_list_product_profiles
customer_searches
客户发现 TaskDraft、报价、执行和增量状态。
POST/api/v2/customer-searches/drafts
权限 customer_searches:write · 需要 Idempotency-Key
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
draft | 按场景 | 服务端返回的完整范围草稿doou-customer-search-draft.v1 |
product | 按场景 | 目标产品或品类string · 至少 2 字符 · 至多 120 字符 |
market | 按场景 | 目标市场 / 国家string · 至少 2 字符 · 至多 100 字符 |
resultLimit | 按场景 | 希望交付的客户数量integer · 最小 1 · 最大 20 · 默认 10 |
customerTypes | 按场景 | 目标采购方类型array · 元素:string · 至少 2 字符 · 至多 60 字符 · 最多 5 项 |
contactRequirement | 按场景 | 联系渠道要求string · 可选:any_contact / email / phone · 默认 "any_contact" |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-customer-search-draft-request.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"anyOf": [
{
"required": [
"draft"
]
},
{
"required": [
"product",
"market"
]
}
],
"properties": {
"draft": {
"$ref": "https://doouai.com/api/v2/schemas/doou-customer-search-draft.v1.json"
},
"product": {
"type": "string",
"minLength": 2,
"maxLength": 120
},
"market": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"resultLimit": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 10
},
"customerTypes": {
"type": "array",
"maxItems": 5,
"items": {
"type": "string",
"minLength": 2,
"maxLength": 60
}
},
"contactRequirement": {
"type": "string",
"enum": [
"any_contact",
"email",
"phone"
],
"default": "any_contact"
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-customer-search-draft.v1" |
draftId | 是 | 草稿标识string |
revision | 是 | 数据修订版本integer · 最小 1 |
status | 是 | string · 固定值:"scope_ready" |
scope | 是 | 已确认的任务范围object |
updatedAt | 是 | 最近更新时间string · date-time |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-customer-search-draft.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"draftId",
"revision",
"status",
"scope",
"updatedAt"
],
"properties": {
"schemaVersion": {
"const": "doou-customer-search-draft.v1"
},
"draftId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"revision": {
"type": "integer",
"minimum": 1
},
"status": {
"const": "scope_ready"
},
"scope": {
"type": "object",
"additionalProperties": false,
"required": [
"product",
"market",
"resultLimit",
"customerTypes",
"includeContacts",
"contactRequirement"
],
"properties": {
"product": {
"type": "string",
"minLength": 2,
"maxLength": 120
},
"market": {
"type": "string",
"minLength": 2,
"maxLength": 100
},
"resultLimit": {
"type": "integer",
"minimum": 1,
"maximum": 20
},
"customerTypes": {
"type": "array",
"minItems": 1,
"maxItems": 5,
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 2,
"maxLength": 60
}
},
"includeContacts": {
"const": true
},
"contactRequirement": {
"type": "string",
"enum": [
"any_contact",
"email",
"phone"
]
}
}
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · customer_product_missing · customer_market_missing · customer_market_invalid · customer_market_requires_country · customer_result_limit_invalid · idempotency_key_invalid · internal_error
MCP 工具:doou_create_customer_search_draft
POST/api/v2/customer-searches/quotes
权限 customer_searches:execute · 需要 Idempotency-Key
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
draft | 是 | 服务端返回的完整范围草稿doou-customer-search-draft.v1 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-customer-search-quote-request.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"draft"
],
"properties": {
"draft": {
"$ref": "https://doouai.com/api/v2/schemas/doou-customer-search-draft.v1.json"
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-customer-search-quote.v1" |
quoteId | 是 | string |
operation | 是 | 业务操作标识string · 固定值:"customer_searches.confirm_start" |
draft | 是 | 服务端返回的完整范围草稿doou-customer-search-draft.v1 |
pricing | 是 | 本次操作的费用信息object |
confirmation | 是 | 确认要求、凭证和有效期object |
replayed | 是 | 是否重放已有回执boolean |
providerCalls | 是 | number · 固定值:0 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-customer-search-quote.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"quoteId",
"operation",
"draft",
"pricing",
"confirmation",
"replayed",
"providerCalls"
],
"properties": {
"schemaVersion": {
"const": "doou-customer-search-quote.v1"
},
"quoteId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"const": "customer_searches.confirm_start"
},
"draft": {
"$ref": "https://doouai.com/api/v2/schemas/doou-customer-search-draft.v1.json"
},
"pricing": {
"type": "object"
},
"confirmation": {
"type": "object",
"additionalProperties": false,
"required": [
"required",
"expiresAt",
"token"
],
"properties": {
"required": {
"const": true
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"token": {
"type": "string",
"minLength": 32,
"maxLength": 4096
}
}
},
"replayed": {
"type": "boolean"
},
"providerCalls": {
"const": 0
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · customer_search_draft_invalid · idempotency_key_invalid · idempotency_conflict · external_confirmation_configuration_missing · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_quote_customer_search
POST/api/v2/customer-searches
权限 customer_searches:execute · 需要 Idempotency-Key · 需要确认凭证
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
confirmationToken | 是 | 当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-customer-search-confirmation.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"confirmationToken"
],
"properties": {
"confirmationToken": {
"type": "string",
"minLength": 32,
"maxLength": 4096
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · customer_search_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_confirm_customer_search
companies
工作区内已保存企业、公开渠道、负责人摘要和来源。
GET/api/v1/customer-lists
权限 customers:read
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
limit | 按场景 | 单页条数integer · 最小 1 · 最大 50 · 默认 20 |
offset | 按场景 | 已跳过的条数integer · 最小 0 · 最大 500 · 默认 0 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-pagination.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"default": 20
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 500,
"default": 0
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-customer-list-index.v1" |
total | 是 | integer · 最小 0 |
limit | 是 | 单页条数integer · 最小 1 · 最大 50 |
offset | 是 | 已跳过的条数integer · 最小 0 |
hasMore | 是 | boolean |
lists | 是 | array · 元素:object · 最多 50 项 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-customer-list-index.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"total",
"limit",
"offset",
"hasMore",
"lists"
],
"properties": {
"schemaVersion": {
"const": "doou-customer-list-index.v1"
},
"total": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
},
"offset": {
"type": "integer",
"minimum": 0
},
"hasMore": {
"type": "boolean"
},
"lists": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"key",
"name",
"subject",
"rowCount",
"createdAt",
"updatedAt"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"key": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 240
},
"subject": {
"type": "object"
},
"rowCount": {
"type": "integer",
"minimum": 0
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · not_found · internal_error
MCP 工具:doou_list_customer_lists
GET/api/v1/customer-lists/{id}
权限 customers:read
请求字段
id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
limit | 按场景 | 单页条数integer · 最小 1 · 最大 50 · 默认 20 |
offset | 按场景 | 已跳过的条数integer · 最小 0 · 最大 500 · 默认 0 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-pagination.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"default": 20
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 500,
"default": 0
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-customer-list.v1" |
list | 是 | object |
page | 是 | object |
companies | 是 | array · 元素:object · 最多 100 项 |
meta | 是 | object |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-customer-list.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"list",
"page",
"companies",
"meta"
],
"properties": {
"schemaVersion": {
"const": "doou-customer-list.v1"
},
"list": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"key",
"name",
"subject",
"rowCount",
"createdAt",
"updatedAt"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"key": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 240
},
"subject": {
"type": "object"
},
"rowCount": {
"type": "integer",
"minimum": 0
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
},
"page": {
"type": "object",
"additionalProperties": false,
"required": [
"total",
"limit",
"offset",
"hasMore"
],
"properties": {
"total": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": "integer",
"minimum": 1
},
"offset": {
"type": "integer",
"minimum": 0
},
"hasMore": {
"type": "boolean"
}
}
},
"companies": {
"type": "array",
"maxItems": 100,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"name",
"qualification",
"channels",
"people",
"source"
],
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"businessId": {
"type": "string",
"maxLength": 160
},
"leadId": {
"type": "string",
"maxLength": 160
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 240
},
"legalName": {
"type": "string",
"maxLength": 240
},
"domain": {
"type": "string",
"maxLength": 240
},
"website": {
"type": "string",
"format": "uri",
"maxLength": 500
},
"companyType": {
"type": "string",
"maxLength": 160
},
"industry": {
"type": "string",
"maxLength": 160
},
"market": {
"type": "string",
"maxLength": 160
},
"city": {
"type": "string",
"maxLength": 160
},
"status": {
"type": "string",
"maxLength": 120
},
"qualification": {
"type": "object"
},
"channels": {
"type": "object",
"additionalProperties": false,
"required": [
"direct",
"social"
],
"properties": {
"direct": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object"
}
},
"social": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object"
}
}
}
},
"people": {
"type": "array",
"maxItems": 20,
"items": {
"type": "object"
}
},
"source": {
"type": "object"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
}
},
"meta": {
"type": "object",
"additionalProperties": true,
"required": [
"liveProviderCalls",
"externalWrites"
],
"properties": {
"source": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"liveProviderCalls": {
"const": false
},
"externalWrites": {
"const": false
},
"modelCalls": {
"type": "boolean"
},
"fullBodyIncluded": {
"type": "boolean"
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · not_found · internal_error
MCP 工具:doou_get_customer_list
people
负责人身份、任职、岗位、联系方式和核验证据。
GET/api/v2/people/enrichments/{id}
权限 people:enrich
请求字段
id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
id | 是 | 资源唯一标识string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_get_people_enrichment_receipt
POST/api/v2/people/enrichment-quotes
权限 people:enrich · 需要 Idempotency-Key
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
businessIds | 是 | array · 元素:string · 最多 10 项 |
targetRole | 是 | string · 至少 2 字符 · 至多 120 字符 |
targetTableId | 按场景 | string · 至多 180 字符 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-people-enrichment-quote-request.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"businessIds",
"targetRole"
],
"properties": {
"businessIds": {
"type": "array",
"minItems": 1,
"maxItems": 10,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"targetRole": {
"type": "string",
"minLength": 2,
"maxLength": 120
},
"targetTableId": {
"type": "string",
"maxLength": 180
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-people-enrichment-quote.v1" |
quoteId | 是 | string |
operation | 是 | 业务操作标识string · 固定值:"people.confirm_enrichment" |
input | 是 | object |
pricing | 是 | 本次操作的费用信息object |
confirmation | 是 | 确认要求、凭证和有效期object |
replayed | 是 | 是否重放已有回执boolean |
providerCalls | 是 | number · 固定值:0 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-people-enrichment-quote.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"quoteId",
"operation",
"input",
"pricing",
"confirmation",
"replayed",
"providerCalls"
],
"properties": {
"schemaVersion": {
"const": "doou-people-enrichment-quote.v1"
},
"quoteId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"const": "people.confirm_enrichment"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"confirmation": {
"type": "object",
"additionalProperties": false,
"required": [
"required",
"expiresAt",
"token"
],
"properties": {
"required": {
"const": true
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"token": {
"type": "string",
"minLength": 32,
"maxLength": 4096
}
}
},
"replayed": {
"type": "boolean"
},
"providerCalls": {
"const": 0
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · contact_business_ids_missing · contact_enrichment_limit_exceeded · contact_target_role_missing · business_scope_forbidden · external_confirmation_configuration_missing · people_enrichment_unavailable · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_quote_people_enrichment
POST/api/v2/people/enrichments
权限 people:enrich · 需要 Idempotency-Key · 需要确认凭证
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
confirmationToken | 是 | 当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-people-enrichment-confirmation.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"confirmationToken"
],
"properties": {
"confirmationToken": {
"type": "string",
"minLength": 32,
"maxLength": 4096
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · workflow_start_rejected · workflow_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_confirm_people_enrichment
relationships
客户阶段、归属、结果和抑制状态。
GET/api/v2/relationships
权限 relationships:read
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
cursor | 按场景 | 上一页返回的游标string · 至少 1 字符 · 至多 1024 字符 |
limit | 按场景 | 单页条数integer · 最小 1 · 最大 50 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-relationship-query.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 1024
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-relationship-index.v1" |
status | 是 | string · 可选:ready / empty |
relationships | 是 | array · 元素:object · 最多 50 项 |
summary | 是 | object |
page | 是 | object |
meta | 是 | object |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-relationship-index.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"status",
"relationships",
"summary",
"page",
"meta"
],
"properties": {
"schemaVersion": {
"const": "doou-relationship-index.v1"
},
"status": {
"type": "string",
"enum": [
"ready",
"empty"
]
},
"relationships": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object"
}
},
"summary": {
"type": "object"
},
"page": {
"type": "object",
"additionalProperties": false,
"required": [
"limit",
"nextCursor",
"hasMore"
],
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"hasMore": {
"type": "boolean"
}
}
},
"meta": {
"type": "object",
"additionalProperties": true,
"required": [
"liveProviderCalls",
"externalWrites"
],
"properties": {
"source": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"liveProviderCalls": {
"const": false
},
"externalWrites": {
"const": false
},
"modelCalls": {
"type": "boolean"
},
"fullBodyIncluded": {
"type": "boolean"
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · invalid_cursor · relationship_storage_unavailable · relationship_ledger_limit_exceeded · relationship_lead_read_failed · relationship_outcome_read_failed · relationship_suppression_read_failed · internal_error
MCP 工具:doou_list_customer_relationships
GET/api/v2/relationships/follow-up-changes/{id}
权限 relationships:write
请求字段
id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
id | 是 | 资源唯一标识string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_get_relationship_follow_up_receipt
POST/api/v2/relationships/follow-up-reviews
权限 relationships:write · 需要 Idempotency-Key
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
leadId | 是 | string |
status | 按场景 | string · 可选:pending / active / won / closed |
note | 按场景 | string · 至多 1000 字符 |
nextFollowUpAt | 按场景 | string · date-time | null |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-relationship-follow-up-review-request.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"anyOf": [
{
"required": [
"status"
]
},
{
"required": [
"note"
]
},
{
"required": [
"nextFollowUpAt"
]
}
],
"required": [
"leadId"
],
"properties": {
"leadId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"status": {
"type": "string",
"enum": [
"pending",
"active",
"won",
"closed"
]
},
"note": {
"type": "string",
"maxLength": 1000
},
"nextFollowUpAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-relationship-follow-up-review.v1" |
reviewId | 是 | string |
operation | 是 | 业务操作标识string · 固定值:"relationships.confirm_follow_up" |
company | 是 | object |
current | 是 | object | null |
proposed | 是 | object |
cost | 是 | object |
confirmation | 是 | 确认要求、凭证和有效期object |
replayed | 是 | 是否重放已有回执boolean |
providerCalls | 是 | number · 固定值:0 |
modelCalls | 是 | number · 固定值:0 |
ledgerWritePerformed | 是 | boolean · 固定值:false |
externalWritePerformed | 是 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-relationship-follow-up-review.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"reviewId",
"operation",
"company",
"current",
"proposed",
"cost",
"confirmation",
"replayed",
"providerCalls",
"modelCalls",
"ledgerWritePerformed",
"externalWritePerformed"
],
"properties": {
"schemaVersion": {
"const": "doou-relationship-follow-up-review.v1"
},
"reviewId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"const": "relationships.confirm_follow_up"
},
"company": {
"type": "object"
},
"current": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"proposed": {
"type": "object"
},
"cost": {
"type": "object"
},
"confirmation": {
"type": "object",
"additionalProperties": false,
"required": [
"required",
"expiresAt",
"token"
],
"properties": {
"required": {
"const": true
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"token": {
"type": "string",
"minLength": 32,
"maxLength": 4096
}
}
},
"replayed": {
"type": "boolean"
},
"providerCalls": {
"const": 0
},
"modelCalls": {
"const": 0
},
"ledgerWritePerformed": {
"const": false
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · relationship_follow_up_lead_invalid · relationship_follow_up_status_invalid · relationship_follow_up_date_invalid · relationship_follow_up_change_missing · relationship_follow_up_field_unsupported · follow_up_lead_not_found · follow_up_suppressed · follow_up_unchanged · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_review_relationship_follow_up
POST/api/v2/relationships/follow-up-changes
权限 relationships:write · 需要 Idempotency-Key · 需要确认凭证
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
confirmationToken | 是 | 当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-relationship-follow-up-confirmation.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"confirmationToken"
],
"properties": {
"confirmationToken": {
"type": "string",
"minLength": 32,
"maxLength": 4096
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · follow_up_revision_conflict · follow_up_suppressed · follow_up_atomic_write_unavailable · relationship_follow_up_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_confirm_relationship_follow_up
conversations
已同步邮箱中的客户回复索引、企业归属和后续动作。
GET/api/v2/conversations
权限 conversations:read
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
connectionId | 按场景 | string |
limit | 按场景 | 单页条数integer · 最小 1 · 最大 40 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-conversation-inbox-query.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"connectionId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 40
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-conversation-inbox.v1" |
status | 是 | string · 至少 1 字符 · 至多 80 字符 |
conversations | 是 | array · 元素:object · 最多 40 项 |
summary | 是 | object |
meta | 是 | object |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-conversation-inbox.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"status",
"conversations",
"summary",
"meta"
],
"properties": {
"schemaVersion": {
"const": "doou-conversation-inbox.v1"
},
"status": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"conversations": {
"type": "array",
"maxItems": 40,
"items": {
"type": "object"
}
},
"summary": {
"type": "object"
},
"meta": {
"type": "object",
"additionalProperties": true,
"required": [
"liveProviderCalls",
"externalWrites"
],
"properties": {
"source": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"liveProviderCalls": {
"const": false
},
"externalWrites": {
"const": false
},
"modelCalls": {
"type": "boolean"
},
"fullBodyIncluded": {
"type": "boolean"
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · mailbox_connection_invalid · mailbox_reply_query_failed · mailbox_reply_context_failed · internal_error
MCP 工具:doou_list_mailbox_conversations
GET/api/v2/conversations/official
权限 official_messages:read
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
connectionId | 按场景 | string |
limit | 按场景 | 单页条数integer · 最小 1 · 最大 40 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-official-conversation-query.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"connectionId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 40
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-official-conversation-inbox.v1" |
conversations | 是 | array · 元素:object · 最多 40 项 |
summary | 是 | object |
meta | 是 | object |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-official-conversation-inbox.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"conversations",
"summary",
"meta"
],
"properties": {
"schemaVersion": {
"const": "doou-official-conversation-inbox.v1"
},
"conversations": {
"type": "array",
"maxItems": 40,
"items": {
"type": "object"
}
},
"summary": {
"type": "object"
},
"meta": {
"type": "object",
"additionalProperties": true,
"required": [
"liveProviderCalls",
"externalWrites"
],
"properties": {
"source": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"liveProviderCalls": {
"const": false
},
"externalWrites": {
"const": false
},
"modelCalls": {
"type": "boolean"
},
"fullBodyIncluded": {
"type": "boolean"
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · invalid_pagination · official_conversation_connection_invalid · official_conversation_schema_missing · official_conversation_read_failed · internal_error
MCP 工具:doou_list_official_conversations
messages
有界消息、已审核草稿、单封确认和发送回执。
GET/api/v2/messages/drafts/{id}
权限 messages:draft
请求字段
id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
id | 是 | 资源唯一标识string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_get_outreach_draft_receipt
GET/api/v2/messages/sends/{id}
权限 messages:send
请求字段
id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
id | 是 | 资源唯一标识string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_get_single_email_send_receipt
GET/api/v2/messages/official-replies/{id}
权限 official_messages:reply
请求字段
id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
id | 是 | 资源唯一标识string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-official-message-reply-receipt.v1" |
receiptId | 是 | 命令回执标识string |
state | 是 | 命令当前状态string · 可选:prepared / confirmed / sending / accepted / failed / unknown / cancelled |
channel | 是 | string · 固定值:"whatsapp_business" |
conversationId | 是 | string |
latestInboundMessageId | 是 | string · 至少 1 字符 · 至多 180 字符 |
messageId | 是 | string · 至多 180 字符 | null |
providerMessageId | 是 | string · 至多 240 字符 | null |
responseStatus | 是 | integer · 最小 100 · 最大 599 | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
startedAt | 是 | string · date-time | null |
finishedAt | 是 | string · date-time | null |
updatedAt | 是 | 最近更新时间string · date-time |
replayed | 是 | 是否重放已有回执boolean |
automaticRetry | 是 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"state",
"channel",
"conversationId",
"latestInboundMessageId",
"messageId",
"providerMessageId",
"responseStatus",
"errorCode",
"startedAt",
"finishedAt",
"updatedAt",
"replayed",
"automaticRetry"
],
"properties": {
"schemaVersion": {
"const": "doou-official-message-reply-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"state": {
"type": "string",
"enum": [
"prepared",
"confirmed",
"sending",
"accepted",
"failed",
"unknown",
"cancelled"
]
},
"channel": {
"const": "whatsapp_business"
},
"conversationId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"latestInboundMessageId": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"messageId": {
"anyOf": [
{
"type": "string",
"maxLength": 180
},
{
"type": "null"
}
]
},
"providerMessageId": {
"anyOf": [
{
"type": "string",
"maxLength": 240
},
{
"type": "null"
}
]
},
"responseStatus": {
"anyOf": [
{
"type": "integer",
"minimum": 100,
"maximum": 599
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"startedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"finishedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"replayed": {
"type": "boolean"
},
"automaticRetry": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · official_message_receipt_invalid · official_message_receipt_not_found · official_message_reply_schema_missing · official_message_reply_persistence_failed · internal_error
MCP 工具:doou_get_official_message_reply_receipt
POST/api/v2/messages/draft-quotes
权限 messages:draft · 需要 Idempotency-Key
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
tableId | 是 | string |
businessIds | 是 | array · 元素:string · 最多 20 项 |
product | 是 | 目标产品或品类string · 至少 2 字符 · 至多 160 字符 |
market | 按场景 | 目标市场 / 国家string · 至多 120 字符 |
productProfileKey | 按场景 | string · 至多 180 字符 |
targetRole | 是 | string · 至少 2 字符 · 至多 120 字符 |
channelStrategy | 是 | string · 可选:auto / email / linkedin |
language | 是 | string · 可选:en / zh |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-outreach-draft-quote-request.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"tableId",
"businessIds",
"product",
"targetRole",
"channelStrategy",
"language"
],
"properties": {
"tableId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"businessIds": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
},
"product": {
"type": "string",
"minLength": 2,
"maxLength": 160
},
"market": {
"type": "string",
"maxLength": 120
},
"productProfileKey": {
"type": "string",
"maxLength": 180
},
"targetRole": {
"type": "string",
"minLength": 2,
"maxLength": 120
},
"channelStrategy": {
"type": "string",
"enum": [
"auto",
"email",
"linkedin"
]
},
"language": {
"type": "string",
"enum": [
"en",
"zh"
]
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-outreach-draft-quote.v1" |
quoteId | 是 | string |
operation | 是 | 业务操作标识string · 固定值:"messages.confirm_outreach_draft" |
input | 是 | object |
pricing | 是 | 本次操作的费用信息object |
confirmation | 是 | 确认要求、凭证和有效期object |
replayed | 是 | 是否重放已有回执boolean |
providerCalls | 是 | number · 固定值:0 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-outreach-draft-quote.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"quoteId",
"operation",
"input",
"pricing",
"confirmation",
"replayed",
"providerCalls"
],
"properties": {
"schemaVersion": {
"const": "doou-outreach-draft-quote.v1"
},
"quoteId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"const": "messages.confirm_outreach_draft"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"confirmation": {
"type": "object",
"additionalProperties": false,
"required": [
"required",
"expiresAt",
"token"
],
"properties": {
"required": {
"const": true
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"token": {
"type": "string",
"minLength": 32,
"maxLength": 4096
}
}
},
"replayed": {
"type": "boolean"
},
"providerCalls": {
"const": 0
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · outreach_table_missing · outreach_businesses_missing · outreach_business_limit · outreach_product_missing · outreach_target_role_missing · outreach_channel_invalid · outreach_language_invalid · outreach_selection_forbidden · outreach_product_profile_changed · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_quote_outreach_drafts
POST/api/v2/messages/drafts
权限 messages:draft · 需要 Idempotency-Key · 需要确认凭证
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
confirmationToken | 是 | 当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-outreach-draft-confirmation.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"confirmationToken"
],
"properties": {
"confirmationToken": {
"type": "string",
"minLength": 32,
"maxLength": 4096
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · outreach_product_profile_changed · outreach_draft_start_rejected · outreach_draft_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_confirm_outreach_drafts
POST/api/v2/messages/send-reviews
权限 messages:send · 需要 Idempotency-Key
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
campaignKey | 是 | string · 至少 1 字符 · 至多 180 字符 |
draftId | 是 | 草稿标识string |
connectionId | 是 | string |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-outreach-send-review-request.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"campaignKey",
"draftId",
"connectionId"
],
"properties": {
"campaignKey": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"draftId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"connectionId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-outreach-send-review.v1" |
reviewId | 是 | string |
operation | 是 | 业务操作标识string · 固定值:"messages.confirm_single_send" |
confirmation | 是 | 确认要求、凭证和有效期object |
replayed | 是 | 是否重放已有回执boolean |
providerCalls | 是 | number · 固定值:0 |
modelCalls | 是 | number · 固定值:0 |
externalWritePerformed | 是 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-outreach-send-review.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"reviewId",
"operation",
"confirmation",
"replayed",
"providerCalls",
"modelCalls",
"externalWritePerformed"
],
"properties": {
"schemaVersion": {
"const": "doou-outreach-send-review.v1"
},
"reviewId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"const": "messages.confirm_single_send"
},
"confirmation": {
"type": "object",
"additionalProperties": false,
"required": [
"required",
"expiresAt",
"token"
],
"properties": {
"required": {
"const": true
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"token": {
"type": "string",
"minLength": 32,
"maxLength": 4096
}
}
},
"replayed": {
"type": "boolean"
},
"providerCalls": {
"const": 0
},
"modelCalls": {
"const": 0
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · campaign_id_invalid · draft_id_invalid · connection_id_invalid · campaign_not_found · campaign_not_sendable · campaign_draft_not_found · campaign_draft_not_sendable · mailbox_connection_unavailable · mailbox_send_not_authorized · campaign_content_quality_failed · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_review_single_email_send
POST/api/v2/messages/sends
权限 messages:send · 需要 Idempotency-Key · 需要确认凭证
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
confirmationToken | 是 | 当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-outreach-send-confirmation.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"confirmationToken"
],
"properties": {
"confirmationToken": {
"type": "string",
"minLength": 32,
"maxLength": 4096
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · outreach_send_revision_conflict · outreach_send_preflight_failed · outreach_send_rejected · outreach_send_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_confirm_single_email_send
POST/api/v2/messages/official-reply-reviews
权限 official_messages:reply · 需要 Idempotency-Key
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
conversationId | 是 | string |
replyText | 是 | string · 至少 1 字符 · 至多 4000 字符 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-review-request.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"conversationId",
"replyText"
],
"properties": {
"conversationId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"replyText": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-official-message-reply-review.v1" |
reviewId | 是 | string |
state | 是 | 命令当前状态string |
channel | 是 | string · 固定值:"whatsapp_business" |
conversationId | 是 | string |
latestInboundMessageId | 是 | string · 至少 1 字符 · 至多 180 字符 |
recipientExternalId | 是 | string · 至少 1 字符 · 至多 180 字符 |
replyText | 是 | string · 至少 1 字符 · 至多 4000 字符 |
cost | 是 | object |
confirmation | 是 | 确认要求、凭证和有效期object |
replayed | 是 | 是否重放已有回执boolean |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-review.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"reviewId",
"state",
"channel",
"conversationId",
"latestInboundMessageId",
"recipientExternalId",
"replyText",
"cost",
"confirmation",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "doou-official-message-reply-review.v1"
},
"reviewId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"state": {
"type": "string"
},
"channel": {
"const": "whatsapp_business"
},
"conversationId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"latestInboundMessageId": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"recipientExternalId": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"replyText": {
"type": "string",
"minLength": 1,
"maxLength": 4000
},
"cost": {
"type": "object"
},
"confirmation": {
"type": "object",
"additionalProperties": false,
"required": [
"required",
"expiresAt",
"token"
],
"properties": {
"required": {
"const": true
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"token": {
"type": "string",
"minLength": 32,
"maxLength": 4096
}
}
},
"replayed": {
"type": "boolean"
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · official_message_conversation_invalid · official_message_conversation_not_found · official_message_channel_unsupported · official_message_conversation_not_sendable · official_message_account_unavailable · official_message_inbound_not_found · official_message_reply_not_authorized · whatsapp_reply_window_closed · official_message_reply_empty · official_message_reply_too_long · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · official_message_reply_schema_missing · official_message_reply_persistence_failed · internal_error
MCP 工具:doou_review_official_message_reply
POST/api/v2/messages/official-replies
权限 official_messages:reply · 需要 Idempotency-Key · 需要确认凭证
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
confirmationToken | 是 | 当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-confirmation.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"confirmationToken"
],
"properties": {
"confirmationToken": {
"type": "string",
"minLength": 32,
"maxLength": 4096
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-official-message-reply-receipt.v1" |
receiptId | 是 | 命令回执标识string |
state | 是 | 命令当前状态string · 可选:prepared / confirmed / sending / accepted / failed / unknown / cancelled |
channel | 是 | string · 固定值:"whatsapp_business" |
conversationId | 是 | string |
latestInboundMessageId | 是 | string · 至少 1 字符 · 至多 180 字符 |
messageId | 是 | string · 至多 180 字符 | null |
providerMessageId | 是 | string · 至多 240 字符 | null |
responseStatus | 是 | integer · 最小 100 · 最大 599 | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
startedAt | 是 | string · date-time | null |
finishedAt | 是 | string · date-time | null |
updatedAt | 是 | 最近更新时间string · date-time |
replayed | 是 | 是否重放已有回执boolean |
automaticRetry | 是 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-official-message-reply-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"state",
"channel",
"conversationId",
"latestInboundMessageId",
"messageId",
"providerMessageId",
"responseStatus",
"errorCode",
"startedAt",
"finishedAt",
"updatedAt",
"replayed",
"automaticRetry"
],
"properties": {
"schemaVersion": {
"const": "doou-official-message-reply-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"state": {
"type": "string",
"enum": [
"prepared",
"confirmed",
"sending",
"accepted",
"failed",
"unknown",
"cancelled"
]
},
"channel": {
"const": "whatsapp_business"
},
"conversationId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"latestInboundMessageId": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"messageId": {
"anyOf": [
{
"type": "string",
"maxLength": 180
},
{
"type": "null"
}
]
},
"providerMessageId": {
"anyOf": [
{
"type": "string",
"maxLength": 240
},
{
"type": "null"
}
]
},
"responseStatus": {
"anyOf": [
{
"type": "integer",
"minimum": 100,
"maximum": 599
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"startedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"finishedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"updatedAt": {
"type": "string",
"format": "date-time"
},
"replayed": {
"type": "boolean"
},
"automaticRetry": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_key_invalid · idempotency_conflict · official_message_reply_revision_conflict · official_message_reply_not_authorized · whatsapp_reply_window_closed · whatsapp_send_rejected · whatsapp_send_receipt_unknown · official_message_reply_schema_missing · official_message_reply_persistence_failed · internal_error
MCP 工具:doou_confirm_official_message_reply
actions
需确认的业务动作和 AI 值守策略。
GET/api/v2/watch-policy/changes/{id}
权限 watch_policy:write
请求字段
id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
id | 是 | 资源唯一标识string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-command-receipt-id.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · receipt_id_invalid · receipt_not_found · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_get_watch_policy_receipt
POST/api/v2/watch-policy/reviews
权限 watch_policy:write · 需要 Idempotency-Key
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
change | 是 | string · 可选:replace / pause / resume |
policy | 按场景 | object |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-watch-policy-change-request.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"change"
],
"properties": {
"change": {
"type": "string",
"enum": [
"replace",
"pause",
"resume"
]
},
"policy": {
"type": "object"
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-watch-policy-review.v1" |
reviewId | 是 | string |
operation | 是 | 业务操作标识string · 固定值:"actions.update_watch_policy" |
change | 是 | string · 可选:replace / pause / resume |
confirmation | 是 | 确认要求、凭证和有效期object |
replayed | 是 | 是否重放已有回执boolean |
providerCalls | 是 | number · 固定值:0 |
modelCalls | 是 | number · 固定值:0 |
scheduleWritePerformed | 是 | boolean · 固定值:false |
externalWritePerformed | 是 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-watch-policy-review.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"reviewId",
"operation",
"change",
"confirmation",
"replayed",
"providerCalls",
"modelCalls",
"scheduleWritePerformed",
"externalWritePerformed"
],
"properties": {
"schemaVersion": {
"const": "doou-watch-policy-review.v1"
},
"reviewId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"const": "actions.update_watch_policy"
},
"change": {
"type": "string",
"enum": [
"replace",
"pause",
"resume"
]
},
"confirmation": {
"type": "object",
"additionalProperties": false,
"required": [
"required",
"expiresAt",
"token"
],
"properties": {
"required": {
"const": true
},
"expiresAt": {
"type": "string",
"format": "date-time"
},
"token": {
"type": "string",
"minLength": 32,
"maxLength": 4096
}
}
},
"replayed": {
"type": "boolean"
},
"providerCalls": {
"const": 0
},
"modelCalls": {
"const": 0
},
"scheduleWritePerformed": {
"const": false
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · watch_policy_change_invalid · watch_policy_change_ambiguous · watch_policy_patch_missing · watch_policy_field_unsupported · watch_policy_review_actions_fixed · watch_policy_snapshot_invalid · watch_policy_no_change · external_confirmation_configuration_missing · idempotency_key_invalid · idempotency_conflict · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_review_watch_policy
POST/api/v2/watch-policy/changes
权限 watch_policy:write · 需要 Idempotency-Key · 需要确认凭证
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
confirmationToken | 是 | 当前报价或审核的确认凭证string · 至少 32 字符 · 至多 4096 字符 |
idempotencyKey | 按场景 | REST 放在 Idempotency-Key 请求头;MCP 放在参数中string |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-watch-policy-confirmation.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"confirmationToken"
],
"properties": {
"confirmationToken": {
"type": "string",
"minLength": 32,
"maxLength": 4096
},
"idempotencyKey": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$"
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"workflow-command-receipt.v1" |
receiptId | 是 | 命令回执标识string |
operation | 是 | 业务操作标识string · 至少 1 字符 · 至多 160 字符 |
state | 是 | 命令当前状态string · 可选:quoted / executing / accepted / running / succeeded / failed / unknown / expired |
inputHash | 按场景 | string |
input | 按场景 | object |
pricing | 按场景 | 本次操作的费用信息object |
workflow | 按场景 | object | null |
workflowRunId | 按场景 | 工作流运行标识string | null |
statusUrl | 是 | 状态查询地址string · 至少 1 字符 · 至多 500 字符 |
resultStatus | 是 | 结果是否可用string · 可选:available / missing / pending / unavailable |
result | 是 | 已产生的业务结果object | null |
errorCode | 是 | 业务错误码string · 至多 120 字符 | null |
replayed | 是 | 是否重放已有回执boolean |
externalWritePerformed | 按场景 | boolean · 固定值:false |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/workflow-command-receipt.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": true,
"required": [
"schemaVersion",
"receiptId",
"operation",
"state",
"statusUrl",
"resultStatus",
"result",
"errorCode",
"replayed"
],
"properties": {
"schemaVersion": {
"const": "workflow-command-receipt.v1"
},
"receiptId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"operation": {
"type": "string",
"minLength": 1,
"maxLength": 160
},
"state": {
"type": "string",
"enum": [
"quoted",
"executing",
"accepted",
"running",
"succeeded",
"failed",
"unknown",
"expired"
]
},
"inputHash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input": {
"type": "object"
},
"pricing": {
"type": "object"
},
"workflow": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"workflowRunId": {
"anyOf": [
{
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
{
"type": "null"
}
]
},
"statusUrl": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"resultStatus": {
"type": "string",
"enum": [
"available",
"missing",
"pending",
"unavailable"
]
},
"result": {
"anyOf": [
{
"type": "object"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"maxLength": 120
},
{
"type": "null"
}
]
},
"replayed": {
"type": "boolean"
},
"externalWritePerformed": {
"const": false
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · request_too_large · idempotency_key_invalid · confirmation_invalid · confirmation_expired · confirmation_actor_mismatch · confirmation_not_found · confirmation_input_conflict · confirmation_already_used · idempotency_conflict · watch_policy_revision_conflict · watch_policy_change_rejected · watch_policy_receipt_unknown · external_command_storage_unavailable · external_command_persistence_failed · internal_error
MCP 工具:doou_confirm_watch_policy
artifacts
工作流生成的版本化业务成果。
GET/api/v1/workflow-runs/{id}/artifacts
权限 artifacts:read
请求字段
id 为必填路径参数,使用前序查询或回执返回的对应资源 ID。
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
limit | 按场景 | 单页条数integer · 最小 1 · 最大 50 · 默认 20 |
offset | 按场景 | 已跳过的条数integer · 最小 0 · 最大 500 · 默认 0 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-pagination.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"default": 20
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 500,
"default": 0
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-workflow-artifact-list.v1" |
run | 是 | object |
page | 是 | object |
artifacts | 是 | array · 元素:object · 最多 50 项 |
meta | 是 | object |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-workflow-artifact-list.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"run",
"page",
"artifacts",
"meta"
],
"properties": {
"schemaVersion": {
"const": "doou-workflow-artifact-list.v1"
},
"run": {
"type": "object",
"additionalProperties": true,
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"status": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
}
},
"page": {
"type": "object",
"additionalProperties": false,
"required": [
"total",
"limit",
"offset",
"hasMore"
],
"properties": {
"total": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": "integer",
"minimum": 1
},
"offset": {
"type": "integer",
"minimum": 0
},
"hasMore": {
"type": "boolean"
}
}
},
"artifacts": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"objectType",
"objectId",
"schemaVersion",
"classification",
"data",
"lineage",
"revision",
"createdAt",
"updatedAt"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"stepId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"objectType": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"objectId": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"schemaVersion": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"classification": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"data": {},
"lineage": {},
"revision": {
"type": "integer",
"minimum": 1
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
}
},
"meta": {
"type": "object",
"additionalProperties": true,
"required": [
"liveProviderCalls",
"externalWrites"
],
"properties": {
"source": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"liveProviderCalls": {
"const": false
},
"externalWrites": {
"const": false
},
"modelCalls": {
"type": "boolean"
},
"fullBodyIncluded": {
"type": "boolean"
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · not_found · internal_error
MCP 工具:doou_get_workflow_artifacts
GET/api/v2/artifacts
权限 artifacts:read
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
workflowRunId | 是 | 工作流运行标识string |
cursor | 按场景 | 上一页返回的游标string · 至少 1 字符 · 至多 1024 字符 |
limit | 按场景 | 单页条数integer · 最小 1 · 最大 50 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-workflow-artifact-event-cursor.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"workflowRunId"
],
"properties": {
"workflowRunId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 1024
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-workflow-artifact-event-page.v1" |
run | 是 | object |
page | 是 | object |
events | 是 | array · 元素:object · 最多 50 项 |
meta | 是 | object |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-workflow-artifact-event-page.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"run",
"page",
"events",
"meta"
],
"properties": {
"schemaVersion": {
"const": "doou-workflow-artifact-event-page.v1"
},
"run": {
"type": "object",
"additionalProperties": true,
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"status": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
}
},
"page": {
"type": "object",
"additionalProperties": false,
"required": [
"limit",
"nextCursor",
"hasMore"
],
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"hasMore": {
"type": "boolean"
}
}
},
"events": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"cursor",
"eventType",
"occurredAt",
"artifact"
],
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 1024
},
"eventType": {
"type": "string",
"enum": [
"artifact.snapshot_created",
"artifact.snapshot_updated"
]
},
"occurredAt": {
"type": "string",
"format": "date-time"
},
"artifact": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"objectType",
"objectId",
"schemaVersion",
"classification",
"data",
"lineage",
"revision",
"createdAt",
"updatedAt"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"stepId": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"objectType": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"objectId": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"schemaVersion": {
"type": "string",
"minLength": 1,
"maxLength": 100
},
"classification": {
"type": "string",
"minLength": 1,
"maxLength": 40
},
"data": {},
"lineage": {},
"revision": {
"type": "integer",
"minimum": 1
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
}
}
}
}
},
"meta": {
"type": "object",
"additionalProperties": true,
"required": [
"liveProviderCalls",
"externalWrites"
],
"properties": {
"source": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"liveProviderCalls": {
"const": false
},
"externalWrites": {
"const": false
},
"modelCalls": {
"type": "boolean"
},
"fullBodyIncluded": {
"type": "boolean"
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · invalid_cursor · run_id_invalid · run_not_found · internal_error
MCP 工具:doou_list_workflow_artifact_events
workflows
可恢复工作流及其运行状态。
GET/api/v1/workflow-runs
权限 runs:read
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
limit | 按场景 | 单页条数integer · 最小 1 · 最大 50 · 默认 20 |
offset | 按场景 | 已跳过的条数integer · 最小 0 · 最大 500 · 默认 0 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-pagination.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50,
"default": 20
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 500,
"default": 0
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-workflow-run-index.v1" |
mode | 是 | string · 至少 1 字符 · 至多 80 字符 |
reason | 按场景 | string · 至多 240 字符 | null |
runs | 是 | array · 元素:object · 最多 50 项 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-workflow-run-index.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"mode",
"runs"
],
"properties": {
"schemaVersion": {
"const": "doou-workflow-run-index.v1"
},
"mode": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"reason": {
"anyOf": [
{
"type": "string",
"maxLength": 240
},
{
"type": "null"
}
]
},
"runs": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object",
"additionalProperties": true,
"required": [
"id",
"status"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"
},
"status": {
"type": "string",
"minLength": 1,
"maxLength": 80
}
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · not_found · internal_error
MCP 工具:doou_list_workflow_runs
usage_receipts
外部命令的费用预估、确认状态和最终用量回执。
GET/api/v2/usage-receipts
权限 usage:read
请求字段
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
cursor | 按场景 | 上一页返回的游标string · 至少 1 字符 · 至多 1024 字符 |
limit | 按场景 | 单页条数integer · 最小 1 · 最大 50 |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-usage-receipt-cursor.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"properties": {
"cursor": {
"type": "string",
"minLength": 1,
"maxLength": 1024
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
}
}
}响应 data
| 字段 | 必填 | 说明 / 类型与约束 |
|---|---|---|
schemaVersion | 是 | 数据结构版本string · 固定值:"doou-usage-receipt-page.v1" |
page | 是 | object |
receipts | 是 | array · 元素:object · 最多 50 项 |
meta | 是 | object |
完整 JSON Schema · 含嵌套字段与组合约束
{
"$id": "https://doouai.com/api/v2/schemas/doou-usage-receipt-page.v1.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"additionalProperties": false,
"required": [
"schemaVersion",
"page",
"receipts",
"meta"
],
"properties": {
"schemaVersion": {
"const": "doou-usage-receipt-page.v1"
},
"page": {
"type": "object",
"additionalProperties": false,
"required": [
"limit",
"nextCursor",
"hasMore"
],
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 50
},
"nextCursor": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 1024
},
{
"type": "null"
}
]
},
"hasMore": {
"type": "boolean"
}
}
},
"receipts": {
"type": "array",
"maxItems": 50,
"items": {
"type": "object"
}
},
"meta": {
"type": "object",
"additionalProperties": true,
"required": [
"liveProviderCalls",
"externalWrites"
],
"properties": {
"source": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"scope": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"liveProviderCalls": {
"const": false
},
"externalWrites": {
"const": false
},
"modelCalls": {
"type": "boolean"
},
"fullBodyIncluded": {
"type": "boolean"
}
}
}
}
}错误码:unauthorized · scope_forbidden · rate_limited · invalid_cursor · external_command_storage_unavailable · internal_error
MCP 工具:doou_list_usage_receipts
06 / RELIABILITY
分页、重试与错误处理
名单接口使用 limit / offset;采用游标的接口使用响应中的 page.nextCursor。分页方式、上限和终止条件以各接口 Schema 为准。成果按稳定 ID 与 revision 合并,避免旧版本覆盖新版本。
交互界面可从 3–5 秒轮询间隔开始,后台适当放缓;收到 429 时遵守 Retry-After。不应根据一次空分页推断任务完成。
| 情况 | 处理方式 |
|---|---|
| 401 / 403 | 检查令牌有效性与 Scope,不自动扩大权限。 |
| 409 | 检查幂等键、已冻结的范围或审核版本是否冲突。 |
| 422 | 按字段约束修正参数,再请求。 |
| 429 | 按 Retry-After 延后,降低请求频率。 |
| 网络超时 / 5xx / unknown | 先查询已有回执或任务状态,不使用新幂等键盲目再次执行。 |
| 确认凭证过期 | 先检查原任务是否已启动;需要新报价时重新取得用户确认。 |
幂等键格式为 ^[A-Za-z0-9][A-Za-z0-9._:-]{11,159}$。重试保持相同凭据、请求体与键。replayed: true 表示返回已有回执;retryable 不代表可以用新键重复付费执行。排错时保存 error.code、error.message 与请求 ID。
07 / MCP · BETA
让 AI 助手理解你的业务
支持远程 MCP 的客户端可连接获准环境的 /api/mcp,使用 Streamable HTTP。OAuth 客户端先读取资源发现地址,并按该环境的授权流程完成 PKCE;手动令牌由宿主的安全配置保存。
MCP: {DOOU_BASE_URL}/api/mcp
OAuth discovery: {DOOU_BASE_URL}/.well-known/oauth-protected-resource/api/mcp连接后使用 tools/list 获取实际可用工具及其 inputSchema,再用 tools/call 调用。读取返回的 structuredContent 与 isError,不要将展示文本当作稳定数据结构。
doou_create_customer_search_draft
→ doou_quote_customer_search
→ 展示费用,等待用户确认
→ doou_confirm_customer_searchMCP 的 idempotencyKey 放在工具参数中。API 和 MCP 使用相同的权限、费用与确认规则,AI 助手不能跳过用户确认。可用工具以授权环境的实际发现结果为准。