首页 > API调用场景 > 商品调用场景说明 > 商品发布API调用示例

商品发布API调用示例

1.通过老类目接口获取到的类目属性的话,放在props,新老接口可以参考这个链接:https://open.jd.com/home/home#/doc/common?listId=461

https://api.jd.com/routerjson?app_key=***&v=2.0&method=jingdong.ware.write.add×tamp=2018-06-22 10:07:25&access_token=***&360buy_param_json={"ware":{"outerId":1,"weight":2300,"venderId":0,"title":"\u6d4b\u8bd5A","height":10,"length":10,"barCode":"123","marketPrice":2300,"width":10,"categoryId":15119,"introduction":"\u5546\u54c1\u4ecb\u7ecd","images":[{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t24517\/184\/39825035\/692195\/da848975\/5b23790cN3e93eebd.png","colorId":"0000000000","imgIndex":1,"type":"com.jd.pop.ware.ic.api.domain.Image"},{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t20692\/55\/1259730580\/743537\/fdd8f5b8\/5b23790cN9e989912.png","colorId":"0000000000","imgIndex":2,"type":"com.jd.pop.ware.ic.api.domain.Image"},{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t20386\/336\/1235944826\/815136\/bc296f14\/5b23790cN3ab93628.png","colorId":"0000000000","imgIndex":3,"type":"com.jd.pop.ware.ic.api.domain.Image"},{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t21220\/283\/1262658180\/743537\/fdd8f5b8\/5b2379dfNbab66ea2.png","colorId":"0000000000","imgIndex":4,"type":"com.jd.pop.ware.ic.api.domain.Image"},{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t20389\/329\/1272989178\/849493\/9f470d28\/5b23790cN6072927e.png","colorId":"0000000000","imgIndex":5,"type":"com.jd.pop.ware.ic.api.domain.Image"}],"props":[{"attrid":"10147073","attrValues":["2\u53f7\u697c"]},{"attrid":"10147074","attrValues":["7\u5355\u5143"]},{"attrid":"10147076","attrValues":["402"]},{"attrid":"10147077","attrValues":["20"]},{"attrid":"10147078","attrValues":["16"]},{"attrid":"10144092","attrValues":["4"]},{"attrid":"10144099","attrValues":["10744488"]},{"attrid":"10144100","attrValues":["10744496","10744497","10744498"]},{"attrid":"10147086","attrValues":["20"]},{"attrid":"10144109","attrValues":["10744524","10744525"]},{"attrid":"147036","attrValues":["750900"]},{"attrid":"144052","attrValues":["744385"]},{"attrid":"144053","attrValues":["744391"]},{"attrid":"147041","attrValues":["750906"]},{"attrid":"144054","attrValues":["744395"]},{"attrid":"144055","attrValues":["744400"]},{"attrid":"144056","attrValues":["744411"]},{"attrid":"144057","attrValues":["744415"]},{"attrid":"144058","attrValues":["744416"]},{"attrid":"144060","attrValues":["744430"]},{"attrid":"147061","attrValues":["750931"]},{"attrid":"147067","attrValues":["750947"]}]},"skus":[{"@type":"com.jd.pop.ware.ic.api.domain.Sku","stockNum":1,"jdPrice":2300,"type":"com.jd.pop.ware.ic.api.domain.sku"}]}&sign=776918E51424B2517C635FD6CF4C49BA





2.如果通过无限级(新)类目接口获取到的类目属性,得放在multiCateProps这个里面

https://api.jd.com/routerjson?app_key=***&v=2.0&method=jingdong.ware.write.add×tamp=2018-06-22 10:07:25&access_token=***&360buy_param_json={"ware":{"outerId":1,"weight":2300,"venderId":0,"title":"\u6d4b\u8bd5A","height":10,"length":10,"barCode":"123","marketPrice":2300,"width":10,"categoryId":15119,"introduction":"\u5546\u54c1\u4ecb\u7ecd","images":[{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t24517\/184\/39825035\/692195\/da848975\/5b23790cN3e93eebd.png","colorId":"0000000000","imgIndex":1,"type":"com.jd.pop.ware.ic.api.domain.Image"},{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t20692\/55\/1259730580\/743537\/fdd8f5b8\/5b23790cN9e989912.png","colorId":"0000000000","imgIndex":2,"type":"com.jd.pop.ware.ic.api.domain.Image"},{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t20386\/336\/1235944826\/815136\/bc296f14\/5b23790cN3ab93628.png","colorId":"0000000000","imgIndex":3,"type":"com.jd.pop.ware.ic.api.domain.Image"},{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t21220\/283\/1262658180\/743537\/fdd8f5b8\/5b2379dfNbab66ea2.png","colorId":"0000000000","imgIndex":4,"type":"com.jd.pop.ware.ic.api.domain.Image"},{"@type":"com.jd.pop.ware.ic.api.domain.Image","imgUrl":"jfs\/t20389\/329\/1272989178\/849493\/9f470d28\/5b23790cN6072927e.png","colorId":"0000000000","imgIndex":5,"type":"com.jd.pop.ware.ic.api.domain.Image"}],"multiCateProps":[{"attrid":"10147073","attrValues":["2\u53f7\u697c"]},{"attrid":"10147074","attrValues":["7\u5355\u5143"]},{"attrid":"10147076","attrValues":["402"]},{"attrid":"10147077","attrValues":["20"]},{"attrid":"10147078","attrValues":["16"]},{"attrid":"10144092","attrValues":["4"]},{"attrid":"10144099","attrValues":["10744488"]},{"attrid":"10144100","attrValues":["10744496","10744497","10744498"]},{"attrid":"10147086","attrValues":["20"]},{"attrid":"10144109","attrValues":["10744524","10744525"]},{"attrid":"147036","attrValues":["750900"]},{"attrid":"144052","attrValues":["744385"]},{"attrid":"144053","attrValues":["744391"]},{"attrid":"147041","attrValues":["750906"]},{"attrid":"144054","attrValues":["744395"]},{"attrid":"144055","attrValues":["744400"]},{"attrid":"144056","attrValues":["744411"]},{"attrid":"144057","attrValues":["744415"]},{"attrid":"144058","attrValues":["744416"]},{"attrid":"144060","attrValues":["744430"]},{"attrid":"147061","attrValues":["750931"]},{"attrid":"147067","attrValues":["750947"]}]},"skus":[{"@type":"com.jd.pop.ware.ic.api.domain.Sku","stockNum":1,"jdPrice":2300,"type":"com.jd.pop.ware.ic.api.domain.sku"}]}&sign=776918E51424B2517C635FD6CF4C49BA