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

taobao.logistics.express.courier.region.async (官流路区范围新增/修改接口)

官流路区范围新增/修改接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
courier_region_async_request CourierRegionAsyncRequest 必须 官流路区范围新增/修改接口入参
  • └ request_time
  • Number
  • 必须
  • 1689067417799
  • 业务请求时间戳(毫秒)
  • └ request_id
  • String
  • 必须
  • 1689067417799
  • 业务请求ID,用于做幂等
  • └ supplier_id
  • String
  • 必须
  • 10000074832948
  • 服务商ID
  • └ delivery_code
  • String
  • 必须
  • SF123
  • 配资源编码
  • └ service_type
  • String
  • 必须
  • 1
  • 服务类型:1-送货上门
  • └ region_id
  • String
  • 必须
  • region_code001
  • 路区ID,主键,需保证服务商下唯一性
  • region_fences
  • RegionFence []
  • 必须
  • 电子围栏(经纬度),电子围栏最多8000个点
  • └ longitude
  • String
  • 必须
  • 120.151329
  • 经度(高德)
  • └ latitude
  • String
  • 必须
  • 30.249481
  • 纬度(高德)
  • └ region_address_ids
  • String
  • 必须
  • 330110
  • 电子围栏内包含的四级地址id(菜鸟地址库ID),电子围栏内包含多个四级地址时,需传多个,以英文逗号分隔
  • └ region_wkt
  • String
  • 必须
  • POLYGON((120.025147 30.279419,120.027528 30.279419,120.024535 30.277436,120.02372 30.278984,120.025147 30.279419))
  • 网点覆盖范围(WKT格式) 样例: MULTIPOLYGON((11.51,55,15.1 1),(22,23,33,32,22)),((63,92,94,6 3)//多面 GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(46,710))//复杂几何

响应参数

名称 类型 示例值 描述
courier_region_async_response CourierRegionAsyncResponse 官流路区范围新增/修改接口出参
  • └ success
  • Boolean
  • true
  • 系统处理结果true|false
  • └ code
  • String
  • GRAPHIC_ERROR
  • 响应码
  • └ message
  • String
  • 电子围栏形状不符合要求,非多边形/存在交叉
  • 响应信息
  • └ is_retry
  • Boolean
  • true
  • 是否可重试

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
LogisticsExpressCourierRegionAsyncRequest req = new LogisticsExpressCourierRegionAsyncRequest();
LogisticsExpressCourierRegionAsyncRequest.CourierRegionAsyncRequest obj1 = new LogisticsExpressCourierRegionAsyncRequest.CourierRegionAsyncRequest();
obj1.setRequestTime(1689067417799L);
obj1.setRequestId("1689067417799");
obj1.setSupplierId("10000074832948");
obj1.setDeliveryCode("SF123");
obj1.setServiceType("1");
obj1.setRegionId("region_code001");
List<LogisticsExpressCourierRegionAsyncRequest.RegionFence> list3 = new ArrayList<LogisticsExpressCourierRegionAsyncRequest.RegionFence>();
LogisticsExpressCourierRegionAsyncRequest.RegionFence obj4 = new LogisticsExpressCourierRegionAsyncRequest.RegionFence();
list3.add(obj4);
obj4.setLongitude("120.151329");
obj4.setLatitude("30.249481");
obj1.setRegionFences(list3);
obj1.setRegionAddressIds("330110");
obj1.setRegionWkt("POLYGON((120.025147 30.279419,120.027528 30.279419,120.024535 30.277436,120.02372 30.278984,120.025147 30.279419))");
req.setCourierRegionAsyncRequest(obj1);
LogisticsExpressCourierRegionAsyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<logistics_express_courier_region_async_response>
    <courier_region_async_response>
        <success>true</success>
        <code>GRAPHIC_ERROR</code>
        <message>电子围栏形状不符合要求,非多边形/存在交叉</message>
        <is_retry>true</is_retry>
    </courier_region_async_response>
</logistics_express_courier_region_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

返回
顶部