文档中心 > API类目 > 天猫优品

tmall.tmyp.ai.queryallpromotionbyitem (优品AI查询优惠接口)

优品AI查询优惠接口

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
ump_promotion_query UmpPromotionQuery 可选 入参
  • └ time_stamp
  • Date
  • 可选
  • 2025-11-28 11:11:11
  • 时间
  • └ item_id
  • Number
  • 可选
  • 11
  • 商品id
  • └ channel
  • String
  • 可选
  • xx
  • 渠道
  • └ include_final_price
  • Boolean
  • 可选
  • true
  • 是否包含到后价
  • └ store_id
  • Number
  • 可选
  • 11
  • 门店id
  • └ openid
  • String
  • 可选
  • xxxx
  • openId
  • └ valid_template_codes
  • String
  • 可选
  • {1:111}
  • 有效优惠券模板
  • └ uuid
  • Number
  • 可选
  • 111
  • 券uuid
  • └ sku_id
  • Number
  • 可选
  • 11
  • 商品skuId

响应参数

名称 类型 示例值 描述
suc Boolean true 是否成功
module ItemPromotionWrapperDTO 优惠DTO
  • └ item_id
  • Number
  • 1111
  • 商品id
  • item_discount_price_list
  • ItemDiscountPriceDTO []
  • 商品单品折扣价列表(包含sku维度)
  • └ item_id
  • Number
  • 111
  • 商品id
  • └ sku_id
  • Number
  • 111
  • skuId
  • └ original_price
  • Number
  • 11
  • 商品原始价格
  • └ discount_price
  • Number
  • 111
  • 单品折扣价
  • └ item_promotion_user_limit
  • Number
  • 111
  • 活动消费者维度的限购数量
  • └ item_promotion_user_limit_left_count
  • Number
  • 1
  • 活动消费者维度的限购剩余数量
  • └ item_promotion_item_limit
  • Number
  • 1
  • 活动商家维度的限购
  • └ item_promotion_item_limit_left_count
  • Number
  • 1
  • 活动商家维度的限购剩余数量
  • └ start_time
  • Date
  • xxx
  • 活动开始时间
  • └ end_time
  • Date
  • xxx
  • 活动结束时间
  • └ title
  • String
  • xxx
  • 优惠活动名称
  • └ tool_code
  • String
  • xx
  • 优惠名称
  • └ description
  • String
  • xx
  • 优惠描述(例如满300减30元,满1件打7折)
  • └ discount
  • Number
  • 11
  • 优惠多少钱或打几折
  • └ s_time
  • Date
  • 2025-11-28 11:11:11
  • 活动开始时间
  • └ e_time
  • Date
  • 2025-11-28 11:11:11
  • 活动结束时间
  • shop_promotion_detail_list
  • PromotionDetailDTO []
  • 店铺优惠信息列表
  • └ start_time
  • Date
  • xx
  • 优惠的开始时间
  • └ end_time
  • Date
  • xx
  • 优惠结束时间
  • └ warm_up_start_time
  • Date
  • xx
  • 预热开始时间
  • └ warm_up_end_time
  • Date
  • xx
  • 预热结束时间
  • └ infinite
  • Boolean
  • false
  • 是否是上不封顶
  • └ title
  • String
  • xx
  • 优惠活动名称
  • └ tool_code
  • String
  • xx
  • 优惠名称
  • └ description
  • String
  • xx
  • 优惠描述(例如满300减30元,满1件打7折)
  • └ discount
  • Number
  • 11
  • 优惠多少钱或打几折
  • └ s_time
  • Date
  • 2025-11-28 11:11:11
  • 活动开始时间
  • └ e_time
  • Date
  • 2025-11-28 11:11:11
  • 活动结束时间
  • coupon_promotion_detail_list
  • PromotionDetailDTO []
  • 卡券优惠列表
  • └ start_time
  • Date
  • xx
  • 优惠的开始时间
  • └ end_time
  • Date
  • xx
  • 优惠结束时间
  • └ warm_up_start_time
  • Date
  • xx
  • 预热开始时间
  • └ warm_up_end_time
  • Date
  • xx
  • 预热结束时间
  • └ infinite
  • Boolean
  • false
  • 是否是上不封顶
  • └ title
  • String
  • xx
  • 优惠活动名称
  • └ tool_code
  • String
  • xx
  • 优惠名称
  • └ description
  • String
  • xx
  • 优惠描述(例如满300减30元,满1件打7折)
  • └ discount
  • Number
  • 11
  • 优惠多少钱或打几折
  • └ s_time
  • Date
  • 2025-11-28 11:11:11
  • 活动开始时间
  • └ e_time
  • Date
  • 2025-11-28 11:11:11
  • 活动结束时间
  • after_coupon_price
  • AfterCouponPriceDTO
  • 券后价命中的优惠(满足单件门槛)
  • └ item_id
  • Number
  • 11
  • 商品id
  • └ selected_sku_id
  • Number
  • 11
  • 被选中skuId,如果没有sku,值为0
  • └ discount_fee
  • Number
  • 1
  • 优惠的金额
  • └ final_price
  • Number
  • 1
  • 最终到手价
  • └ text_type
  • Number
  • 1
  • 文案类型 折后价 1,券后价 2
  • └ text
  • String
  • ""
  • 文案,折后价,券后价
  • └ district_text
  • String
  • ""
  • 区间价文案
  • └ is_district_price
  • Boolean
  • false
  • 是否是区间价
  • promotion_detail_list
  • AfterCouponPricePromotionDetailDTO []
  • 券后价命中的优惠(满足单件门槛)
  • └ promotion_type
  • String
  • xx
  • 优惠类型(立减)
  • └ discount_fee_value
  • Number
  • 11
  • 优惠金额
  • └ title
  • String
  • xx
  • 优惠活动名称
  • └ tool_code
  • String
  • xx
  • 优惠名称
  • └ description
  • String
  • xx
  • 优惠描述(例如满300减30元,满1件打7折)
  • └ discount
  • Number
  • 11
  • 优惠多少钱或打几折
  • └ s_time
  • Date
  • 2025-11-28 11:11:11
  • 活动开始时间
  • └ e_time
  • Date
  • 2025-11-28 11:11:11
  • 活动结束时间
  • sku_after_coupon_price_list
  • SkuAfterCouponPriceDTO []
  • sku 券后价
  • └ sku_id
  • Number
  • 1
  • skuId
  • └ discount_fee
  • Number
  • 1
  • 优惠的金额
  • └ final_price
  • Number
  • 1
  • 最终到手价
  • └ text
  • String
  • xx
  • 文案,折后价,券后价
