TaobaoTbkDgMaterialOptionalUpgradeRequest.cs 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. using System.Text.Json.Serialization;
  2. using System.Collections.Generic;
  3. using Topsdk.Util;
  4. using Topsdk.Top.Defaultability.Domain;
  5. namespace Topsdk.Top.Defaultability.Request;
  6. public class TaobaoTbkDgMaterialOptionalUpgradeRequest : AbstractTopApiRequest
  7. {
  8. /*
  9. 商品筛选-店铺dsr评分。筛选大于等于当前设置的店铺dsr评分的商品0-50000之间
  10. */
  11. private long? startDsr;
  12. /*
  13. 页大小,默认20,1~100
  14. 默认值:20 */
  15. private long? pageSize;
  16. /*
  17. 第几页,默认:1
  18. 默认值:1 */
  19. private long? pageNo;
  20. /*
  21. 商品筛选-淘客收入比率上限(商品佣金比率+补贴比率)。如:1234表示12.34%
  22. */
  23. private long? endTkRate;
  24. /*
  25. 商品筛选-淘客收入比率下限(商品佣金比率+补贴比率)。如:1234表示12.34%
  26. */
  27. private long? startTkRate;
  28. /*
  29. 商品筛选-预估到手价范围上限。单位:元
  30. */
  31. private long? endPrice;
  32. /*
  33. 商品筛选-预估到手价范围下限。单位:元
  34. */
  35. private long? startPrice;
  36. /*
  37. 商品筛选-是否海外商品。true表示属于海外商品,false或不设置表示不限
  38. */
  39. private bool? isOverseas;
  40. /*
  41. 商品筛选-是否天猫商品。true表示属于天猫商品,false或不设置表示不限
  42. */
  43. private bool? isTmall;
  44. /*
  45. 排序_des(降序),排序_asc(升序),销量(total_sales),淘客收入比率(tk_rate),营销计划佣金(tk_mkt_rate), 累计推广量(tk_total_sales),总支出佣金(tk_total_commi),预估到价格(final_promotion_price),匹配分(match)
  46. */
  47. private string? sort;
  48. /*
  49. 商品筛选-所在地
  50. */
  51. private string? itemloc;
  52. /*
  53. 商品筛选-后台类目ID。用,分割,最大10个
  54. */
  55. private string? cat;
  56. /*
  57. 商品筛选-查询词;注意:① q参数不支持入参淘宝联盟链接;② 淘宝复制商品含数字ID的链接需消费者比价场景ID2权限;③ 使用标题搜索时,如搜索出来的商品仅有一个,则需要消费者比价场景ID2权限,否则不透出商品推广链接和商品id字段;如搜索出来的商品有多个,则不受权限影响正常出参。(场景id使用说明参考《淘宝客新商品ID升级》白皮书:https://www.yuque.com/taobaolianmengguanfangxiaoer/zmig94/tfyt0pahmlpzu2ud)
  58. */
  59. private string? q;
  60. /*
  61. 物料id,不传时默认物料material_id=80309;如果直接对消费者投放,可使用官方个性化算法优化的搜索物料material_id=17004(注意:若物料id=17004没查询到结果则出系统默认物料id=80309的查询结果)
  62. 默认值:80309 */
  63. private long? materialId;
  64. /*
  65. 优惠券筛选-是否有优惠券。true表示该商品有优惠券,false或不设置表示不限
  66. */
  67. private bool? hasCoupon;
  68. /*
  69. ip参数影响邮费获取,如果不传或者传入不准确,邮费无法精准提供
  70. */
  71. private string? ip;
  72. /*
  73. 推广位id,mm_xxx_xxx_12345678三段式的最后一段数字(登录pub.alimama.com推广管理-推广位管理中查询)
  74. */
  75. private long? adzoneId;
  76. /*
  77. 商品筛选-是否包邮。true表示包邮,false或不设置表示不限
  78. */
  79. private bool? needFreeShipment;
  80. /*
  81. 商品筛选-是否加入消费者保障。true表示加入,false或不设置表示不限
  82. */
  83. private bool? needPrepay;
  84. /*
  85. 商品筛选-成交转化是否高于行业均值。True表示大于等于,false或不设置表示不限
  86. */
  87. private bool? includePayRate30;
  88. /*
  89. 商品筛选-好评率是否高于行业均值。True表示大于等于,false或不设置表示不限
  90. */
  91. private bool? includeGoodRate;
  92. /*
  93. 商品筛选-退款率是否低于行业均值。True表示大于等于,false或不设置表示不限
  94. */
  95. private bool? includeRfdRate;
  96. /*
  97. 商品筛选-牛皮癣程度。取值:1不限,2无,3轻微
  98. 默认值:1 */
  99. private long? npxLevel;
  100. /*
  101. 智能匹配-设备号加密类型:MD5;使用智能推荐请先签署协议https://pub.alimama.com/fourth/protocol/common.htm?key=hangye_laxin
  102. */
  103. private string? deviceEncrypt;
  104. /*
  105. 智能匹配-设备号加密后的值(MD5加密需32位小写);使用智能推荐请先签署协议https://pub.alimama.com/fourth/protocol/common.htm?key=hangye_laxin
  106. */
  107. private string? deviceValue;
  108. /*
  109. 智能匹配-设备号类型:IMEI,或者IDFA,或者UTDID(UTDID不支持MD5加密),或者OAID;使用智能推荐请先签署协议https://pub.alimama.com/fourth/protocol/common.htm?key=hangye_laxin
  110. */
  111. private string? deviceType;
  112. /*
  113. 会员运营ID
  114. */
  115. private string? specialId;
  116. /*
  117. 渠道关系ID,仅适用于渠道推广场景
  118. */
  119. private string? relationId;
  120. /*
  121. 是否获取前N件佣金信息 0否,1是,其他值否
  122. */
  123. private long? getTopnRate;
  124. /*
  125. 1-动态ID转链场景,2-消费者比价场景(不填默认为1);场景id使用说明参考《淘宝客新商品ID升级》白皮书:https://www.yuque.com/taobaolianmengguanfangxiaoer/zmig94/tfyt0pahmlpzu2ud
  126. */
  127. private string? bizSceneId;
  128. /*
  129. 1-自购省,2-推广赚(代理模式专属ID,代理模式必填,非代理模式不用填写该字段)
  130. */
  131. private string? promotionType;
  132. /*
  133. 线报内容筛选—内容生产开始时间,13毫秒时间戳
  134. */
  135. private string? mgcStartTime;
  136. /*
  137. 线报内容筛选—内容生产截止时间,13毫秒时间戳
  138. */
  139. private string? mgcEndTime;
  140. /*
  141. 线报状态筛选,0-全部 1-过期 2-实时生效 3-未来生效 不传默认过滤有效
  142. */
  143. private string? mgcStatus;
  144. /*
  145. 人群ID,仅适用于物料评估场景material_id=41377
  146. */
  147. private long? ucrowdId;
  148. /*
  149. 物料评估-商品列表
  150. */
  151. private IList<TaobaoTbkDgMaterialOptionalUpgradeUcrowdrankitems>? ucrowdRankItems;
  152. [JsonPropertyName("start_dsr")]
  153. public long? StartDsr
  154. {
  155. get => startDsr;
  156. set => this.startDsr = value;
  157. }
  158. [JsonPropertyName("page_size")]
  159. public long? PageSize
  160. {
  161. get => pageSize;
  162. set => this.pageSize = value;
  163. }
  164. [JsonPropertyName("page_no")]
  165. public long? PageNo
  166. {
  167. get => pageNo;
  168. set => this.pageNo = value;
  169. }
  170. [JsonPropertyName("end_tk_rate")]
  171. public long? EndTkRate
  172. {
  173. get => endTkRate;
  174. set => this.endTkRate = value;
  175. }
  176. [JsonPropertyName("start_tk_rate")]
  177. public long? StartTkRate
  178. {
  179. get => startTkRate;
  180. set => this.startTkRate = value;
  181. }
  182. [JsonPropertyName("end_price")]
  183. public long? EndPrice
  184. {
  185. get => endPrice;
  186. set => this.endPrice = value;
  187. }
  188. [JsonPropertyName("start_price")]
  189. public long? StartPrice
  190. {
  191. get => startPrice;
  192. set => this.startPrice = value;
  193. }
  194. [JsonPropertyName("is_overseas")]
  195. public bool? IsOverseas
  196. {
  197. get => isOverseas;
  198. set => this.isOverseas = value;
  199. }
  200. [JsonPropertyName("is_tmall")]
  201. public bool? IsTmall
  202. {
  203. get => isTmall;
  204. set => this.isTmall = value;
  205. }
  206. [JsonPropertyName("sort")]
  207. public string? Sort
  208. {
  209. get => sort;
  210. set => this.sort = value;
  211. }
  212. [JsonPropertyName("itemloc")]
  213. public string? Itemloc
  214. {
  215. get => itemloc;
  216. set => this.itemloc = value;
  217. }
  218. [JsonPropertyName("cat")]
  219. public string? Cat
  220. {
  221. get => cat;
  222. set => this.cat = value;
  223. }
  224. [JsonPropertyName("q")]
  225. public string? Q
  226. {
  227. get => q;
  228. set => this.q = value;
  229. }
  230. [JsonPropertyName("material_id")]
  231. public long? MaterialId
  232. {
  233. get => materialId;
  234. set => this.materialId = value;
  235. }
  236. [JsonPropertyName("has_coupon")]
  237. public bool? HasCoupon
  238. {
  239. get => hasCoupon;
  240. set => this.hasCoupon = value;
  241. }
  242. [JsonPropertyName("ip")]
  243. public string? Ip
  244. {
  245. get => ip;
  246. set => this.ip = value;
  247. }
  248. [JsonPropertyName("adzone_id")]
  249. public long? AdzoneId
  250. {
  251. get => adzoneId;
  252. set => this.adzoneId = value;
  253. }
  254. [JsonPropertyName("need_free_shipment")]
  255. public bool? NeedFreeShipment
  256. {
  257. get => needFreeShipment;
  258. set => this.needFreeShipment = value;
  259. }
  260. [JsonPropertyName("need_prepay")]
  261. public bool? NeedPrepay
  262. {
  263. get => needPrepay;
  264. set => this.needPrepay = value;
  265. }
  266. [JsonPropertyName("include_pay_rate_30")]
  267. public bool? IncludePayRate30
  268. {
  269. get => includePayRate30;
  270. set => this.includePayRate30 = value;
  271. }
  272. [JsonPropertyName("include_good_rate")]
  273. public bool? IncludeGoodRate
  274. {
  275. get => includeGoodRate;
  276. set => this.includeGoodRate = value;
  277. }
  278. [JsonPropertyName("include_rfd_rate")]
  279. public bool? IncludeRfdRate
  280. {
  281. get => includeRfdRate;
  282. set => this.includeRfdRate = value;
  283. }
  284. [JsonPropertyName("npx_level")]
  285. public long? NpxLevel
  286. {
  287. get => npxLevel;
  288. set => this.npxLevel = value;
  289. }
  290. [JsonPropertyName("device_encrypt")]
  291. public string? DeviceEncrypt
  292. {
  293. get => deviceEncrypt;
  294. set => this.deviceEncrypt = value;
  295. }
  296. [JsonPropertyName("device_value")]
  297. public string? DeviceValue
  298. {
  299. get => deviceValue;
  300. set => this.deviceValue = value;
  301. }
  302. [JsonPropertyName("device_type")]
  303. public string? DeviceType
  304. {
  305. get => deviceType;
  306. set => this.deviceType = value;
  307. }
  308. [JsonPropertyName("special_id")]
  309. public string? SpecialId
  310. {
  311. get => specialId;
  312. set => this.specialId = value;
  313. }
  314. [JsonPropertyName("relation_id")]
  315. public string? RelationId
  316. {
  317. get => relationId;
  318. set => this.relationId = value;
  319. }
  320. [JsonPropertyName("get_topn_rate")]
  321. public long? GetTopnRate
  322. {
  323. get => getTopnRate;
  324. set => this.getTopnRate = value;
  325. }
  326. [JsonPropertyName("biz_scene_id")]
  327. public string? BizSceneId
  328. {
  329. get => bizSceneId;
  330. set => this.bizSceneId = value;
  331. }
  332. [JsonPropertyName("promotion_type")]
  333. public string? PromotionType
  334. {
  335. get => promotionType;
  336. set => this.promotionType = value;
  337. }
  338. [JsonPropertyName("mgc_start_time")]
  339. public string? MgcStartTime
  340. {
  341. get => mgcStartTime;
  342. set => this.mgcStartTime = value;
  343. }
  344. [JsonPropertyName("mgc_end_time")]
  345. public string? MgcEndTime
  346. {
  347. get => mgcEndTime;
  348. set => this.mgcEndTime = value;
  349. }
  350. [JsonPropertyName("mgc_status")]
  351. public string? MgcStatus
  352. {
  353. get => mgcStatus;
  354. set => this.mgcStatus = value;
  355. }
  356. [JsonPropertyName("ucrowd_id")]
  357. public long? UcrowdId
  358. {
  359. get => ucrowdId;
  360. set => this.ucrowdId = value;
  361. }
  362. [JsonPropertyName("ucrowd_rank_items")]
  363. public IList<TaobaoTbkDgMaterialOptionalUpgradeUcrowdrankitems>? UcrowdRankItems
  364. {
  365. get => ucrowdRankItems;
  366. set => this.ucrowdRankItems = value;
  367. }
  368. public override IDictionary<string, string> ToRequestParam()
  369. {
  370. IDictionary<string, string> requestParam = new Dictionary<string, string>();
  371. if(this.startDsr != null)
  372. {
  373. requestParam.Add("start_dsr",TopUtils.ConvertBasicType(this.startDsr));
  374. }
  375. if(this.pageSize != null)
  376. {
  377. requestParam.Add("page_size",TopUtils.ConvertBasicType(this.pageSize));
  378. }
  379. if(this.pageNo != null)
  380. {
  381. requestParam.Add("page_no",TopUtils.ConvertBasicType(this.pageNo));
  382. }
  383. if(this.endTkRate != null)
  384. {
  385. requestParam.Add("end_tk_rate",TopUtils.ConvertBasicType(this.endTkRate));
  386. }
  387. if(this.startTkRate != null)
  388. {
  389. requestParam.Add("start_tk_rate",TopUtils.ConvertBasicType(this.startTkRate));
  390. }
  391. if(this.endPrice != null)
  392. {
  393. requestParam.Add("end_price",TopUtils.ConvertBasicType(this.endPrice));
  394. }
  395. if(this.startPrice != null)
  396. {
  397. requestParam.Add("start_price",TopUtils.ConvertBasicType(this.startPrice));
  398. }
  399. if(this.isOverseas != null)
  400. {
  401. requestParam.Add("is_overseas",TopUtils.ConvertBasicType(this.isOverseas));
  402. }
  403. if(this.isTmall != null)
  404. {
  405. requestParam.Add("is_tmall",TopUtils.ConvertBasicType(this.isTmall));
  406. }
  407. if(this.sort != null)
  408. {
  409. requestParam.Add("sort",TopUtils.ConvertBasicType(this.sort));
  410. }
  411. if(this.itemloc != null)
  412. {
  413. requestParam.Add("itemloc",TopUtils.ConvertBasicType(this.itemloc));
  414. }
  415. if(this.cat != null)
  416. {
  417. requestParam.Add("cat",TopUtils.ConvertBasicType(this.cat));
  418. }
  419. if(this.q != null)
  420. {
  421. requestParam.Add("q",TopUtils.ConvertBasicType(this.q));
  422. }
  423. if(this.materialId != null)
  424. {
  425. requestParam.Add("material_id",TopUtils.ConvertBasicType(this.materialId));
  426. }
  427. if(this.hasCoupon != null)
  428. {
  429. requestParam.Add("has_coupon",TopUtils.ConvertBasicType(this.hasCoupon));
  430. }
  431. if(this.ip != null)
  432. {
  433. requestParam.Add("ip",TopUtils.ConvertBasicType(this.ip));
  434. }
  435. if(this.adzoneId != null)
  436. {
  437. requestParam.Add("adzone_id",TopUtils.ConvertBasicType(this.adzoneId));
  438. }
  439. if(this.needFreeShipment != null)
  440. {
  441. requestParam.Add("need_free_shipment",TopUtils.ConvertBasicType(this.needFreeShipment));
  442. }
  443. if(this.needPrepay != null)
  444. {
  445. requestParam.Add("need_prepay",TopUtils.ConvertBasicType(this.needPrepay));
  446. }
  447. if(this.includePayRate30 != null)
  448. {
  449. requestParam.Add("include_pay_rate_30",TopUtils.ConvertBasicType(this.includePayRate30));
  450. }
  451. if(this.includeGoodRate != null)
  452. {
  453. requestParam.Add("include_good_rate",TopUtils.ConvertBasicType(this.includeGoodRate));
  454. }
  455. if(this.includeRfdRate != null)
  456. {
  457. requestParam.Add("include_rfd_rate",TopUtils.ConvertBasicType(this.includeRfdRate));
  458. }
  459. if(this.npxLevel != null)
  460. {
  461. requestParam.Add("npx_level",TopUtils.ConvertBasicType(this.npxLevel));
  462. }
  463. if(this.deviceEncrypt != null)
  464. {
  465. requestParam.Add("device_encrypt",TopUtils.ConvertBasicType(this.deviceEncrypt));
  466. }
  467. if(this.deviceValue != null)
  468. {
  469. requestParam.Add("device_value",TopUtils.ConvertBasicType(this.deviceValue));
  470. }
  471. if(this.deviceType != null)
  472. {
  473. requestParam.Add("device_type",TopUtils.ConvertBasicType(this.deviceType));
  474. }
  475. if(this.specialId != null)
  476. {
  477. requestParam.Add("special_id",TopUtils.ConvertBasicType(this.specialId));
  478. }
  479. if(this.relationId != null)
  480. {
  481. requestParam.Add("relation_id",TopUtils.ConvertBasicType(this.relationId));
  482. }
  483. if(this.getTopnRate != null)
  484. {
  485. requestParam.Add("get_topn_rate",TopUtils.ConvertBasicType(this.getTopnRate));
  486. }
  487. if(this.bizSceneId != null)
  488. {
  489. requestParam.Add("biz_scene_id",TopUtils.ConvertBasicType(this.bizSceneId));
  490. }
  491. if(this.promotionType != null)
  492. {
  493. requestParam.Add("promotion_type",TopUtils.ConvertBasicType(this.promotionType));
  494. }
  495. if(this.mgcStartTime != null)
  496. {
  497. requestParam.Add("mgc_start_time",TopUtils.ConvertBasicType(this.mgcStartTime));
  498. }
  499. if(this.mgcEndTime != null)
  500. {
  501. requestParam.Add("mgc_end_time",TopUtils.ConvertBasicType(this.mgcEndTime));
  502. }
  503. if(this.mgcStatus != null)
  504. {
  505. requestParam.Add("mgc_status",TopUtils.ConvertBasicType(this.mgcStatus));
  506. }
  507. if(this.ucrowdId != null)
  508. {
  509. requestParam.Add("ucrowd_id",TopUtils.ConvertBasicType(this.ucrowdId));
  510. }
  511. if(this.ucrowdRankItems != null)
  512. {
  513. requestParam.Add("ucrowd_rank_items",TopUtils.ConvertStructList(this.ucrowdRankItems));
  514. }
  515. return requestParam;
  516. }
  517. public override IDictionary<string, TopFileItem> ToFileParam()
  518. {
  519. IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
  520. return fileParam;
  521. }
  522. public override string GetApiCode()
  523. {
  524. return "taobao.tbk.dg.material.optional.upgrade";
  525. }
  526. }