您的位置 : 文档中心 -> API信息

发布一个新商品,此API为国际站与1688通用。

API用户授权类型

需要授权

系统级输入参数

名称 类型 是否必须 描述
_aop_timestamp String 请求时间戳
_aop_signature String 请求签名
access_token String 用户授权令牌

应用级输入参数

名称 类型 是否必须 描述 示例值 默认值
productType String 商品类型,在线批发商品(wholesale)或者询盘商品(sourcing),1688网站缺省为wholesale wholesale
categoryID Long 类目ID,由相应类目API获取 123456
+ attributes alibaba.product.ProductAttribute[] 商品属性和属性值。若webSite=1688,此字段必填
groupID Long[] 分组ID,确定商品所属分组。1688可传入多个分组ID,国际站同一个商品只能属于一个分组,因此默认只取第一个 123456
subject String 商品标题,最多128个字符。标题内容将被系统切分作为关键字,因此API将不再单独提供关键字字段。 新款女装 立领套头毛衫
description String 商品详情描述,可包含图片中心的图片URL
language String 语种,参见FAQ 语种枚举值,1688网站默认传入CHINESE ENGLISH
periodOfValidity Integer 信息有效期,按天计算,国际站可不填 200
bizType Integer 业务类型。1:商品,2:加工,3:代理,4:合作,5:商务服务;不传入默认按照商品发布;国际站按默认商品。 1
pictureAuth Boolean 是否图片私密信息,国际站此字段无效 true true
+ image alibaba.product.ProductImageInfo 商品主图
+ skuInfos alibaba.product.ProductSKUInfo[] SKU信息,这里可传入多组信息
+ saleInfo alibaba.product.ProductSaleInfo 商品销售信息
+ shippingInfo alibaba.product.ProductShippingInfo 商品物流信息
+ internationalTradeInfo alibaba.product.ProductInternationalTradeInfo 商品国际贸易信息,1688无需处理此字段
webSite String 站点信息,指定调用的API是属于国际站(alibaba)还是1688网站(1688)

返回结果

名称 类型 是否必须 描述 示例值
productID Long 操作成功的情况下会返回商品ID 123456
errorMsg String 错误返回信息

返回结果

入参示例

  类目:121778003
attribute参数入参:[{"attributeID":"2600","attributeName":"适用性别","valueID":"3873886","value":"公","isCustom":"false"},{"attributeID":"7869","attributeName":"是否进口","valueID":"21959","value":"否","isCustom":"false"},{"attributeID":"143220385","attributeName":"是否专利货源","valueID":"21959","value":"否","isCustom":"false"},{"attributeID":"287","attributeName":"材质","valueID":"20213","value":"其他","isCustom":"false"},{"attributeID":"364","attributeName":"产品类别","valueID":"20213","value":"其他","isCustom":"false"},{"attributeID":"3216","attributeName":"颜色","valueID":"21961","value":"金","isCustom":"false"},{"attributeID":"450","attributeName":"尺码","valueID":"29828","value":"1号","isCustom":"false"},{"attributeID":"3216","attributeName":"颜色","valueID":"21962","value":"蓝","isCustom":"false"},{"attributeID":"450","attributeName":"尺码","valueID":"29829","value":"2号","isCustom":"false"}]
imges参数入参:{"images":["https://cbu01.alicdn.com/img/ibank/2017/701/130/4427031107_512067402.jpg"],"isWatermark":"true","isWatermarkFrame":"true","watermarkPosition":"center"}
skuInfo参数入参:[{"attributes":[{"attributeID":"3216","attributeValue":"金","attValueID":null,"customValueName":null,"skuImageUrl":null,"attributeDisplayName":null},{"attributeID":"450","attributeValue":"1号","attValueID":null,"customValueName":null,"skuImageUrl":null,"attributeDisplayName":null}],"amountOnSale":"200","retailPrice":"100.1","price":"100.1","cargoNumber":null,"priceRange":null,"skuCode":null,"skuId":null,"specId":null},{"attributes":[{"attributeID":"3216","attributeValue":"金","attValueID":null,"customValueName":null,"skuImageUrl":null,"attributeDisplayName":null},{"attributeID":"450","attributeValue":"2号","attValueID":null,"customValueName":null,"skuImageUrl":null,"attributeDisplayName":null}],"amountOnSale":"200","retailPrice":"100.1","price":"100.1","cargoNumber":null,"priceRange":null,"skuCode":null,"skuId":null,"specId":null}]
saleInfo参数入参:{"supportOnlineTrade":"true","mixWholeSale":"false","saleType":"normal","priceAuth":"false","amountOnSale":"100","unit":"件","retailPrice":28,"quoteType":"1","retailprice":"100","priceRanges":null,"minOrderQuantity":null,"batchNumber":null,"tax":null,"sellunit":null}
shippingInfo参数入参:{"freightTemplateID":"0","unitWeight":"0","packageSize":"10x20x50","volume":"0","handlingTime":"0","sendGoodsAddressId":"13075622"} 

错误码

错误码 错误描述 解决方案
系统错误 系统错误 attributes中必须包括类目的必传属性。包括必传的产品属性和规格属性,如果没有规格属性又要按照规格报价的话会出“系统错误”
无错误Case1 发布Offer 之后没有具体的规格信息 attributes的规格属性的值value必须和SKUInfo里面的attribute规格属性值attributeValue一致,否则当按规格报价时会出现offer发布成功,但是没有规格的情况。

API工具

SDK 示例