error_message String “” 错误信息
error String “” 错误码

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TmallTmypAiQueryallpromotionbyitemRequest req = new TmallTmypAiQueryallpromotionbyitemRequest();
TmallTmypAiQueryallpromotionbyitemRequest.UmpPromotionQuery obj1 = new TmallTmypAiQueryallpromotionbyitemRequest.UmpPromotionQuery();
obj1.setTimeStamp(StringUtils.parseDateTime("2025-11-28 11:11:11"));
obj1.setItemId(11L);
obj1.setChannel("xx");
obj1.setIncludeFinalPrice(true);
obj1.setStoreId(11L);
obj1.setOpenid("xxxx");
obj1.setValidTemplateCodes("{1:111}");
obj1.setUuid(111L);
obj1.setSkuId(11L);
req.setUmpPromotionQuery(obj1);
TmallTmypAiQueryallpromotionbyitemResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<tmall_tmyp_ai_queryallpromotionbyitem_response>
    <suc>true</suc>
    <module>
        <item_id>1111</item_id>
        <item_discount_price_list>
            <item_discount_price_d_t_o>
                <item_id>111</item_id>
                <sku_id>111</sku_id>
                <original_price>11</original_price>
                <discount_price>111</discount_price>
                <item_promotion_user_limit>111</item_promotion_user_limit>
                <item_promotion_user_limit_left_count>1</item_promotion_user_limit_left_count>
                <item_promotion_item_limit>1</item_promotion_item_limit>
                <item_promotion_item_limit_left_count>1</item_promotion_item_limit_left_count>
                <start_time>xxx</start_time>
                <end_time>xxx</end_time>
                <title>xxx</title>
                <tool_code>xx</tool_code>
                <description>xx</description>
                <discount>11</discount>
                <s_time>2025-11-28 11:11:11</s_time>
                <e_time>2025-11-28 11:11:11</e_time>
            </item_discount_price_d_t_o>
        </item_discount_price_list>
        <shop_promotion_detail_list>
            <promotion_detail_d_t_o>
                <start_time>xx</start_time>
                <end_time>xx</end_time>
                <warm_up_start_time>xx</warm_up_start_time>
                <warm_up_end_time>xx</warm_up_end_time>
                <infinite>false</infinite>
                <title>xx</title>
                <tool_code>xx</tool_code>
                <description>xx</description>
                <discount>11</discount>
                <s_time>2025-11-28 11:11:11</s_time>
                <e_time>2025-11-28 11:11:11</e_time>
            </promotion_detail_d_t_o>
        </shop_promotion_detail_list>
        <coupon_promotion_detail_list>
            <promotion_detail_d_t_o>
                <start_time>xx</start_time>
                <end_time>xx</end_time>
                <warm_up_start_time>xx</warm_up_start_time>
                <warm_up_end_time>xx</warm_up_end_time>
                <infinite>false</infinite>
                <title>xx</title>
                <tool_code>xx</tool_code>
                <description>xx</description>
                <discount>11</discount>
                <s_time>2025-11-28 11:11:11</s_time>
                <e_time>2025-11-28 11:11:11</e_time>
            </promotion_detail_d_t_o>
        </coupon_promotion_detail_list>
        <after_coupon_price>
            <item_id>11</item_id>
            <selected_sku_id>11</selected_sku_id>
            <discount_fee>1</discount_fee>
            <final_price>1</final_price>
            <text_type>1</text_type>
            <text>&quot;&quot;</text>
            <district_text>&quot;&quot;</district_text>
            <is_district_price>false</is_district_price>
            <promotion_detail_list>
                <after_coupon_price_promotion_detail_d_t_o>
                    <promotion_type>xx</promotion_type>
                    <discount_fee_value>11</discount_fee_value>
                    <title>xx</title>
                    <tool_code>xx</tool_code>
                    <description>xx</description>
                    <discount>11</discount>
                    <s_time>2025-11-28 11:11:11</s_time>
                    <e_time>2025-11-28 11:11:11</e_time>
                </after_coupon_price_promotion_detail_d_t_o>
            </promotion_detail_list>
            <sku_after_coupon_price_list>
                <sku_after_coupon_price_d_t_o>
                    <sku_id>1</sku_id>
                    <discount_fee>1</discount_fee>
                    <final_price>1</final_price>
                    <text>xx</text>
                </sku_after_coupon_price_d_t_o>
            </sku_after_coupon_price_list>
        </after_coupon_price>
    </module>
    <error_message>“”</error_message>
    <error>“”</error>
</tmall_tmyp_ai_queryallpromotionbyitem_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

返回
顶部