注意:以下文档只适用于TOP接口,请谨慎使用!

文档中心 > API类目 > 天猫校园零售

tmall.campus.item.relation.sync (零售一品多码商品关联关系同步)

零售一品多码商品关联关系同步

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
relation_request SyncItemRelationRequest 必须 关联关系入参类
  • └ tenant_num
  • String
  • 必须
  • 80778
  • saas租户号
  • └ outer_id
  • String
  • 必须
  • 213128312
  • saas商品编码
  • └ main_barcode
  • String
  • 必须
  • 10000001
  • 主商品编码
  • └ store_id_list
  • Number []
  • 必须
  • [12626]
  • 门店编码数组
  • relation_barcode_list
  • RelationBarcodeDTO []
  • 必须
  • {""}
  • 关联条码数组
  • └ relation_barcode
  • String
  • 必须
  • 10001
  • 关联商品条码
  • └ whole_package
  • Boolean
  • 必须
  • true
  • 是否整件
  • └ package_num
  • Number
  • 必须
  • 1
  • 包装数量

响应参数

名称 类型 示例值 描述
result Result 返回对象
  • └ data
  • Boolean
  • true
  • 同步结果
  • └ code
  • String
  • 0
  • 接口返回code
  • └ success
  • Boolean
  • true
  • 接口调用是否成功
  • └ msg
  • String
  • 成功
  • 接口返回信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallCampusItemRelationSyncRequest req = new TmallCampusItemRelationSyncRequest();
TmallCampusItemRelationSyncRequest.SyncItemRelationRequest obj1 = new TmallCampusItemRelationSyncRequest.SyncItemRelationRequest();
obj1.setTenantNum("80778");
obj1.setOuterId("213128312");
obj1.setMainBarcode("10000001");
obj1.setStoreIdList(new Long[] { 12626 };
);
List<TmallCampusItemRelationSyncRequest.RelationBarcodeDTO> list3 = new ArrayList<TmallCampusItemRelationSyncRequest.RelationBarcodeDTO>();
TmallCampusItemRelationSyncRequest.RelationBarcodeDTO obj4 = new TmallCampusItemRelationSyncRequest.RelationBarcodeDTO();
list3.add(obj4);
obj4.setRelationBarcode("10001");
obj4.setWholePackage(true);
obj4.setPackageNum(1L);
obj1.setRelationBarcodeList(list3);
req.setRelationRequest(obj1);
TmallCampusItemRelationSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_campus_item_relation_sync_response>
    <result>
        <data>true</data>
        <code>0</code>
        <success>true</success>
        <msg>成功</msg>
    </result>
</tmall_campus_item_relation_sync_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

返回
顶部