openapi.yaml 131 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772
  1. openapi: 3.0.0
  2. info:
  3. title: klt-bos
  4. version: 0.1.0
  5. description: |
  6. 恪澜通运营支撑扩展微服务(klt-bos)。
  7. 统一请求信封:`{ "data": { … } }`;统一响应信封:`{ code, message, error_code?, data }`。
  8. 业务错误码段 20000–20999。
  9. 经网关对外前缀:`/api/klt/bos/{resource}/{action}@v1`(本文件路径不含 namespace 前缀)。
  10. 分页约定:请求页码 0 基;呈现时再转为 1 基。
  11. x-error-code-range:
  12. start: 20000
  13. end: 20999
  14. servers:
  15. - url: /
  16. paths:
  17. /health:
  18. get:
  19. summary: 健康检查
  20. description: 服务存活探测,无需登录。
  21. x-require-auth: false
  22. x-resource-type: bos.health
  23. x-action: view
  24. x-version: v1
  25. x-permission-visibility: catalog
  26. responses:
  27. "200":
  28. description: 成功。统一信封 code/message/data
  29. /health@v1:
  30. get:
  31. summary: 健康检查(v1)
  32. description: 服务存活探测,无需登录。
  33. x-require-auth: false
  34. x-resource-type: bos.health
  35. x-action: view
  36. x-version: v1
  37. x-permission-visibility: catalog
  38. responses:
  39. "200":
  40. description: 成功。统一信封 code/message/data
  41. /ping@v1:
  42. get:
  43. summary: 存活探测
  44. description: 需登录的轻量探测,返回服务状态与绑定信息。
  45. x-require-auth: true
  46. x-resource-type: bos.ping
  47. x-action: view
  48. x-version: v1
  49. x-permission-visibility: catalog
  50. responses:
  51. "200":
  52. description: 成功。统一信封 code/message/data
  53. /auth/context@v1:
  54. get:
  55. summary: 当前登录上下文
  56. description: 返回当前登录身份、业务角色、主体类型/ID、可见形态等;首次业务请求在此完成未激活/已过期拦截。
  57. x-require-auth: true
  58. x-resource-type: bos.auth
  59. x-action: view
  60. x-version: v1
  61. x-permission-visibility: catalog
  62. responses:
  63. "200":
  64. description: 成功。统一信封 code/message/data
  65. /region/create@v1:
  66. post:
  67. summary: 新建区域节点
  68. description: 在区域树下新建省/市/区县节点。admin 任意层级;区域运营主/子账号仅限本团队负责范围内已有省份下建市/区县。
  69. x-require-auth: true
  70. x-resource-type: bos.region
  71. x-action: create
  72. x-version: v1
  73. x-permission-visibility: catalog
  74. requestBody:
  75. required: true
  76. description: JSON 请求体,业务字段置于 data
  77. content:
  78. application/json:
  79. schema:
  80. type: object
  81. description: 统一信封请求体,业务字段放在 data 内
  82. properties:
  83. data:
  84. type: object
  85. description: 新建区域参数
  86. properties:
  87. parent_node_id:
  88. type: string
  89. description: 父节点 ID;根下建省时可空
  90. node_name:
  91. type: string
  92. description: 本级区域名称
  93. level:
  94. type: string
  95. description: 层级提示(省/市/区县等,业务侧自持,可选)
  96. required:
  97. - node_name
  98. required:
  99. - data
  100. responses:
  101. "200":
  102. description: 成功。统一信封 code/message/data
  103. /region/rename@v1:
  104. post:
  105. summary: 重命名区域节点
  106. description: 仅修改节点名称 node_name,不改层级与父子关系。
  107. x-require-auth: true
  108. x-resource-type: bos.region
  109. x-action: update
  110. x-version: v1
  111. x-permission-visibility: catalog
  112. requestBody:
  113. required: true
  114. description: JSON 请求体,业务字段置于 data
  115. content:
  116. application/json:
  117. schema:
  118. type: object
  119. description: 统一信封请求体,业务字段放在 data 内
  120. properties:
  121. data:
  122. type: object
  123. description: 业务参数
  124. properties:
  125. node_id:
  126. type: string
  127. description: 区域节点 ID
  128. node_name:
  129. type: string
  130. description: 新名称
  131. required:
  132. - node_id
  133. - node_name
  134. required:
  135. - data
  136. responses:
  137. "200":
  138. description: 成功。统一信封 code/message/data
  139. /region/delete@v1:
  140. post:
  141. summary: 删除区域节点
  142. description: 仅 admin。须提交 confirm_name(与当前区域名逐字一致)并通过三重守卫(无下级/无挂载客户/无引用)。
  143. x-require-auth: true
  144. x-resource-type: bos.region
  145. x-action: delete
  146. x-version: v1
  147. x-permission-visibility: catalog
  148. requestBody:
  149. required: true
  150. description: JSON 请求体,业务字段置于 data
  151. content:
  152. application/json:
  153. schema:
  154. type: object
  155. description: 统一信封请求体,业务字段放在 data 内
  156. properties:
  157. data:
  158. type: object
  159. description: 业务参数
  160. properties:
  161. node_id:
  162. type: string
  163. description: 待删除区域节点 ID
  164. confirm_name:
  165. type: string
  166. description: 确认名称,须与当前区域名逐字一致
  167. required:
  168. - node_id
  169. - confirm_name
  170. required:
  171. - data
  172. responses:
  173. "200":
  174. description: 成功。统一信封 code/message/data
  175. /region/tree@v1:
  176. get:
  177. summary: 查询可见区域树
  178. description: 按操作人可见范围返回区域节点集合/树;运营主/子账号只见本范围及下级。
  179. x-require-auth: true
  180. x-resource-type: bos.region
  181. x-action: view
  182. x-version: v1
  183. x-permission-visibility: catalog
  184. responses:
  185. "200":
  186. description: 成功。统一信封 code/message/data
  187. /region/subtree@v1:
  188. post:
  189. summary: 查询区域子树
  190. description: 挂载弹窗左树、区域钻取共用;按可见范围裁剪。
  191. x-require-auth: true
  192. x-resource-type: bos.region
  193. x-action: view
  194. x-version: v1
  195. x-permission-visibility: catalog
  196. requestBody:
  197. required: true
  198. description: JSON 请求体,业务字段置于 data
  199. content:
  200. application/json:
  201. schema:
  202. type: object
  203. description: 统一信封请求体,业务字段放在 data 内
  204. properties:
  205. data:
  206. type: object
  207. description: 子树查询参数
  208. properties:
  209. node_id:
  210. type: string
  211. description: 根节点 ID(可选;空则按可见根展开)
  212. required:
  213. - data
  214. responses:
  215. "200":
  216. description: 成功。统一信封 code/message/data
  217. /region/change_log@v1:
  218. get:
  219. summary: 区域变更流水
  220. description: 仅 admin 可见;运营子账号可见节点但不可见变更流水。
  221. x-require-auth: true
  222. x-resource-type: bos.region
  223. x-action: view
  224. x-version: v1
  225. x-permission-visibility: catalog
  226. responses:
  227. "200":
  228. description: 成功。统一信封 code/message/data
  229. /region/orphans@v1:
  230. get:
  231. summary: 悬空区域节点
  232. description: 查询悬空/孤儿节点;按节点所在区域分派可见性,admin 全量。
  233. x-require-auth: true
  234. x-resource-type: bos.region
  235. x-action: view
  236. x-version: v1
  237. x-permission-visibility: catalog
  238. responses:
  239. "200":
  240. description: 成功。统一信封 code/message/data
  241. /account/provision@v1:
  242. post:
  243. summary: 开通账号
  244. description: 四入口共用开通管线。唯一性守卫(登录名/手机号)先于平台调用;角色与主体须一致。
  245. x-require-auth: true
  246. x-resource-type: bos.account
  247. x-action: create
  248. x-version: v1
  249. x-permission-visibility: catalog
  250. requestBody:
  251. required: true
  252. description: JSON 请求体,业务字段置于 data
  253. content:
  254. application/json:
  255. schema:
  256. type: object
  257. description: 统一信封请求体,业务字段放在 data 内
  258. properties:
  259. data:
  260. type: object
  261. description: 业务参数
  262. properties:
  263. username:
  264. type: string
  265. description: 登录名(归一化后全站唯一)
  266. role_code:
  267. type: string
  268. description: 业务角色码
  269. subject_type:
  270. type: string
  271. description: 主体类型(operator/partner/ent_team/ops_team/customer 等)
  272. subject_id:
  273. type: string
  274. description: 主体 ID
  275. mobile:
  276. type: string
  277. description: 手机号(可选,唯一)
  278. required:
  279. - username
  280. - role_code
  281. - subject_type
  282. - subject_id
  283. required:
  284. - data
  285. responses:
  286. "200":
  287. description: 成功。统一信封 code/message/data
  288. /account/update_status@v1:
  289. post:
  290. summary: 停用或恢复账号
  291. description: 停用/恢复账号状态;不可操作当前登录账号。
  292. x-require-auth: true
  293. x-resource-type: bos.account
  294. x-action: manage
  295. x-version: v1
  296. x-permission-visibility: catalog
  297. requestBody:
  298. required: true
  299. description: JSON 请求体,业务字段置于 data
  300. content:
  301. application/json:
  302. schema:
  303. type: object
  304. description: 统一信封请求体,业务字段放在 data 内
  305. properties:
  306. data:
  307. type: object
  308. description: 业务参数
  309. properties:
  310. user_id:
  311. type: string
  312. description: 目标用户 ID
  313. status:
  314. type: string
  315. description: 目标状态(如 disabled/active)
  316. required:
  317. - user_id
  318. - status
  319. required:
  320. - data
  321. responses:
  322. "200":
  323. description: 成功。统一信封 code/message/data
  324. /account/reset_code@v1:
  325. post:
  326. summary: 重置激活码
  327. description: 仅未激活账号可重置;已激活拒绝。新码仅当次返回。
  328. x-require-auth: true
  329. x-resource-type: bos.account
  330. x-action: manage
  331. x-version: v1
  332. x-permission-visibility: catalog
  333. requestBody:
  334. required: true
  335. description: JSON 请求体,业务字段置于 data
  336. content:
  337. application/json:
  338. schema:
  339. type: object
  340. description: 统一信封请求体,业务字段放在 data 内
  341. properties:
  342. data:
  343. type: object
  344. description: 业务参数
  345. properties:
  346. user_id:
  347. type: string
  348. description: 目标用户 ID
  349. required:
  350. - user_id
  351. required:
  352. - data
  353. responses:
  354. "200":
  355. description: 成功。统一信封 code/message/data
  356. /account/export_codes@v1:
  357. post:
  358. summary: 导出激活码
  359. description: 导出未设密账号激活码明文。必传收窄后的 user_ids,以及与令牌一致的 scope_type/scope_id;validity=expired/all 为写操作(先作废再换新码)。
  360. x-require-auth: true
  361. x-resource-type: bos.account
  362. x-action: export
  363. x-version: v1
  364. x-permission-visibility: catalog
  365. requestBody:
  366. required: true
  367. description: JSON 请求体,业务字段置于 data
  368. content:
  369. application/json:
  370. schema:
  371. type: object
  372. description: 统一信封请求体,业务字段放在 data 内
  373. properties:
  374. data:
  375. type: object
  376. description: 业务参数
  377. properties:
  378. user_ids:
  379. type: array
  380. description: 按本人可见范围收窄后的用户 ID 列表(禁止空列表全量)
  381. items:
  382. type: string
  383. description: 用户 ID
  384. scope_type:
  385. type: string
  386. description: 作用域类型,须与所用令牌一致
  387. scope_id:
  388. type: string
  389. description: 作用域 ID,须与所用令牌一致
  390. validity:
  391. type: string
  392. description: 导出口径:active=仍有效;expired=已过期(写);all=全部(写)
  393. enum:
  394. - active
  395. - expired
  396. - all
  397. required:
  398. - user_ids
  399. - scope_type
  400. - scope_id
  401. - validity
  402. required:
  403. - data
  404. responses:
  405. "200":
  406. description: 成功。统一信封 code/message/data
  407. /account/change_password@v1:
  408. post:
  409. summary: 自助修改密码
  410. description: 已登录用户修改本人密码;新旧相同不保存。
  411. x-require-auth: true
  412. x-resource-type: bos.account
  413. x-action: manage
  414. x-version: v1
  415. x-permission-visibility: catalog
  416. requestBody:
  417. required: true
  418. description: JSON 请求体,业务字段置于 data
  419. content:
  420. application/json:
  421. schema:
  422. type: object
  423. description: 统一信封请求体,业务字段放在 data 内
  424. properties:
  425. data:
  426. type: object
  427. description: 业务参数
  428. properties:
  429. old_password:
  430. type: string
  431. description: 原密码
  432. new_password:
  433. type: string
  434. description: 新密码
  435. required:
  436. - old_password
  437. - new_password
  438. required:
  439. - data
  440. responses:
  441. "200":
  442. description: 成功。统一信封 code/message/data
  443. /activation/verify@v1:
  444. post:
  445. summary: 激活并设置密码
  446. description: 免登录豁免接口。校验激活码后设置新密码;按来源 IP+码窗口限流,不设失败计数锁死。
  447. x-require-auth: false
  448. x-resource-type: bos.activation
  449. x-action: manage
  450. x-version: v1
  451. x-permission-visibility: catalog
  452. requestBody:
  453. required: true
  454. description: JSON 请求体,业务字段置于 data
  455. content:
  456. application/json:
  457. schema:
  458. type: object
  459. description: 统一信封请求体,业务字段放在 data 内
  460. properties:
  461. data:
  462. type: object
  463. description: 业务参数
  464. properties:
  465. code:
  466. type: string
  467. description: 激活码
  468. new_password:
  469. type: string
  470. description: 新密码(建议不少于 8 位)
  471. minLength: 8
  472. required:
  473. - code
  474. - new_password
  475. required:
  476. - data
  477. responses:
  478. "200":
  479. description: 成功。统一信封 code/message/data
  480. /operator/create@v1:
  481. post:
  482. summary: 新建运营商
  483. description: 运营商建档。所属区域必须是省级节点;同省份×品牌唯一;可写结算口径。
  484. x-require-auth: true
  485. x-resource-type: bos.operator
  486. x-action: create
  487. x-version: v1
  488. x-permission-visibility: catalog
  489. requestBody:
  490. required: true
  491. description: JSON 请求体,业务字段置于 data
  492. content:
  493. application/json:
  494. schema:
  495. type: object
  496. description: 统一信封请求体,业务字段放在 data 内
  497. properties:
  498. data:
  499. type: object
  500. description: 业务参数
  501. properties:
  502. name:
  503. type: string
  504. description: 运营商名称
  505. brand:
  506. type: string
  507. description: 品牌:移动/联通/电信
  508. region_node_id:
  509. type: string
  510. description: 建档区域节点 ID(必须省级)
  511. is_province_node:
  512. type: boolean
  513. description: 是否省级节点标记(服务端校验用,可选)
  514. settle_mode:
  515. type: string
  516. description: 结算方式:ratio=比例;amount=固定金额;per_account=每账号
  517. enum:
  518. - ratio
  519. - amount
  520. - per_account
  521. settle_value:
  522. type: number
  523. description: 结算值:比例时 0<x≤100;金额/每账号时为分且 >0
  524. required:
  525. - name
  526. - brand
  527. - region_node_id
  528. required:
  529. - data
  530. responses:
  531. "200":
  532. description: 成功。统一信封 code/message/data
  533. /operator/update@v1:
  534. post:
  535. summary: 编辑运营商
  536. description: 编辑运营商档案;改品牌/省份不得绕过省份×品牌唯一与省级节点校验。
  537. x-require-auth: true
  538. x-resource-type: bos.operator
  539. x-action: update
  540. x-version: v1
  541. x-permission-visibility: catalog
  542. requestBody:
  543. required: true
  544. description: JSON 请求体,业务字段置于 data
  545. content:
  546. application/json:
  547. schema:
  548. type: object
  549. description: 统一信封请求体,业务字段放在 data 内
  550. properties:
  551. data:
  552. type: object
  553. description: 业务参数
  554. properties:
  555. operator_id:
  556. type: string
  557. description: 运营商 ID
  558. name:
  559. type: string
  560. description: 运营商名称
  561. brand:
  562. type: string
  563. description: 品牌:移动/联通/电信
  564. region_node_id:
  565. type: string
  566. description: 建档区域节点 ID(必须省级)
  567. is_province_node:
  568. type: boolean
  569. description: 是否省级节点标记(可选)
  570. settle_mode:
  571. type: string
  572. description: 结算方式:ratio/amount/per_account
  573. settle_value:
  574. type: number
  575. description: 结算值
  576. row_version:
  577. type: integer
  578. description: 乐观锁版本(若启用)
  579. required:
  580. - operator_id
  581. - name
  582. - brand
  583. - region_node_id
  584. required:
  585. - data
  586. responses:
  587. "200":
  588. description: 成功。统一信封 code/message/data
  589. /operator/delete@v1:
  590. post:
  591. summary: 删除运营商
  592. description: 删除前六项检查并级联注销对账账号。
  593. x-require-auth: true
  594. x-resource-type: bos.operator
  595. x-action: delete
  596. x-version: v1
  597. x-permission-visibility: catalog
  598. requestBody:
  599. required: true
  600. description: JSON 请求体,业务字段置于 data
  601. content:
  602. application/json:
  603. schema:
  604. type: object
  605. description: 统一信封请求体,业务字段放在 data 内
  606. properties:
  607. data:
  608. type: object
  609. description: 业务参数
  610. properties:
  611. operator_id:
  612. type: string
  613. description: 运营商 ID
  614. required:
  615. - operator_id
  616. required:
  617. - data
  618. responses:
  619. "200":
  620. description: 成功。统一信封 code/message/data
  621. /operator/get_list@v1:
  622. post:
  623. summary: 运营商列表
  624. description: 卡片口径:建档区域或下挂客户落在本可见范围。
  625. x-require-auth: true
  626. x-resource-type: bos.operator
  627. x-action: list
  628. x-version: v1
  629. x-permission-visibility: catalog
  630. requestBody:
  631. required: true
  632. description: JSON 请求体,业务字段置于 data
  633. content:
  634. application/json:
  635. schema:
  636. type: object
  637. description: 统一信封请求体,业务字段放在 data 内
  638. properties:
  639. data:
  640. type: object
  641. description: 列表筛选参数
  642. properties:
  643. page:
  644. type: integer
  645. description: 页码(0 基索引,默认 0)
  646. minimum: 0
  647. default: 0
  648. page_size:
  649. type: integer
  650. description: 每页条数(默认 20,上限 200)
  651. minimum: 1
  652. maximum: 200
  653. default: 20
  654. keyword:
  655. type: string
  656. description: 关键字筛选(可选)
  657. brand:
  658. type: string
  659. description: 品牌筛选(可选)
  660. required:
  661. - data
  662. responses:
  663. "200":
  664. description: 成功。统一信封 code/message/data
  665. /operator/recon_account/create@v1:
  666. post:
  667. summary: 创建对账账号
  668. description: 一家运营商至多一个对账账号;初始密码仅当次显示。
  669. x-require-auth: true
  670. x-resource-type: bos.operator.recon_account
  671. x-action: create
  672. x-version: v1
  673. x-permission-visibility: catalog
  674. requestBody:
  675. required: true
  676. description: JSON 请求体,业务字段置于 data
  677. content:
  678. application/json:
  679. schema:
  680. type: object
  681. description: 统一信封请求体,业务字段放在 data 内
  682. properties:
  683. data:
  684. type: object
  685. description: 业务参数
  686. properties:
  687. operator_id:
  688. type: string
  689. description: 运营商 ID
  690. username:
  691. type: string
  692. description: 对账账号登录名
  693. mobile:
  694. type: string
  695. description: 手机号(可选)
  696. required:
  697. - operator_id
  698. - username
  699. required:
  700. - data
  701. responses:
  702. "200":
  703. description: 成功。统一信封 code/message/data
  704. /operator/recon_account/get@v1:
  705. post:
  706. summary: 查询对账账号
  707. description: 只回状态提示(如「未发送,线下告知本人」),不回密码。
  708. x-require-auth: true
  709. x-resource-type: bos.operator.recon_account
  710. x-action: view
  711. x-version: v1
  712. x-permission-visibility: catalog
  713. requestBody:
  714. required: true
  715. description: JSON 请求体,业务字段置于 data
  716. content:
  717. application/json:
  718. schema:
  719. type: object
  720. description: 统一信封请求体,业务字段放在 data 内
  721. properties:
  722. data:
  723. type: object
  724. description: 业务参数
  725. properties:
  726. operator_id:
  727. type: string
  728. description: 运营商 ID
  729. required:
  730. - operator_id
  731. required:
  732. - data
  733. responses:
  734. "200":
  735. description: 成功。统一信封 code/message/data
  736. /partner/create@v1:
  737. post:
  738. summary: 新建合伙人
  739. description: 合伙人建档并同步开通账号;名称全站唯一;结算字段仅 admin 可写。
  740. x-require-auth: true
  741. x-resource-type: bos.partner
  742. x-action: create
  743. x-version: v1
  744. x-permission-visibility: catalog
  745. requestBody:
  746. required: true
  747. description: JSON 请求体,业务字段置于 data
  748. content:
  749. application/json:
  750. schema:
  751. type: object
  752. description: 统一信封请求体,业务字段放在 data 内
  753. properties:
  754. data:
  755. type: object
  756. description: 业务参数
  757. properties:
  758. name:
  759. type: string
  760. description: 合伙人名称(全站唯一)
  761. duty_desc:
  762. type: string
  763. description: 职务说明(可选)
  764. region_node_id:
  765. type: string
  766. description: 建档区域节点 ID
  767. mobile:
  768. type: string
  769. description: 手机号(可选)
  770. username:
  771. type: string
  772. description: 登录名(开通账号用)
  773. settle_mode:
  774. type: string
  775. description: 结算方式(仅 admin 可写,可选)
  776. settle_value:
  777. type: number
  778. description: 结算值(仅 admin 可写,可选)
  779. required:
  780. - name
  781. - region_node_id
  782. - username
  783. required:
  784. - data
  785. responses:
  786. "200":
  787. description: 成功。统一信封 code/message/data
  788. /partner/update@v1:
  789. post:
  790. summary: 编辑合伙人
  791. description: 编辑合伙人资料;登录名不可改。
  792. x-require-auth: true
  793. x-resource-type: bos.partner
  794. x-action: update
  795. x-version: v1
  796. x-permission-visibility: catalog
  797. requestBody:
  798. required: true
  799. description: JSON 请求体,业务字段置于 data
  800. content:
  801. application/json:
  802. schema:
  803. type: object
  804. description: 统一信封请求体,业务字段放在 data 内
  805. properties:
  806. data:
  807. type: object
  808. description: 业务参数
  809. properties:
  810. partner_id:
  811. type: string
  812. description: 合伙人 ID
  813. name:
  814. type: string
  815. description: 合伙人名称(全站唯一)
  816. duty_desc:
  817. type: string
  818. description: 职务说明(可选)
  819. region_node_id:
  820. type: string
  821. description: 建档区域节点 ID
  822. mobile:
  823. type: string
  824. description: 手机号(可选)
  825. settle_mode:
  826. type: string
  827. description: 结算方式(仅 admin 可写,可选)
  828. settle_value:
  829. type: number
  830. description: 结算值(仅 admin 可写,可选)
  831. row_version:
  832. type: integer
  833. description: 乐观锁版本(若启用)
  834. required:
  835. - partner_id
  836. - name
  837. - region_node_id
  838. required:
  839. - data
  840. responses:
  841. "200":
  842. description: 成功。统一信封 code/message/data
  843. /partner/delete@v1:
  844. post:
  845. summary: 删除合伙人
  846. description: 删除合伙人档案及相关授权。
  847. x-require-auth: true
  848. x-resource-type: bos.partner
  849. x-action: delete
  850. x-version: v1
  851. x-permission-visibility: catalog
  852. requestBody:
  853. required: true
  854. description: JSON 请求体,业务字段置于 data
  855. content:
  856. application/json:
  857. schema:
  858. type: object
  859. description: 统一信封请求体,业务字段放在 data 内
  860. properties:
  861. data:
  862. type: object
  863. description: 业务参数
  864. properties:
  865. partner_id:
  866. type: string
  867. description: 合伙人 ID
  868. required:
  869. - partner_id
  870. required:
  871. - data
  872. responses:
  873. "200":
  874. description: 成功。统一信封 code/message/data
  875. /partner/get_list@v1:
  876. post:
  877. summary: 合伙人列表
  878. description: 卡片口径:建档区域落在本范围(含下级)。
  879. x-require-auth: true
  880. x-resource-type: bos.partner
  881. x-action: list
  882. x-version: v1
  883. x-permission-visibility: catalog
  884. requestBody:
  885. required: true
  886. description: JSON 请求体,业务字段置于 data
  887. content:
  888. application/json:
  889. schema:
  890. type: object
  891. description: 统一信封请求体,业务字段放在 data 内
  892. properties:
  893. data:
  894. type: object
  895. description: 列表筛选参数
  896. properties:
  897. page:
  898. type: integer
  899. description: 页码(0 基索引,默认 0)
  900. minimum: 0
  901. default: 0
  902. page_size:
  903. type: integer
  904. description: 每页条数(默认 20,上限 200)
  905. minimum: 1
  906. maximum: 200
  907. default: 20
  908. keyword:
  909. type: string
  910. description: 关键字筛选(可选)
  911. required:
  912. - data
  913. responses:
  914. "200":
  915. description: 成功。统一信封 code/message/data
  916. /partner/scope/get@v1:
  917. get:
  918. summary: 读取合伙人负责范围
  919. description: 返回该合伙人的 region/customer 两类 scope_grant。
  920. x-require-auth: true
  921. x-resource-type: bos.partner.scope
  922. x-action: view
  923. x-version: v1
  924. x-permission-visibility: catalog
  925. responses:
  926. "200":
  927. description: 成功。统一信封 code/message/data
  928. /partner/scope/save@v1:
  929. post:
  930. summary: 保存合伙人负责范围
  931. description: 写入 scope_grant(holder_type=partner);允许保存为空;保存即 bump epoch。
  932. x-require-auth: true
  933. x-resource-type: bos.partner.scope
  934. x-action: manage
  935. x-version: v1
  936. x-permission-visibility: catalog
  937. requestBody:
  938. required: true
  939. description: JSON 请求体,业务字段置于 data
  940. content:
  941. application/json:
  942. schema:
  943. type: object
  944. description: 统一信封请求体,业务字段放在 data 内
  945. properties:
  946. data:
  947. type: object
  948. description: 业务参数
  949. properties:
  950. partner_id:
  951. type: string
  952. description: 合伙人 ID
  953. region_node_ids:
  954. type: array
  955. description: 负责区域节点 ID 列表(可空)
  956. items:
  957. type: string
  958. description: 区域节点 ID
  959. customer_ids:
  960. type: array
  961. description: 负责客户 ID 列表(可空)
  962. items:
  963. type: string
  964. description: 客户 ID
  965. required:
  966. - partner_id
  967. required:
  968. - data
  969. responses:
  970. "200":
  971. description: 成功。统一信封 code/message/data
  972. /ent_team/create@v1:
  973. post:
  974. summary: 新建运营团队
  975. description: 仅 admin。新建运营团队,负责范围初始为空。
  976. x-require-auth: true
  977. x-resource-type: bos.ent_team
  978. x-action: create
  979. x-version: v1
  980. x-permission-visibility: catalog
  981. requestBody:
  982. required: true
  983. description: JSON 请求体,业务字段置于 data
  984. content:
  985. application/json:
  986. schema:
  987. type: object
  988. description: 统一信封请求体,业务字段放在 data 内
  989. properties:
  990. data:
  991. type: object
  992. description: 业务参数
  993. properties:
  994. team_name:
  995. type: string
  996. description: 团队名称
  997. primary_username:
  998. type: string
  999. description: 主账号登录名(可选)
  1000. primary_mobile:
  1001. type: string
  1002. description: 主账号手机号(可选)
  1003. required:
  1004. - team_name
  1005. required:
  1006. - data
  1007. responses:
  1008. "200":
  1009. description: 成功。统一信封 code/message/data
  1010. /ent_team/update@v1:
  1011. post:
  1012. summary: 编辑运营团队
  1013. description: 仅 admin。编辑团队资料。
  1014. x-require-auth: true
  1015. x-resource-type: bos.ent_team
  1016. x-action: update
  1017. x-version: v1
  1018. x-permission-visibility: catalog
  1019. requestBody:
  1020. required: true
  1021. description: JSON 请求体,业务字段置于 data
  1022. content:
  1023. application/json:
  1024. schema:
  1025. type: object
  1026. description: 统一信封请求体,业务字段放在 data 内
  1027. properties:
  1028. data:
  1029. type: object
  1030. description: 业务参数
  1031. properties:
  1032. team_id:
  1033. type: string
  1034. description: 团队 ID
  1035. team_name:
  1036. type: string
  1037. description: 团队名称
  1038. row_version:
  1039. type: integer
  1040. description: 乐观锁版本(若启用)
  1041. required:
  1042. - team_id
  1043. - team_name
  1044. required:
  1045. - data
  1046. responses:
  1047. "200":
  1048. description: 成功。统一信封 code/message/data
  1049. /ent_team/delete@v1:
  1050. post:
  1051. summary: 删除运营团队
  1052. description: 仅 admin。内置「总部·不限区域」团队不可删。
  1053. x-require-auth: true
  1054. x-resource-type: bos.ent_team
  1055. x-action: delete
  1056. x-version: v1
  1057. x-permission-visibility: catalog
  1058. requestBody:
  1059. required: true
  1060. description: JSON 请求体,业务字段置于 data
  1061. content:
  1062. application/json:
  1063. schema:
  1064. type: object
  1065. description: 统一信封请求体,业务字段放在 data 内
  1066. properties:
  1067. data:
  1068. type: object
  1069. description: 业务参数
  1070. properties:
  1071. team_id:
  1072. type: string
  1073. description: 团队 ID
  1074. required:
  1075. - team_id
  1076. required:
  1077. - data
  1078. responses:
  1079. "200":
  1080. description: 成功。统一信封 code/message/data
  1081. /ent_team/member_add@v1:
  1082. post:
  1083. summary: 添加运营团队成员
  1084. description: 每团队有且仅有一个主账号;不可删除当前登录账号。
  1085. x-require-auth: true
  1086. x-resource-type: bos.ent_team
  1087. x-action: manage
  1088. x-version: v1
  1089. x-permission-visibility: catalog
  1090. requestBody:
  1091. required: true
  1092. description: JSON 请求体,业务字段置于 data
  1093. content:
  1094. application/json:
  1095. schema:
  1096. type: object
  1097. description: 统一信封请求体,业务字段放在 data 内
  1098. properties:
  1099. data:
  1100. type: object
  1101. description: 业务参数
  1102. properties:
  1103. team_id:
  1104. type: string
  1105. description: 团队 ID
  1106. username:
  1107. type: string
  1108. description: 成员登录名
  1109. mobile:
  1110. type: string
  1111. description: 手机号(可选)
  1112. is_primary:
  1113. type: boolean
  1114. description: 是否设为主账号(可选)
  1115. required:
  1116. - team_id
  1117. - username
  1118. required:
  1119. - data
  1120. responses:
  1121. "200":
  1122. description: 成功。统一信封 code/message/data
  1123. /ent_team/member_remove@v1:
  1124. post:
  1125. summary: 移除运营团队成员
  1126. description: 内置主账号不可删不可转交;不可删除当前登录账号。
  1127. x-require-auth: true
  1128. x-resource-type: bos.ent_team
  1129. x-action: manage
  1130. x-version: v1
  1131. x-permission-visibility: catalog
  1132. requestBody:
  1133. required: true
  1134. description: JSON 请求体,业务字段置于 data
  1135. content:
  1136. application/json:
  1137. schema:
  1138. type: object
  1139. description: 统一信封请求体,业务字段放在 data 内
  1140. properties:
  1141. data:
  1142. type: object
  1143. description: 业务参数
  1144. properties:
  1145. team_id:
  1146. type: string
  1147. description: 团队 ID
  1148. user_id:
  1149. type: string
  1150. description: 成员用户 ID
  1151. required:
  1152. - team_id
  1153. - user_id
  1154. required:
  1155. - data
  1156. responses:
  1157. "200":
  1158. description: 成功。统一信封 code/message/data
  1159. /ent_team/transfer_primary@v1:
  1160. post:
  1161. summary: 转交运营团队主账号
  1162. description: 仅 admin。同事务切换 is_primary 标记并同步 role_code(opsMain↔opsSub)。
  1163. x-require-auth: true
  1164. x-resource-type: bos.ent_team
  1165. x-action: manage
  1166. x-version: v1
  1167. x-permission-visibility: catalog
  1168. requestBody:
  1169. required: true
  1170. description: JSON 请求体,业务字段置于 data
  1171. content:
  1172. application/json:
  1173. schema:
  1174. type: object
  1175. description: 统一信封请求体,业务字段放在 data 内
  1176. properties:
  1177. data:
  1178. type: object
  1179. description: 业务参数
  1180. properties:
  1181. team_id:
  1182. type: string
  1183. description: 团队 ID
  1184. from_user_id:
  1185. type: string
  1186. description: 原主账号用户 ID
  1187. to_user_id:
  1188. type: string
  1189. description: 新主账号用户 ID
  1190. required:
  1191. - team_id
  1192. - from_user_id
  1193. - to_user_id
  1194. required:
  1195. - data
  1196. responses:
  1197. "200":
  1198. description: 成功。统一信封 code/message/data
  1199. /ent_team/scope/get@v1:
  1200. get:
  1201. summary: 读取运营团队负责范围
  1202. description: 仅 admin。返回团队区域负责范围。
  1203. x-require-auth: true
  1204. x-resource-type: bos.ent_team.scope
  1205. x-action: view
  1206. x-version: v1
  1207. x-permission-visibility: catalog
  1208. responses:
  1209. "200":
  1210. description: 成功。统一信封 code/message/data
  1211. /ent_team/scope/save@v1:
  1212. post:
  1213. summary: 保存运营团队负责范围
  1214. description: 仅 admin。勾选区域写入 scope_grant(holder=ent_team),成为区域删除的引用来源。
  1215. x-require-auth: true
  1216. x-resource-type: bos.ent_team.scope
  1217. x-action: manage
  1218. x-version: v1
  1219. x-permission-visibility: catalog
  1220. requestBody:
  1221. required: true
  1222. description: JSON 请求体,业务字段置于 data
  1223. content:
  1224. application/json:
  1225. schema:
  1226. type: object
  1227. description: 统一信封请求体,业务字段放在 data 内
  1228. properties:
  1229. data:
  1230. type: object
  1231. description: 业务参数
  1232. properties:
  1233. team_id:
  1234. type: string
  1235. description: 团队 ID
  1236. region_node_ids:
  1237. type: array
  1238. description: 负责区域节点 ID 列表
  1239. items:
  1240. type: string
  1241. description: 区域节点 ID
  1242. required:
  1243. - team_id
  1244. - region_node_ids
  1245. required:
  1246. - data
  1247. responses:
  1248. "200":
  1249. description: 成功。统一信封 code/message/data
  1250. /ops_team/create@v1:
  1251. post:
  1252. summary: 新建运维团队
  1253. description: 须指定所属区域、可派工单类型≥1、分派方式与结算口径。⚠️ 2026-11-05 起团队不分类型(无 team_type 键)。
  1254. x-require-auth: true
  1255. x-resource-type: bos.ops_team
  1256. x-action: create
  1257. x-version: v1
  1258. x-permission-visibility: catalog
  1259. requestBody:
  1260. required: true
  1261. description: JSON 请求体,业务字段置于 data
  1262. content:
  1263. application/json:
  1264. schema:
  1265. type: object
  1266. description: 统一信封请求体,业务字段放在 data 内
  1267. properties:
  1268. data:
  1269. type: object
  1270. description: 业务参数
  1271. properties:
  1272. team_name:
  1273. type: string
  1274. description: 团队名称
  1275. region_node_id:
  1276. type: string
  1277. description: 所属区域节点 ID
  1278. ticket_types:
  1279. type: array
  1280. description: 可派工单类型列表(至少 1 项)
  1281. items:
  1282. type: string
  1283. description: 工单类型码
  1284. dispatch_mode:
  1285. type: string
  1286. description: 分派方式:manual=手工;auto_avg=自动均分
  1287. enum:
  1288. - manual
  1289. - auto_avg
  1290. settle_mode:
  1291. type: string
  1292. description: 结算方式
  1293. settle_value:
  1294. type: number
  1295. description: 结算值
  1296. primary_username:
  1297. type: string
  1298. description: 主账号登录名(空则默认「{团队名}主账号」)
  1299. primary_mobile:
  1300. type: string
  1301. description: 主账号手机号(可选)
  1302. required:
  1303. - team_name
  1304. - region_node_id
  1305. - ticket_types
  1306. - dispatch_mode
  1307. required:
  1308. - data
  1309. responses:
  1310. "200":
  1311. description: 成功。统一信封 code/message/data
  1312. /ops_team/update@v1:
  1313. post:
  1314. summary: 编辑运维团队
  1315. description: 编辑团队资料。⚠️ 2026-11-05 起团队不分类型,请求体无 team_type 键。
  1316. x-require-auth: true
  1317. x-resource-type: bos.ops_team
  1318. x-action: update
  1319. x-version: v1
  1320. x-permission-visibility: catalog
  1321. requestBody:
  1322. required: true
  1323. description: JSON 请求体,业务字段置于 data
  1324. content:
  1325. application/json:
  1326. schema:
  1327. type: object
  1328. description: 统一信封请求体,业务字段放在 data 内
  1329. properties:
  1330. data:
  1331. type: object
  1332. description: 业务参数
  1333. properties:
  1334. team_id:
  1335. type: string
  1336. description: 团队 ID
  1337. team_name:
  1338. type: string
  1339. description: 团队名称
  1340. region_node_id:
  1341. type: string
  1342. description: 所属区域节点 ID
  1343. ticket_types:
  1344. type: array
  1345. description: 可派工单类型列表
  1346. items:
  1347. type: string
  1348. description: 工单类型码
  1349. settle_mode:
  1350. type: string
  1351. description: 结算方式
  1352. settle_value:
  1353. type: number
  1354. description: 结算值
  1355. row_version:
  1356. type: integer
  1357. description: 乐观锁版本(若启用)
  1358. required:
  1359. - team_id
  1360. required:
  1361. - data
  1362. responses:
  1363. "200":
  1364. description: 成功。统一信封 code/message/data
  1365. /ops_team/delete@v1:
  1366. post:
  1367. summary: 删除运维团队
  1368. description: 删除前校验引用与未办完工单等守卫。
  1369. x-require-auth: true
  1370. x-resource-type: bos.ops_team
  1371. x-action: delete
  1372. x-version: v1
  1373. x-permission-visibility: catalog
  1374. requestBody:
  1375. required: true
  1376. description: JSON 请求体,业务字段置于 data
  1377. content:
  1378. application/json:
  1379. schema:
  1380. type: object
  1381. description: 统一信封请求体,业务字段放在 data 内
  1382. properties:
  1383. data:
  1384. type: object
  1385. description: 业务参数
  1386. properties:
  1387. team_id:
  1388. type: string
  1389. description: 团队 ID
  1390. required:
  1391. - team_id
  1392. required:
  1393. - data
  1394. responses:
  1395. "200":
  1396. description: 成功。统一信封 code/message/data
  1397. /ops_team/scope/save@v1:
  1398. post:
  1399. summary: 保存运维团队负责范围
  1400. description: 三个范围写入口之一。同事务校验范围包含关系与未办完工单守卫;失败两侧都不落库。
  1401. x-require-auth: true
  1402. x-resource-type: bos.ops_team.scope
  1403. x-action: manage
  1404. x-version: v1
  1405. x-permission-visibility: catalog
  1406. requestBody:
  1407. required: true
  1408. description: JSON 请求体,业务字段置于 data
  1409. content:
  1410. application/json:
  1411. schema:
  1412. type: object
  1413. description: 统一信封请求体,业务字段放在 data 内
  1414. properties:
  1415. data:
  1416. type: object
  1417. description: 业务参数
  1418. properties:
  1419. team_id:
  1420. type: string
  1421. description: 团队 ID
  1422. region_node_ids:
  1423. type: array
  1424. description: 负责区域节点 ID 列表
  1425. items:
  1426. type: string
  1427. description: 区域节点 ID
  1428. customer_ids:
  1429. type: array
  1430. description: 负责客户 ID 列表(可空)
  1431. items:
  1432. type: string
  1433. description: 客户 ID
  1434. required:
  1435. - team_id
  1436. required:
  1437. - data
  1438. responses:
  1439. "200":
  1440. description: 成功。统一信封 code/message/data
  1441. /ops_team/member_add@v1:
  1442. post:
  1443. summary: 添加运维成员
  1444. description: 新建成员档案并开通运维子账号(`role_code=ops`)。⚠️ 2026-11-05 起成员不分类型,服务侧只校验 `ticket_types` 是团队可分配类型的子集(`KLT-I105`,可为空=不接单)。
  1445. x-require-auth: true
  1446. x-resource-type: bos.ops_team
  1447. x-action: manage
  1448. x-version: v1
  1449. x-permission-visibility: catalog
  1450. requestBody:
  1451. required: true
  1452. description: JSON 请求体,业务字段置于 data
  1453. content:
  1454. application/json:
  1455. schema:
  1456. type: object
  1457. description: 统一信封请求体,业务字段放在 data 内
  1458. properties:
  1459. data:
  1460. type: object
  1461. description: 业务参数
  1462. properties:
  1463. team_id:
  1464. type: string
  1465. description: 团队 ID
  1466. ticket_types:
  1467. type: array
  1468. description: 该成员可处理的工单类型(须为团队可分配类型的子集;空数组=不接单,如录入人员)
  1469. items:
  1470. type: string
  1471. description: 工单类型码
  1472. username:
  1473. type: string
  1474. description: 登录名
  1475. mobile:
  1476. type: string
  1477. description: 手机号(可选)
  1478. required:
  1479. - team_id
  1480. - username
  1481. required:
  1482. - data
  1483. responses:
  1484. "200":
  1485. description: 成功。统一信封 code/message/data
  1486. /ops_team/member_update@v1:
  1487. post:
  1488. summary: 更新运维成员
  1489. description: 可改手机号与可处理工单类型。⚠️ 2026-11-05 起成员不分类型,⛔ 不因类型变更改写 role_code;可接类型落 ops_member_ticket_type。
  1490. x-require-auth: true
  1491. x-resource-type: bos.ops_team
  1492. x-action: manage
  1493. x-version: v1
  1494. x-permission-visibility: catalog
  1495. requestBody:
  1496. required: true
  1497. description: JSON 请求体,业务字段置于 data
  1498. content:
  1499. application/json:
  1500. schema:
  1501. type: object
  1502. description: 统一信封请求体,业务字段放在 data 内
  1503. properties:
  1504. data:
  1505. type: object
  1506. description: 业务参数
  1507. properties:
  1508. team_id:
  1509. type: string
  1510. description: 团队 ID
  1511. ticket_types:
  1512. type: array
  1513. description: 该成员可处理的工单类型(整体替换;须为团队可分配类型的子集;空数组=不接单)
  1514. items:
  1515. type: string
  1516. description: 工单类型码
  1517. member_id:
  1518. type: string
  1519. description: 成员 ID
  1520. mobile:
  1521. type: string
  1522. description: 手机号(可选)
  1523. required:
  1524. - team_id
  1525. - member_id
  1526. required:
  1527. - data
  1528. responses:
  1529. "200":
  1530. description: 成功。统一信封 code/message/data
  1531. /ops_team/member_remove@v1:
  1532. post:
  1533. summary: 移除运维成员
  1534. description: 删除前五项检查并注销账号。
  1535. x-require-auth: true
  1536. x-resource-type: bos.ops_team
  1537. x-action: manage
  1538. x-version: v1
  1539. x-permission-visibility: catalog
  1540. requestBody:
  1541. required: true
  1542. description: JSON 请求体,业务字段置于 data
  1543. content:
  1544. application/json:
  1545. schema:
  1546. type: object
  1547. description: 统一信封请求体,业务字段放在 data 内
  1548. properties:
  1549. data:
  1550. type: object
  1551. description: 业务参数
  1552. properties:
  1553. team_id:
  1554. type: string
  1555. description: 团队 ID
  1556. member_id:
  1557. type: string
  1558. description: 成员 ID
  1559. required:
  1560. - team_id
  1561. - member_id
  1562. required:
  1563. - data
  1564. responses:
  1565. "200":
  1566. description: 成功。统一信封 code/message/data
  1567. /ops_member/scope/save@v1:
  1568. post:
  1569. summary: 保存运维成员负责范围
  1570. description: 三个范围写入口之二。scope_mode∈follow_team/region/customer;越界报错不保存。
  1571. x-require-auth: true
  1572. x-resource-type: bos.ops_member.scope
  1573. x-action: manage
  1574. x-version: v1
  1575. x-permission-visibility: catalog
  1576. requestBody:
  1577. required: true
  1578. description: JSON 请求体,业务字段置于 data
  1579. content:
  1580. application/json:
  1581. schema:
  1582. type: object
  1583. description: 统一信封请求体,业务字段放在 data 内
  1584. properties:
  1585. data:
  1586. type: object
  1587. description: 业务参数
  1588. properties:
  1589. member_id:
  1590. type: string
  1591. description: 成员 ID
  1592. scope_mode:
  1593. type: string
  1594. description: 范围模式:follow_team=跟随团队;region=按区域;customer=按客户
  1595. enum:
  1596. - follow_team
  1597. - region
  1598. - customer
  1599. targets:
  1600. type: array
  1601. description: region/customer 模式下的目标 ID 列表
  1602. items:
  1603. type: string
  1604. description: 目标 ID
  1605. required:
  1606. - member_id
  1607. - scope_mode
  1608. required:
  1609. - data
  1610. responses:
  1611. "200":
  1612. description: 成功。统一信封 code/message/data
  1613. /ops_team/dispatch_mode/update@v1:
  1614. post:
  1615. summary: 更新分派方式
  1616. description: 与运营侧改同一字段,后写入者生效;默认补记审计。
  1617. x-require-auth: true
  1618. x-resource-type: bos.ops_team.dispatch_mode
  1619. x-action: update
  1620. x-version: v1
  1621. x-permission-visibility: catalog
  1622. requestBody:
  1623. required: true
  1624. description: JSON 请求体,业务字段置于 data
  1625. content:
  1626. application/json:
  1627. schema:
  1628. type: object
  1629. description: 统一信封请求体,业务字段放在 data 内
  1630. properties:
  1631. data:
  1632. type: object
  1633. description: 业务参数
  1634. properties:
  1635. team_id:
  1636. type: string
  1637. description: 团队 ID
  1638. dispatch_mode:
  1639. type: string
  1640. description: 分派方式:manual=手工;auto_avg=自动均分
  1641. enum:
  1642. - manual
  1643. - auto_avg
  1644. required:
  1645. - team_id
  1646. - dispatch_mode
  1647. required:
  1648. - data
  1649. responses:
  1650. "200":
  1651. description: 成功。统一信封 code/message/data
  1652. /ops_team/coverage/get@v1:
  1653. get:
  1654. summary: 运维团队覆盖客户
  1655. description: 覆盖客户=团队区域范围(Tree) ∩ 本类型归属(Owner),与列表分页同源。
  1656. x-require-auth: true
  1657. x-resource-type: bos.ops_team.coverage
  1658. x-action: view
  1659. x-version: v1
  1660. x-permission-visibility: catalog
  1661. responses:
  1662. "200":
  1663. description: 成功。统一信封 code/message/data
  1664. /customer/create@v1:
  1665. post:
  1666. summary: 新建客户
  1667. description: 客户建档。须指定归属运营商;可选合伙人、挂载申请、父区域节点。完整弹窗字段还可含识别号、联系人、地址、运维团队、主账号、证照等。
  1668. x-require-auth: true
  1669. x-resource-type: bos.customer
  1670. x-action: create
  1671. x-version: v1
  1672. x-permission-visibility: catalog
  1673. requestBody:
  1674. required: true
  1675. description: JSON 请求体,业务字段置于 data
  1676. content:
  1677. application/json:
  1678. schema:
  1679. type: object
  1680. description: 统一信封请求体,业务字段放在 data 内
  1681. properties:
  1682. data:
  1683. type: object
  1684. description: 业务参数
  1685. properties:
  1686. customer_name:
  1687. type: string
  1688. description: 客户名称
  1689. subject_type:
  1690. type: string
  1691. description: 主体类型
  1692. operator_id:
  1693. type: string
  1694. description: 归属运营商 ID
  1695. partner_id:
  1696. type: string
  1697. description: 归属合伙人 ID(可选)
  1698. mount_request_id:
  1699. type: string
  1700. description: 挂载申请 ID(可选;有值表示已完成挂载前置)
  1701. parent_node_id:
  1702. type: string
  1703. description: 所挂区域父节点 ID(可选)
  1704. id_code:
  1705. type: string
  1706. description: 识别号(可选)
  1707. contact_name:
  1708. type: string
  1709. description: 联系人(可选)
  1710. contact_mobile:
  1711. type: string
  1712. description: 联系电话(可选)
  1713. address:
  1714. type: string
  1715. description: 地址(可选)
  1716. ops_team_ids:
  1717. type: array
  1718. description: 所挂运维团队 ID 列表(可选;至少一支时须在操作人负责范围内,多支之间允许可分配类型重叠)
  1719. items:
  1720. type: string
  1721. description: 运维团队 ID
  1722. primary_username:
  1723. type: string
  1724. description: 客户主账号登录名(可选)
  1725. primary_mobile:
  1726. type: string
  1727. description: 客户主账号手机号(可选)
  1728. required:
  1729. - customer_name
  1730. - subject_type
  1731. - operator_id
  1732. required:
  1733. - data
  1734. responses:
  1735. "200":
  1736. description: 成功。统一信封 code/message/data
  1737. /customer/get_list@v1:
  1738. post:
  1739. summary: 客户列表
  1740. description: 按可见范围返回客户列表,支持筛选与分页。
  1741. x-require-auth: true
  1742. x-resource-type: bos.customer
  1743. x-action: list
  1744. x-version: v1
  1745. x-permission-visibility: catalog
  1746. requestBody:
  1747. required: true
  1748. description: JSON 请求体,业务字段置于 data
  1749. content:
  1750. application/json:
  1751. schema:
  1752. type: object
  1753. description: 统一信封请求体,业务字段放在 data 内
  1754. properties:
  1755. data:
  1756. type: object
  1757. description: 列表筛选参数
  1758. properties:
  1759. page:
  1760. type: integer
  1761. description: 页码(0 基索引,默认 0)
  1762. minimum: 0
  1763. default: 0
  1764. page_size:
  1765. type: integer
  1766. description: 每页条数(默认 20,上限 200)
  1767. minimum: 1
  1768. maximum: 200
  1769. default: 20
  1770. keyword:
  1771. type: string
  1772. description: 关键字筛选(可选)
  1773. region_node_id:
  1774. type: string
  1775. description: 区域筛选(可选)
  1776. operator_id:
  1777. type: string
  1778. description: 运营商筛选(可选)
  1779. partner_id:
  1780. type: string
  1781. description: 合伙人筛选(可选)
  1782. status:
  1783. type: string
  1784. description: 状态筛选(可选)
  1785. required:
  1786. - data
  1787. responses:
  1788. "200":
  1789. description: 成功。统一信封 code/message/data
  1790. /customer/get@v1:
  1791. post:
  1792. summary: 客户详情
  1793. description: 按客户 ID 查询档案详情。
  1794. x-require-auth: true
  1795. x-resource-type: bos.customer
  1796. x-action: view
  1797. x-version: v1
  1798. x-permission-visibility: catalog
  1799. requestBody:
  1800. required: true
  1801. description: JSON 请求体,业务字段置于 data
  1802. content:
  1803. application/json:
  1804. schema:
  1805. type: object
  1806. description: 统一信封请求体,业务字段放在 data 内
  1807. properties:
  1808. data:
  1809. type: object
  1810. description: 业务参数
  1811. properties:
  1812. customer_id:
  1813. type: string
  1814. description: 客户 ID
  1815. required:
  1816. - customer_id
  1817. required:
  1818. - data
  1819. responses:
  1820. "200":
  1821. description: 成功。统一信封 code/message/data
  1822. /customer/update@v1:
  1823. post:
  1824. summary: 编辑客户
  1825. description: 编辑客户资料。拒收改写 customer_id/region_node_id/operator_id/partner_id;改识别号须带 change_basis。
  1826. x-require-auth: true
  1827. x-resource-type: bos.customer
  1828. x-action: update
  1829. x-version: v1
  1830. x-permission-visibility: catalog
  1831. requestBody:
  1832. required: true
  1833. description: JSON 请求体,业务字段置于 data
  1834. content:
  1835. application/json:
  1836. schema:
  1837. type: object
  1838. description: 统一信封请求体,业务字段放在 data 内
  1839. properties:
  1840. data:
  1841. type: object
  1842. description: 业务参数
  1843. properties:
  1844. customer_id:
  1845. type: string
  1846. description: 客户 ID
  1847. customer_name:
  1848. type: string
  1849. description: 客户名称
  1850. subject_type:
  1851. type: string
  1852. description: 主体类型
  1853. id_code:
  1854. type: string
  1855. description: 识别号
  1856. change_basis:
  1857. type: string
  1858. description: 改识别号时的变更依据
  1859. contact_name:
  1860. type: string
  1861. description: 联系人
  1862. contact_mobile:
  1863. type: string
  1864. description: 联系电话
  1865. address:
  1866. type: string
  1867. description: 地址
  1868. ops_team_ids:
  1869. type: array
  1870. description: 所挂运维团队 ID 列表(整体替换当前归属;多支之间允许可分配类型重叠)
  1871. items:
  1872. type: string
  1873. description: 运维团队 ID
  1874. row_version:
  1875. type: integer
  1876. description: 乐观锁版本(若启用)
  1877. required:
  1878. - customer_id
  1879. required:
  1880. - data
  1881. responses:
  1882. "200":
  1883. description: 成功。统一信封 code/message/data
  1884. /customer/delete_precheck@v1:
  1885. post:
  1886. summary: 客户删除前置检查
  1887. description: 返回 can_delete 与 reasons,供删除确认弹窗使用。
  1888. x-require-auth: true
  1889. x-resource-type: bos.customer
  1890. x-action: view
  1891. x-version: v1
  1892. x-permission-visibility: catalog
  1893. requestBody:
  1894. required: true
  1895. description: JSON 请求体,业务字段置于 data
  1896. content:
  1897. application/json:
  1898. schema:
  1899. type: object
  1900. description: 统一信封请求体,业务字段放在 data 内
  1901. properties:
  1902. data:
  1903. type: object
  1904. description: 业务参数
  1905. properties:
  1906. customer_id:
  1907. type: string
  1908. description: 客户 ID
  1909. required:
  1910. - customer_id
  1911. required:
  1912. - data
  1913. responses:
  1914. "200":
  1915. description: 成功。统一信封 code/message/data
  1916. /customer/delete@v1:
  1917. post:
  1918. summary: 删除客户
  1919. description: 删除客户;须携带删除前置检查时的阻塞快照版本。
  1920. x-require-auth: true
  1921. x-resource-type: bos.customer
  1922. x-action: delete
  1923. x-version: v1
  1924. x-permission-visibility: catalog
  1925. requestBody:
  1926. required: true
  1927. description: JSON 请求体,业务字段置于 data
  1928. content:
  1929. application/json:
  1930. schema:
  1931. type: object
  1932. description: 统一信封请求体,业务字段放在 data 内
  1933. properties:
  1934. data:
  1935. type: object
  1936. description: 业务参数
  1937. properties:
  1938. customer_id:
  1939. type: string
  1940. description: 客户 ID
  1941. precheck_version:
  1942. type: string
  1943. description: 删除前置检查快照版本
  1944. required:
  1945. - customer_id
  1946. required:
  1947. - data
  1948. responses:
  1949. "200":
  1950. description: 成功。统一信封 code/message/data
  1951. /customer/history@v1:
  1952. post:
  1953. summary: 客户变更历史
  1954. description: 查询客户档案变更流水。
  1955. x-require-auth: true
  1956. x-resource-type: bos.customer
  1957. x-action: view
  1958. x-version: v1
  1959. x-permission-visibility: catalog
  1960. requestBody:
  1961. required: true
  1962. description: JSON 请求体,业务字段置于 data
  1963. content:
  1964. application/json:
  1965. schema:
  1966. type: object
  1967. description: 统一信封请求体,业务字段放在 data 内
  1968. properties:
  1969. data:
  1970. type: object
  1971. description: 业务参数
  1972. properties:
  1973. customer_id:
  1974. type: string
  1975. description: 客户 ID
  1976. page:
  1977. type: integer
  1978. description: 页码(0 基索引,默认 0)
  1979. minimum: 0
  1980. default: 0
  1981. page_size:
  1982. type: integer
  1983. description: 每页条数(默认 20,上限 200)
  1984. minimum: 1
  1985. maximum: 200
  1986. default: 20
  1987. keyword:
  1988. type: string
  1989. description: 关键字筛选(可选)
  1990. required:
  1991. - customer_id
  1992. required:
  1993. - data
  1994. responses:
  1995. "200":
  1996. description: 成功。统一信封 code/message/data
  1997. /customer/mount_candidates@v1:
  1998. get:
  1999. summary: 改挂候选客户
  2000. description: 返回操作人可见范围内可作为改挂目标的候选客户列表。
  2001. x-require-auth: true
  2002. x-resource-type: bos.customer
  2003. x-action: view
  2004. x-version: v1
  2005. x-permission-visibility: catalog
  2006. responses:
  2007. "200":
  2008. description: 成功。统一信封 code/message/data
  2009. /customer/influence@v1:
  2010. post:
  2011. summary: 改挂影响面
  2012. description: 改挂前必做前置:未办完工单数、当前责任人与团队、当期是否已出账等。
  2013. x-require-auth: true
  2014. x-resource-type: bos.customer
  2015. x-action: view
  2016. x-version: v1
  2017. x-permission-visibility: catalog
  2018. requestBody:
  2019. required: true
  2020. description: JSON 请求体,业务字段置于 data
  2021. content:
  2022. application/json:
  2023. schema:
  2024. type: object
  2025. description: 统一信封请求体,业务字段放在 data 内
  2026. properties:
  2027. data:
  2028. type: object
  2029. description: 业务参数
  2030. properties:
  2031. customer_id:
  2032. type: string
  2033. description: 客户 ID
  2034. required:
  2035. - customer_id
  2036. required:
  2037. - data
  2038. responses:
  2039. "200":
  2040. description: 成功。统一信封 code/message/data
  2041. /customer/move_region@v1:
  2042. post:
  2043. summary: 客户改挂区域
  2044. description: 复合事务改挂区域;新区域省份须等于归属运营商档案省份。
  2045. x-require-auth: true
  2046. x-resource-type: bos.customer
  2047. x-action: update
  2048. x-version: v1
  2049. x-permission-visibility: catalog
  2050. requestBody:
  2051. required: true
  2052. description: JSON 请求体,业务字段置于 data
  2053. content:
  2054. application/json:
  2055. schema:
  2056. type: object
  2057. description: 统一信封请求体,业务字段放在 data 内
  2058. properties:
  2059. data:
  2060. type: object
  2061. description: 业务参数
  2062. properties:
  2063. customer_id:
  2064. type: string
  2065. description: 客户 ID
  2066. new_region_node_id:
  2067. type: string
  2068. description: 新挂载区域节点 ID
  2069. ops_team_ids:
  2070. type: array
  2071. description: 所挂运维团队 ID 列表(可选,随改挂重绑)
  2072. items:
  2073. type: string
  2074. description: 运维团队 ID
  2075. required:
  2076. - customer_id
  2077. - new_region_node_id
  2078. required:
  2079. - data
  2080. responses:
  2081. "200":
  2082. description: 成功。统一信封 code/message/data
  2083. /customer/attribution/update@v1:
  2084. post:
  2085. summary: 更新客户归属
  2086. description: 改归属运营商/合伙人;改运营商时档案省份须等于客户所挂区域省份。
  2087. x-require-auth: true
  2088. x-resource-type: bos.customer.attribution
  2089. x-action: update
  2090. x-version: v1
  2091. x-permission-visibility: catalog
  2092. requestBody:
  2093. required: true
  2094. description: JSON 请求体,业务字段置于 data
  2095. content:
  2096. application/json:
  2097. schema:
  2098. type: object
  2099. description: 统一信封请求体,业务字段放在 data 内
  2100. properties:
  2101. data:
  2102. type: object
  2103. description: 业务参数
  2104. properties:
  2105. customer_id:
  2106. type: string
  2107. description: 客户 ID
  2108. operator_id:
  2109. type: string
  2110. description: 新归属运营商 ID(可选)
  2111. partner_id:
  2112. type: string
  2113. description: 新归属合伙人 ID(可选,可清空)
  2114. required:
  2115. - customer_id
  2116. required:
  2117. - data
  2118. responses:
  2119. "200":
  2120. description: 成功。统一信封 code/message/data
  2121. /import_batch/template_download@v1:
  2122. get:
  2123. summary: 下载导入模板
  2124. description: 返回 14 列 xlsx 模板说明(format/columns/max_rows)。
  2125. x-require-auth: true
  2126. x-resource-type: bos.import_batch
  2127. x-action: export
  2128. x-version: v1
  2129. x-permission-visibility: catalog
  2130. responses:
  2131. "200":
  2132. description: 成功。统一信封 code/message/data
  2133. /import_batch/submit@v1:
  2134. post:
  2135. summary: 提交客户批量导入
  2136. description: 提交导入行对象列表,单批上限 500 行。列含客户名称、识别号、主体类型、联系人、电话、地址、区域、运营商、合伙人、运维团队、主账号等。
  2137. x-require-auth: true
  2138. x-resource-type: bos.import_batch
  2139. x-action: create
  2140. x-version: v1
  2141. x-permission-visibility: catalog
  2142. requestBody:
  2143. required: true
  2144. description: JSON 请求体,业务字段置于 data
  2145. content:
  2146. application/json:
  2147. schema:
  2148. type: object
  2149. description: 统一信封请求体,业务字段放在 data 内
  2150. properties:
  2151. data:
  2152. type: object
  2153. description: 业务参数
  2154. properties:
  2155. rows:
  2156. type: array
  2157. description: 导入行对象列表(≤500)
  2158. maxItems: 500
  2159. items:
  2160. type: object
  2161. description: 单行导入字段(14 列)
  2162. properties:
  2163. row_no:
  2164. type: integer
  2165. description: 行编号
  2166. customer_name:
  2167. type: string
  2168. description: 客户名称
  2169. id_code:
  2170. type: string
  2171. description: 识别号
  2172. subject_type:
  2173. type: string
  2174. description: 主体类型
  2175. contact_name:
  2176. type: string
  2177. description: 联系人
  2178. contact_mobile:
  2179. type: string
  2180. description: 联系电话
  2181. address:
  2182. type: string
  2183. description: 地址
  2184. region_name:
  2185. type: string
  2186. description: 所挂区域
  2187. operator_name:
  2188. type: string
  2189. description: 运营商
  2190. partner_name:
  2191. type: string
  2192. description: 合伙人
  2193. ops_team_names:
  2194. type: array
  2195. description: 所挂运维团队名称列表(多支时逐项列出)
  2196. items:
  2197. type: string
  2198. description: 运维团队名称
  2199. primary_username:
  2200. type: string
  2201. description: 主账号登录名
  2202. primary_mobile:
  2203. type: string
  2204. description: 主账号手机号
  2205. required:
  2206. - rows
  2207. required:
  2208. - data
  2209. responses:
  2210. "200":
  2211. description: 成功。统一信封 code/message/data
  2212. /import_batch/get_list@v1:
  2213. post:
  2214. summary: 导入批次列表
  2215. description: 查询本人可见范围内的导入批次。
  2216. x-require-auth: true
  2217. x-resource-type: bos.import_batch
  2218. x-action: list
  2219. x-version: v1
  2220. x-permission-visibility: catalog
  2221. requestBody:
  2222. required: true
  2223. description: JSON 请求体,业务字段置于 data
  2224. content:
  2225. application/json:
  2226. schema:
  2227. type: object
  2228. description: 统一信封请求体,业务字段放在 data 内
  2229. properties:
  2230. data:
  2231. type: object
  2232. description: 列表筛选参数
  2233. properties:
  2234. page:
  2235. type: integer
  2236. description: 页码(0 基索引,默认 0)
  2237. minimum: 0
  2238. default: 0
  2239. page_size:
  2240. type: integer
  2241. description: 每页条数(默认 20,上限 200)
  2242. minimum: 1
  2243. maximum: 200
  2244. default: 20
  2245. keyword:
  2246. type: string
  2247. description: 关键字筛选(可选)
  2248. required:
  2249. - data
  2250. responses:
  2251. "200":
  2252. description: 成功。统一信封 code/message/data
  2253. /import_batch/get@v1:
  2254. post:
  2255. summary: 导入批次详情
  2256. description: 按批次 ID/编号查询详情与行状态。
  2257. x-require-auth: true
  2258. x-resource-type: bos.import_batch
  2259. x-action: view
  2260. x-version: v1
  2261. x-permission-visibility: catalog
  2262. requestBody:
  2263. required: true
  2264. description: JSON 请求体,业务字段置于 data
  2265. content:
  2266. application/json:
  2267. schema:
  2268. type: object
  2269. description: 统一信封请求体,业务字段放在 data 内
  2270. properties:
  2271. data:
  2272. type: object
  2273. description: 业务参数
  2274. properties:
  2275. batch_id:
  2276. type: string
  2277. description: 批次 ID(与 batch_no 二选一)
  2278. batch_no:
  2279. type: string
  2280. description: 批次编号(与 batch_id 二选一)
  2281. required:
  2282. - data
  2283. responses:
  2284. "200":
  2285. description: 成功。统一信封 code/message/data
  2286. /import_batch/resume@v1:
  2287. post:
  2288. summary: 失败行续传
  2289. description: 针对失败行提交续传数据,行号对应原 row_no。
  2290. x-require-auth: true
  2291. x-resource-type: bos.import_batch
  2292. x-action: update
  2293. x-version: v1
  2294. x-permission-visibility: catalog
  2295. requestBody:
  2296. required: true
  2297. description: JSON 请求体,业务字段置于 data
  2298. content:
  2299. application/json:
  2300. schema:
  2301. type: object
  2302. description: 统一信封请求体,业务字段放在 data 内
  2303. properties:
  2304. data:
  2305. type: object
  2306. description: 业务参数
  2307. properties:
  2308. batch_id:
  2309. type: string
  2310. description: 批次 ID
  2311. rows:
  2312. type: array
  2313. description: 续传行列表(含原 row_no)
  2314. items:
  2315. type: object
  2316. required:
  2317. - batch_id
  2318. - rows
  2319. required:
  2320. - data
  2321. responses:
  2322. "200":
  2323. description: 成功。统一信封 code/message/data
  2324. /import_batch/export_codes@v1:
  2325. post:
  2326. summary: 按批次导出激活码
  2327. description: 语义同账号导出;须传收窄后的 user_ids 与 scope。
  2328. x-require-auth: true
  2329. x-resource-type: bos.import_batch
  2330. x-action: export
  2331. x-version: v1
  2332. x-permission-visibility: catalog
  2333. requestBody:
  2334. required: true
  2335. description: JSON 请求体,业务字段置于 data
  2336. content:
  2337. application/json:
  2338. schema:
  2339. type: object
  2340. description: 统一信封请求体,业务字段放在 data 内
  2341. properties:
  2342. data:
  2343. type: object
  2344. description: 业务参数
  2345. properties:
  2346. batch_id:
  2347. type: string
  2348. description: 批次 ID
  2349. user_ids:
  2350. type: array
  2351. description: 收窄后的用户 ID 列表
  2352. items:
  2353. type: string
  2354. description: 用户 ID
  2355. scope_type:
  2356. type: string
  2357. description: 作用域类型
  2358. scope_id:
  2359. type: string
  2360. description: 作用域 ID
  2361. validity:
  2362. type: string
  2363. description: 导出口径:active/expired/all
  2364. enum:
  2365. - active
  2366. - expired
  2367. - all
  2368. required:
  2369. - batch_id
  2370. - user_ids
  2371. - scope_type
  2372. - scope_id
  2373. - validity
  2374. required:
  2375. - data
  2376. responses:
  2377. "200":
  2378. description: 成功。统一信封 code/message/data
  2379. /import_batch/export_customers@v1:
  2380. post:
  2381. summary: 按批次导出客户
  2382. description: 按导入批次导出客户 15 列结果。
  2383. x-require-auth: true
  2384. x-resource-type: bos.import_batch
  2385. x-action: export
  2386. x-version: v1
  2387. x-permission-visibility: catalog
  2388. requestBody:
  2389. required: true
  2390. description: JSON 请求体,业务字段置于 data
  2391. content:
  2392. application/json:
  2393. schema:
  2394. type: object
  2395. description: 统一信封请求体,业务字段放在 data 内
  2396. properties:
  2397. data:
  2398. type: object
  2399. description: 业务参数
  2400. properties:
  2401. batch_id:
  2402. type: string
  2403. description: 批次 ID
  2404. required:
  2405. - batch_id
  2406. required:
  2407. - data
  2408. responses:
  2409. "200":
  2410. description: 成功。统一信封 code/message/data
  2411. /sub_account/get_list@v1:
  2412. post:
  2413. summary: 分账号列表
  2414. description: 查询客户下属分账号列表。
  2415. x-require-auth: true
  2416. x-resource-type: bos.sub_account
  2417. x-action: list
  2418. x-version: v1
  2419. x-permission-visibility: catalog
  2420. requestBody:
  2421. required: true
  2422. description: JSON 请求体,业务字段置于 data
  2423. content:
  2424. application/json:
  2425. schema:
  2426. type: object
  2427. description: 统一信封请求体,业务字段放在 data 内
  2428. properties:
  2429. data:
  2430. type: object
  2431. description: 业务参数
  2432. properties:
  2433. customer_id:
  2434. type: string
  2435. description: 客户 ID
  2436. page:
  2437. type: integer
  2438. description: 页码(0 基索引,默认 0)
  2439. minimum: 0
  2440. default: 0
  2441. page_size:
  2442. type: integer
  2443. description: 每页条数(默认 20,上限 200)
  2444. minimum: 1
  2445. maximum: 200
  2446. default: 20
  2447. keyword:
  2448. type: string
  2449. description: 关键字筛选(可选)
  2450. required:
  2451. - customer_id
  2452. required:
  2453. - data
  2454. responses:
  2455. "200":
  2456. description: 成功。统一信封 code/message/data
  2457. /sub_account/update@v1:
  2458. post:
  2459. summary: 更新分账号
  2460. description: 运营可改 display_name 与 network_account_name;客户主账号只许改 display_name。
  2461. x-require-auth: true
  2462. x-resource-type: bos.sub_account
  2463. x-action: update
  2464. x-version: v1
  2465. x-permission-visibility: catalog
  2466. requestBody:
  2467. required: true
  2468. description: JSON 请求体,业务字段置于 data
  2469. content:
  2470. application/json:
  2471. schema:
  2472. type: object
  2473. description: 统一信封请求体,业务字段放在 data 内
  2474. properties:
  2475. data:
  2476. type: object
  2477. description: 业务参数
  2478. properties:
  2479. sub_account_id:
  2480. type: string
  2481. description: 分账号 ID
  2482. display_name:
  2483. type: string
  2484. description: 显示名称/用途说明
  2485. network_account_name:
  2486. type: string
  2487. description: 网络侧账号名(运营可改)
  2488. required:
  2489. - sub_account_id
  2490. required:
  2491. - data
  2492. responses:
  2493. "200":
  2494. description: 成功。统一信封 code/message/data
  2495. /catalog/create@v1:
  2496. post:
  2497. summary: 新建套餐档位
  2498. description: 新建固定/自定义档位。拒收 monthly_settle_cents、sub_mode、first_referred_at。自定义档必填 customer_id。
  2499. x-require-auth: true
  2500. x-resource-type: bos.catalog
  2501. x-action: create
  2502. x-version: v1
  2503. x-permission-visibility: catalog
  2504. requestBody:
  2505. required: true
  2506. description: JSON 请求体,业务字段置于 data
  2507. content:
  2508. application/json:
  2509. schema:
  2510. type: object
  2511. description: 统一信封请求体,业务字段放在 data 内
  2512. properties:
  2513. data:
  2514. type: object
  2515. description: 业务参数
  2516. properties:
  2517. plan_kind:
  2518. type: string
  2519. description: 档位类型:fixed=固定;custom=自定义
  2520. enum:
  2521. - fixed
  2522. - custom
  2523. plan_name:
  2524. type: string
  2525. description: 档位名称
  2526. use_category:
  2527. type: string
  2528. description: 用途分类:office/live/ai/value_add/customized
  2529. annual_price_cents:
  2530. type: integer
  2531. description: 年价(分)
  2532. sub_account_quota:
  2533. type: integer
  2534. description: 分账号配额
  2535. total_bandwidth_mbps:
  2536. type: number
  2537. description: 总带宽(Mbps,单值形态)
  2538. customer_id:
  2539. type: string
  2540. description: 自定义档所属客户 ID(custom 必填)
  2541. required:
  2542. - plan_kind
  2543. - plan_name
  2544. - use_category
  2545. - annual_price_cents
  2546. required:
  2547. - data
  2548. responses:
  2549. "200":
  2550. description: 成功。统一信封 code/message/data
  2551. /catalog/update@v1:
  2552. post:
  2553. summary: 编辑套餐档位
  2554. description: 编辑档位;use_category 建后不可改;被订阅引用冻结后多数字段只读。
  2555. x-require-auth: true
  2556. x-resource-type: bos.catalog
  2557. x-action: update
  2558. x-version: v1
  2559. x-permission-visibility: catalog
  2560. requestBody:
  2561. required: true
  2562. description: JSON 请求体,业务字段置于 data
  2563. content:
  2564. application/json:
  2565. schema:
  2566. type: object
  2567. description: 统一信封请求体,业务字段放在 data 内
  2568. properties:
  2569. data:
  2570. type: object
  2571. description: 业务参数
  2572. properties:
  2573. plan_id:
  2574. type: string
  2575. description: 档位 ID
  2576. plan_name:
  2577. type: string
  2578. description: 档位名称
  2579. annual_price_cents:
  2580. type: integer
  2581. description: 年价(分)
  2582. sub_account_quota:
  2583. type: integer
  2584. description: 分账号配额
  2585. total_bandwidth_mbps:
  2586. type: number
  2587. description: 总带宽(Mbps)
  2588. row_version:
  2589. type: integer
  2590. description: 乐观锁版本(若启用)
  2591. required:
  2592. - plan_id
  2593. required:
  2594. - data
  2595. responses:
  2596. "200":
  2597. description: 成功。统一信封 code/message/data
  2598. /catalog/get_list@v1:
  2599. post:
  2600. summary: 套餐档位列表
  2601. description: 按 plan_kind 等条件筛选档位列表。
  2602. x-require-auth: true
  2603. x-resource-type: bos.catalog
  2604. x-action: list
  2605. x-version: v1
  2606. x-permission-visibility: catalog
  2607. requestBody:
  2608. required: true
  2609. description: JSON 请求体,业务字段置于 data
  2610. content:
  2611. application/json:
  2612. schema:
  2613. type: object
  2614. description: 统一信封请求体,业务字段放在 data 内
  2615. properties:
  2616. data:
  2617. type: object
  2618. description: 列表筛选参数
  2619. properties:
  2620. page:
  2621. type: integer
  2622. description: 页码(0 基索引,默认 0)
  2623. minimum: 0
  2624. default: 0
  2625. page_size:
  2626. type: integer
  2627. description: 每页条数(默认 20,上限 200)
  2628. minimum: 1
  2629. maximum: 200
  2630. default: 20
  2631. keyword:
  2632. type: string
  2633. description: 关键字筛选(可选)
  2634. plan_kind:
  2635. type: string
  2636. description: 档位类型筛选:fixed/custom
  2637. use_category:
  2638. type: string
  2639. description: 用途分类筛选
  2640. customer_id:
  2641. type: string
  2642. description: 自定义档客户筛选
  2643. required:
  2644. - data
  2645. responses:
  2646. "200":
  2647. description: 成功。统一信封 code/message/data
  2648. /catalog/get@v1:
  2649. post:
  2650. summary: 套餐档位详情
  2651. description: 按档位 ID 查询详情。
  2652. x-require-auth: true
  2653. x-resource-type: bos.catalog
  2654. x-action: view
  2655. x-version: v1
  2656. x-permission-visibility: catalog
  2657. requestBody:
  2658. required: true
  2659. description: JSON 请求体,业务字段置于 data
  2660. content:
  2661. application/json:
  2662. schema:
  2663. type: object
  2664. description: 统一信封请求体,业务字段放在 data 内
  2665. properties:
  2666. data:
  2667. type: object
  2668. description: 业务参数
  2669. properties:
  2670. plan_id:
  2671. type: string
  2672. description: 档位 ID
  2673. required:
  2674. - plan_id
  2675. required:
  2676. - data
  2677. responses:
  2678. "200":
  2679. description: 成功。统一信封 code/message/data
  2680. /contract/create@v1:
  2681. post:
  2682. summary: 新建合同
  2683. description: 客户段+合同段+服务构成条目+IP 条件一次提交。拒收 source(服务端定)。
  2684. x-require-auth: true
  2685. x-resource-type: bos.contract
  2686. x-action: create
  2687. x-version: v1
  2688. x-permission-visibility: catalog
  2689. requestBody:
  2690. required: true
  2691. description: JSON 请求体,业务字段置于 data
  2692. content:
  2693. application/json:
  2694. schema:
  2695. type: object
  2696. description: 统一信封请求体,业务字段放在 data 内
  2697. properties:
  2698. data:
  2699. type: object
  2700. description: 业务参数
  2701. properties:
  2702. customer_id:
  2703. type: string
  2704. description: 签约客户 ID(或改用内联建档字段)
  2705. contract_no:
  2706. type: string
  2707. description: 合同编号(空则服务端发号)
  2708. external_no:
  2709. type: string
  2710. description: 外部合同号(可选)
  2711. contract_amount_cents:
  2712. type: integer
  2713. description: 合同金额(分,可选)
  2714. pay_cycle:
  2715. type: string
  2716. description: 付款周期:yearly/quarterly/monthly
  2717. enum:
  2718. - yearly
  2719. - quarterly
  2720. - monthly
  2721. start_date:
  2722. type: string
  2723. description: 合同开始日期(YYYY-MM-DD)
  2724. format: date
  2725. end_date:
  2726. type: string
  2727. description: 合同结束日期(YYYY-MM-DD)
  2728. format: date
  2729. agent_name:
  2730. type: string
  2731. description: 经办人姓名
  2732. agent_mobile:
  2733. type: string
  2734. description: 经办人手机
  2735. agent_handover_on:
  2736. type: string
  2737. description: 经办交接日期(可选)
  2738. format: date
  2739. agent_org:
  2740. type: string
  2741. description: 经办组织(可选)
  2742. attachment_url:
  2743. type: string
  2744. description: 附件地址(可选)
  2745. service_items:
  2746. type: array
  2747. description: 服务构成条目列表
  2748. items:
  2749. type: object
  2750. description: 服务条目
  2751. properties:
  2752. item_kind:
  2753. type: string
  2754. description: 条目类型:plan_based/custom_spec
  2755. plan_id:
  2756. type: string
  2757. description: 档位 ID(plan_based)
  2758. quantity:
  2759. type: integer
  2760. description: 数量
  2761. account_count:
  2762. type: integer
  2763. description: 账号数(custom_spec)
  2764. bandwidth_mbps:
  2765. type: number
  2766. description: 带宽 Mbps(custom_spec)
  2767. line_exits:
  2768. type: array
  2769. description: 线路出口列表
  2770. items:
  2771. type: string
  2772. description: 出口标识
  2773. ip_entries:
  2774. type: array
  2775. description: IP 条件条目(可选)
  2776. items:
  2777. type: object
  2778. description: IP 条目
  2779. required:
  2780. - pay_cycle
  2781. - start_date
  2782. - end_date
  2783. required:
  2784. - data
  2785. responses:
  2786. "200":
  2787. description: 成功。统一信封 code/message/data
  2788. /contract/update@v1:
  2789. post:
  2790. summary: 编辑合同
  2791. description: 编号与签约客户不可改;条目按 item_id 三向对比增删改。
  2792. x-require-auth: true
  2793. x-resource-type: bos.contract
  2794. x-action: update
  2795. x-version: v1
  2796. x-permission-visibility: catalog
  2797. requestBody:
  2798. required: true
  2799. description: JSON 请求体,业务字段置于 data
  2800. content:
  2801. application/json:
  2802. schema:
  2803. type: object
  2804. description: 统一信封请求体,业务字段放在 data 内
  2805. properties:
  2806. data:
  2807. type: object
  2808. description: 业务参数
  2809. properties:
  2810. contract_id:
  2811. type: string
  2812. description: 合同 ID
  2813. row_version:
  2814. type: integer
  2815. description: 乐观锁版本
  2816. external_no:
  2817. type: string
  2818. description: 外部合同号
  2819. contract_amount_cents:
  2820. type: integer
  2821. description: 合同金额(分)
  2822. pay_cycle:
  2823. type: string
  2824. description: 付款周期
  2825. start_date:
  2826. type: string
  2827. description: 开始日期
  2828. format: date
  2829. end_date:
  2830. type: string
  2831. description: 结束日期
  2832. format: date
  2833. agent_name:
  2834. type: string
  2835. description: 经办人姓名
  2836. agent_mobile:
  2837. type: string
  2838. description: 经办人手机
  2839. agent_handover_on:
  2840. type: string
  2841. description: 经办交接日期
  2842. agent_org:
  2843. type: string
  2844. description: 经办组织
  2845. attachment_url:
  2846. type: string
  2847. description: 附件地址
  2848. service_items:
  2849. type: array
  2850. description: 服务构成条目(含 item_id 的增删改)
  2851. items:
  2852. type: object
  2853. ip_entries:
  2854. type: array
  2855. description: IP 条件条目
  2856. items:
  2857. type: object
  2858. required:
  2859. - contract_id
  2860. - row_version
  2861. required:
  2862. - data
  2863. responses:
  2864. "200":
  2865. description: 成功。统一信封 code/message/data
  2866. /contract/get_list@v1:
  2867. post:
  2868. summary: 合同列表
  2869. description: 按客户/状态等筛选合同列表。
  2870. x-require-auth: true
  2871. x-resource-type: bos.contract
  2872. x-action: list
  2873. x-version: v1
  2874. x-permission-visibility: catalog
  2875. requestBody:
  2876. required: true
  2877. description: JSON 请求体,业务字段置于 data
  2878. content:
  2879. application/json:
  2880. schema:
  2881. type: object
  2882. description: 统一信封请求体,业务字段放在 data 内
  2883. properties:
  2884. data:
  2885. type: object
  2886. description: 列表筛选参数
  2887. properties:
  2888. page:
  2889. type: integer
  2890. description: 页码(0 基索引,默认 0)
  2891. minimum: 0
  2892. default: 0
  2893. page_size:
  2894. type: integer
  2895. description: 每页条数(默认 20,上限 200)
  2896. minimum: 1
  2897. maximum: 200
  2898. default: 20
  2899. keyword:
  2900. type: string
  2901. description: 关键字筛选(可选)
  2902. customer_id:
  2903. type: string
  2904. description: 客户 ID 筛选
  2905. status:
  2906. type: string
  2907. description: 状态筛选
  2908. required:
  2909. - data
  2910. responses:
  2911. "200":
  2912. description: 成功。统一信封 code/message/data
  2913. /contract/get@v1:
  2914. post:
  2915. summary: 合同详情
  2916. description: 按合同 ID 查询详情(含服务条目与 IP 条件)。
  2917. x-require-auth: true
  2918. x-resource-type: bos.contract
  2919. x-action: view
  2920. x-version: v1
  2921. x-permission-visibility: catalog
  2922. requestBody:
  2923. required: true
  2924. description: JSON 请求体,业务字段置于 data
  2925. content:
  2926. application/json:
  2927. schema:
  2928. type: object
  2929. description: 统一信封请求体,业务字段放在 data 内
  2930. properties:
  2931. data:
  2932. type: object
  2933. description: 业务参数
  2934. properties:
  2935. contract_id:
  2936. type: string
  2937. description: 合同 ID
  2938. required:
  2939. - contract_id
  2940. required:
  2941. - data
  2942. responses:
  2943. "200":
  2944. description: 成功。统一信封 code/message/data
  2945. /subscription/create@v1:
  2946. post:
  2947. summary: 新建订阅
  2948. description: 拒收 line_exits、sub_mode、order_no、新建时的 end_date、opened_at。
  2949. x-require-auth: true
  2950. x-resource-type: bos.subscription
  2951. x-action: create
  2952. x-version: v1
  2953. x-permission-visibility: catalog
  2954. requestBody:
  2955. required: true
  2956. description: JSON 请求体,业务字段置于 data
  2957. content:
  2958. application/json:
  2959. schema:
  2960. type: object
  2961. description: 统一信封请求体,业务字段放在 data 内
  2962. properties:
  2963. data:
  2964. type: object
  2965. description: 业务参数
  2966. properties:
  2967. customer_id:
  2968. type: string
  2969. description: 客户 ID
  2970. plan_id:
  2971. type: string
  2972. description: 档位 ID
  2973. contract_id:
  2974. type: string
  2975. description: 合同 ID
  2976. contract_item_id:
  2977. type: string
  2978. description: 合同服务条目 ID
  2979. start_date:
  2980. type: string
  2981. description: 订阅开始日期
  2982. format: date
  2983. annual_price_cents:
  2984. type: integer
  2985. description: 年价(分)
  2986. monthly_settle_cents:
  2987. type: integer
  2988. description: 月结算金额(分)
  2989. use_category:
  2990. type: string
  2991. description: 派生档用途分类(需要时填写)
  2992. required:
  2993. - customer_id
  2994. - plan_id
  2995. - contract_id
  2996. - contract_item_id
  2997. - start_date
  2998. - annual_price_cents
  2999. - monthly_settle_cents
  3000. required:
  3001. - data
  3002. responses:
  3003. "200":
  3004. description: 成功。统一信封 code/message/data
  3005. /subscription/change@v1:
  3006. post:
  3007. summary: 订阅升降配
  3008. description: 升降配须填 replaces_subscription_id,且须使用新的 contract_id(不得沿用原合同)。
  3009. x-require-auth: true
  3010. x-resource-type: bos.subscription
  3011. x-action: update
  3012. x-version: v1
  3013. x-permission-visibility: catalog
  3014. requestBody:
  3015. required: true
  3016. description: JSON 请求体,业务字段置于 data
  3017. content:
  3018. application/json:
  3019. schema:
  3020. type: object
  3021. description: 统一信封请求体,业务字段放在 data 内
  3022. properties:
  3023. data:
  3024. type: object
  3025. description: 业务参数
  3026. properties:
  3027. replaces_subscription_id:
  3028. type: string
  3029. description: 被替换的原订阅 ID
  3030. customer_id:
  3031. type: string
  3032. description: 客户 ID
  3033. plan_id:
  3034. type: string
  3035. description: 新档位 ID
  3036. contract_id:
  3037. type: string
  3038. description: 新合同 ID(不得沿用原合同)
  3039. contract_item_id:
  3040. type: string
  3041. description: 新合同服务条目 ID
  3042. start_date:
  3043. type: string
  3044. description: 新订阅开始日期
  3045. format: date
  3046. annual_price_cents:
  3047. type: integer
  3048. description: 年价(分)
  3049. monthly_settle_cents:
  3050. type: integer
  3051. description: 月结算金额(分)
  3052. use_category:
  3053. type: string
  3054. description: 派生档用途分类(需要时填写)
  3055. required:
  3056. - replaces_subscription_id
  3057. - customer_id
  3058. - plan_id
  3059. - contract_id
  3060. - contract_item_id
  3061. - start_date
  3062. - annual_price_cents
  3063. - monthly_settle_cents
  3064. required:
  3065. - data
  3066. responses:
  3067. "200":
  3068. description: 成功。统一信封 code/message/data
  3069. /subscription/stack@v1:
  3070. post:
  3071. summary: 订阅叠加或白名单更新
  3072. description: 叠加开通或更新白名单字段(两金额+end_date);其余只读键拒绝。
  3073. x-require-auth: true
  3074. x-resource-type: bos.subscription
  3075. x-action: create
  3076. x-version: v1
  3077. x-permission-visibility: catalog
  3078. requestBody:
  3079. required: true
  3080. description: JSON 请求体,业务字段置于 data
  3081. content:
  3082. application/json:
  3083. schema:
  3084. type: object
  3085. description: 统一信封请求体,业务字段放在 data 内
  3086. properties:
  3087. data:
  3088. type: object
  3089. description: 业务参数
  3090. properties:
  3091. subscription_id:
  3092. type: string
  3093. description: 订阅 ID(更新场景)
  3094. customer_id:
  3095. type: string
  3096. description: 客户 ID(叠加新建时)
  3097. plan_id:
  3098. type: string
  3099. description: 档位 ID(叠加新建时)
  3100. contract_id:
  3101. type: string
  3102. description: 合同 ID
  3103. contract_item_id:
  3104. type: string
  3105. description: 合同服务条目 ID
  3106. annual_price_cents:
  3107. type: integer
  3108. description: 年价(分,可改)
  3109. monthly_settle_cents:
  3110. type: integer
  3111. description: 月结算金额(分,可改)
  3112. end_date:
  3113. type: string
  3114. description: 结束日期(可改)
  3115. format: date
  3116. start_date:
  3117. type: string
  3118. description: 开始日期(叠加新建时)
  3119. format: date
  3120. required:
  3121. - data
  3122. responses:
  3123. "200":
  3124. description: 成功。统一信封 code/message/data
  3125. /subscription/get_list@v1:
  3126. post:
  3127. summary: 订阅列表
  3128. description: 按客户等维度筛选订阅列表。
  3129. x-require-auth: true
  3130. x-resource-type: bos.subscription
  3131. x-action: list
  3132. x-version: v1
  3133. x-permission-visibility: catalog
  3134. requestBody:
  3135. required: true
  3136. description: JSON 请求体,业务字段置于 data
  3137. content:
  3138. application/json:
  3139. schema:
  3140. type: object
  3141. description: 统一信封请求体,业务字段放在 data 内
  3142. properties:
  3143. data:
  3144. type: object
  3145. description: 列表筛选参数
  3146. properties:
  3147. customer_id:
  3148. type: string
  3149. description: 客户 ID(常必填)
  3150. page:
  3151. type: integer
  3152. description: 页码(0 基索引,默认 0)
  3153. minimum: 0
  3154. default: 0
  3155. page_size:
  3156. type: integer
  3157. description: 每页条数(默认 20,上限 200)
  3158. minimum: 1
  3159. maximum: 200
  3160. default: 20
  3161. keyword:
  3162. type: string
  3163. description: 关键字筛选(可选)
  3164. status:
  3165. type: string
  3166. description: 状态筛选
  3167. required:
  3168. - data
  3169. responses:
  3170. "200":
  3171. description: 成功。统一信封 code/message/data
  3172. /subscription/get@v1:
  3173. post:
  3174. summary: 订阅详情
  3175. description: 按订阅 ID 查询详情。
  3176. x-require-auth: true
  3177. x-resource-type: bos.subscription
  3178. x-action: view
  3179. x-version: v1
  3180. x-permission-visibility: catalog
  3181. requestBody:
  3182. required: true
  3183. description: JSON 请求体,业务字段置于 data
  3184. content:
  3185. application/json:
  3186. schema:
  3187. type: object
  3188. description: 统一信封请求体,业务字段放在 data 内
  3189. properties:
  3190. data:
  3191. type: object
  3192. description: 业务参数
  3193. properties:
  3194. subscription_id:
  3195. type: string
  3196. description: 订阅 ID
  3197. required:
  3198. - subscription_id
  3199. required:
  3200. - data
  3201. responses:
  3202. "200":
  3203. description: 成功。统一信封 code/message/data
  3204. /cost_item/save@v1:
  3205. post:
  3206. summary: 保存成本项定义
  3207. description: 仅 admin。增改成本项定义。拒收金额、客户、运营商、省份、cycle、is_system。
  3208. x-require-auth: true
  3209. x-resource-type: bos.cost_item
  3210. x-action: manage
  3211. x-version: v1
  3212. x-permission-visibility: catalog
  3213. requestBody:
  3214. required: true
  3215. description: JSON 请求体,业务字段置于 data
  3216. content:
  3217. application/json:
  3218. schema:
  3219. type: object
  3220. description: 统一信封请求体,业务字段放在 data 内
  3221. properties:
  3222. data:
  3223. type: object
  3224. description: 业务参数
  3225. properties:
  3226. cost_item_id:
  3227. type: string
  3228. description: 成本项 ID(更新时必填)
  3229. category:
  3230. type: string
  3231. description: 类别:intl_resource/device_purchase/project_fee
  3232. enum:
  3233. - intl_resource
  3234. - device_purchase
  3235. - project_fee
  3236. item_name:
  3237. type: string
  3238. description: 成本项名称
  3239. billing_unit:
  3240. type: string
  3241. description: 计费单位:per_customer/per_account/per_copy
  3242. enum:
  3243. - per_customer
  3244. - per_account
  3245. - per_copy
  3246. is_amortized:
  3247. type: boolean
  3248. description: 是否摊销
  3249. amortization_months:
  3250. type: integer
  3251. description: 摊销月数(勾选摊销时可空=每月摊销不结束)
  3252. deduct_from_base:
  3253. type: boolean
  3254. description: 是否从基数扣除
  3255. remark:
  3256. type: string
  3257. description: 备注
  3258. row_version:
  3259. type: integer
  3260. description: 乐观锁版本(更新时)
  3261. required:
  3262. - category
  3263. - item_name
  3264. - billing_unit
  3265. - is_amortized
  3266. - deduct_from_base
  3267. required:
  3268. - data
  3269. responses:
  3270. "200":
  3271. description: 成功。统一信封 code/message/data
  3272. /cost_item/get_list@v1:
  3273. post:
  3274. summary: 成本项列表
  3275. description: 全局成本项目录;可选类别/名称关键字;无客户过滤。
  3276. x-require-auth: true
  3277. x-resource-type: bos.cost_item
  3278. x-action: list
  3279. x-version: v1
  3280. x-permission-visibility: catalog
  3281. requestBody:
  3282. required: true
  3283. description: JSON 请求体,业务字段置于 data
  3284. content:
  3285. application/json:
  3286. schema:
  3287. type: object
  3288. description: 统一信封请求体,业务字段放在 data 内
  3289. properties:
  3290. data:
  3291. type: object
  3292. description: 列表筛选参数
  3293. properties:
  3294. page:
  3295. type: integer
  3296. description: 页码(0 基索引,默认 0)
  3297. minimum: 0
  3298. default: 0
  3299. page_size:
  3300. type: integer
  3301. description: 每页条数(默认 20,上限 200)
  3302. minimum: 1
  3303. maximum: 200
  3304. default: 20
  3305. keyword:
  3306. type: string
  3307. description: 关键字筛选(可选)
  3308. category:
  3309. type: string
  3310. description: 类别筛选
  3311. required:
  3312. - data
  3313. responses:
  3314. "200":
  3315. description: 成功。统一信封 code/message/data
  3316. /cost_amount/save@v1:
  3317. post:
  3318. summary: 保存成本金额
  3319. description: 按「省份×运营商×成本项」只写差异金额;留空项表示删除该差异。
  3320. x-require-auth: true
  3321. x-resource-type: bos.cost_amount
  3322. x-action: manage
  3323. x-version: v1
  3324. x-permission-visibility: catalog
  3325. requestBody:
  3326. required: true
  3327. description: JSON 请求体,业务字段置于 data
  3328. content:
  3329. application/json:
  3330. schema:
  3331. type: object
  3332. description: 统一信封请求体,业务字段放在 data 内
  3333. properties:
  3334. data:
  3335. type: object
  3336. description: 业务参数
  3337. properties:
  3338. province_node_id:
  3339. type: string
  3340. description: 省份节点 ID
  3341. operator_id:
  3342. type: string
  3343. description: 运营商 ID
  3344. items:
  3345. type: array
  3346. description: 变更项列表;留空金额表示删除该差异行
  3347. items:
  3348. type: object
  3349. properties:
  3350. cost_item_id:
  3351. type: string
  3352. description: 成本项 ID
  3353. amount_cents:
  3354. type: integer
  3355. description: 金额(分);空/省略表示删除
  3356. row_version:
  3357. type: integer
  3358. description: 乐观锁版本
  3359. required:
  3360. - cost_item_id
  3361. required:
  3362. - province_node_id
  3363. - operator_id
  3364. - items
  3365. required:
  3366. - data
  3367. responses:
  3368. "200":
  3369. description: 成功。统一信封 code/message/data
  3370. /cost_amount/get_list@v1:
  3371. post:
  3372. summary: 成本金额一览
  3373. description: 透视表;admin 全量,区域运营按可见省/运营商收窄。
  3374. x-require-auth: true
  3375. x-resource-type: bos.cost_amount
  3376. x-action: list
  3377. x-version: v1
  3378. x-permission-visibility: catalog
  3379. requestBody:
  3380. required: true
  3381. description: JSON 请求体,业务字段置于 data
  3382. content:
  3383. application/json:
  3384. schema:
  3385. type: object
  3386. description: 统一信封请求体,业务字段放在 data 内
  3387. properties:
  3388. data:
  3389. type: object
  3390. description: 列表筛选参数
  3391. properties:
  3392. province_node_id:
  3393. type: string
  3394. description: 省份筛选
  3395. operator_id:
  3396. type: string
  3397. description: 运营商筛选
  3398. page:
  3399. type: integer
  3400. description: 页码(0 基索引,默认 0)
  3401. minimum: 0
  3402. default: 0
  3403. page_size:
  3404. type: integer
  3405. description: 每页条数(默认 20,上限 200)
  3406. minimum: 1
  3407. maximum: 200
  3408. default: 20
  3409. keyword:
  3410. type: string
  3411. description: 关键字筛选(可选)
  3412. required:
  3413. - data
  3414. responses:
  3415. "200":
  3416. description: 成功。统一信封 code/message/data
  3417. /share_rule/save@v1:
  3418. post:
  3419. summary: 保存分成规则
  3420. description: holder_type 仅 operator/ops_team(无 partner)。share_value 填 0/负表示删除该行。
  3421. x-require-auth: true
  3422. x-resource-type: bos.share_rule
  3423. x-action: manage
  3424. x-version: v1
  3425. x-permission-visibility: catalog
  3426. requestBody:
  3427. required: true
  3428. description: JSON 请求体,业务字段置于 data
  3429. content:
  3430. application/json:
  3431. schema:
  3432. type: object
  3433. description: 统一信封请求体,业务字段放在 data 内
  3434. properties:
  3435. data:
  3436. type: object
  3437. description: 业务参数
  3438. properties:
  3439. holder_type:
  3440. type: string
  3441. description: 持有方类型:operator/ops_team
  3442. enum:
  3443. - operator
  3444. - ops_team
  3445. holder_id:
  3446. type: string
  3447. description: 持有方 ID
  3448. rules:
  3449. type: array
  3450. description: 规则行列表
  3451. items:
  3452. type: object
  3453. properties:
  3454. rule_id:
  3455. type: string
  3456. description: 规则 ID(更新/删除时)
  3457. customer_id:
  3458. type: string
  3459. description: 客户 ID
  3460. rule_level:
  3461. type: string
  3462. description: 规则层级:contract_addon/region_regular
  3463. enum:
  3464. - contract_addon
  3465. - region_regular
  3466. share_mode:
  3467. type: string
  3468. description: 分成方式:ratio_total/per_account/fixed_amount
  3469. enum:
  3470. - ratio_total
  3471. - per_account
  3472. - fixed_amount
  3473. share_value:
  3474. type: number
  3475. description: 分成值:比例 (0,1];金额/每账号>0 分;0/负=删除该行
  3476. remark:
  3477. type: string
  3478. description: 备注
  3479. required:
  3480. - holder_type
  3481. - holder_id
  3482. - rules
  3483. required:
  3484. - data
  3485. responses:
  3486. "200":
  3487. description: 成功。统一信封 code/message/data
  3488. /share_rule/get_list@v1:
  3489. post:
  3490. summary: 分成规则列表
  3491. description: 按持有方等条件列出分成规则。
  3492. x-require-auth: true
  3493. x-resource-type: bos.share_rule
  3494. x-action: list
  3495. x-version: v1
  3496. x-permission-visibility: catalog
  3497. requestBody:
  3498. required: true
  3499. description: JSON 请求体,业务字段置于 data
  3500. content:
  3501. application/json:
  3502. schema:
  3503. type: object
  3504. description: 统一信封请求体,业务字段放在 data 内
  3505. properties:
  3506. data:
  3507. type: object
  3508. description: 列表筛选参数
  3509. properties:
  3510. holder_type:
  3511. type: string
  3512. description: 持有方类型
  3513. holder_id:
  3514. type: string
  3515. description: 持有方 ID
  3516. page:
  3517. type: integer
  3518. description: 页码(0 基索引,默认 0)
  3519. minimum: 0
  3520. default: 0
  3521. page_size:
  3522. type: integer
  3523. description: 每页条数(默认 20,上限 200)
  3524. minimum: 1
  3525. maximum: 200
  3526. default: 20
  3527. keyword:
  3528. type: string
  3529. description: 关键字筛选(可选)
  3530. required:
  3531. - data
  3532. responses:
  3533. "200":
  3534. description: 成功。统一信封 code/message/data
  3535. /share_rule/get@v1:
  3536. post:
  3537. summary: 分成规则详情
  3538. description: 按持有方一次返回四卡摘要与规则表。
  3539. x-require-auth: true
  3540. x-resource-type: bos.share_rule
  3541. x-action: view
  3542. x-version: v1
  3543. x-permission-visibility: catalog
  3544. requestBody:
  3545. required: true
  3546. description: JSON 请求体,业务字段置于 data
  3547. content:
  3548. application/json:
  3549. schema:
  3550. type: object
  3551. description: 统一信封请求体,业务字段放在 data 内
  3552. properties:
  3553. data:
  3554. type: object
  3555. description: 业务参数
  3556. properties:
  3557. holder_type:
  3558. type: string
  3559. description: 持有方类型:operator/ops_team
  3560. holder_id:
  3561. type: string
  3562. description: 持有方 ID
  3563. required:
  3564. - holder_type
  3565. - holder_id
  3566. required:
  3567. - data
  3568. responses:
  3569. "200":
  3570. description: 成功。统一信封 code/message/data
  3571. /share_rule/delete@v1:
  3572. post:
  3573. summary: 删除分成规则
  3574. description: 按 rule_id 删除单条分成规则(亦可在 save 内以 0/负值删除)。
  3575. x-require-auth: true
  3576. x-resource-type: bos.share_rule
  3577. x-action: delete
  3578. x-version: v1
  3579. x-permission-visibility: catalog
  3580. requestBody:
  3581. required: true
  3582. description: JSON 请求体,业务字段置于 data
  3583. content:
  3584. application/json:
  3585. schema:
  3586. type: object
  3587. description: 统一信封请求体,业务字段放在 data 内
  3588. properties:
  3589. data:
  3590. type: object
  3591. description: 业务参数
  3592. properties:
  3593. rule_id:
  3594. type: string
  3595. description: 规则 ID
  3596. required:
  3597. - rule_id
  3598. required:
  3599. - data
  3600. responses:
  3601. "200":
  3602. description: 成功。统一信封 code/message/data
  3603. /opsview/home@v1:
  3604. get:
  3605. summary: 运维只读首页
  3606. description: 运维侧只读首页(U-60),返回工单/逾期等概览数据。
  3607. x-require-auth: true
  3608. x-resource-type: bos.opsview
  3609. x-action: view
  3610. x-version: v1
  3611. x-permission-visibility: catalog
  3612. responses:
  3613. "200":
  3614. description: 成功。统一信封 code/message/data
  3615. /jobs/get_list@v1:
  3616. get:
  3617. summary: 定时作业清单
  3618. description: 返回已注册作业规格列表(key/name/cron_hint 等)。
  3619. x-require-auth: true
  3620. x-resource-type: bos.jobs
  3621. x-action: list
  3622. x-version: v1
  3623. x-permission-visibility: catalog
  3624. responses:
  3625. "200":
  3626. description: 成功。统一信封 code/message/data
  3627. /jobs/toggle@v1:
  3628. post:
  3629. summary: 启停定时作业
  3630. description: 仅 admin。按作业 key 启停。
  3631. x-require-auth: true
  3632. x-resource-type: bos.jobs
  3633. x-action: manage
  3634. x-version: v1
  3635. x-permission-visibility: catalog
  3636. requestBody:
  3637. required: true
  3638. description: JSON 请求体,业务字段置于 data
  3639. content:
  3640. application/json:
  3641. schema:
  3642. type: object
  3643. description: 统一信封请求体,业务字段放在 data 内
  3644. properties:
  3645. data:
  3646. type: object
  3647. description: 业务参数
  3648. properties:
  3649. key:
  3650. type: string
  3651. description: 作业键
  3652. enabled:
  3653. type: boolean
  3654. description: 是否启用
  3655. required:
  3656. - key
  3657. - enabled
  3658. required:
  3659. - data
  3660. responses:
  3661. "200":
  3662. description: 成功。统一信封 code/message/data
  3663. /jobs/runs@v1:
  3664. post:
  3665. summary: 作业执行记录
  3666. description: 查询指定作业的执行记录。
  3667. x-require-auth: true
  3668. x-resource-type: bos.jobs
  3669. x-action: view
  3670. x-version: v1
  3671. x-permission-visibility: catalog
  3672. requestBody:
  3673. required: true
  3674. description: JSON 请求体,业务字段置于 data
  3675. content:
  3676. application/json:
  3677. schema:
  3678. type: object
  3679. description: 统一信封请求体,业务字段放在 data 内
  3680. properties:
  3681. data:
  3682. type: object
  3683. description: 业务参数
  3684. properties:
  3685. key:
  3686. type: string
  3687. description: 作业键
  3688. required:
  3689. - key
  3690. required:
  3691. - data
  3692. responses:
  3693. "200":
  3694. description: 成功。统一信封 code/message/data
  3695. /jobs/run_once@v1:
  3696. post:
  3697. summary: 补跑作业一次
  3698. description: 触发一次指定作业。prod 环境仅总运营可补跑。可选 key:SUB-EFF/STOP-GEN/OVERDUE/DELEGATION-SYNC/OPEN-GEN/SVC-GEN/RECON。
  3699. x-require-auth: true
  3700. x-resource-type: bos.jobs
  3701. x-action: manage
  3702. x-version: v1
  3703. x-permission-visibility: catalog
  3704. requestBody:
  3705. required: true
  3706. description: JSON 请求体,业务字段置于 data
  3707. content:
  3708. application/json:
  3709. schema:
  3710. type: object
  3711. description: 统一信封请求体,业务字段放在 data 内
  3712. properties:
  3713. data:
  3714. type: object
  3715. description: 业务参数
  3716. properties:
  3717. key:
  3718. type: string
  3719. description: 作业键
  3720. enum:
  3721. - SUB-EFF
  3722. - STOP-GEN
  3723. - OVERDUE
  3724. - DELEGATION-SYNC
  3725. - OPEN-GEN
  3726. - SVC-GEN
  3727. - RECON
  3728. required:
  3729. - key
  3730. required:
  3731. - data
  3732. responses:
  3733. "200":
  3734. description: 成功。统一信封 code/message/data
  3735. components:
  3736. schemas:
  3737. ApiEnvelope:
  3738. type: object
  3739. description: 统一响应信封
  3740. properties:
  3741. code:
  3742. type: integer
  3743. description: 业务/协议码,0 表示成功
  3744. message:
  3745. type: string
  3746. description: 提示信息
  3747. error_code:
  3748. type: string
  3749. description: 稳定错误码(失败时)
  3750. data:
  3751. description: 业务数据载荷
  3752. required:
  3753. - code
  3754. - message
  3755. PageQuery:
  3756. type: object
  3757. description: 分页查询(0 基)
  3758. properties:
  3759. page:
  3760. type: integer
  3761. description: 页码(0 基索引,默认 0)
  3762. minimum: 0
  3763. default: 0
  3764. page_size:
  3765. type: integer
  3766. description: 每页条数(默认 20,上限 200)
  3767. minimum: 1
  3768. maximum: 200
  3769. default: 20
  3770. keyword:
  3771. type: string
  3772. description: 关键字筛选(可选)