get_order_status
按平台订单 ID 查询单个订单的当前状态。网关会先尝试从上游拉取实时状态,失败时回落到本地快照,并将状态归一化为统一的平台状态枚举。下单链路:
preview_order 得 preview_id + confirmation_token → create_order 得 order_id → get_order_status 查状态。order_id(ord_ 前缀)必须原样使用 create_order 返回的值,不要自造或改写。参数
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
consent_grant_id | string | 是 | — | 用户授权 ID(cg_ 前缀,来自 verify_user_bind),标识已授权用户 |
order_id | string | 是 | — | 平台订单 ID(ord_ 前缀),原样使用 create_order 返回的值 |
lang | string | 否 | — | 本次返回内容使用的语言,枚举 zh / en / ja / ko / ru / ms / es;不传则用绑定时设定的语言(默认中文) |
include_chinese | boolean | 否 | false | 为 true 时响应同时返回中文原文(<key>_zh),见 双语响应 |
返回
{
"order_id": "ord_7c1a...",
"status": "delivering",
"status_text": "配送中",
"shop_name": "瑞幸咖啡(人民广场店)",
"items_summary": "生椰拿铁 x1,美式 x2",
"payable_price": 1500,
"cancel_reason": null,
"delivery": {
"status": "DELIVERING",
"estimated_time_text": null,
"rider_name": null,
"rider_phone": null
},
"detail_url": "https://g.clawdot.ai/xk2IP",
"created_at": "2026-06-16T10:20:00+00:00",
"paid_at": null,
"completed_at": null
}
金额字段
payable_price 单位为分(整数),不是元。例如 payable_price: 1500 表示 ¥15.00。| 字段 | 类型 | 说明 |
|---|---|---|
order_id | string | 平台订单 ID,原样回传请求中的值 |
status | string | 归一化后的平台状态枚举(见下表) |
status_text | string | 状态的中文文案(与 status 一一对应) |
shop_name | string | 店铺名称(取不到时为空串) |
items_summary | string | 商品摘要,取前 3 项拼成 名称 x数量,以中文逗号 , 连接 |
payable_price | integer | 应付金额(分) |
cancel_reason | string | null | 订单取消或下单失败的原因,如「超时未支付」「用户取消支付」;文案由平台给出、可能新增,请直接展示不要做枚举判断;其他状态为 null |
delivery | object | null | 配送信息;暂时查不到实时配送数据时为 null |
delivery.status | string | null | 配送状态 |
delivery.estimated_time_text | string | null | 预计送达文案(当前恒为 null) |
delivery.rider_name | string | null | 骑手姓名。骑手未接单时为 null |
delivery.rider_phone | string | null | 骑手联系电话,可直接给用户拨打。骑手未接单时为 null |
detail_url | string | null | 订单详情页链接,可直接发给用户查看订单进度;未支付的订单打开后可继续支付。每次调用返回的链接可能不同,但都可用——不要用作订单标识或做前后比对。链接有效期 30 天。下单时传了 require_phone_verify: true 的订单,打开链接时先要求输入下单手机号后 4 位确认本人 |
created_at | string | null | 下单时间(ISO 8601) |
paid_at | string | null | 支付时间(当前恒为 null,上游暂不返回该字段) |
completed_at | string | null | 完成时间(当前恒为 null,上游暂不返回该字段) |
status 枚举与 status_text 对照:
status | status_text |
|---|---|
created | 订单已创建 |
pending_payment | 待支付 |
paid | 已支付 |
preparing | 商家备餐中 |
delivering | 配送中 |
completed | 已完成 |
cancelled | 已取消 |
failed | 下单或履约失败 |
refunded | 已退款 |
created,不会向调用方泄露渠道原始状态码。
错误码
| code | 说明 |
|---|---|
CONSENT_GRANT_REQUIRED | 缺少用户授权(未传 consent_grant_id) |
CONSENT_GRANT_INVALID | 用户授权无效 |
CONSENT_GRANT_EXPIRED | 用户授权已过期,需重新授权 |
CAP_NOT_BOUND | 该 Agent 未开通外卖能力 |
CONSENT_GRANT_WRONG_CAP | 授权属于其它能力,不可用于本工具 |
PUBLIC_REFERENCE_INVALID | order_id 无效、过期或不属于当前授权用户 |
ORDER_FAILED | 订单未找到(本地无记录且实时查询未命中) |
调用示例
{
"name": "get_order_status",
"arguments": {
"consent_grant_id": "cg_your_consent_grant",
"order_id": "<来自 create_order>"
}
}

