taobao.promotion.meal.get (搭配套餐查询)

搭配套餐查询。每个卖家最多创建50个搭配套餐,所以查询不会分页,会将所有的满足状态的搭配套餐全部查出。该接口不会校验商品的下架或库存为0,查询结果的状态表明搭配套餐在数据库中的状态,商品的状态请isv自己验证。在卖家后台页面点击查看会触发数据库状态的修改。

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
meal_id Number 可选 849846 搭配套餐id
status String 可选 VALID 套餐状态。有效:VALID;失效:INVALID(有效套餐为可使用的套餐,无效套餐为套餐中有商品下架或库存为0时)。默认时两种情况都会查询。

响应参数

名称 类型 示例值 描述
meal_list Meal [] 搭配套餐列表。
  • └ meal_id
  • Number
  • 489461
  • 套餐id。
  • └ meal_name
  • String
  • 搭配套餐一
  • 搭配套餐名称。
  • └ meal_price
  • String
  • 5487
  • 套餐一口价(单位是:分)
  • └ item_list
  • String
  • {'item_list':[{'item_id':'4856181','item_show_name':'衬衫'},{'item_id':'978946','item_show_name':'连衣裙'}]}
  • 搭配套餐商品列表。item_id为商品的id;item_show_name为商品显示名。因最多允许5个商品进行搭配,所以查询最多有5个,以json格式传出。
  • └ type_postage
  • String
  • BUY
  • 运费模板类型。卖家标识'SELL';买家标识'BUY'。若为'SELL'则字段postage_id为空。若为'BUY',则postage_id为运费模板id,必有值。
  • └ meal_memo
  • String
  • 这个套餐真给力!
  • 搭配套餐描述!
  • └ postage_id
  • Number
  • 89756465
  • 普通运费模板id。若这个字段为空或0时,运费是卖家负责;若这个字段不为空,说明运费模板存在,运费是买家负责。
  • └ status
  • String
  • VALID
  • 套餐状态。有效:VALID;失效:INVALID(有效套餐为可使用的套餐,无效套餐为套餐中有商品下架或库存为0时)。

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
PromotionMealGetRequest req = new PromotionMealGetRequest();
req.setMealId(849846L);
req.setStatus("VALID");
PromotionMealGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<promotion_meal_get_response>
    <meal_list>
        <meal>
            <meal_id>489461</meal_id>
            <meal_name>搭配套餐一</meal_name>
            <meal_price>5487</meal_price>
            <item_list>{&apos;item_list&apos;:[{&apos;item_id&apos;:&apos;4856181&apos;,&apos;item_show_name&apos;:&apos;衬衫&apos;},{&apos;item_id&apos;:&apos;978946&apos;,&apos;item_show_name&apos;:&apos;连衣裙&apos;}]}</item_list>
            <type_postage>BUY</type_postage>
            <meal_memo>这个套餐真给力!</meal_memo>
            <postage_id>89756465</postage_id>
            <status>VALID</status>
        </meal>
    </meal_list>
</promotion_meal_get_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>

错误码解释

错误码 错误描述 解决方案
isv.service-error:statusError 套餐状态错误! 输入正确的套餐状态。
isv.promotiontop-service-unavailable 系统异常。isv没有权限等。 检查isv权限。
isp.promotiontop-service-unavailable isp系统异常。isp系统出现问题。 稍后再访问。

API工具

如何获得此API

FAQ

返回
顶部