alibaba.alsc.items.list (本地生活商品查询接口)

本地生活统一对外的商品查询接口,包括商品基本信息,库存,销量,价格,爆爆团价格

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
item_info_request ItemInfoRequest 必须 请求体
  • └ include_sales_volume
  • Boolean
  • 可选
  • false
  • 是否需要咨询销量信息
  • └ biz_scene
  • String
  • 必须
  • ITEM_RELATION
  • 场景码 (需要申请)
  • └ city_id
  • String
  • 可选
  • 310100
  • 城市ID,includePrice=true时需要
  • └ tt_id
  • String
  • 可选
  • huawei_store@alipay_android_10.2.10.7020
  • ttid
  • └ user_id
  • String
  • 可选
  • 1105497998
  • 用户id
  • item_info_request_detail_list
  • ItemInfoRequestDetail []
  • 可选
  • 请求商品明细
  • └ item_id
  • Number
  • 必须
  • 2300952215831
  • 商品id
  • └ channel
  • String
  • 可选
  • BAO_BAO_TUAN
  • 渠道列表(includePrice=true时需要,否则可能无法咨询出对应价格)
  • └ include_price
  • Boolean
  • 可选
  • false
  • 是否需要咨询商品价格
  • └ sales_volume_type
  • String
  • 可选
  • TOTAL_SALES
  • 销量查询类型("TOTAL_SALES","总销量")
  • └ include_alsc_item_detail_fields
  • String
  • 可选
  • false
  • 是否需要返回商品详情模型字段

响应参数

