文档中心 > API类目 > 闲客联盟

alibaba.idle.affiliate.general.link.convert (闲鱼联盟-推广转链)

闲鱼联盟-推广转链

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
link_convert_vo LinkConvertVO 必须 转链入参
  • └ sub_publisher_id
  • String
  • 可选
  • 123456
  • 子推广者id
  • └ material_type
  • Number
  • 必须
  • 1
  • 物料类型(1商品,2权益,3cpa活动,4闲鱼口令或短链)
  • └ item_ids
  • String []
  • 可选
  • ["852637600710"]
  • 加密的商品id集合(可以从物料接口获取,测试时格式为array)
  • └ coupon_id
  • String
  • 可选
  • 123456
  • 圈id
  • └ campaign_id
  • String
  • 可选
  • 1
  • cpa活动id,从联盟活动接口获取
  • └ plain_item_ids
  • String []
  • 可选
  • ["852637600710"]
  • 明文商品id集合(测试时格式为array)
  • └ xy_url
  • String []
  • 可选
  • 【闲鱼】https://m.tb.cn/h.6YcFmBA?tk=Y208eIMmlD8 CZ057 「快来为我助力吧」
  • 1.通过接口转链的短口令 2.从闲鱼帮卖广场分享出来的商品口令

响应参数

名称 类型 示例值 描述
result IdleAffiliateCommonResult result
  • result
  • LinkConvertDTO
  • result
  • └ short_url
  • String
  • https://m.tb.cn/h.T11HDVK
  • 短链
  • └ short_tpwd
  • String
  • 【闲鱼】https://m.tb.cn/h.T11HDVK?tk=qnus3sXRQAs MF7997 「闲鱼」 点击链接直接打开
  • 口令
  • └ deeplink
  • String
  • fleamarket://2.taobao.com/onepiece?source=auto&action=ali.open.nav&module=h5&bootImage=0&h5Url=https%3A%2F%2Fh5.m.goofish.com%2Fwow%2Fmoyu%2Fmoyu-project%2Fcampaign-pages%2Fpages%2Fredirect%3Fneed_login%3Dtrue%26needLogin%3Dtrue%26url%3Dhttps%253A%252F%252Fh5.m.goofish.com%252Fwow%252Fmoyu%252Fmoyu-project%252Fact-react%252Fpages%252FpEvR6WvK7atv%26need_login%3Dtrue%26needLogin%3Dtrue%26affiliateCode%3DXGR0AU0X7%26campaignId%3D1%26asac%3D2A24416GFQT0DYPCBQ54RU
  • deeplink链接 有端唤端到目标页 无端需自行判断跳转
  • └ success
  • Boolean
  • true
  • success
  • └ err_code
  • String
  • AFFILIATE_COMMON_ERROR
  • 错误码
  • └ err_msg
  • String
  • 系统异常
  • 错误信息
  • └ display_error_msg
  • String
  • 系统异常
  • 错误信息

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaIdleAffiliateGeneralLinkConvertRequest req = new AlibabaIdleAffiliateGeneralLinkConvertRequest();
AlibabaIdleAffiliateGeneralLinkConvertRequest.LinkConvertVO obj1 = new AlibabaIdleAffiliateGeneralLinkConvertRequest.LinkConvertVO();
obj1.setSubPublisherId("123456");
obj1.setMaterialType(1L);
obj1.setItemIds(""852637600710"");
obj1.setCouponId("123456");
obj1.setCampaignId("1");
obj1.setPlainItemIds(""852637600710"");
obj1.setXyUrl("【闲鱼】https://m.tb.cn/h.6YcFmBA?tk=Y208eIMmlD8 CZ057 「快来为我助力吧」");
req.setLinkConvertVo(obj1);
AlibabaIdleAffiliateGeneralLinkConvertResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_idle_affiliate_general_link_convert_response>
    <result>
        <result>
            <short_url>https://m.tb.cn/h.T11HDVK</short_url>
            <short_tpwd>【闲鱼】https://m.tb.cn/h.T11HDVK?tk=qnus3sXRQAs MF7997 「闲鱼」
点击链接直接打开</short_tpwd>
            <deeplink>fleamarket://2.taobao.com/onepiece?source=auto&amp;action=ali.open.nav&amp;module=h5&amp;bootImage=0&amp;h5Url=https%3A%2F%2Fh5.m.goofish.com%2Fwow%2Fmoyu%2Fmoyu-project%2Fcampaign-pages%2Fpages%2Fredirect%3Fneed_login%3Dtrue%26needLogin%3Dtrue%26url%3Dhttps%253A%252F%252Fh5.m.goofish.com%252Fwow%252Fmoyu%252Fmoyu-project%252Fact-react%252Fpages%252FpEvR6WvK7atv%26need_login%3Dtrue%26needLogin%3Dtrue%26affiliateCode%3DXGR0AU0X7%26campaignId%3D1%26asac%3D2A24416GFQT0DYPCBQ54RU</deeplink>
        </result>
        <success>true</success>
        <err_code>AFFILIATE_COMMON_ERROR</err_code>
        <err_msg>系统异常</err_msg>
        <display_error_msg>系统异常</display_error_msg>
    </result>
</alibaba_idle_affiliate_general_link_convert_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

返回
顶部