using System; using System.Collections.Generic; using Top.Api.Util; namespace Top.Api.Request { /// /// TOP API: taobao.tbk.dg.material.recommend /// public class TbkDgMaterialRecommendRequest : BaseTopRequest { /// /// 推广位id,mm_xxx_xxx_12345678三段式的最后一段数字(登录pub.alimama.com推广管理-推广位管理中查询) /// public Nullable AdzoneId { get; set; } /// /// 智能匹配-设备号加密类型:MD5;使用智能推荐请先签署协议https://pub.alimama.com/fourth/protocol/common.htm?key=hangye_laxin /// public string DeviceEncrypt { get; set; } /// /// 智能匹配-设备号类型:IMEI,或者IDFA,或者UTDID(UTDID不支持MD5加密),或者OAID;使用智能推荐请先签署协议https://pub.alimama.com/fourth/protocol/common.htm?key=hangye_laxin /// public string DeviceType { get; set; } /// /// 智能匹配-设备号加密后的值(MD5加密需32位小写);使用智能推荐请先签署协议https://pub.alimama.com/fourth/protocol/common.htm?key=hangye_laxin /// public string DeviceValue { get; set; } /// /// 选品库收藏夹id,获取收藏夹id参考文档:https://mos.m.taobao.com/union/page_20230109_175050_176?spm=a219t._portal_v2_pages_promo_goods_index_htm.0.0.7c2a75a5H2ER3N /// public string FavoritesId { get; set; } /// /// 淘宝客新商品ID;用于相似商品推荐(注意:使用相似商品推荐material_id=13256必传,并请先签署协议https://pub.alimama.com/fourth/protocol/common.htm?key=hangye_laxin);另关于《淘宝客新商品ID升级》参考白皮书:https://www.yuque.com/taobaolianmengguanfangxiaoer/zmig94/tfyt0pahmlpzu2ud /// public string ItemId { get; set; } /// /// 官方提供的物料Id;可以通过taobao.tbk.optimus.tou.material.ids.get接口获取公开的物料id列表或查看物料id汇总贴:https://market.m.taobao.com/app/qn/toutiao-new/index-pc.html#/detail/10628875?_k=gpov9a /// public Nullable MaterialId { get; set; } /// /// 第几页,默认:1 /// public Nullable PageNo { get; set; } /// /// 页大小,默认20,1~100 /// public Nullable PageSize { get; set; } /// /// 1-自购省,2-推广赚(代理模式专属ID,代理模式必填,非代理模式不用填写该字段) /// public string PromotionType { get; set; } /// /// 渠道关系ID,仅适用于渠道推广场景 /// public Nullable RelationId { get; set; } /// /// 会员运营ID /// public string SpecialId { get; set; } #region ITopRequest Members public override string GetApiName() { return "taobao.tbk.dg.material.recommend"; } public override IDictionary GetParameters() { TopDictionary parameters = new TopDictionary(); parameters.Add("adzone_id", this.AdzoneId); parameters.Add("device_encrypt", this.DeviceEncrypt); parameters.Add("device_type", this.DeviceType); parameters.Add("device_value", this.DeviceValue); parameters.Add("favorites_id", this.FavoritesId); parameters.Add("item_id", this.ItemId); parameters.Add("material_id", this.MaterialId); parameters.Add("page_no", this.PageNo); parameters.Add("page_size", this.PageSize); parameters.Add("promotion_type", this.PromotionType); parameters.Add("relation_id", this.RelationId); parameters.Add("special_id", this.SpecialId); if (this.otherParams != null) { parameters.AddAll(this.otherParams); } return parameters; } public override void Validate() { RequestValidator.ValidateRequired("adzone_id", this.AdzoneId); RequestValidator.ValidateRequired("material_id", this.MaterialId); } #endregion } }