文档中心 > API类目 > 信息平台-采购

alibaba.pur.cmall.goods.sync (第三方商家接入采购商城-商品同步)

第三方商家接入采购商城-商品同步

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
access_product_dto AccessProductDto 必须 产品对象
  • └ buyer_work_no
  • String
  • 可选
  • 45862
  • 阿里采购员工号
  • └ catalog_category_id
  • Number
  • 可选
  • 1
  • 阿里商城品类ID
  • └ category_code
  • String
  • 可选
  • VB01
  • 阿里采购三级类目
  • └ data_source
  • String
  • 必须
  • ZKH
  • 外部商家标识
  • └ img_url_list
  • String []
  • 可选
  • 图片地址列表
  • └ mall_url
  • String
  • 可选
  • http://xxx
  • 外部商家产品链接
  • └ order_type
  • String
  • 必须
  • QUANTITY
  • 计价方式 AMOUNT QUANTITY
  • product_attr_value_list
  • AccessProductAttrValueDto []
  • 必须
  • 产品属性
  • └ attr_name
  • String
  • 必须
  • 颜色
  • 属性名称
  • └ attr_value_name_list
  • String []
  • 必须
  • 属性值名称
  • └ product_desc
  • String
  • 可选
  • 产品描述
  • 产品描述
  • └ product_name
  • String
  • 必须
  • 苹果手机
  • 产品名称
  • └ purchase_channel
  • String
  • 必须
  • CATALOG
  • 采购通道,阿里侧枚举
  • └ recommendation
  • String
  • 可选
  • 产品详情
  • 产品详情
  • └ source_category_id
  • Number
  • 可选
  • 123
  • 外部商家品类ID,如果有的话需要在阿里侧有对应的映射
  • └ source_category_name
  • String
  • 可选
  • 生活用品
  • 外部商家品类名称
  • └ source_info
  • String
  • 可选
  • {}
  • 额外信息
  • └ source_type
  • String
  • 可选
  • ZKH
  • 子类型
  • └ source_value
  • String
  • 必须
  • 123
  • 外部商家对应产品ID
  • └ unit
  • String
  • 必须
  • 计价单位
  • └ lead_pur_org
  • String []
  • 可选
  • 0001
  • 主导采购组织
access_goods_dto AccessGoodsDto 必须 商品对象
  • └ contract_code
  • String
  • 可选
  • A50202200001
  • 阿里侧合同编号
  • └ data_source
  • String
  • 必须
  • ZKH
  • 外部商家标识
  • └ is_apply_directory_mall
  • String
  • 必须
  • y
  • 是否上架商城
  • └ minimum_purchase_quantity
  • BigDecimal
  • 可选
  • 1
  • 最小采购量
  • quotation_list
  • AccessQuotationDto []
  • 必须
  • 报价明细
  • └ currency_code
  • String
  • 必须
  • CNY
  • 币种
  • └ effective_date
  • Date
  • 必须
  • 2022-04-01 10:00:00
  • 报价生效时间
  • └ expire_date
  • Date
  • 必须
  • 2022-04-30 10:00:00
  • 报价失效时间
  • └ ladder_price
  • Boolean
  • 必须
  • false
  • 是否阶梯价
  • ladder_price_list
  • AccessLadderPriceDto []
  • 可选
  • 阶梯价信息
  • └ origin_unit_price
  • BigDecimal
  • 可选
  • 12
  • 原价
  • └ unit_price
  • BigDecimal
  • 可选
  • 10.5
  • 协议价
  • └ minimum_purchase_quantity
  • BigDecimal
  • 可选
  • 1
  • 最小采购量
  • sku_attr_value_list
  • AccessSkuAttrValueDto []
  • 必须
  • sku属性列表
  • └ attr_name
  • String
  • 必须
  • 颜色
  • 属性名称
  • └ attr_value_name
  • String
  • 必须
  • 红色
  • 属性值名称
  • └ source_sku_id
  • String
  • 必须
  • 112
  • 外部商家skuId
  • └ unit_price
  • BigDecimal
  • 必须
  • 10.5
  • 协议价
  • └ origin_unit_price
  • BigDecimal
  • 可选
  • 12
  • 原价
  • └ source_value
  • String
  • 必须
  • 111
  • 外部商家商品标记值
  • └ supplier_id
  • Number
  • 可选
  • 123
  • 阿里侧供应商ID
  • └ tax_rate
  • BigDecimal
  • 必须
  • 6
  • 税率,如6%则为6

响应参数

