文档中心 > API类目 > 零售终端API

tmall.mafia.account.area.auth (经销商区域授权)

联众向内部写入经销商负责区域

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
area_request TxpAccountAreaRequest 可选 请求入参
  • auth_area_dto
  • TxpAccountAreaDTO []
  • 可选
  • 请求变量
  • └ account_id
  • Number
  • 可选
  • 1234
  • 账号id
  • └ account_name
  • String
  • 可选
  • 张三经销商
  • 账号名称
  • └ province_code
  • Number
  • 可选
  • 330000
  • 省code
  • └ province_name
  • String
  • 可选
  • 浙江省
  • 省名称
  • └ city_code
  • Number
  • 可选
  • 330100
  • 城市code
  • └ city_name
  • String
  • 可选
  • 杭州
  • 城市名称
  • └ area_code
  • Number
  • 可选
  • 330110
  • 区域code
  • └ area_name
  • String
  • 可选
  • 余杭区
  • 区域名称
  • └ town_code
  • Number
  • 可选
  • 330110005
  • 街道code
  • └ town_name
  • String
  • 可选
  • 五常街道
  • 街道名称
  • └ community_id
  • Number
  • 可选
  • 123456
  • 社区id
  • └ community_name
  • String
  • 可选
  • xxxx
  • 社区名称
  • └ store_id
  • Number
  • 可选
  • 123456
  • 门店id
  • └ address
  • String
  • 可选
  • xxxx
  • 地址
  • └ account_type
  • String
  • 可选
  • xxxx
  • 账户类型
  • └ status
  • String
  • 可选
  • xxx
  • 状态
  • └ modifier_name
  • String
  • 可选
  • 张三
  • 修改人名称
  • └ creator_name
  • String
  • 可选
  • 张三
  • 创建人名称
  • └ modifier_id
  • Number
  • 可选
  • 1234
  • 修改人id
  • └ creator_id
  • Number
  • 可选
  • 1234
  • 创建人id
  • └ version
  • Number
  • 可选
  • 0
  • 版本号
  • └ attributes
  • String
  • 可选
  • xxxx
  • 扩展字段
  • └ gmt_modified
  • Date
  • 可选
  • 2018-06-12 19:59:20
  • 修改时间
  • └ gmt_create
  • Date
  • 可选
  • 2018-06-12 19:59:20
  • 创建时间
  • un_auth_area_dto
  • TxpAccountAreaDTO []
  • 可选
  • 请求入参
  • └ account_id
  • Number
  • 可选
  • 1234
  • 账号id
  • └ account_name
  • String
  • 可选
  • 张三经销商
  • 账号名称
  • └ province_code
  • Number
  • 可选
  • 330000
  • 省code
  • └ province_name
  • String
  • 可选
  • 浙江省
  • 省名称
  • └ city_code
  • Number
  • 可选
  • 330100
  • 城市code
  • └ city_name
  • String
  • 可选
  • 杭州
  • 城市名称
  • └ area_code
  • Number
  • 可选
  • 330110
  • 区域code
  • └ area_name
  • String
  • 可选
  • 余杭区
  • 区域名称
  • └ town_code
  • Number
  • 可选
  • 330110005
  • 街道code
  • └ town_name
  • String
  • 可选
  • 五常街道
  • 街道名称
  • └ community_id
  • Number
  • 可选
  • 123456
  • 社区id
  • └ community_name
  • String
  • 可选
  • xxxx
  • 社区名称
  • └ store_id
  • Number
  • 可选
  • 123456
  • 门店id
  • └ address
  • String
  • 可选
  • xxxxx
  • 地址
  • └ account_type
  • String
  • 可选
  • xxxx
  • 用户类型
  • └ status
  • String
  • 可选
  • ""
  • 状态
  • └ modifier_name
  • String
  • 可选
  • 张三
  • 修改人名称
  • └ creator_name
  • String
  • 可选
  • 张三
  • 创建人名称
  • └ modifier_id
  • Number
  • 可选
  • 1234
  • 修改人id
  • └ creator_id
  • Number
  • 可选
  • 1234
  • 创建人id
  • └ version
  • Number
  • 可选
  • 0
  • 版本号
  • └ attributes
  • String
  • 可选
  • xxxx
  • 扩展字段
  • └ gmt_modified
  • Date
  • 可选
  • 2018-06-12 19:59:20
  • 修改时间
  • └ gmt_create
  • Date
  • 可选
  • 2018-06-12 19:59:20
  • 创建时间

