文档中心 > API类目 > 天猫供应链

taobao.logistics.express.delivery.send.ability.async (快递送货上门能力同步/更新接口)

快递送货上门能力同步/更新接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
delivery_send_ability_request DeliverySendAbilityRequest 必须 快递送货上门能力
  • └ request_id
  • String
  • 必须
  • xxxxxxxx
  • 业务请求ID,用于做幂等
  • └ request_time
  • Number
  • 必须
  • 1656674541000
  • 时间戳(毫秒)
  • └ supplier_id
  • String
  • 必须
  • 10000000001
  • 服务商ID
  • └ delivery_code
  • String
  • 必须
  • STO-001
  • 服务商配资源唯一编码
  • └ site_id
  • String
  • 可选
  • 0001
  • 网点ID
  • └ site_address
  • String
  • 可选
  • 详细地址
  • 网点地址
  • └ ability_type
  • String
  • 必须
  • 1
  • 能力:1-送货上门;2-极速上门
  • └ service_class
  • String
  • 必须
  • 1
  • 服务:1-送货上门
  • └ category
  • String
  • 可选
  • 0
  • 品类:0-全部(默认);1-中小件;2-大件;
  • └ service_time
  • String
  • 可选
  • 20230901 11:00:00-20231001 11:00:00
  • 服务时间
  • └ service_cap
  • String
  • 可选
  • 10
  • 服务容量:包裹件数(不传,默认无上限)
  • └ service_scope_type
  • String
  • 必须
  • 1
  • 服务范围地址类型:1-行政地址;2-地理围栏
  • └ address_type
  • String
  • 必须
  • 1
  • 地址传入方式 1.菜鸟地址库ID传入 2.中文地址传入
  • └ address_id
  • String []
  • 可选
  • ["330110005"]
  • 当地址传入方式为菜鸟地址库ID传入时,则必须填写 地址id(数组);四级/三级/二级
  • address_name
  • AddressName []
  • 可选
  • 当地址传入方式为详细地址时填写
  • └ province
  • String
  • 可选
  • 浙江省
  • └ city
  • String
  • 可选
  • 杭州市
  • └ area
  • String
  • 可选
  • 余杭区
  • └ town
  • String
  • 可选
  • 五常街道
  • 街道
  • region_id
  • RegionId []
  • 可选
  • 地理围栏(经纬度),电子围栏最多5000个点(数组)
  • └ latitude
  • String
  • 可选
  • 120.21201
  • 经度(高德)
  • └ longitude
  • String
  • 可选
  • 30.2084
  • 纬度(高德)
  • └ region_code
  • String
  • 可选
  • 001
  • 电子围栏外部ID

响应参数

名称 类型 示例值 描述
delivery_send_ability_async_response DeliverySendAblitiyAsyncResponse 返回值
  • └ success
  • Boolean
  • true
  • 系统成功失败 true|false
  • └ code
  • String
  • 200
  • 响应码
  • └ message
  • String
  • SUCCESS
  • 响应信息
  • data
  • DataDetails
  • 处理结果详细信息
  • address_id_results
  • AddressIdResults []
  • 只会返回错误的地址id,如果淘天物流无法识别的地址则返回错误码
  • └ address_id
  • String
  • 0
  • 错误的地址ID
  • └ error_message
  • String
  • 错误原因
  • 错误原因
  • address_name_results
  • AddressNameResults []
  • 只会返回错误的地址信息,如果淘天物流无法识别的地址则返回错误码
  • └ province
  • String
  • 浙江省
  • └ city
  • String
  • 杭州市
  • └ area
  • String
  • 余杭区
  • └ town
  • String
  • 五常街道
  • 街道
  • └ error_message
  • String
  • 错误原因
  • 错误原因
  • region_id_results
  • RegionIdResults []
  • 只会返回错误的地理围栏信息
  • └ latitude
  • String
  • 120.21201
  • 经度(高德)
  • └ longitude
  • String
  • 30.2084
  • 纬度(高德)
  • └ error_message
  • String
  • 错误原因
  • 错误原因

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsExpressDeliverySendAbilityAsyncRequest req = new LogisticsExpressDeliverySendAbilityAsyncRequest();
LogisticsExpressDeliverySendAbilityAsyncRequest.DeliverySendAbilityRequest obj1 = new LogisticsExpressDeliverySendAbilityAsyncRequest.DeliverySendAbilityRequest();
obj1.setRequestId("xxxxxxxx");
obj1.setRequestTime(1656674541000L);
obj1.setSupplierId("10000000001");
obj1.setDeliveryCode("STO-001");
obj1.setSiteId("0001");
obj1.setSiteAddress("详细地址");
obj1.setAbilityType("1");
obj1.setServiceClass("1");
obj1.setCategory("0");
obj1.setServiceTime("20230901 11:00:00-20231001 11:00:00");
obj1.setServiceCap("10");
obj1.setServiceScopeType("1");
obj1.setAddressType("1");
obj1.setAddressId(""330110005"");
List<LogisticsExpressDeliverySendAbilityAsyncRequest.AddressName> list3 = new ArrayList<LogisticsExpressDeliverySendAbilityAsyncRequest.AddressName>();
LogisticsExpressDeliverySendAbilityAsyncRequest.AddressName obj4 = new LogisticsExpressDeliverySendAbilityAsyncRequest.AddressName();
list3.add(obj4);
obj4.setProvince("浙江省");
obj4.setCity("杭州市");
obj4.setArea("余杭区");
obj4.setTown("五常街道");
obj1.setAddressName(list3);
List<LogisticsExpressDeliverySendAbilityAsyncRequest.RegionId> list6 = new ArrayList<LogisticsExpressDeliverySendAbilityAsyncRequest.RegionId>();
LogisticsExpressDeliverySendAbilityAsyncRequest.RegionId obj7 = new LogisticsExpressDeliverySendAbilityAsyncRequest.RegionId();
list6.add(obj7);
obj7.setLatitude("120.21201");
obj7.setLongitude("30.2084");
obj1.setRegionId(list6);
obj1.setRegionCode("001");
req.setDeliverySendAbilityRequest(obj1);
LogisticsExpressDeliverySendAbilityAsyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<logistics_express_delivery_send_ability_async_response>
    <delivery_send_ability_async_response>
        <success>true</success>
        <code>200</code>
        <message>SUCCESS</message>
        <data>
            <address_id_results>
                <address_id_results>
                    <address_id>0</address_id>
                    <error_message>错误原因</error_message>
                </address_id_results>
            </address_id_results>
            <address_name_results>
                <address_name_results>
                    <province>浙江省</province>
                    <city>杭州市</city>
                    <area>余杭区</area>
                    <town>五常街道</town>
                    <error_message>错误原因</error_message>
                </address_name_results>
            </address_name_results>
            <region_id_results>
                <region_id_results>
                    <latitude>120.21201</latitude>
                    <longitude>30.2084</longitude>
                    <error_message>错误原因</error_message>
                </region_id_results>
            </region_id_results>
        </data>
    </delivery_send_ability_async_response>
</logistics_express_delivery_send_ability_async_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

返回
顶部