查询预报单称重信息
按 po_number 查询预报单的称重数据(长宽高/重量),以及称重器拍摄的图片和预报单拍照图片。
预报单送达仓库后,仓库称重机会对称重包裹进行称重并回写长、宽、高、重量,同时拍摄称重图片。通过本接口可按 po_number 实时查询这些数据,用于租户侧对账、计费核对或问题件排查。
| 项 | 值 |
|---|
| 方法 | GET |
| 路径 | /open/v1/forecasts/weighing |
| 鉴权 | ApiKey 鉴权 |
| 请求头 | 必填 | 说明 |
|---|
X-Api-Key | 是 | ApiKey,详见鉴权说明 |
| 参数 | 类型 | 必填 | 说明 |
|---|
po_number | string | 是 | PO 号(业务键,提交预报单时传入) |
curl 'https://open.test.huixingguoji.com/open/v1/forecasts/weighing?po_number=180401699' \
-H 'X-Api-Key: YOUR_API_KEY'
{
"code": "0",
"message": "success",
"data": {
"po_number": "180401699",
"status": 6,
"length_cm": 35.5,
"width_cm": 25.0,
"height_cm": 18.2,
"weight_kg": 4.26,
"weighing_images": [
{
"id": 1024,
"express_no": "180401699",
"image_path": "storage/20260814/weigh_1024.jpg",
"image_url": "https://open.huixingguoji.com/storage/20260814/weigh_1024.jpg",
"file_size": 245760,
"upload_time": "2026-08-14T16:03:05+08:00"
}
],
"forecast_images": [
{
"id": 88,
"forecast_id": 1201,
"image_type": "package",
"image_url": "https://open.huixingguoji.com/storage/20260813/fc_88.jpg",
"image_order": 1,
"upload_source": "tenant"
}
]
}
}
| 字段 | 类型 | 说明 |
|---|
po_number | string | PO 号 |
status | integer | 预报单状态(1~7,见提交预报单状态说明) |
length_cm | number | 称重回写的长(cm);未称重为 null |
width_cm | number | 称重回写的宽(cm);未称重为 null |
height_cm | number | 称重回写的高(cm);未称重为 null |
weight_kg | number | 称重回写的重量(kg);未称重为 null |
weighing_images | array | 称重器拍摄图片,最新在前;无图片为空数组 |
forecast_images | array | 预报单拍照图片,按 image_order 升序;无图片为空数组 |
weighing_images[] 节点字段:
| 字段 | 类型 | 说明 |
|---|
image_url | string | 图片访问 URL |
file_size | integer | 文件大小(字节) |
upload_time | string | 上传时间(ISO8601) |
forecast_images[] 节点字段:
| 字段 | 类型 | 说明 |
|---|
image_type | string | 图片类型:product 产品图 / package 包装图 / shipping 发货图 / document 单据图 / other 其他 |
image_url | string | 图片访问 URL |
image_order | integer | 排序序号 |
仓库称重完成并通过 Webhook parcel.weighed 通知后,即可调用本接口获取称重数据;称重数据由仓库侧回写,存在短暂延迟属正常现象。
常见错误码(完整列表见错误码):
| 错误码 | 含义 | 触发场景 |
|---|
42201 | 字段校验失败 | 未携带 po_number |
40401 | 包裹不存在 | po_number 不存在或不属于当前租户 |