openapi.yaml 133 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787
  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. bandwidth_committed:
  2536. type: boolean
  2537. description: 是否承诺带宽(界面「是否承诺带宽」开关):true=承诺(缺省,同列 DEFAULT TRUE);false=该档「不承诺带宽」,此时上行/下行两字段一律不传
  2538. bandwidth_up_mbps:
  2539. type: integer
  2540. description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填。⛔ 不再有单值 total_bandwidth_mbps(2026-11-05 D8 关闭=该列退役,「总带宽」只是显示列名)
  2541. bandwidth_down_mbps:
  2542. type: integer
  2543. description: 下行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填;与上行同值时界面并显「上下行 N 兆」,不等显「下行 X 兆 / 上行 Y 兆」
  2544. customer_id:
  2545. type: string
  2546. description: 自定义档所属客户 ID(custom 必填)
  2547. required:
  2548. - plan_kind
  2549. - plan_name
  2550. - use_category
  2551. - annual_price_cents
  2552. required:
  2553. - data
  2554. responses:
  2555. "200":
  2556. description: 成功。统一信封 code/message/data
  2557. /catalog/update@v1:
  2558. post:
  2559. summary: 编辑套餐档位
  2560. description: 编辑档位;use_category 建后不可改;被订阅引用冻结后多数字段只读。
  2561. x-require-auth: true
  2562. x-resource-type: bos.catalog
  2563. x-action: update
  2564. x-version: v1
  2565. x-permission-visibility: catalog
  2566. requestBody:
  2567. required: true
  2568. description: JSON 请求体,业务字段置于 data
  2569. content:
  2570. application/json:
  2571. schema:
  2572. type: object
  2573. description: 统一信封请求体,业务字段放在 data 内
  2574. properties:
  2575. data:
  2576. type: object
  2577. description: 业务参数
  2578. properties:
  2579. plan_id:
  2580. type: string
  2581. description: 档位 ID
  2582. plan_name:
  2583. type: string
  2584. description: 档位名称
  2585. annual_price_cents:
  2586. type: integer
  2587. description: 年价(分)
  2588. sub_account_quota:
  2589. type: integer
  2590. description: 分账号配额
  2591. bandwidth_committed:
  2592. type: boolean
  2593. description: 是否承诺带宽:true=承诺(缺省);false=该档「不承诺带宽」,上下行两字段一律不传
  2594. bandwidth_up_mbps:
  2595. type: integer
  2596. description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填,关闭「是否承诺带宽」时必不传(档位被订阅引用后随整单只读,K204)
  2597. bandwidth_down_mbps:
  2598. type: integer
  2599. description: 下行带宽(Mbps,整数 1~1000);必填规则同上,两值⛔ 不折算为单值
  2600. row_version:
  2601. type: integer
  2602. description: 乐观锁版本(若启用)
  2603. required:
  2604. - plan_id
  2605. required:
  2606. - data
  2607. responses:
  2608. "200":
  2609. description: 成功。统一信封 code/message/data
  2610. /catalog/get_list@v1:
  2611. post:
  2612. summary: 套餐档位列表
  2613. description: 按 plan_kind 等条件筛选档位列表。
  2614. x-require-auth: true
  2615. x-resource-type: bos.catalog
  2616. x-action: list
  2617. x-version: v1
  2618. x-permission-visibility: catalog
  2619. requestBody:
  2620. required: true
  2621. description: JSON 请求体,业务字段置于 data
  2622. content:
  2623. application/json:
  2624. schema:
  2625. type: object
  2626. description: 统一信封请求体,业务字段放在 data 内
  2627. properties:
  2628. data:
  2629. type: object
  2630. description: 列表筛选参数
  2631. properties:
  2632. page:
  2633. type: integer
  2634. description: 页码(0 基索引,默认 0)
  2635. minimum: 0
  2636. default: 0
  2637. page_size:
  2638. type: integer
  2639. description: 每页条数(默认 20,上限 200)
  2640. minimum: 1
  2641. maximum: 200
  2642. default: 20
  2643. keyword:
  2644. type: string
  2645. description: 关键字筛选(可选)
  2646. plan_kind:
  2647. type: string
  2648. description: 档位类型筛选:fixed/custom
  2649. use_category:
  2650. type: string
  2651. description: 用途分类筛选
  2652. customer_id:
  2653. type: string
  2654. description: 自定义档客户筛选
  2655. required:
  2656. - data
  2657. responses:
  2658. "200":
  2659. description: 成功。统一信封 code/message/data
  2660. /catalog/get@v1:
  2661. post:
  2662. summary: 套餐档位详情
  2663. description: 按档位 ID 查询详情。
  2664. x-require-auth: true
  2665. x-resource-type: bos.catalog
  2666. x-action: view
  2667. x-version: v1
  2668. x-permission-visibility: catalog
  2669. requestBody:
  2670. required: true
  2671. description: JSON 请求体,业务字段置于 data
  2672. content:
  2673. application/json:
  2674. schema:
  2675. type: object
  2676. description: 统一信封请求体,业务字段放在 data 内
  2677. properties:
  2678. data:
  2679. type: object
  2680. description: 业务参数
  2681. properties:
  2682. plan_id:
  2683. type: string
  2684. description: 档位 ID
  2685. required:
  2686. - plan_id
  2687. required:
  2688. - data
  2689. responses:
  2690. "200":
  2691. description: 成功。统一信封 code/message/data
  2692. /contract/create@v1:
  2693. post:
  2694. summary: 新建合同
  2695. description: 客户段+合同段+服务构成条目+IP 条件一次提交。拒收 source(服务端定)。
  2696. x-require-auth: true
  2697. x-resource-type: bos.contract
  2698. x-action: create
  2699. x-version: v1
  2700. x-permission-visibility: catalog
  2701. requestBody:
  2702. required: true
  2703. description: JSON 请求体,业务字段置于 data
  2704. content:
  2705. application/json:
  2706. schema:
  2707. type: object
  2708. description: 统一信封请求体,业务字段放在 data 内
  2709. properties:
  2710. data:
  2711. type: object
  2712. description: 业务参数
  2713. properties:
  2714. customer_id:
  2715. type: string
  2716. description: 签约客户 ID(或改用内联建档字段)
  2717. contract_no:
  2718. type: string
  2719. description: 合同编号(空则服务端发号)
  2720. external_no:
  2721. type: string
  2722. description: 外部合同号(可选)
  2723. contract_amount_cents:
  2724. type: integer
  2725. description: 合同金额(分,可选)
  2726. pay_cycle:
  2727. type: string
  2728. description: 付款周期:yearly/quarterly/monthly
  2729. enum:
  2730. - yearly
  2731. - quarterly
  2732. - monthly
  2733. start_date:
  2734. type: string
  2735. description: 合同开始日期(YYYY-MM-DD)
  2736. format: date
  2737. end_date:
  2738. type: string
  2739. description: 合同结束日期(YYYY-MM-DD)
  2740. format: date
  2741. agent_name:
  2742. type: string
  2743. description: 经办人姓名
  2744. agent_mobile:
  2745. type: string
  2746. description: 经办人手机
  2747. agent_handover_on:
  2748. type: string
  2749. description: 经办交接日期(可选)
  2750. format: date
  2751. agent_org:
  2752. type: string
  2753. description: 经办组织(可选)
  2754. attachment_url:
  2755. type: string
  2756. description: 附件地址(可选)
  2757. service_items:
  2758. type: array
  2759. description: 服务构成条目列表
  2760. items:
  2761. type: object
  2762. description: 服务条目
  2763. properties:
  2764. item_kind:
  2765. type: string
  2766. description: 条目类型:plan_based/custom_spec
  2767. plan_id:
  2768. type: string
  2769. description: 档位 ID(plan_based)
  2770. quantity:
  2771. type: integer
  2772. description: 数量
  2773. account_count:
  2774. type: integer
  2775. description: 账号数(custom_spec)
  2776. bandwidth_up_mbps:
  2777. type: integer
  2778. description: 上行带宽(Mbps,整数 1~1000,custom_spec);与下行至少填一侧,只填一侧时按上下行对称填同一值
  2779. bandwidth_down_mbps:
  2780. type: integer
  2781. description: 下行带宽(Mbps,整数 1~1000,custom_spec);两值原样投影到派生自定义档,⛔ 不折算(2026-11-05 D8 关闭)
  2782. line_exits:
  2783. type: array
  2784. description: 线路出口列表
  2785. items:
  2786. type: string
  2787. description: 出口标识
  2788. ip_entries:
  2789. type: array
  2790. description: IP 条件条目(可选)
  2791. items:
  2792. type: object
  2793. description: IP 条目
  2794. required:
  2795. - pay_cycle
  2796. - start_date
  2797. - end_date
  2798. required:
  2799. - data
  2800. responses:
  2801. "200":
  2802. description: 成功。统一信封 code/message/data
  2803. /contract/update@v1:
  2804. post:
  2805. summary: 编辑合同
  2806. description: 编号与签约客户不可改;条目按 item_id 三向对比增删改。
  2807. x-require-auth: true
  2808. x-resource-type: bos.contract
  2809. x-action: update
  2810. x-version: v1
  2811. x-permission-visibility: catalog
  2812. requestBody:
  2813. required: true
  2814. description: JSON 请求体,业务字段置于 data
  2815. content:
  2816. application/json:
  2817. schema:
  2818. type: object
  2819. description: 统一信封请求体,业务字段放在 data 内
  2820. properties:
  2821. data:
  2822. type: object
  2823. description: 业务参数
  2824. properties:
  2825. contract_id:
  2826. type: string
  2827. description: 合同 ID
  2828. row_version:
  2829. type: integer
  2830. description: 乐观锁版本
  2831. external_no:
  2832. type: string
  2833. description: 外部合同号
  2834. contract_amount_cents:
  2835. type: integer
  2836. description: 合同金额(分)
  2837. pay_cycle:
  2838. type: string
  2839. description: 付款周期
  2840. start_date:
  2841. type: string
  2842. description: 开始日期
  2843. format: date
  2844. end_date:
  2845. type: string
  2846. description: 结束日期
  2847. format: date
  2848. agent_name:
  2849. type: string
  2850. description: 经办人姓名
  2851. agent_mobile:
  2852. type: string
  2853. description: 经办人手机
  2854. agent_handover_on:
  2855. type: string
  2856. description: 经办交接日期
  2857. agent_org:
  2858. type: string
  2859. description: 经办组织
  2860. attachment_url:
  2861. type: string
  2862. description: 附件地址
  2863. service_items:
  2864. type: array
  2865. description: 服务构成条目(含 item_id 的增删改)
  2866. items:
  2867. type: object
  2868. ip_entries:
  2869. type: array
  2870. description: IP 条件条目
  2871. items:
  2872. type: object
  2873. required:
  2874. - contract_id
  2875. - row_version
  2876. required:
  2877. - data
  2878. responses:
  2879. "200":
  2880. description: 成功。统一信封 code/message/data
  2881. /contract/get_list@v1:
  2882. post:
  2883. summary: 合同列表
  2884. description: 按客户/状态等筛选合同列表。
  2885. x-require-auth: true
  2886. x-resource-type: bos.contract
  2887. x-action: list
  2888. x-version: v1
  2889. x-permission-visibility: catalog
  2890. requestBody:
  2891. required: true
  2892. description: JSON 请求体,业务字段置于 data
  2893. content:
  2894. application/json:
  2895. schema:
  2896. type: object
  2897. description: 统一信封请求体,业务字段放在 data 内
  2898. properties:
  2899. data:
  2900. type: object
  2901. description: 列表筛选参数
  2902. properties:
  2903. page:
  2904. type: integer
  2905. description: 页码(0 基索引,默认 0)
  2906. minimum: 0
  2907. default: 0
  2908. page_size:
  2909. type: integer
  2910. description: 每页条数(默认 20,上限 200)
  2911. minimum: 1
  2912. maximum: 200
  2913. default: 20
  2914. keyword:
  2915. type: string
  2916. description: 关键字筛选(可选)
  2917. customer_id:
  2918. type: string
  2919. description: 客户 ID 筛选
  2920. status:
  2921. type: string
  2922. description: 状态筛选
  2923. required:
  2924. - data
  2925. responses:
  2926. "200":
  2927. description: 成功。统一信封 code/message/data
  2928. /contract/get@v1:
  2929. post:
  2930. summary: 合同详情
  2931. description: 按合同 ID 查询详情(含服务条目与 IP 条件)。
  2932. x-require-auth: true
  2933. x-resource-type: bos.contract
  2934. x-action: view
  2935. x-version: v1
  2936. x-permission-visibility: catalog
  2937. requestBody:
  2938. required: true
  2939. description: JSON 请求体,业务字段置于 data
  2940. content:
  2941. application/json:
  2942. schema:
  2943. type: object
  2944. description: 统一信封请求体,业务字段放在 data 内
  2945. properties:
  2946. data:
  2947. type: object
  2948. description: 业务参数
  2949. properties:
  2950. contract_id:
  2951. type: string
  2952. description: 合同 ID
  2953. required:
  2954. - contract_id
  2955. required:
  2956. - data
  2957. responses:
  2958. "200":
  2959. description: 成功。统一信封 code/message/data
  2960. /subscription/create@v1:
  2961. post:
  2962. summary: 新建订阅
  2963. description: 拒收 line_exits、sub_mode、order_no、新建时的 end_date、opened_at。
  2964. x-require-auth: true
  2965. x-resource-type: bos.subscription
  2966. x-action: create
  2967. x-version: v1
  2968. x-permission-visibility: catalog
  2969. requestBody:
  2970. required: true
  2971. description: JSON 请求体,业务字段置于 data
  2972. content:
  2973. application/json:
  2974. schema:
  2975. type: object
  2976. description: 统一信封请求体,业务字段放在 data 内
  2977. properties:
  2978. data:
  2979. type: object
  2980. description: 业务参数
  2981. properties:
  2982. customer_id:
  2983. type: string
  2984. description: 客户 ID
  2985. plan_id:
  2986. type: string
  2987. description: 档位 ID
  2988. contract_id:
  2989. type: string
  2990. description: 合同 ID
  2991. contract_item_id:
  2992. type: string
  2993. description: 合同服务条目 ID
  2994. start_date:
  2995. type: string
  2996. description: 订阅开始日期
  2997. format: date
  2998. annual_price_cents:
  2999. type: integer
  3000. description: 年价(分)
  3001. monthly_settle_cents:
  3002. type: integer
  3003. description: 月结算金额(分)
  3004. use_category:
  3005. type: string
  3006. description: 派生档用途分类(需要时填写)
  3007. required:
  3008. - customer_id
  3009. - plan_id
  3010. - contract_id
  3011. - contract_item_id
  3012. - start_date
  3013. - annual_price_cents
  3014. - monthly_settle_cents
  3015. required:
  3016. - data
  3017. responses:
  3018. "200":
  3019. description: 成功。统一信封 code/message/data
  3020. /subscription/change@v1:
  3021. post:
  3022. summary: 订阅升降配
  3023. description: 升降配须填 replaces_subscription_id,且须使用新的 contract_id(不得沿用原合同)。
  3024. x-require-auth: true
  3025. x-resource-type: bos.subscription
  3026. x-action: update
  3027. x-version: v1
  3028. x-permission-visibility: catalog
  3029. requestBody:
  3030. required: true
  3031. description: JSON 请求体,业务字段置于 data
  3032. content:
  3033. application/json:
  3034. schema:
  3035. type: object
  3036. description: 统一信封请求体,业务字段放在 data 内
  3037. properties:
  3038. data:
  3039. type: object
  3040. description: 业务参数
  3041. properties:
  3042. replaces_subscription_id:
  3043. type: string
  3044. description: 被替换的原订阅 ID
  3045. customer_id:
  3046. type: string
  3047. description: 客户 ID
  3048. plan_id:
  3049. type: string
  3050. description: 新档位 ID
  3051. contract_id:
  3052. type: string
  3053. description: 新合同 ID(不得沿用原合同)
  3054. contract_item_id:
  3055. type: string
  3056. description: 新合同服务条目 ID
  3057. start_date:
  3058. type: string
  3059. description: 新订阅开始日期
  3060. format: date
  3061. annual_price_cents:
  3062. type: integer
  3063. description: 年价(分)
  3064. monthly_settle_cents:
  3065. type: integer
  3066. description: 月结算金额(分)
  3067. use_category:
  3068. type: string
  3069. description: 派生档用途分类(需要时填写)
  3070. required:
  3071. - replaces_subscription_id
  3072. - customer_id
  3073. - plan_id
  3074. - contract_id
  3075. - contract_item_id
  3076. - start_date
  3077. - annual_price_cents
  3078. - monthly_settle_cents
  3079. required:
  3080. - data
  3081. responses:
  3082. "200":
  3083. description: 成功。统一信封 code/message/data
  3084. /subscription/stack@v1:
  3085. post:
  3086. summary: 订阅叠加或白名单更新
  3087. description: 叠加开通或更新白名单字段(两金额+end_date);其余只读键拒绝。
  3088. x-require-auth: true
  3089. x-resource-type: bos.subscription
  3090. x-action: create
  3091. x-version: v1
  3092. x-permission-visibility: catalog
  3093. requestBody:
  3094. required: true
  3095. description: JSON 请求体,业务字段置于 data
  3096. content:
  3097. application/json:
  3098. schema:
  3099. type: object
  3100. description: 统一信封请求体,业务字段放在 data 内
  3101. properties:
  3102. data:
  3103. type: object
  3104. description: 业务参数
  3105. properties:
  3106. subscription_id:
  3107. type: string
  3108. description: 订阅 ID(更新场景)
  3109. customer_id:
  3110. type: string
  3111. description: 客户 ID(叠加新建时)
  3112. plan_id:
  3113. type: string
  3114. description: 档位 ID(叠加新建时)
  3115. contract_id:
  3116. type: string
  3117. description: 合同 ID
  3118. contract_item_id:
  3119. type: string
  3120. description: 合同服务条目 ID
  3121. annual_price_cents:
  3122. type: integer
  3123. description: 年价(分,可改)
  3124. monthly_settle_cents:
  3125. type: integer
  3126. description: 月结算金额(分,可改)
  3127. end_date:
  3128. type: string
  3129. description: 结束日期(可改)
  3130. format: date
  3131. start_date:
  3132. type: string
  3133. description: 开始日期(叠加新建时)
  3134. format: date
  3135. required:
  3136. - data
  3137. responses:
  3138. "200":
  3139. description: 成功。统一信封 code/message/data
  3140. /subscription/get_list@v1:
  3141. post:
  3142. summary: 订阅列表
  3143. description: 按客户等维度筛选订阅列表。
  3144. x-require-auth: true
  3145. x-resource-type: bos.subscription
  3146. x-action: list
  3147. x-version: v1
  3148. x-permission-visibility: catalog
  3149. requestBody:
  3150. required: true
  3151. description: JSON 请求体,业务字段置于 data
  3152. content:
  3153. application/json:
  3154. schema:
  3155. type: object
  3156. description: 统一信封请求体,业务字段放在 data 内
  3157. properties:
  3158. data:
  3159. type: object
  3160. description: 列表筛选参数
  3161. properties:
  3162. customer_id:
  3163. type: string
  3164. description: 客户 ID(常必填)
  3165. page:
  3166. type: integer
  3167. description: 页码(0 基索引,默认 0)
  3168. minimum: 0
  3169. default: 0
  3170. page_size:
  3171. type: integer
  3172. description: 每页条数(默认 20,上限 200)
  3173. minimum: 1
  3174. maximum: 200
  3175. default: 20
  3176. keyword:
  3177. type: string
  3178. description: 关键字筛选(可选)
  3179. status:
  3180. type: string
  3181. description: 状态筛选
  3182. required:
  3183. - data
  3184. responses:
  3185. "200":
  3186. description: 成功。统一信封 code/message/data
  3187. /subscription/get@v1:
  3188. post:
  3189. summary: 订阅详情
  3190. description: 按订阅 ID 查询详情。
  3191. x-require-auth: true
  3192. x-resource-type: bos.subscription
  3193. x-action: view
  3194. x-version: v1
  3195. x-permission-visibility: catalog
  3196. requestBody:
  3197. required: true
  3198. description: JSON 请求体,业务字段置于 data
  3199. content:
  3200. application/json:
  3201. schema:
  3202. type: object
  3203. description: 统一信封请求体,业务字段放在 data 内
  3204. properties:
  3205. data:
  3206. type: object
  3207. description: 业务参数
  3208. properties:
  3209. subscription_id:
  3210. type: string
  3211. description: 订阅 ID
  3212. required:
  3213. - subscription_id
  3214. required:
  3215. - data
  3216. responses:
  3217. "200":
  3218. description: 成功。统一信封 code/message/data
  3219. /cost_item/save@v1:
  3220. post:
  3221. summary: 保存成本项定义
  3222. description: 仅 admin。增改成本项定义。拒收金额、客户、运营商、省份、cycle、is_system。
  3223. x-require-auth: true
  3224. x-resource-type: bos.cost_item
  3225. x-action: manage
  3226. x-version: v1
  3227. x-permission-visibility: catalog
  3228. requestBody:
  3229. required: true
  3230. description: JSON 请求体,业务字段置于 data
  3231. content:
  3232. application/json:
  3233. schema:
  3234. type: object
  3235. description: 统一信封请求体,业务字段放在 data 内
  3236. properties:
  3237. data:
  3238. type: object
  3239. description: 业务参数
  3240. properties:
  3241. cost_item_id:
  3242. type: string
  3243. description: 成本项 ID(更新时必填)
  3244. category:
  3245. type: string
  3246. description: 类别:intl_resource/device_purchase/project_fee
  3247. enum:
  3248. - intl_resource
  3249. - device_purchase
  3250. - project_fee
  3251. item_name:
  3252. type: string
  3253. description: 成本项名称
  3254. billing_unit:
  3255. type: string
  3256. description: 计费单位:per_customer/per_account/per_copy
  3257. enum:
  3258. - per_customer
  3259. - per_account
  3260. - per_copy
  3261. is_amortized:
  3262. type: boolean
  3263. description: 是否摊销
  3264. amortization_months:
  3265. type: integer
  3266. description: 摊销月数(勾选摊销时可空=每月摊销不结束)
  3267. deduct_from_base:
  3268. type: boolean
  3269. description: 是否从基数扣除
  3270. remark:
  3271. type: string
  3272. description: 备注
  3273. row_version:
  3274. type: integer
  3275. description: 乐观锁版本(更新时)
  3276. required:
  3277. - category
  3278. - item_name
  3279. - billing_unit
  3280. - is_amortized
  3281. - deduct_from_base
  3282. required:
  3283. - data
  3284. responses:
  3285. "200":
  3286. description: 成功。统一信封 code/message/data
  3287. /cost_item/get_list@v1:
  3288. post:
  3289. summary: 成本项列表
  3290. description: 全局成本项目录;可选类别/名称关键字;无客户过滤。
  3291. x-require-auth: true
  3292. x-resource-type: bos.cost_item
  3293. x-action: list
  3294. x-version: v1
  3295. x-permission-visibility: catalog
  3296. requestBody:
  3297. required: true
  3298. description: JSON 请求体,业务字段置于 data
  3299. content:
  3300. application/json:
  3301. schema:
  3302. type: object
  3303. description: 统一信封请求体,业务字段放在 data 内
  3304. properties:
  3305. data:
  3306. type: object
  3307. description: 列表筛选参数
  3308. properties:
  3309. page:
  3310. type: integer
  3311. description: 页码(0 基索引,默认 0)
  3312. minimum: 0
  3313. default: 0
  3314. page_size:
  3315. type: integer
  3316. description: 每页条数(默认 20,上限 200)
  3317. minimum: 1
  3318. maximum: 200
  3319. default: 20
  3320. keyword:
  3321. type: string
  3322. description: 关键字筛选(可选)
  3323. category:
  3324. type: string
  3325. description: 类别筛选
  3326. required:
  3327. - data
  3328. responses:
  3329. "200":
  3330. description: 成功。统一信封 code/message/data
  3331. /cost_amount/save@v1:
  3332. post:
  3333. summary: 保存成本金额
  3334. description: 按「省份×运营商×成本项」只写差异金额;留空项表示删除该差异。
  3335. x-require-auth: true
  3336. x-resource-type: bos.cost_amount
  3337. x-action: manage
  3338. x-version: v1
  3339. x-permission-visibility: catalog
  3340. requestBody:
  3341. required: true
  3342. description: JSON 请求体,业务字段置于 data
  3343. content:
  3344. application/json:
  3345. schema:
  3346. type: object
  3347. description: 统一信封请求体,业务字段放在 data 内
  3348. properties:
  3349. data:
  3350. type: object
  3351. description: 业务参数
  3352. properties:
  3353. province_node_id:
  3354. type: string
  3355. description: 省份节点 ID
  3356. operator_id:
  3357. type: string
  3358. description: 运营商 ID
  3359. items:
  3360. type: array
  3361. description: 变更项列表;留空金额表示删除该差异行
  3362. items:
  3363. type: object
  3364. properties:
  3365. cost_item_id:
  3366. type: string
  3367. description: 成本项 ID
  3368. amount_cents:
  3369. type: integer
  3370. description: 金额(分);空/省略表示删除
  3371. row_version:
  3372. type: integer
  3373. description: 乐观锁版本
  3374. required:
  3375. - cost_item_id
  3376. required:
  3377. - province_node_id
  3378. - operator_id
  3379. - items
  3380. required:
  3381. - data
  3382. responses:
  3383. "200":
  3384. description: 成功。统一信封 code/message/data
  3385. /cost_amount/get_list@v1:
  3386. post:
  3387. summary: 成本金额一览
  3388. description: 透视表;admin 全量,区域运营按可见省/运营商收窄。
  3389. x-require-auth: true
  3390. x-resource-type: bos.cost_amount
  3391. x-action: list
  3392. x-version: v1
  3393. x-permission-visibility: catalog
  3394. requestBody:
  3395. required: true
  3396. description: JSON 请求体,业务字段置于 data
  3397. content:
  3398. application/json:
  3399. schema:
  3400. type: object
  3401. description: 统一信封请求体,业务字段放在 data 内
  3402. properties:
  3403. data:
  3404. type: object
  3405. description: 列表筛选参数
  3406. properties:
  3407. province_node_id:
  3408. type: string
  3409. description: 省份筛选
  3410. operator_id:
  3411. type: string
  3412. description: 运营商筛选
  3413. page:
  3414. type: integer
  3415. description: 页码(0 基索引,默认 0)
  3416. minimum: 0
  3417. default: 0
  3418. page_size:
  3419. type: integer
  3420. description: 每页条数(默认 20,上限 200)
  3421. minimum: 1
  3422. maximum: 200
  3423. default: 20
  3424. keyword:
  3425. type: string
  3426. description: 关键字筛选(可选)
  3427. required:
  3428. - data
  3429. responses:
  3430. "200":
  3431. description: 成功。统一信封 code/message/data
  3432. /share_rule/save@v1:
  3433. post:
  3434. summary: 保存分成规则
  3435. description: holder_type 仅 operator/ops_team(无 partner)。share_value 填 0/负表示删除该行。
  3436. x-require-auth: true
  3437. x-resource-type: bos.share_rule
  3438. x-action: manage
  3439. x-version: v1
  3440. x-permission-visibility: catalog
  3441. requestBody:
  3442. required: true
  3443. description: JSON 请求体,业务字段置于 data
  3444. content:
  3445. application/json:
  3446. schema:
  3447. type: object
  3448. description: 统一信封请求体,业务字段放在 data 内
  3449. properties:
  3450. data:
  3451. type: object
  3452. description: 业务参数
  3453. properties:
  3454. holder_type:
  3455. type: string
  3456. description: 持有方类型:operator/ops_team
  3457. enum:
  3458. - operator
  3459. - ops_team
  3460. holder_id:
  3461. type: string
  3462. description: 持有方 ID
  3463. rules:
  3464. type: array
  3465. description: 规则行列表
  3466. items:
  3467. type: object
  3468. properties:
  3469. rule_id:
  3470. type: string
  3471. description: 规则 ID(更新/删除时)
  3472. customer_id:
  3473. type: string
  3474. description: 客户 ID
  3475. rule_level:
  3476. type: string
  3477. description: 规则层级:contract_addon/region_regular
  3478. enum:
  3479. - contract_addon
  3480. - region_regular
  3481. share_mode:
  3482. type: string
  3483. description: 分成方式:ratio_total/per_account/fixed_amount
  3484. enum:
  3485. - ratio_total
  3486. - per_account
  3487. - fixed_amount
  3488. share_value:
  3489. type: number
  3490. description: 分成值:比例 (0,1];金额/每账号>0 分;0/负=删除该行
  3491. remark:
  3492. type: string
  3493. description: 备注
  3494. required:
  3495. - holder_type
  3496. - holder_id
  3497. - rules
  3498. required:
  3499. - data
  3500. responses:
  3501. "200":
  3502. description: 成功。统一信封 code/message/data
  3503. /share_rule/get_list@v1:
  3504. post:
  3505. summary: 分成规则列表
  3506. description: 按持有方等条件列出分成规则。
  3507. x-require-auth: true
  3508. x-resource-type: bos.share_rule
  3509. x-action: list
  3510. x-version: v1
  3511. x-permission-visibility: catalog
  3512. requestBody:
  3513. required: true
  3514. description: JSON 请求体,业务字段置于 data
  3515. content:
  3516. application/json:
  3517. schema:
  3518. type: object
  3519. description: 统一信封请求体,业务字段放在 data 内
  3520. properties:
  3521. data:
  3522. type: object
  3523. description: 列表筛选参数
  3524. properties:
  3525. holder_type:
  3526. type: string
  3527. description: 持有方类型
  3528. holder_id:
  3529. type: string
  3530. description: 持有方 ID
  3531. page:
  3532. type: integer
  3533. description: 页码(0 基索引,默认 0)
  3534. minimum: 0
  3535. default: 0
  3536. page_size:
  3537. type: integer
  3538. description: 每页条数(默认 20,上限 200)
  3539. minimum: 1
  3540. maximum: 200
  3541. default: 20
  3542. keyword:
  3543. type: string
  3544. description: 关键字筛选(可选)
  3545. required:
  3546. - data
  3547. responses:
  3548. "200":
  3549. description: 成功。统一信封 code/message/data
  3550. /share_rule/get@v1:
  3551. post:
  3552. summary: 分成规则详情
  3553. description: 按持有方一次返回四卡摘要与规则表。
  3554. x-require-auth: true
  3555. x-resource-type: bos.share_rule
  3556. x-action: view
  3557. x-version: v1
  3558. x-permission-visibility: catalog
  3559. requestBody:
  3560. required: true
  3561. description: JSON 请求体,业务字段置于 data
  3562. content:
  3563. application/json:
  3564. schema:
  3565. type: object
  3566. description: 统一信封请求体,业务字段放在 data 内
  3567. properties:
  3568. data:
  3569. type: object
  3570. description: 业务参数
  3571. properties:
  3572. holder_type:
  3573. type: string
  3574. description: 持有方类型:operator/ops_team
  3575. holder_id:
  3576. type: string
  3577. description: 持有方 ID
  3578. required:
  3579. - holder_type
  3580. - holder_id
  3581. required:
  3582. - data
  3583. responses:
  3584. "200":
  3585. description: 成功。统一信封 code/message/data
  3586. /share_rule/delete@v1:
  3587. post:
  3588. summary: 删除分成规则
  3589. description: 按 rule_id 删除单条分成规则(亦可在 save 内以 0/负值删除)。
  3590. x-require-auth: true
  3591. x-resource-type: bos.share_rule
  3592. x-action: delete
  3593. x-version: v1
  3594. x-permission-visibility: catalog
  3595. requestBody:
  3596. required: true
  3597. description: JSON 请求体,业务字段置于 data
  3598. content:
  3599. application/json:
  3600. schema:
  3601. type: object
  3602. description: 统一信封请求体,业务字段放在 data 内
  3603. properties:
  3604. data:
  3605. type: object
  3606. description: 业务参数
  3607. properties:
  3608. rule_id:
  3609. type: string
  3610. description: 规则 ID
  3611. required:
  3612. - rule_id
  3613. required:
  3614. - data
  3615. responses:
  3616. "200":
  3617. description: 成功。统一信封 code/message/data
  3618. /opsview/home@v1:
  3619. get:
  3620. summary: 运维只读首页
  3621. description: 运维侧只读首页(U-60),返回工单/逾期等概览数据。
  3622. x-require-auth: true
  3623. x-resource-type: bos.opsview
  3624. x-action: view
  3625. x-version: v1
  3626. x-permission-visibility: catalog
  3627. responses:
  3628. "200":
  3629. description: 成功。统一信封 code/message/data
  3630. /jobs/get_list@v1:
  3631. get:
  3632. summary: 定时作业清单
  3633. description: 返回已注册作业规格列表(key/name/cron_hint 等)。
  3634. x-require-auth: true
  3635. x-resource-type: bos.jobs
  3636. x-action: list
  3637. x-version: v1
  3638. x-permission-visibility: catalog
  3639. responses:
  3640. "200":
  3641. description: 成功。统一信封 code/message/data
  3642. /jobs/toggle@v1:
  3643. post:
  3644. summary: 启停定时作业
  3645. description: 仅 admin。按作业 key 启停。
  3646. x-require-auth: true
  3647. x-resource-type: bos.jobs
  3648. x-action: manage
  3649. x-version: v1
  3650. x-permission-visibility: catalog
  3651. requestBody:
  3652. required: true
  3653. description: JSON 请求体,业务字段置于 data
  3654. content:
  3655. application/json:
  3656. schema:
  3657. type: object
  3658. description: 统一信封请求体,业务字段放在 data 内
  3659. properties:
  3660. data:
  3661. type: object
  3662. description: 业务参数
  3663. properties:
  3664. key:
  3665. type: string
  3666. description: 作业键
  3667. enabled:
  3668. type: boolean
  3669. description: 是否启用
  3670. required:
  3671. - key
  3672. - enabled
  3673. required:
  3674. - data
  3675. responses:
  3676. "200":
  3677. description: 成功。统一信封 code/message/data
  3678. /jobs/runs@v1:
  3679. post:
  3680. summary: 作业执行记录
  3681. description: 查询指定作业的执行记录。
  3682. x-require-auth: true
  3683. x-resource-type: bos.jobs
  3684. x-action: view
  3685. x-version: v1
  3686. x-permission-visibility: catalog
  3687. requestBody:
  3688. required: true
  3689. description: JSON 请求体,业务字段置于 data
  3690. content:
  3691. application/json:
  3692. schema:
  3693. type: object
  3694. description: 统一信封请求体,业务字段放在 data 内
  3695. properties:
  3696. data:
  3697. type: object
  3698. description: 业务参数
  3699. properties:
  3700. key:
  3701. type: string
  3702. description: 作业键
  3703. required:
  3704. - key
  3705. required:
  3706. - data
  3707. responses:
  3708. "200":
  3709. description: 成功。统一信封 code/message/data
  3710. /jobs/run_once@v1:
  3711. post:
  3712. summary: 补跑作业一次
  3713. description: 触发一次指定作业。prod 环境仅总运营可补跑。可选 key:SUB-EFF/STOP-GEN/OVERDUE/DELEGATION-SYNC/OPEN-GEN/SVC-GEN/RECON。
  3714. x-require-auth: true
  3715. x-resource-type: bos.jobs
  3716. x-action: manage
  3717. x-version: v1
  3718. x-permission-visibility: catalog
  3719. requestBody:
  3720. required: true
  3721. description: JSON 请求体,业务字段置于 data
  3722. content:
  3723. application/json:
  3724. schema:
  3725. type: object
  3726. description: 统一信封请求体,业务字段放在 data 内
  3727. properties:
  3728. data:
  3729. type: object
  3730. description: 业务参数
  3731. properties:
  3732. key:
  3733. type: string
  3734. description: 作业键
  3735. enum:
  3736. - SUB-EFF
  3737. - STOP-GEN
  3738. - OVERDUE
  3739. - DELEGATION-SYNC
  3740. - OPEN-GEN
  3741. - SVC-GEN
  3742. - RECON
  3743. required:
  3744. - key
  3745. required:
  3746. - data
  3747. responses:
  3748. "200":
  3749. description: 成功。统一信封 code/message/data
  3750. components:
  3751. schemas:
  3752. ApiEnvelope:
  3753. type: object
  3754. description: 统一响应信封
  3755. properties:
  3756. code:
  3757. type: integer
  3758. description: 业务/协议码,0 表示成功
  3759. message:
  3760. type: string
  3761. description: 提示信息
  3762. error_code:
  3763. type: string
  3764. description: 稳定错误码(失败时)
  3765. data:
  3766. description: 业务数据载荷
  3767. required:
  3768. - code
  3769. - message
  3770. PageQuery:
  3771. type: object
  3772. description: 分页查询(0 基)
  3773. properties:
  3774. page:
  3775. type: integer
  3776. description: 页码(0 基索引,默认 0)
  3777. minimum: 0
  3778. default: 0
  3779. page_size:
  3780. type: integer
  3781. description: 每页条数(默认 20,上限 200)
  3782. minimum: 1
  3783. maximum: 200
  3784. default: 20
  3785. keyword:
  3786. type: string
  3787. description: 关键字筛选(可选)