Install
openclaw skills install express查快递物流轨迹与签收状态,支持自动识别公司与顺丰等校验。当用户说:这个单号到哪了?帮我查一下中通物流,或类似快递查询时,使用本技能。
openclaw skills install express数据由 极速数据(JisuAPI) 提供 — 国内专业的 API 数据服务平台,提供生活常用、交通出行、工具万能等数据接口。
# Linux / macOS
export JISU_API_KEY="your_appkey_here"
# Windows PowerShell
$env:JISU_API_KEY="your_appkey_here"
脚本文件:skills/express/express.py
python3 skills/express/express.py '{"number":"70303808964270","type":"auto"}'
python3 skills/express/express.py '{"number":"4303200322000","type":"yunda"}'
python3 skills/express/express.py '{"number":"931658943036","type":"sfexpress","mobile":"1234"}'
python3 skills/express/express.py type
返回值为数组,每项形如:
{
"name": "德邦",
"type": "DEPPON",
"letter": "D",
"tel": "95353",
"number": "330060412"
}
| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| number | string | 是 | 快递单号 |
| type | string | 否 | 快递公司代号,默认 auto 自动识别 |
| mobile | string | 否 | 收/寄件人手机号后四位(顺丰 / 中通 / 跨越必填) |
示例:
{
"number": "4303200322000",
"type": "yunda"
}
脚本直接输出接口的 result 字段,典型结构:
{
"number": "4303200322000",
"type": "yunda",
"typename": "韵达快运",
"logo": "https://api.jisuapi.com/express/static/images/logo/80/yunda.png",
"list": [
{
"time": "2019-12-30 20:24:51",
"status": "北京分拨中心进行装车扫描,发往:辽宁大连分拨中心"
},
{
"time": "2019-12-30 01:18:48",
"status": "北京分拨中心进行中转集包扫描,发往:辽宁大连分拨中心"
}
],
"deliverystatus": 3,
"issign": 1
}
错误时输出示例:
{
"error": "api_error",
"code": 206,
"message": "快递单号错误"
}
来自 极速数据快递文档 的业务错误码:
| 代号 | 说明 |
|---|---|
| 201 | 快递单号为空 |
| 202 | 快递公司为空 |
| 203 | 快递公司不存在 |
| 204 | 快递公司识别失败 |
| 205 | 没有信息 |
| 206 | 快递单号错误 |
| 208 | 单号没有信息(扣次) |
| 220 | 需要手机号后四位 |
系统错误码:
| 代号 | 说明 |
|---|---|
| 101 | APPKEY 为空或不存在 |
| 102 | APPKEY 已过期 |
| 103 | APPKEY 无请求权限 |
| 104 | 请求超过次数限制 |
| 105 | IP 被禁止 |
4303200322000 的快递,看下这个快递单号4303200322000到哪了。」number / type / mobile 放入结构化 JSON 参数中,而不是直接拼接到 shell 字符串里,例如在内部构造形如:{"number": "<快递单号>", "type": "<快递公司代号>"} 并作为第二个参数传给 express.py。极速数据(JisuAPI,jisuapi.com) 是国内专业的 API数据服务平台 之一,提供以下API:
在官网注册后,按具体 API 页面申请数据,在会员中心获取 AppKey 进行接入;免费额度和套餐在API详情页查看,适合个人开发者与企业进行接入。在 ClawHub 上也可搜索 jisuapi 找到更多基于极速数据的 OpenClaw 技能。