文档中心 > API类目 > 电子面单API

taobao.logistics.routing.sortingcode.config (快递特定场景分拣码配置(大头笔、集包地、末端中心))

快递特定场景分拣码配置(大头笔、集包地、末端中心)

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
routing_rule_config_batch_top_request RoutingRuleConfigBatchTopRequest 必须 分拣码配置信息
  • └ cp_code
  • String
  • 必须
  • STO
  • 快递公司编码
  • └ resource_type
  • String
  • 必须
  • jiyun
  • 场景类型
  • └ routing_type
  • Number
  • 必须
  • 0
  • 码值类型:0大头笔 1集包地 2末端中心
  • routing_rule_config_list
  • RoutingRuleConfigDTO []
  • 必须
  • 分拣码配置列表
  • └ text_value
  • String
  • 必须
  • 900X
  • 码值打印值:大头笔、集包地打印值,末端中心名称
  • receive_address
  • AddressDTO
  • 必须
  • 收件地址
  • └ town_name
  • String
  • 可选
  • 余杭街道
  • 乡镇/街道
  • └ city_name
  • String
  • 可选
  • 杭州市
  • 城市
  • └ area_name
  • String
  • 可选
  • 余杭区
  • 区县
  • └ province_name
  • String
  • 必须
  • 浙江省
  • └ object_id
  • String
  • 必须
  • 412414141411srsrrw
  • 分组唯一标识码
  • send_address
  • AddressDTO
  • 可选
  • 发件地址,非必填
  • └ town_name
  • String
  • 可选
  • 余杭街道
  • 乡镇/街道
  • └ city_name
  • String
  • 可选
  • 杭州市
  • 城市
  • └ area_name
  • String
  • 可选
  • 余杭区
  • 区县
  • └ province_name
  • String
  • 可选
  • 浙江省
  • └ num_value
  • String
  • 可选
  • 123344
  • 码值编码:大头笔不用,集包地编码,末端中心编码
  • └ action
  • String
  • 必须
  • 0
  • 操作类型: 0新增 1更新 2删除
  • └ operator
  • String
  • 必须
  • 小明
  • 操作人
client_info ClientInfoDTO 可选 客户端信息
  • └ description
  • String
  • 可选
  • 申通
  • 自定义描述信息

响应参数

名称 类型 示例值 描述
result BaseResultDTO 接口调用结果模型
  • └ success
  • Boolean
  • false
  • 接口调用结果
  • modules
  • RoutingRuleConfigTopResponse []
  • 结果列表
  • └ object_id
  • String
  • 123456
  • 唯一性id,用于分组
  • └ success
  • Boolean
  • false
  • 单个是否成功
  • └ error_code
  • String
  • INVALID_ADDRESS
  • 错误码
  • └ error_message
  • String
  • 收件地址解析不合法
  • 错误信息
  • one_error_info
  • ErrorInfo
  • 接口错误模型
  • └ error_code
  • String
  • SYSTEM_ERROR
  • 错误码
  • └ error_message
  • String
  • 系统异常
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsRoutingSortingcodeConfigRequest req = new LogisticsRoutingSortingcodeConfigRequest();
LogisticsRoutingSortingcodeConfigRequest.RoutingRuleConfigBatchTopRequest obj1 = new LogisticsRoutingSortingcodeConfigRequest.RoutingRuleConfigBatchTopRequest();
obj1.setCpCode("STO");
obj1.setResourceType("jiyun");
obj1.setRoutingType(0L);
List<LogisticsRoutingSortingcodeConfigRequest.RoutingRuleConfigDTO> list3 = new ArrayList<LogisticsRoutingSortingcodeConfigRequest.RoutingRuleConfigDTO>();
LogisticsRoutingSortingcodeConfigRequest.RoutingRuleConfigDTO obj4 = new LogisticsRoutingSortingcodeConfigRequest.RoutingRuleConfigDTO();
list3.add(obj4);
obj4.setTextValue("900X");
LogisticsRoutingSortingcodeConfigRequest.AddressDTO obj6 = new LogisticsRoutingSortingcodeConfigRequest.AddressDTO();
obj6.setTownName("余杭街道");
obj6.setCityName("杭州市");
obj6.setAreaName("余杭区");
obj6.setProvinceName("浙江省");
list5.setReceiveAddress(obj6);
obj4.setObjectId("412414141411srsrrw");
LogisticsRoutingSortingcodeConfigRequest.AddressDTO obj8 = new LogisticsRoutingSortingcodeConfigRequest.AddressDTO();
obj8.setTownName("余杭街道");
obj8.setCityName("杭州市");
obj8.setAreaName("余杭区");
obj8.setProvinceName("浙江省");
list7.setSendAddress(obj8);
obj4.setNumValue("123344");
obj1.setRoutingRuleConfigList(list3);
obj1.setAction("0");
obj1.setOperator("小明");
req.setRoutingRuleConfigBatchTopRequest(obj1);
LogisticsRoutingSortingcodeConfigRequest.ClientInfoDTO obj9 = new LogisticsRoutingSortingcodeConfigRequest.ClientInfoDTO();
obj9.setDescription("申通");
req.setClientInfo(obj9);
LogisticsRoutingSortingcodeConfigResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<logistics_routing_sortingcode_config_response>
    <result>
        <success>false</success>
        <modules>
            <routing_rule_config_top_response>
                <object_id>123456</object_id>
                <success>false</success>
                <error_code>INVALID_ADDRESS</error_code>
                <error_message>收件地址解析不合法</error_message>
            </routing_rule_config_top_response>
        </modules>
        <one_error_info>
            <error_code>SYSTEM_ERROR</error_code>
            <error_message>系统异常</error_message>
        </one_error_info>
    </result>
</logistics_routing_sortingcode_config_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部