文档中心 > API类目 > 内容开放API

taobao.content.sub.update (更新[关注], 仅下线后才能更新)

更新[关注], 仅下线后才能更新

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
content_id Number 必须 998 内容id
app_type_code String 必须 900091 实例类型code
schema_version Number 必须 12345 scheme版本
outer_id String 必须 C-123 服务商自己指定的外部编码,每次执行发布动作需要唯一生成,外部编码与一条订阅内容一一对应,同时外部编码对发布接口的重复调用有幂等效果
data String 必须 {"subscriptionConfig":{"timingPublishTime":null},"description":"颜值跟实用性并存,快来看看~","images":[{"picId":""}],"goods":[{"itemId":,"picId":}],"shortTitle":""} 结构化内容,结构标准来自于schema接口

响应参数

名称 类型 示例值 描述
tao_subscribe_key_resp TaoSubscribeKeyResp 响应结果
  • └ content_id
  • Number
  • 998
  • 内容id
  • └ outer_id
  • String
  • C-123
  • 服务商自己指定的外部编码,每次执行发布动作需要唯一生成,跟contentId一一对应
  • └ app_type_code
  • String
  • 900091
  • 实例类型code

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
ContentSubUpdateRequest req = new ContentSubUpdateRequest();
req.setContentId(998L);
req.setAppTypeCode("900091");
req.setSchemaVersion(12345L);
req.setOuterId("C-123");
req.setData("{\"subscriptionConfig\":{\"timingPublishTime\":null},\"description\":\"颜值跟实用性并存,快来看看~\",\"images\":[{\"picId\":\"\"}],\"goods\":[{\"itemId\":,\"picId\":}],\"shortTitle\":\"\"}");
ContentSubUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<content_sub_update_response>
    <tao_subscribe_key_resp>
        <content_id>998</content_id>
        <outer_id>C-123</outer_id>
        <app_type_code>900091</app_type_code>
    </tao_subscribe_key_resp>
</content_sub_update_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

返回
顶部