响应参数

名称 类型 示例值 描述
succ Boolean true succ
area_code String xxx code
area_msg String xxx msg
data Json 1234 data

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallMafiaAccountAreaAuthRequest req = new TmallMafiaAccountAreaAuthRequest();
TmallMafiaAccountAreaAuthRequest.TxpAccountAreaRequest obj1 = new TmallMafiaAccountAreaAuthRequest.TxpAccountAreaRequest();
List<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO> list3 = new ArrayList<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO>();
TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO obj4 = new TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO();
list3.add(obj4);
obj4.setAccountId(1234L);
obj4.setAccountName("张三经销商");
obj4.setProvinceCode(330000L);
obj4.setProvinceName("浙江省");
obj4.setCityCode(330100L);
obj4.setCityName("杭州");
obj4.setAreaCode(330110L);
obj4.setAreaName("余杭区");
obj4.setTownCode(330110005L);
obj4.setTownName("五常街道");
obj4.setCommunityId(123456L);
obj4.setCommunityName("xxxx");
obj4.setStoreId(123456L);
obj4.setAddress("xxxx");
obj4.setAccountType("xxxx");
obj4.setStatus("xxx");
obj4.setModifierName("张三");
obj4.setCreatorName("张三");
obj4.setModifierId(1234L);
obj4.setCreatorId(1234L);
obj4.setVersion(0L);
obj4.setAttributes("xxxx");
obj4.setGmtModified(StringUtils.parseDateTime("2018-06-12 19:59:20"));
obj4.setGmtCreate(StringUtils.parseDateTime("2018-06-12 19:59:20"));
obj1.setAuthAreaDto(list3);
List<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO> list6 = new ArrayList<TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO>();
TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO obj7 = new TmallMafiaAccountAreaAuthRequest.TxpAccountAreaDTO();
list6.add(obj7);
obj7.setAccountId(1234L);
obj7.setAccountName("张三经销商");
obj7.setProvinceCode(330000L);
obj7.setProvinceName("浙江省");
obj7.setCityCode(330100L);
obj7.setCityName("杭州");
obj7.setAreaCode(330110L);
obj7.setAreaName("余杭区");
obj7.setTownCode(330110005L);
obj7.setTownName("五常街道");
obj7.setCommunityId(123456L);
obj7.setCommunityName("xxxx");
obj7.setStoreId(123456L);
obj7.setAddress("xxxxx");
obj7.setAccountType("xxxx");
obj7.setStatus("\"\"");
obj7.setModifierName("张三");
obj7.setCreatorName("张三");
obj7.setModifierId(1234L);
obj7.setCreatorId(1234L);
obj7.setVersion(0L);
obj7.setAttributes("xxxx");
obj7.setGmtModified(StringUtils.parseDateTime("2018-06-12 19:59:20"));
obj7.setGmtCreate(StringUtils.parseDateTime("2018-06-12 19:59:20"));
obj1.setUnAuthAreaDto(list6);
req.setAreaRequest(obj1);
TmallMafiaAccountAreaAuthResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_mafia_account_area_auth_response>
    <succ>true</succ>
    <area_code>xxx</area_code>
    <area_msg>xxx</area_msg>
    <data>1234</data>
</tmall_mafia_account_area_auth_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

返回
顶部