TbkDgMaterialOptionalUpgradeRequest.php 13 KB

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