taobao.items.custom.get.tmall (根据外部ID取天猫商品)

跟据卖家设定的商品外部id获取商品 这个商品对应卖家从传入的session中获取,需要session绑定

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
fields String 必须 num_iid,sku,item_img,prop_img 需返回的字段列表,参考:Item商品结构体说明,其中barcode、sku.barcode等条形码字段暂不支持;多个字段之间用“,”分隔。
outer_id String 必须 123456 商品的外部商品ID,支持批量,最多不超过40个。

响应参数

名称 类型 示例值 描述
items Item [] 商品列表,具体返回字段以fields决定
  • └ iid
  • String
  • 13232
  • 商品iid
  • └ detail_url
  • String
  • http://item.taobao.com/item.htm?id=4947813209
  • 商品url
  • └ num_iid
  • Number
  • 1489161932
  • 商品数字id
  • └ title
  • String
  • Google test item
  • 商品标题,不能超过60字节
  • └ nick
  • String
  • tbtest561
  • 卖家昵称
  • └ type
  • String
  • fixed
  • 商品类型(fixed:一口价;auction:拍卖)注:取消团购
  • └ cid
  • Number
  • 132443
  • 商品所属的叶子类目 id
  • └ seller_cids
  • String
  • 2234445,3344466,446434
  • 商品所属的店铺内卖家自定义类目列表
  • └ props
  • String
  • 135255:344454
  • 商品属性 格式:pid:vid;pid:vid
  • └ input_pids
  • String
  • 2432,5353,656425
  • 用户自行输入的类目属性ID串。结构:"pid1,pid2,pid3",如:"20000"(表示品牌) 注:通常一个类目下用户可输入的关键属性不超过1个。
  • └ input_str
  • String
  • 耐克;耐克系列;科比系列;科比系列;2K5
  • 用户自行输入的子属性名和属性值,结构:"父属性值;一级子属性名;一级子属性值;二级子属性名;自定义输入值,....",如:“耐克;耐克系列;科比系列;科比系列;2K5”,input_str需要与input_pids一一对应,注:通常一个类目下用户可输入的关键属性不超过1个。所有属性别名加起来不能超过 3999字节。
  • └ desc
  • String
  • 这是一个好商品
  • 商品描述, 字数要大于5个字符,小于25000个字符
  • └ pic_url
  • String
  • http://img03.taobao.net/bao/uploaded/i3/T1HXdXXgPSt0JxZ2.8_070458.jpg
  • 商品主图片地址
  • └ num
  • Number
  • 8888
  • 商品数量
  • └ valid_thru
  • Number
  • 7
  • 有效期,7或者14(默认是7天)
  • └ list_time
  • Date
  • 2009-10-22 14:22:06
  • 上架时间(格式:yyyy-MM-dd HH:mm:ss)
  • └ delist_time
  • Date
  • 2000-01-01 00:00:00
  • 下架时间(格式:yyyy-MM-dd HH:mm:ss)
  • └ stuff_status
  • String
  • new
  • 商品新旧程度(全新:new,闲置:unused,二手:second)
  • location
  • Location
  • 商品所在地
  • └ state
  • String
  • 浙江
  • 所在省份(中文名称)
  • └ city
  • String
  • 杭州
  • 所在城市(中文名称)
  • └ price
  • String
  • 5.00
  • 商品价格,格式:5.00;单位:元;精确到:分
  • └ post_fee
  • String
  • 5.00
  • 平邮费用,格式:5.00;单位:元;精确到:分
  • └ express_fee
  • String
  • 5.00
  • 快递费用,格式:5.00;单位:元;精确到:分
  • └ ems_fee
  • String
  • 5.00
  • ems费用,格式:5.00;单位:元;精确到:分
  • └ has_discount
  • Boolean
  • true
  • 支持会员打折,true/false
  • └ freight_payer
  • String
  • seller
  • 运费承担方式,seller(卖家承担),buyer(买家承担)
  • └ has_invoice
  • Boolean
  • true
  • 是否有发票,true/false
  • └ has_warranty
  • Boolean
  • true
  • 是否有保修,true/false
  • └ has_showcase
  • Boolean
  • true
  • 橱窗推荐,true/false
  • └ modified
  • Date
  • 2000-01-01 00:00:00
  • 商品修改时间(格式:yyyy-MM-dd HH:mm:ss)
  • └ increment
  • String
  • 0
  • 加价幅度。如果为0,代表系统代理幅度。在竞拍中,为了超越上一个出价,会员需要在当前出价上增加金额,这个金额就是加价幅度。卖家在发布宝贝的时候可以自定义加价幅度,也可以让系统自动代理加价。系统自动代理加价的加价幅度随着当前出价金额的增加而增加,我们建议会员使用系统自动代理加价,并请买家在出价前看清楚加价幅度的具体金额。另外需要注意是,此功能只适用于拍卖的商品。以下是系统自动代理加价幅度表:当前价(加价幅度 )1-40( 1 )、41-100( 2 )、101-200(5 )、201-500 (10)、501-1001(15)、001-2000(25)、2001-5000(50)、5001-10000(100)10001以上 200
  • └ approve_status
  • String
  • onsale
  • 商品上传后的状态。onsale出售中,instock库中
  • └ violation
  • Boolean
  • true
  • 商品是否违规,违规:true , 不违规:false
  • └ postage_id
  • Number
  • 32
  • 宝贝所属的运费模板ID,如果没有返回则说明没有使用运费模板
  • └ product_id
  • Number
  • 85883030
  • 宝贝所属产品的id(可能为空). 该字段可以通过taobao.products.search 得到
  • └ auction_point
  • Number
  • 15
  • 商品的积分返点比例。如:5,表示:返点比例0.5%
  • └ property_alias
  • String
  • property
  • 属性值别名,比如颜色的自定义名称
  • item_imgs
  • ItemImg []
  • 商品图片列表(包括主图)。fields中只设置item_img可以返回ItemImg结构体中所有字段,如果设置为item_img.id、item_img.url、item_img.position等形式就只会返回相应的字段
  • └ id
  • Number
  • 1645920
  • 商品图片的id,和商品相对应(主图id默认为0)
  • └ url
  • String
  • http://img03.taobao.net/bao/uploaded/i3/T1HXdXXgPSt0JxZ2.8_070458.jpg
  • 图片链接地址
  • └ position
  • Number
  • 1
  • 图片放在第几张(多图时可设置)
  • prop_imgs
  • PropImg []
  • 商品属性图片列表。fields中只设置prop_img可以返回PropImg结构体中所有字段,如果设置为prop_img.id、prop_img.url、prop_img.properties、prop_img.position等形式就只会返回相应的字段
  • └ id
  • Number
  • 1646146
  • 属性图片的id,和商品相对应
  • └ url
  • String
  • http://img03.taobao.net/bao/uploaded/i3/T1HXdXXgPSt0JxZ2.8_070458.jpg
  • 图片链接地址
  • └ properties
  • String
  • 1627207:28326
  • 图片所对应的属性组合的字符串
  • └ position
  • Number
  • 1
  • 图片放在第几张(多图时可设置)
  • skus
  • Sku []
  • Sku列表。fields中只设置sku可以返回Sku结构体中所有字段,如果设置为sku.sku_id、sku.properties、sku.quantity等形式就只会返回相应的字段
  • └ sku_id
  • Number
  • 123
  • sku的id
  • └ properties
  • String
  • 1243:1215;5626:5125
  • sku的销售属性组合字符串(颜色,大小,等等,可通过类目API获取某类目下的销售属性),格式是p1:v1;p2:v2
  • └ properties_name
  • String
  • 20000:3275069:品牌:盈讯;1753146:3485013:型号:F908;-1234:-5678:自定义属性1:属性值1
  • sku所对应的销售属性的中文名字串,格式如:pid1:vid1:pid_name1:vid_name1;pid2:vid2:pid_name2:vid_name2……
  • └ quantity
  • Number
  • 3
  • 属于这个sku的商品的数量,
  • └ price
  • String
  • 200.07
  • 属于这个sku的商品的价格 取值范围:0-100000000;精确到2位小数;单位:元。如:200.07,表示:200元7分。
  • └ outer_id
  • String
  • 12345
  • 商家设置的外部id。天猫和集市的卖家,需要登录才能获取到自己的商家编码,不能获取到他人的商家编码。
  • └ created
  • String
  • 2009-11-04 15:24:43
  • sku创建日期 时间格式:yyyy-MM-dd HH:mm:ss
  • └ modified
  • String
  • 2009-11-04 15:24:43
  • sku最后修改日期 时间格式:yyyy-MM-dd HH:mm:ss
  • └ with_hold_quantity
  • Number
  • 100
  • 商品在付款减库存的状态下,该sku上未付款的订单数量
  • └ outer_id
  • String
  • 34143554352
  • 商家外部编码(可与商家外部系统对接)。需要授权才能获取。
  • └ is_virtual
  • Boolean
  • true
  • 虚拟商品的状态字段
  • └ is_taobao
  • Boolean
  • true
  • 是否在淘宝显示
  • └ is_ex
  • Boolean
  • true
  • 是否在外部网店显示
  • videos
  • Video []
  • 商品视频列表(目前只支持单个视频关联)。fields中只设置video可以返回Video结构体中所有字段,如果设置为video.id、video.video_id、video.url等形式就只会返回相应的字段
  • └ id
  • Number
  • 123456
  • 视频关联记录的id,和商品相对应
  • └ video_id
  • Number
  • 123456
  • video的id,对应于视频在淘秀的存储记录
  • └ url
  • String
  • http://js.tudouui.com/bin/taobaoisv/TaoBaoPlayer.swf……
  • video的url连接地址。淘秀里视频记录里面存储的url地址
  • └ created
  • Date
  • 2000-01-01 00:00:00
  • 视频关联记录创建时间(格式:yyyy-MM-dd HH:mm:ss)
  • └ modified
  • Date
  • 2000-01-01 00:00:00
  • 视频关联记录修改时间(格式:yyyy-MM-dd HH:mm:ss)
  • └ is_3D
  • Boolean
  • true
  • 是否是3D淘宝的商品
  • └ one_station
  • Boolean
  • true
  • 是否淘1站商品
  • └ second_kill
  • String
  • web_only
  • 秒杀商品类型。打上秒杀标记的商品,用户只能下架并不能再上架,其他任何编辑或删除操作都不能进行。如果用户想取消秒杀标记,需要联系小二进行操作。如果秒杀结束需要自由编辑请联系活动负责人(小二)去掉秒杀标记。可选类型web_only(只能通过web网络秒杀)wap_only(只能通过wap网络秒杀)web_and_wap(既能通过web秒杀也能通过wap秒杀)
  • └ auto_fill
  • String
  • time_card
  • 代充商品类型。在代充商品的类目下,不传表示不标记商品类型(交易搜索中就不能通过标记搜到相关的交易了)。可选类型: no_mark(不做类型标记) time_card(点卡软件代充) fee_card(话费软件代充)
  • └ features
  • String
  • ;tags:3522,7234;source:sell;sp:2;
  • 宝贝特征值,只有在Top支持的特征值才能保存到宝贝上
  • └ global_stock_type
  • String
  • 1
  • 全球购商品采购地信息(库存类型),有两种库存类型:现货和代购;参数值为1时代表现货,值为2时代表代购
  • └ global_stock_country
  • String
  • 美国
  • 全球购商品采购地信息(地区/国家),代表全球购商品的产地信息。
  • └ global_stock_delivery_place
  • String
  • 1
  • 全球购商品发货地,发货地现在有两种类型:“国内”和“海外及港澳台”,参数值为1时代表“国内”,值为2时代表“海外及港澳台”
  • └ global_stock_tax_free_promise
  • Boolean
  • false
  • 全球购商品卖家包税承诺,当值为true时,代表卖家承诺包税。
  • locality_life
  • LocalityLife
  • 本地生活电子交易凭证业务,目前此字段只涉及到的信息为有效期:如果有效期为起止日期类型,此值为2012-08-06,2012-08-16如果有效期为【购买成功日 至】类型则格式为2012-08-16如果有效期为天数类型则格式为3
  • └ expirydate
  • String
  • 2012-08-06,2012-08-16
  • 电子交易凭证有效期,有三种格式:如果有效期为起止日期类型,此值为2012-08-06,2012-08-16 如果有效期为【购买成功日 至】类型则格式为2012-08-16如果有效期为天数类型则格式为15
  • └ network_id
  • String
  • 5645746
  • 网点ID,在参数empty_fields里设置locality_life.network_id可删除网点ID
  • └ merchant
  • String
  • 56879:码商X
  • 格式为 码商id:nick
  • └ verification
  • String
  • 1
  • 核销打款:1代表核销打款,0代表非核销打款;在参数empty_fields里设置locality_life.verification可删除核销打款
  • └ refund_ratio
  • Number
  • 50
  • 退款比例,百分比%前的数字,1-100的正整数值;在参数empty_fields里设置locality_life.refund_ratio可删除退款比例
  • └ obs
  • String
  • 1
  • 预约门店是否支持门店自提,1:是
  • └ version
  • String
  • 1
  • 电子凭证版本:新版电子凭证:1,旧版不填值
  • └ packageid
  • String
  • 1234
  • 新版电子凭证包 id
  • └ custom_made_type_id
  • String
  • 1
  • 定制工具Id
  • food_security
  • FoodSecurity
  • 食品安全信息,包括:生产许可证编号、产品标准号、厂名、厂址等
  • └ prd_license_no
  • String
  • QS410006010388
  • 生产许可证号
  • └ design_code
  • String
  • Q/DHL.001-2008
  • 产品标准号
  • └ factory
  • String
  • 远东恒天然乳品有限公司
  • 厂名
  • └ factory_site
  • String
  • 台北市仁爱路4段85号
  • 厂址
  • └ contact
  • String
  • 00800-021216
  • 厂家联系方式
  • └ mix
  • String
  • 有机乳糖、有机植物油
  • 配料表
  • └ plan_storage
  • String
  • 常温
  • 储藏方法
  • └ period
  • String
  • 2年
  • 保质期
  • └ food_additive
  • String
  • 磷脂 、膨松剂
  • 食品添加剂
  • └ supplier
  • String
  • 深圳岸通商贸有限公司
  • 供货商
  • └ product_date_start
  • String
  • 2012-06-01
  • 生产开始日期
  • └ product_date_end
  • String
  • 2012-06-10
  • 生产结束日期
  • └ stock_date_start
  • String
  • 2012-06-20
  • 进货开始日期,要在生产日期之后
  • └ stock_date_end
  • String
  • 2012-06-30
  • 进货结束日期,要在生产日期之后
  • └ health_product_no
  • String
  • 卫食健字(1997)第167号
  • 健字号,保健品/膳食营养补充剂 这个类目下特有的信息,此类目下无需填写生产许可证编号(QS),如果填写了生产许可证编号(QS)将被忽略不保存;保存宝贝时,标题前会自动加上健字号产品名称一起作为宝贝标题;
  • └ qualification
  • String
  • %7B%22checked%22%3A%22checked%22%2C%22iq_field_item_pack_image%22%3A%22http%3A%2F%
  • 商品资质的信息,用URLEncoder做过转换,使用时,需要URLDecoder转换回来,默认字符集为:UTF-8
  • └ with_hold_quantity
  • Number
  • 12
  • 预扣库存,即付款减库存的商品现在有多少处于未付款状态的订单
  • └ desc_modules
  • String
  • [{"module_id":123,"module_name":"模特图","type":"cat_mod","content":"模特要漂亮一点拜托"},{"module_id":null,"module_name":"店主最漂亮","type":"usr_mod","content":"老娘全网最美"}]
  • 商品描述模块化,模块列表,由List转化成jsonArray存入,后端逻辑验证通过,拼装成模块内容+锚点导航后存入desc中。数据结构具体参见Item_Desc_Module
  • └ sell_point
  • String
  • 2013新款 时尚 前卫
  • 商品卖点信息,天猫商家使用字段,最长150个字符。
  • delivery_time
  • DeliveryTime
  • 发货时间信息
  • └ need_delivery_time
  • String
  • none/item/sku
  • 设置是否使用发货时间,商品级别,sku级别
  • └ delivery_time_type
  • String
  • absolute,relative
  • 发货时间类型:绝对发货时间或者相对发货时间
  • └ delivery_time
  • String
  • 2013-11-11
  • 商品级别设置的发货时间。设置了商品级别的发货时间,相对发货时间,则填写相对发货时间的天数(大于3);绝对发货时间,则填写yyyy-mm-dd格式,如2013-11-11
  • skus_delivery_time_list
  • SkusDeliveryTime []
  • 发货时间列表
  • └ sku_delivery_time
  • String
  • 2012-06-01
  • sku时间
  • └ sku_id
  • Number
  • 123
  • 商品skuId
  • └ is_cspu
  • Boolean
  • true
  • 是否为达尔文挂接成功了的商品
  • cuntao_item_specific
  • CuntaoItemSpecific
  • 村淘特有商品级数据结构
  • └ kick_back_rate
  • String
  • 3.3即3.3%
  • 村淘商品级佣金率

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
ItemsCustomGetTmallRequest req = new ItemsCustomGetTmallRequest();
req.setFields("num_iid,sku,item_img,prop_img");
req.setOuterId("123456");
ItemsCustomGetTmallResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<items_custom_get_tmall_response>
    <items>
        <item>
            <iid>13232</iid>
            <detail_url>http://item.taobao.com/item.htm?id=4947813209</detail_url>
            <num_iid>1489161932</num_iid>
            <title>Google test item</title>
            <nick>tbtest561</nick>
            <type>fixed</type>
            <cid>132443</cid>
            <seller_cids>2234445,3344466,446434</seller_cids>
            <props>135255:344454</props>
            <input_pids>2432,5353,656425</input_pids>
            <input_str>耐克;耐克系列;科比系列;科比系列;2K5</input_str>
            <desc>这是一个好商品</desc>
            <pic_url>http://img03.taobao.net/bao/uploaded/i3/T1HXdXXgPSt0JxZ2.8_070458.jpg</pic_url>
            <num>8888</num>
            <valid_thru>7</valid_thru>
            <list_time>2009-10-22 14:22:06</list_time>
            <delist_time>2000-01-01 00:00:00</delist_time>
            <stuff_status>new</stuff_status>
            <location>
                <state>浙江</state>
                <city>杭州</city>
            </location>
            <price>5.00</price>
            <post_fee>5.00</post_fee>
            <express_fee>5.00</express_fee>
            <ems_fee>5.00</ems_fee>
            <has_discount>true</has_discount>
            <freight_payer>seller</freight_payer>
            <has_invoice>true</has_invoice>
            <has_warranty>true</has_warranty>
            <has_showcase>true</has_showcase>
            <modified>2000-01-01 00:00:00</modified>
            <increment>0</increment>
            <approve_status>onsale</approve_status>
            <violation>true</violation>
            <postage_id>32</postage_id>
            <product_id>85883030</product_id>
            <auction_point>15</auction_point>
            <property_alias>property</property_alias>
            <item_imgs>
                <item_img>
                    <id>1645920</id>
                    <url>http://img03.taobao.net/bao/uploaded/i3/T1HXdXXgPSt0JxZ2.8_070458.jpg</url>
                    <position>1</position>
                </item_img>
            </item_imgs>
            <prop_imgs>
                <prop_img>
                    <id>1646146</id>
                    <url>http://img03.taobao.net/bao/uploaded/i3/T1HXdXXgPSt0JxZ2.8_070458.jpg</url>
                    <properties>1627207:28326</properties>
                    <position>1</position>
                </prop_img>
            </prop_imgs>
            <skus>
                <sku>
                    <sku_id>123</sku_id>
                    <properties>1243:1215;5626:5125</properties>
                    <properties_name>20000:3275069:品牌:盈讯;1753146:3485013:型号:F908;-1234:-5678:自定义属性1:属性值1</properties_name>
                    <quantity>3</quantity>
                    <price>200.07</price>
                    <outer_id>12345</outer_id>
                    <created>2009-11-04 15:24:43</created>
                    <modified>2009-11-04 15:24:43</modified>
                    <with_hold_quantity>100</with_hold_quantity>
                </sku>
            </skus>
            <outer_id>34143554352</outer_id>
            <is_virtual>true</is_virtual>
            <is_taobao>true</is_taobao>
            <is_ex>true</is_ex>
            <videos>
                <video>
                    <id>123456</id>
                    <video_id>123456</video_id>
                    <url>http://js.tudouui.com/bin/taobaoisv/TaoBaoPlayer.swf……</url>
                    <created>2000-01-01 00:00:00</created>
                    <modified>2000-01-01 00:00:00</modified>
                </video>
            </videos>
            <is_3D>true</is_3D>
            <one_station>true</one_station>
            <second_kill>web_only</second_kill>
            <auto_fill>time_card</auto_fill>
            <features>;tags:3522,7234;source:sell;sp:2;</features>
            <global_stock_type>1</global_stock_type>
            <global_stock_country>美国</global_stock_country>
            <global_stock_delivery_place>1</global_stock_delivery_place>
            <global_stock_tax_free_promise>false</global_stock_tax_free_promise>
            <locality_life>
                <expirydate>2012-08-06,2012-08-16</expirydate>
                <network_id>5645746</network_id>
                <merchant>56879:码商X</merchant>
                <verification>1</verification>
                <refund_ratio>50</refund_ratio>
                <obs>1</obs>
                <version>1</version>
                <packageid>1234</packageid>
            </locality_life>
            <custom_made_type_id>1</custom_made_type_id>
            <food_security>
                <prd_license_no>QS410006010388</prd_license_no>
                <design_code>Q/DHL.001-2008</design_code>
                <factory>远东恒天然乳品有限公司</factory>
                <factory_site>台北市仁爱路4段85号</factory_site>
                <contact>00800-021216</contact>
                <mix>有机乳糖、有机植物油</mix>
                <plan_storage>常温</plan_storage>
                <period>2年</period>
                <food_additive>磷脂 、膨松剂</food_additive>
                <supplier>深圳岸通商贸有限公司</supplier>
                <product_date_start>2012-06-01</product_date_start>
                <product_date_end>2012-06-10</product_date_end>
                <stock_date_start>2012-06-20</stock_date_start>
                <stock_date_end>2012-06-30</stock_date_end>
                <health_product_no>卫食健字(1997)第167号</health_product_no>
            </food_security>
            <qualification>%7B%22checked%22%3A%22checked%22%2C%22iq_field_item_pack_image%22%3A%22http%3A%2F%</qualification>
            <with_hold_quantity>12</with_hold_quantity>
            <desc_modules>[{&quot;module_id&quot;:123,&quot;module_name&quot;:&quot;模特图&quot;,&quot;type&quot;:&quot;cat_mod&quot;,&quot;content&quot;:&quot;模特要漂亮一点拜托&quot;},{&quot;module_id&quot;:null,&quot;module_name&quot;:&quot;店主最漂亮&quot;,&quot;type&quot;:&quot;usr_mod&quot;,&quot;content&quot;:&quot;老娘全网最美&quot;}]</desc_modules>
            <sell_point>2013新款 时尚 前卫</sell_point>
            <delivery_time>
                <need_delivery_time>none/item/sku</need_delivery_time>
                <delivery_time_type>absolute,relative</delivery_time_type>
                <delivery_time>2013-11-11</delivery_time>
                <skus_delivery_time_list>
                    <skus_delivery_time>
                        <sku_delivery_time>2012-06-01</sku_delivery_time>
                        <sku_id>123</sku_id>
                    </skus_delivery_time>
                </skus_delivery_time_list>
            </delivery_time>
            <is_cspu>true</is_cspu>
            <cuntao_item_specific>
                <kick_back_rate>3.3即3.3%</kick_back_rate>
            </cuntao_item_specific>
        </item>
    </items>
</items_custom_get_tmall_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

返回
顶部