# 2004 快递寄送服务动态

## content_json 定义

| 参数 | 是否必填 | 类型 | 说明 | 格式要求 |
| -------- | -------- | -------- | -------- | -------- |
| cur_status | 是 | int32 | 当前状态id |  |
| wxa_path_query | 是 | string | 卡片点击跳转路径与query |  |
| sender_city | 参考状态要求 | string | 寄件地市级行政区名称 | 最多11个可见字符，如「广州市」 |
| receiver_city | 参考状态要求 | string | 收件地市级行政区名称 | 最多11个可见字符，如「广州市」 |
| sender_name | 参考状态要求 | string | 寄件人名称，建议采用掩码 | 最多5个可见字符，如「张*三」 |
| receiver_name | 参考状态要求 | string | 收件人名称，建议采用掩码 | 最多5个可见字符，如「张*三」 |
| delivery_time | 参考状态要求 | uint32 | 预计送达时间（cur_status为1或2或3或4时）、签收时间（cur_status为5或6时） | 秒级时间戳，展示为MM/DD格式 |

## cur_status 传入状态 id 的含义，与不同状态 id 下的字段要求

| id | 激活时是否可为此状态 | 可变更自上一状态* | 状态描述 | 此状态下必填字段 | 此状态下选填字段 | content_json示例 |
| -------- | -------- | -------- | -------- | -------- | -------- | -------- |
| 1 | 是 | 1 | 待揽收 | sender_city
receiver_city
sender_name
receiver_name
wxa_path_query | delivery_time | `"{\"cur_status\":1,\"tracking_no\": \"323244567777\",\"express_company\": \"BEST\",\"sender_city\": \"北京市\",\"receiver_city\": \"广州市\",\"sender_name\": \"s**n\",\"receiver_name\": \"b**n\",\"contact\":{\"consignor_contact\": \"123****3232\",\"receiver_contact\": \"123****3232\"},\"delivery_time\":1696157643,\"wxa_path_query\":\"pages/index/index\"}"` |
| 2 | 是 | 1, 2 | 已揽收 | sender_city
receiver_city
sender_name
receiver_name
wxa_path_query | delivery_time | `"{\"cur_status\":2,\"tracking_no\": \"323244567777\",\"express_company\": \"BEST\",\"sender_city\": \"北京市\",\"receiver_city\": \"广州市\",\"sender_name\": \"s**n\",\"receiver_name\": \"b**n\",\"contact\":{\"consignor_contact\": \"123****3232\",\"receiver_contact\": \"123****3232\"},\"delivery_time\":1696157643,\"wxa_path_query\":\"pages/index/index\"}"` |
| 3 | 否 | 1, 2, 3 | 运输中 | wxa_path_query | delivery_time | `"{\"cur_status\":3,\"delivery_time\":1696157643,\"wxa_path_query\":\"pages/index/index\"}"` |
| 4 | 否 | 3, 4 | 派件中 | wxa_path_query | delivery_time | `"{\"cur_status\":4,\"delivery_time\":1696157643,\"wxa_path_query\":\"pages/index/index\"}"` |
| 5 | 否 | 3, 4 | 已签收 | wxa_path_query | delivery_time | `"{\"cur_status\":5,\"delivery_time\":1696157643,\"wxa_path_query\":\"pages/index/index\"}"` |
| 6 | 否 | 3, 4 | 代签收 | wxa_path_query | delivery_time | `"{\"cur_status\":6,\"delivery_time\":1696157643,\"wxa_path_query\":\"pages/index/index\"}"` |
| 7 | 否 | 1, 2, 3, 4 | 异常 | wxa_path_query |  | `"{\"cur_status\":7,\"wxa_path_query\":\"pages/index/index\"}"` |

**「可变更自上一状态」说明**

1. 此列中的数字表示当前状态只能由这些状态变更（激活时无此要求）
2. 需要注意的是当前状态变更为当前状态，也要求状态id在此列中：如当前为状态为1，只有当1也在此列中，才允许下一次更新时状态传入1
3. 在此列中不存在的状态id，意为结束态，后续不再可更新服务状态

## ext_json 定义

| 参数 | 是否必填 | 类型 | 说明 | 格式要求 |
| -------- | -------- | -------- | -------- | -------- |
| shipping_list | 是 | array<object> | 物流信息 |  |

**shipping_list 定义**

| 参数 | 是否必填 | 类型 | 说明 | 格式要求 |
| -------- | -------- | -------- | -------- | -------- |
| tracking_no | 是 | string | 物流单号 | 字符字节限制: [1, 128] |
| express_company | 是 | string | 快递公司ID，参见[获取快递公司列表](/miniprogram/dev/server/API/express/express-by-business/api_getalldelivery.md)  | 字符字节限制: [1, 128] |
| item_list | 否 | array<uint32> | 物流包含商品编号列表 | 商品编号为product_list中的商品顺序，从0开始，示例值：[0, 1, 4] |
| contact | 否 | object | 联系方式 | **当发货的物流公司为顺丰时，联系方式为必填，收件人或寄件人联系方式二选一** |

**contact 定义**

| 参数 | 是否必填 | 类型 | 说明 | 格式要求 |
| -------- | -------- | -------- | -------- | -------- |
| consignor_contact | 否 | string | 寄件人联系方式，寄件人联系方式 | 采用掩码传输，最后4位数字不能打掩码，示例值: 189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008 |
| receiver_contact | 否 | string | 收件人联系方式，收件人联系方式 | 采用掩码传输，最后4位数字不能打掩码，示例值: 189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008 |