名称 类型 示例值 描述
result ActionResult 返回对象
  • └ is_success
  • Boolean
  • true
  • 是否成功
  • └ message
  • String
  • 参数错误
  • 返回提示信息
  • └ product_url
  • String
  • https://xxxx
  • 返回的产品链接

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaPurCmallGoodsSyncRequest req = new AlibabaPurCmallGoodsSyncRequest();
AlibabaPurCmallGoodsSyncRequest.AccessProductDto obj1 = new AlibabaPurCmallGoodsSyncRequest.AccessProductDto();
obj1.setBuyerWorkNo("45862");
obj1.setCatalogCategoryId(1L);
obj1.setCategoryCode("VB01");
obj1.setDataSource("ZKH");
obj1.setImgUrlList("");
obj1.setMallUrl("http://xxx");
obj1.setOrderType("QUANTITY");
List<AlibabaPurCmallGoodsSyncRequest.AccessProductAttrValueDto> list3 = new ArrayList<AlibabaPurCmallGoodsSyncRequest.AccessProductAttrValueDto>();
AlibabaPurCmallGoodsSyncRequest.AccessProductAttrValueDto obj4 = new AlibabaPurCmallGoodsSyncRequest.AccessProductAttrValueDto();
list3.add(obj4);
obj4.setAttrName("颜色");
obj4.setAttrValueNameList("");
obj1.setProductAttrValueList(list3);
obj1.setProductDesc("产品描述");
obj1.setProductName("苹果手机");
obj1.setPurchaseChannel("CATALOG");
obj1.setRecommendation("产品详情");
obj1.setSourceCategoryId(123L);
obj1.setSourceCategoryName("生活用品");
obj1.setSourceInfo("{}");
obj1.setSourceType("ZKH");
obj1.setSourceValue("123");
obj1.setUnit("件");
obj1.setLeadPurOrg("0001");
req.setAccessProductDto(obj1);
AlibabaPurCmallGoodsSyncRequest.AccessGoodsDto obj5 = new AlibabaPurCmallGoodsSyncRequest.AccessGoodsDto();
obj5.setContractCode("A50202200001");
obj5.setDataSource("ZKH");
obj5.setIsApplyDirectoryMall("y");
obj5.setMinimumPurchaseQuantity("1");
List<AlibabaPurCmallGoodsSyncRequest.AccessQuotationDto> list7 = new ArrayList<AlibabaPurCmallGoodsSyncRequest.AccessQuotationDto>();
AlibabaPurCmallGoodsSyncRequest.AccessQuotationDto obj8 = new AlibabaPurCmallGoodsSyncRequest.AccessQuotationDto();
list7.add(obj8);
obj8.setCurrencyCode("CNY");
obj8.setEffectiveDate(StringUtils.parseDateTime("2022-04-01 10:00:00"));
obj8.setExpireDate(StringUtils.parseDateTime("2022-04-30 10:00:00"));
obj8.setLadderPrice(false);
List<AlibabaPurCmallGoodsSyncRequest.AccessLadderPriceDto> list11 = new ArrayList<AlibabaPurCmallGoodsSyncRequest.AccessLadderPriceDto>();
AlibabaPurCmallGoodsSyncRequest.AccessLadderPriceDto obj12 = new AlibabaPurCmallGoodsSyncRequest.AccessLadderPriceDto();
list11.add(obj12);
obj12.setOriginUnitPrice("12");
obj12.setUnitPrice("10.5");
obj12.setMinimumPurchaseQuantity("1");
list9.setLadderPriceList(list11);
List<AlibabaPurCmallGoodsSyncRequest.AccessSkuAttrValueDto> list15 = new ArrayList<AlibabaPurCmallGoodsSyncRequest.AccessSkuAttrValueDto>();
AlibabaPurCmallGoodsSyncRequest.AccessSkuAttrValueDto obj16 = new AlibabaPurCmallGoodsSyncRequest.AccessSkuAttrValueDto();
list15.add(obj16);
obj16.setAttrName("颜色");
obj16.setAttrValueName("红色");
list13.setSkuAttrValueList(list15);
obj8.setSourceSkuId("112");
obj8.setUnitPrice("10.5");
obj8.setOriginUnitPrice("12");
obj5.setQuotationList(list7);
obj5.setSourceValue("111");
obj5.setSupplierId(123L);
obj5.setTaxRate("6");
req.setAccessGoodsDto(obj5);
AlibabaPurCmallGoodsSyncResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_pur_cmall_goods_sync_response>
    <result>
        <is_success>true</is_success>
        <message>参数错误</message>
        <product_url>https://xxxx</product_url>
    </result>
</alibaba_pur_cmall_goods_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

返回
顶部