文档中心 > API类目 > 菜鸟裹裹API

cainiao.endpoint.locker.top.gui.addorupdate (自提柜新增或修改接口)

新增或者修改自提柜相关信息

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
gui_info GuiInfo 必须 自提柜信息对象
  • └ zip
  • String
  • 可选
  • 300120
  • 邮编
  • └ gui_lng
  • String
  • 必须
  • 120.129872
  • 柜子经度
  • └ gui_addr
  • String
  • 必须
  • 翡翠城二期
  • 柜子短信地址(用户取件地址)
  • └ gui_id
  • String
  • 必须
  • 198128
  • 柜子ID
  • └ status
  • Number
  • 必须
  • 0
  • 状态;0-上线,1-下线
  • └ gui_name
  • String
  • 必须
  • 翡翠城自提柜
  • 柜子名称
  • └ cell_small
  • Number
  • 必须
  • 0
  • 小柜口数
  • └ cell_micro
  • Number
  • 必须
  • 0
  • 微柜口数
  • └ housing_estate
  • String
  • 可选
  • 翡翠城
  • 小区
  • └ cell_total
  • Number
  • 必须
  • 0
  • 总柜口数
  • └ cell_huge
  • Number
  • 必须
  • 0
  • 超大柜口数
  • └ gui_no
  • String
  • 必须
  • A42
  • 柜子编码,用于向用户展示,方便用户定位柜子
  • └ company_code
  • String
  • 必须
  • xxx.com
  • 柜子公司编码
  • └ city
  • String
  • 必须
  • 杭州市
  • 城市
  • └ img_url
  • String
  • 可选
  • http://www.taobao.com
  • 柜子图片URL
  • └ gui_lat
  • String
  • 必须
  • 30.127655
  • 柜子纬度
  • └ cell_middle
  • Number
  • 必须
  • 0
  • 中柜口数
  • └ province
  • String
  • 必须
  • 浙江省
  • └ service_degree
  • Number
  • 可选
  • 0
  • 柜子信号评级:0-GOOD,1-BAD
  • └ coord_type
  • String
  • 必须
  • MARS
  • 坐标类型,MARS-火星坐标(高德坐标),BAIDU-百度坐标,GPS-GPS坐标
  • └ cell_cool
  • Number
  • 必须
  • 0
  • 冷柜口数
  • └ town
  • String
  • 可选
  • 五常街道
  • 街道
  • └ district
  • String
  • 必须
  • 余杭区
  • 区县
  • └ cell_large
  • Number
  • 必须
  • 0
  • 大柜口数
  • └ extra
  • String
  • 可选
  • {'support_oneopen':'true','support_scanopen':'true','support_subscribe':'true'}
  • 柜子服务能力描述

响应参数

名称 类型 示例值 描述
err_desc String 数据库操作失败 错误描述
err_code String 204 错误编码,见白皮书
data Json null 数据内容,本接口返回null
is_success Boolean true 本次调用是否成功

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
CainiaoEndpointLockerTopGuiAddorupdateRequest req = new CainiaoEndpointLockerTopGuiAddorupdateRequest();
CainiaoEndpointLockerTopGuiAddorupdateRequest.GuiInfo obj1 = new CainiaoEndpointLockerTopGuiAddorupdateRequest.GuiInfo();
obj1.setZip("300120");
obj1.setGuiLng("120.129872");
obj1.setGuiAddr("翡翠城二期");
obj1.setGuiId("198128");
obj1.setStatus(0L);
obj1.setGuiName("翡翠城自提柜");
obj1.setCellSmall(0L);
obj1.setCellMicro(0L);
obj1.setHousingEstate("翡翠城");
obj1.setCellTotal(0L);
obj1.setCellHuge(0L);
obj1.setGuiNo("A42");
obj1.setCompanyCode("xxx.com");
obj1.setCity("杭州市");
obj1.setImgUrl("http://www.taobao.com");
obj1.setGuiLat("30.127655");
obj1.setCellMiddle(0L);
obj1.setProvince("浙江省");
obj1.setServiceDegree(0L);
obj1.setCoordType("MARS");
obj1.setCellCool(0L);
obj1.setTown("五常街道");
obj1.setDistrict("余杭区");
obj1.setCellLarge(0L);
obj1.setExtra("{'support_oneopen':'true','support_scanopen':'true','support_subscribe':'true'}");
req.setGuiInfo(obj1);
CainiaoEndpointLockerTopGuiAddorupdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<cainiao_endpoint_locker_top_gui_addorupdate_response>
    <err_desc>数据库操作失败</err_desc>
    <err_code>204</err_code>
    <data>null</data>
    <is_success>true</is_success>
</cainiao_endpoint_locker_top_gui_addorupdate_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

返回
顶部