名称 类型 示例值 描述
result Result 接口返回model
  • └ success
  • Boolean
  • true
  • 是否成功
  • item_infos
  • ItemsInfo []
  • 商品信息集合
  • └ sell_price_cent
  • Number
  • 1000
  • 售价,单位分
  • └ original_price_cent
  • Number
  • 234
  • 原价,单位分
  • └ item_type
  • String
  • TICKET_ITEM
  • 商品大类 卡券类、菜品、预订
  • sales_volume
  • SalesVolume
  • 销量模型
  • └ activity_total_sales
  • Number
  • 1234
  • 活动总销量(查询活动总销量时返回)
  • └ activity_daily_sales
  • Number
  • 345
  • 活动日销量(查询活动日销量时返回)
  • └ pre_sale_total_sales
  • Number
  • 45
  • 预售总销量
  • └ total_sales
  • Number
  • 4566
  • 总销量
  • inventory_list
  • InventoryList []
  • 库存模型
  • └ total_quantity
  • Number
  • 1000
  • 总库存
  • └ daily_sellable_quantity
  • Number
  • 500
  • type为活动时有效,活动的日剩余库存
  • └ daily_total_quantity
  • Number
  • 400
  • ype为活动时有效,活动的日总库存
  • └ type
  • String
  • DAILY
  • 库存类型,包括日常库存、渠道库存
  • └ sellable_quantity
  • Number
  • 3
  • 剩余库存
  • └ channel_code
  • String
  • demo
  • 渠道code,type为活动库存时有效
  • └ item_sub_type
  • String
  • TRADE_VOUCHER
  • 商品子类型 如: 套餐、代金、权益包
  • └ short_title
  • String
  • 商品
  • 商品短标题
  • └ title
  • String
  • 3份WdTest1579074555246
  • 商品名称
  • └ item_client_type
  • String
  • TIME_CARD
  • c端商品类型
  • price_list
  • PriceList []
  • 价格模型
  • └ detail_un_available_code
  • String
  • demo
  • 未通过原因明细编码
  • price_detail
  • PriceDetail
  • 价格明细
  • └ discount_rate
  • String
  • 4.45
  • 活动折扣值=活动价/现价(四舍五入取两位小数向上取整, 如8.155折=8.16折)
  • └ actual_sell_price
  • Number
  • 1000
  • 真实售价,即优惠后的价格
  • └ discount_fee
  • Number
  • 100
  • 补贴金额
  • └ buyer_total_limit
  • Number
  • 30
  • 买家总限购份数
  • └ reduce_amount
  • Number
  • 40
  • 再减金额,priceType为PRESALE有值
  • └ discount_price
  • Number
  • 50
  • 活动价(单位:分)
  • └ sell_price
  • Number
  • 1000
  • 展示售价, priceType为DAILY或ACTIVITY且再减时为IC现价 priceType为PRESALE为预售价
  • └ buyer_daily_limit
  • Number
  • 45
  • 买家日限购份数,活动日限购
  • └ buy_limit
  • Number
  • -1
  • 限购份数,卖家和买家限购取最小,-1表示不限购
  • └ tail_amount
  • Number
  • 34
  • 尾款,priceType为PRESALE有值
  • └ seller_buy_limit
  • Number
  • 45
  • 卖家总限购份数,前N件需求
  • └ buyer_detail_remain_limit
  • Number
  • 45
  • 买家商品详情限购剩余值
  • └ book_amount
  • Number
  • 56
  • 定金,priceType为PRESALE有值
  • └ inventory_code
  • String
  • demo
  • 渠道code
  • └ seller_total_limit
  • Number
  • 56
  • 卖家总限购份数,活动总限购
  • └ seller_daily_limit
  • Number
  • 65
  • 卖家日限购份数,活动日限购
  • └ seller_daily_remain_limit
  • Number
  • 34
  • 商品剩余日库存
  • └ item_detail_remain_limit
  • Number
  • 45
  • 商品剩余活动总库存
  • └ buyer_detail_daily_remain_limit
  • Number
  • 23
  • 买家每日商品详情限购剩余值
  • └ buyer_activity_remain_limit
  • Number
  • 45
  • 买家活动限购剩余值
  • └ buyer_activity_limit
  • Number
  • 45
  • 买家活动限购
  • └ available
  • Boolean
  • false
  • 是否可用
  • └ channel
  • String
  • demo
  • 价格渠道
  • └ sub_type
  • String
  • demo
  • 子类型【c端添加】,目前只有类型为大促时有值
  • └ type
  • String
  • STANDARD
  • 类型【c端添加】,大牌、大促、会员、日常活动、标准
  • └ un_available_code
  • String
  • INVENTORY_NOT_ENOUGH
  • 未通过原因编码
  • └ un_available_msg
  • String
  • 库存不足
  • 未通过原因描述
  • └ detail_un_available_msg
  • String
  • demo
  • 未通过原因明细描述
  • └ cover
  • String
  • https://img.daily.taobaocdn.net/i3/3846021155/O1CN011KP1ogVjlwEEndx_!!3846021155-0-koubei.jpg
  • 主图,封面图
  • └ buy_limit
  • Number
  • 1
  • 聚合最小限购份数,包括每天限购和售卖周期限购,-1表示不限购
  • └ gmt_end
  • String
  • 1665474556000
  • 结束售卖时间
  • └ item_status
  • String
  • PAUSE
  • 商品状态
  • images
  • Images []
  • 图片相册
  • └ name
  • String
  • 主图
  • 图片名称
  • └ url
  • String
  • https://img.daily.taobaocdn.net/i3/3846021155/O1CN011KP1ogVjlwEEndx_!!3846021155-0-koubei.jpg
  • 图片链接)
  • └ currency_symbol
  • String
  • 货币符号
  • └ gmt_start
  • String
  • 1579074556000
  • 起始售卖时间
  • alsc_item_detail_fields
  • AlscItemDetailFields
  • 商品详情部分信息
  • item_content
  • ItemContent
  • 商品详情
  • item_content_groups
  • ItemContentGroups []
  • 商品内容详情组
  • └ dish_select_mode
  • String
  • demo
  • n选m、是否可重复选模型
  • └ title
  • String
  • 勿动-自动化单品
  • 详情组标题
  • content_details
  • ContentDetails []
  • 组内详情列表
  • └ sum_price
  • String
  • 100.00
  • 小计金额=数量*单价
  • └ unit_desc
  • String
  • 单位描述
  • └ quantity
  • Number
  • 1
  • 数量
  • └ price
  • String
  • 100.00
  • 单价
  • └ name
  • String
  • 勿动-自动化单品菜
  • 名称
  • └ spec
  • String
  • demo
  • 规格
  • image_texts
  • ImageTexts []
  • 图文详情
  • └ urls
  • String []
  • 图片列表
  • └ title
  • String
  • 勿动-自动化单品菜
  • 图文标题
  • └ desc
  • String
  • 勿动!!
  • 描述
  • └ memo_list
  • String []
  • 补充说明
  • buy_notes
  • BuyNotes
  • 商品购买须知
  • └ park_fee_per_hour
  • String
  • 5
  • 停车收费金额
  • └ supply_invoice
  • Boolean
  • true
  • 提供发票
  • └ reserve_type
  • String
  • MOBILE
  • 预约类型
  • └ park_fee_upper_bound_per_day
  • String
  • 12
  • 每段时间的封顶金额 例如 24小时封顶xx元
  • extra_note_list
  • ExtraNoteList []
  • 更多须知内容
  • └ title
  • String
  • demo
  • 标题
  • └ remarks
  • String []
  • 内容
  • └ invoice_types
  • String []
  • 发票类型:电子:ELECTRONIC_INVOICE:电子 ,纸质: PAPER_INVOICE
  • └ free_wifi
  • Boolean
  • true
  • 是否有免费wifi
  • └ free_park
  • Boolean
  • true
  • 是否免费停车
  • └ free_park_hours
  • Number
  • 2
  • 免费停车小时数
  • └ need_reserve
  • Boolean
  • true
  • 是否需要预约
  • └ reserve_note
  • String
  • 预约说明
  • └ limit_user_num
  • Boolean
  • false
  • 是否限制人数
  • └ user_num_limited
  • Number
  • 5
  • 限制多少人使用
  • ticket
  • TicketDo
  • 凭证模型
  • ticket_period
  • TicketPeriod
  • 凭证有效期
  • └ validity_period
  • Number
  • 14
  • 相对有效期,单位:天
  • └ validity_period_type
  • String
  • RELATIVE
  • 有效周期类型FIXED:绝对方式;RELATIVE:相对方式
  • └ range_from
  • String
  • 1579074556000
  • 有效期起始时间
  • └ range_to
  • String
  • 1579074557000
  • 有效期结束时间
  • ticket_time_rules
  • TicketTimeRuleDo []
  • 凭证使用时间规则
  • └ rule_apply_mode
  • String
  • EX
  • 时间规则生效模式,IN:包含,EX:排除
  • └ hour_min_rule
  • String
  • 10:00~12:00^14:00~16:00
  • 时分维度的规则,多组用^分隔,每组用"~"分隔时间段
  • └ week_rule
  • String
  • 1~7
  • 星期维度的规则,周一到周日分别是:1~7,多组用^分隔
  • └ date_rule
  • String
  • 2019-01-01~2019-01-10^2019-01-11~2019-01-21
  • 日维度的规则:某天到某天,多组用^分隔,每组用"~"分隔时间段
  • └ category_id
  • Number
  • 147496404
  • 商品后台类目id
  • └ use_times
  • Number
  • 3
  • 可核销次数,当itemClientType为次卡>1
  • └ error_code
  • String
  • QUERY_BATCH_ITEM_FAILED
  • 错误码
  • └ error_msg
  • String
  • 不合法
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAlscItemsListRequest req = new AlibabaAlscItemsListRequest();
AlibabaAlscItemsListRequest.ItemInfoRequest obj1 = new AlibabaAlscItemsListRequest.ItemInfoRequest();
obj1.setIncludeSalesVolume(false);
obj1.setBizScene("ITEM_RELATION");
obj1.setCityId("310100");
obj1.setTtId("huawei_store@alipay_android_10.2.10.7020");
obj1.setUserId("1105497998");
List<AlibabaAlscItemsListRequest.ItemInfoRequestDetail> list3 = new ArrayList<AlibabaAlscItemsListRequest.ItemInfoRequestDetail>();
AlibabaAlscItemsListRequest.ItemInfoRequestDetail obj4 = new AlibabaAlscItemsListRequest.ItemInfoRequestDetail();
list3.add(obj4);
obj4.setItemId(2300952215831L);
obj4.setChannel("BAO_BAO_TUAN");
obj1.setItemInfoRequestDetailList(list3);
obj1.setIncludePrice(false);
obj1.setSalesVolumeType("TOTAL_SALES");
obj1.setIncludeAlscItemDetailFields("false");
req.setItemInfoRequest(obj1);
AlibabaAlscItemsListResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<alibaba_alsc_items_list_response>
    <result>
        <success>true</success>
        <item_infos>
            <items_info>
                <sell_price_cent>1000</sell_price_cent>
                <original_price_cent>234</original_price_cent>
                <item_type>TICKET_ITEM</item_type>
                <sales_volume>
                    <activity_total_sales>1234</activity_total_sales>
                    <activity_daily_sales>345</activity_daily_sales>
                    <pre_sale_total_sales>45</pre_sale_total_sales>
                    <total_sales>4566</total_sales>
                </sales_volume>
                <inventory_list>
                    <inventory_list>
                        <total_quantity>1000</total_quantity>
                        <daily_sellable_quantity>500</daily_sellable_quantity>
                        <daily_total_quantity>400</daily_total_quantity>
                        <type>DAILY</type>
                        <sellable_quantity>3</sellable_quantity>
                        <channel_code>demo</channel_code>
                    </inventory_list>
                </inventory_list>
                <item_sub_type>TRADE_VOUCHER</item_sub_type>
                <short_title>商品</short_title>
                <title>3份WdTest1579074555246</title>
                <item_client_type>TIME_CARD</item_client_type>
                <price_list>
                    <price_list>
                        <detail_un_available_code>demo</detail_un_available_code>
                        <price_detail>
                            <discount_rate>4.45</discount_rate>
                            <actual_sell_price>1000</actual_sell_price>
                            <discount_fee>100</discount_fee>
                            <buyer_total_limit>30</buyer_total_limit>
                            <reduce_amount>40</reduce_amount>
                            <discount_price>50</discount_price>
                            <sell_price>1000</sell_price>
                            <buyer_daily_limit>45</buyer_daily_limit>
                            <buy_limit>-1</buy_limit>
                            <tail_amount>34</tail_amount>
                            <seller_buy_limit>45</seller_buy_limit>
                            <buyer_detail_remain_limit>45</buyer_detail_remain_limit>
                            <book_amount>56</book_amount>
                            <inventory_code>demo</inventory_code>
                            <seller_total_limit>56</seller_total_limit>
                            <seller_daily_limit>65</seller_daily_limit>
                            <seller_daily_remain_limit>34</seller_daily_remain_limit>
                            <item_detail_remain_limit>45</item_detail_remain_limit>
                            <buyer_detail_daily_remain_limit>23</buyer_detail_daily_remain_limit>
                            <buyer_activity_remain_limit>45</buyer_activity_remain_limit>
                            <buyer_activity_limit>45</buyer_activity_limit>
                        </price_detail>
                        <available>false</available>
                        <channel>demo</channel>
                        <sub_type>demo</sub_type>
                        <type>STANDARD</type>
                        <un_available_code>INVENTORY_NOT_ENOUGH</un_available_code>
                        <un_available_msg>库存不足</un_available_msg>
                        <detail_un_available_msg>demo</detail_un_available_msg>
                    </price_list>
                </price_list>
                <cover>https://img.daily.taobaocdn.net/i3/3846021155/O1CN011KP1ogVjlwEEndx_!!3846021155-0-koubei.jpg</cover>
                <buy_limit>1</buy_limit>
                <gmt_end>1665474556000</gmt_end>
                <item_status>PAUSE</item_status>
                <images>
                    <images>
                        <name>主图</name>
                        <url>https://img.daily.taobaocdn.net/i3/3846021155/O1CN011KP1ogVjlwEEndx_!!3846021155-0-koubei.jpg</url>
                    </images>
                </images>
                <currency_symbol>¥</currency_symbol>
                <gmt_start>1579074556000</gmt_start>
                <alsc_item_detail_fields>
                    <item_content>
                        <item_content_groups>
                            <item_content_groups>
                                <dish_select_mode>demo</dish_select_mode>
                                <title>勿动-自动化单品</title>
                                <content_details>
                                    <content_details>
                                        <sum_price>100.00</sum_price>
                                        <unit_desc>元</unit_desc>
                                        <quantity>1</quantity>
                                        <price>100.00</price>
                                        <name>勿动-自动化单品菜</name>
                                        <spec>demo</spec>
                                    </content_details>
                                </content_details>
                            </item_content_groups>
                        </item_content_groups>
                        <image_texts>
                            <image_texts>
                                <urls>
                                    <string></string>
                                </urls>
                                <title>勿动-自动化单品菜</title>
                                <desc>勿动!!</desc>
                            </image_texts>
                        </image_texts>
                        <memo_list>
                            <string></string>
                        </memo_list>
                    </item_content>
                    <buy_notes>
                        <park_fee_per_hour>5</park_fee_per_hour>
                        <supply_invoice>true</supply_invoice>
                        <reserve_type>MOBILE</reserve_type>
                        <park_fee_upper_bound_per_day>12</park_fee_upper_bound_per_day>
                        <extra_note_list>
                            <extra_note_list>
                                <title>demo</title>
                                <remarks>
                                    <string></string>
                                </remarks>
                            </extra_note_list>
                        </extra_note_list>
                        <invoice_types>
                            <string></string>
                        </invoice_types>
                        <free_wifi>true</free_wifi>
                        <free_park>true</free_park>
                        <free_park_hours>2</free_park_hours>
                        <need_reserve>true</need_reserve>
                        <reserve_note></reserve_note>
                        <limit_user_num>false</limit_user_num>
                        <user_num_limited>5</user_num_limited>
                    </buy_notes>
                    <ticket>
                        <ticket_period>
                            <validity_period>14</validity_period>
                            <validity_period_type>RELATIVE</validity_period_type>
                            <range_from>1579074556000</range_from>
                            <range_to>1579074557000</range_to>
                        </ticket_period>
                        <ticket_time_rules>
                            <ticket_time_rule_do>
                                <rule_apply_mode>EX</rule_apply_mode>
                                <hour_min_rule>10:00~12:00^14:00~16:00</hour_min_rule>
                                <week_rule>1~7</week_rule>
                                <date_rule>2019-01-01~2019-01-10^2019-01-11~2019-01-21</date_rule>
                            </ticket_time_rule_do>
                        </ticket_time_rules>
                    </ticket>
                </alsc_item_detail_fields>
                <category_id>147496404</category_id>
                <use_times>3</use_times>
            </items_info>
        </item_infos>
        <error_code>QUERY_BATCH_ITEM_FAILED</error_code>
        <error_msg>不合法</error_msg>
    </result>
</alibaba_alsc_items_list_response>

异常示例

  • XML示例
  • JSON示例
1
2
3
4
5
6
<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

返回
顶部