openapi.yaml 170 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843
  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. 业务错误码段 60000–60999(⚠️ 2026-11-07 平台新口径:`60000` 以前平台已保留 ⇒
  9. 原 20000–20999 **整体 +40000 平移**,块结构与段内顺位⛔ 变;这是第二次对外契约破坏性平移)。
  10. 本服务**产出**的数字码落在该段内;✅ 唯一在册例外=**鉴权失败类透传平台原码**:
  11. 未认证 `11000`、无权限 `11001`(业主 2026-11-07 裁定=⛔ 收段,含平台 SDK 鉴权闸门
  12. 在本进程内产出的响应,业务侧⛔ 改写)。其余平台通用码(11100/11103/11104/10110)
  13. 仍由 `S` 段自造码承接,平台原码在 `message` 原文保留。
  14. 通用块 60000–60049(`S` 段):`KLT-S407`/60001 通用冲突、`KLT-S20002`/11000 未认证(透传)、
  15. `KLT-S20003`/11001 无权限(透传)、`KLT-S20004`/60004 参数缺失或格式错误、`KLT-S20005`/60005 对象不存在、
  16. `KLT-S20006`/60006 下游依赖失败、`KLT-S20007`/60007 内部错误、`KLT-S20008`/60008 功能未实现;
  17. ⚠️ `KLT-*` 字符串⛔ 随段位改名(对外稳定契约)⇒ 字符串内嵌数字与 `code` 已脱钩。
  18. 成功码沿用平台统一值 10000。调用方断言**只绑** `error_code`(`KLT-*`),⛔ 绑数字顺位。
  19. 经网关对外前缀:`/api/klt/klt-bos/{resource}/{action}@v1`(本文件路径不含 namespace 前缀;
  20. 前缀口径=注册中心 `services/registry.rs:707` `format!("/api/{namespace}/{service_name}{path}")`,
  21. ⇒ namespace=`klt` + service_name=`klt-bos`。⚠️ 此前写成的 `/api/klt/bos/` 系**前缀漂移**,
  22. 若本服务以 `prefix_mode=strip_prefix` 注册会被剥掉一段而全链路 404(平台 v1.5 件 §2.4)。)
  23. 分页约定:请求页码 0 基;呈现时再转为 1 基。
  24. x-error-code-range:
  25. start: 60000
  26. end: 60999
  27. servers:
  28. - url: /
  29. tags:
  30. - name: 系统健康
  31. description: 服务存活与状态探测,不含业务写操作。
  32. - name: 认证与激活
  33. description: 当前登录上下文查询;免登录的激活码校验与密码设置。
  34. - name: 区域管理
  35. description: 区域树节点新建、改名、删除与可见范围查询。
  36. - name: 账号管理
  37. description: 账号开通、状态、激活码、改密与客户分账号。
  38. - name: 运营商
  39. description: 运营商建档与对账账号。
  40. - name: 合伙人
  41. description: 合伙人建档、负责范围读写。
  42. - name: 运营团队
  43. description: 运营团队(ent_team)档案、成员与负责范围。
  44. - name: 运维团队与成员
  45. description: 运维团队建档、成员、分派方式、覆盖客户与成员范围。
  46. - name: 客户管理
  47. description: 客户建档、改挂区域、归属变更与变更历史。
  48. - name: 批量导入
  49. description: 客户批量导入模板、提交、批次、续传与导出。
  50. - name: 套餐档位
  51. description: 固定/自定义套餐档位维护。
  52. - name: 合同
  53. description: 合同新建、编辑与查询(含服务条目与 IP 条件)。
  54. - name: 订阅
  55. description: 订阅开通、升降配、叠加与查询。
  56. - name: 成本与分成
  57. description: 成本项定义、成本金额与分成规则。
  58. - name: 运维视图
  59. description: 运维侧只读首页概览。
  60. - name: 定时作业
  61. description: 已注册作业清单、启停、执行记录与补跑。
  62. paths:
  63. /health:
  64. get:
  65. summary: 健康检查
  66. description: 服务存活探测,无需登录。
  67. operationId: health
  68. tags:
  69. - 系统健康
  70. x-require-auth: false
  71. x-resource-type: bos.health
  72. x-action: view
  73. x-version: v1
  74. x-permission-visibility: catalog
  75. responses:
  76. "200":
  77. description: 成功。统一信封 code/message/data
  78. /health@v1:
  79. get:
  80. summary: 健康检查(v1)
  81. description: 服务存活探测,无需登录。
  82. operationId: health_v1
  83. tags:
  84. - 系统健康
  85. x-require-auth: false
  86. x-resource-type: bos.health
  87. x-action: view
  88. x-version: v1
  89. x-permission-visibility: catalog
  90. responses:
  91. "200":
  92. description: 成功。统一信封 code/message/data
  93. /ping@v1:
  94. get:
  95. summary: 存活探测
  96. description: 需登录的轻量探测,返回服务状态与绑定信息。
  97. operationId: ping
  98. tags:
  99. - 系统健康
  100. x-require-auth: true
  101. x-resource-type: bos.ping
  102. x-action: view
  103. x-version: v1
  104. x-permission-visibility: catalog
  105. responses:
  106. "200":
  107. description: 成功。统一信封 code/message/data
  108. /auth/context@v1:
  109. get:
  110. summary: 当前登录上下文
  111. description: 返回当前登录身份、业务角色、主体类型/ID、可见形态等;首次业务请求在此完成未激活/已过期拦截。
  112. operationId: auth_context
  113. tags:
  114. - 认证与激活
  115. x-require-auth: true
  116. x-resource-type: bos.auth
  117. x-action: view
  118. x-version: v1
  119. x-permission-visibility: catalog
  120. responses:
  121. "200":
  122. description: 成功。统一信封 code/message/data
  123. /region/create@v1:
  124. post:
  125. summary: 新建区域节点
  126. description: 在区域树下新建省/市/区县节点。admin 任意层级;区域运营主/子账号仅限本团队负责范围内已有省份下建市/区县。
  127. operationId: region_create
  128. tags:
  129. - 区域管理
  130. x-require-auth: true
  131. x-resource-type: bos.region
  132. x-action: create
  133. x-version: v1
  134. x-permission-visibility: catalog
  135. requestBody:
  136. required: true
  137. description: JSON 请求体,业务字段置于 data
  138. content:
  139. application/json:
  140. schema:
  141. type: object
  142. description: 统一信封请求体,业务字段放在 data 内
  143. properties:
  144. data:
  145. type: object
  146. description: 新建区域参数
  147. properties:
  148. parent_node_id:
  149. type: string
  150. description: 父节点 ID;根下建省时可空
  151. node_name:
  152. type: string
  153. description: 本级区域名称
  154. level:
  155. type: string
  156. description: 层级提示(省/市/区县等,业务侧自持,可选)
  157. required:
  158. - node_name
  159. required:
  160. - data
  161. responses:
  162. "200":
  163. description: 成功。统一信封 code/message/data
  164. /region/rename@v1:
  165. post:
  166. summary: 重命名区域节点
  167. description: 仅修改节点名称 node_name,不改层级与父子关系。
  168. operationId: region_rename
  169. tags:
  170. - 区域管理
  171. x-require-auth: true
  172. x-resource-type: bos.region
  173. x-action: update
  174. x-version: v1
  175. x-permission-visibility: catalog
  176. requestBody:
  177. required: true
  178. description: JSON 请求体,业务字段置于 data
  179. content:
  180. application/json:
  181. schema:
  182. type: object
  183. description: 统一信封请求体,业务字段放在 data 内
  184. properties:
  185. data:
  186. type: object
  187. description: 业务参数
  188. properties:
  189. node_id:
  190. type: string
  191. description: 区域节点 ID
  192. node_name:
  193. type: string
  194. description: 新名称
  195. required:
  196. - node_id
  197. - node_name
  198. required:
  199. - data
  200. responses:
  201. "200":
  202. description: 成功。统一信封 code/message/data
  203. /region/delete@v1:
  204. post:
  205. summary: 删除区域节点
  206. description: 仅 admin。须提交 confirm_name(与当前区域名逐字一致)并通过三重守卫(无下级/无挂载客户/无引用)。
  207. operationId: region_delete
  208. tags:
  209. - 区域管理
  210. x-require-auth: true
  211. x-resource-type: bos.region
  212. x-action: delete
  213. x-version: v1
  214. x-permission-visibility: catalog
  215. requestBody:
  216. required: true
  217. description: JSON 请求体,业务字段置于 data
  218. content:
  219. application/json:
  220. schema:
  221. type: object
  222. description: 统一信封请求体,业务字段放在 data 内
  223. properties:
  224. data:
  225. type: object
  226. description: 业务参数
  227. properties:
  228. node_id:
  229. type: string
  230. description: 待删除区域节点 ID
  231. confirm_name:
  232. type: string
  233. description: 确认名称,须与当前区域名逐字一致
  234. required:
  235. - node_id
  236. - confirm_name
  237. required:
  238. - data
  239. responses:
  240. "200":
  241. description: 成功。统一信封 code/message/data
  242. /region/tree@v1:
  243. post:
  244. summary: 查询可见区域树
  245. description: 按操作人可见范围返回区域节点集合/树;运营主/子账号只见本范围及下级。⚠️ 2026-11-08 由 GET 改 POST(R-5:GET 无请求体,网关无法注入授权上界)。
  246. operationId: region_tree
  247. tags:
  248. - 区域管理
  249. x-require-auth: true
  250. x-resource-type: bos.region
  251. x-action: view
  252. x-version: v1
  253. x-permission-visibility: catalog
  254. x-enumeration-kind: tree
  255. requestBody:
  256. required: true
  257. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  258. content:
  259. application/json:
  260. schema:
  261. type: object
  262. properties:
  263. data:
  264. type: object
  265. description: 无业务参数
  266. required:
  267. - data
  268. responses:
  269. "200":
  270. description: 成功。统一信封 code/message/data
  271. /region/subtree@v1:
  272. post:
  273. summary: 查询区域子树
  274. description: 挂载弹窗左树、区域钻取共用;按可见范围裁剪。
  275. operationId: region_subtree
  276. tags:
  277. - 区域管理
  278. x-require-auth: true
  279. x-resource-type: bos.region
  280. x-action: view
  281. x-version: v1
  282. x-permission-visibility: catalog
  283. requestBody:
  284. required: true
  285. description: JSON 请求体,业务字段置于 data
  286. content:
  287. application/json:
  288. schema:
  289. type: object
  290. description: 统一信封请求体,业务字段放在 data 内
  291. properties:
  292. data:
  293. type: object
  294. description: 子树查询参数
  295. properties:
  296. node_id:
  297. type: string
  298. description: 根节点 ID(可选;空则按可见根展开)
  299. required:
  300. - data
  301. responses:
  302. "200":
  303. description: 成功。统一信封 code/message/data
  304. /region/change_log@v1:
  305. get:
  306. summary: 区域变更流水
  307. description: 仅 admin 可见;运营子账号可见节点但不可见变更流水。
  308. operationId: region_change_log
  309. tags:
  310. - 区域管理
  311. x-require-auth: true
  312. x-resource-type: bos.region
  313. x-action: view
  314. x-version: v1
  315. x-permission-visibility: catalog
  316. responses:
  317. "200":
  318. description: 成功。统一信封 code/message/data
  319. /region/orphans@v1:
  320. post:
  321. summary: 悬空区域节点
  322. description: 查询悬空/孤儿节点;按节点所在区域分派可见性,admin 全量。⚠️ 2026-11-08 由 GET 改 POST(R-5)。
  323. operationId: region_orphans
  324. tags:
  325. - 区域管理
  326. x-require-auth: true
  327. x-resource-type: bos.region
  328. x-action: view
  329. x-version: v1
  330. x-permission-visibility: catalog
  331. x-enumeration-kind: tree
  332. requestBody:
  333. required: true
  334. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  335. content:
  336. application/json:
  337. schema:
  338. type: object
  339. properties:
  340. data:
  341. type: object
  342. description: 无业务参数
  343. required:
  344. - data
  345. responses:
  346. "200":
  347. description: 成功。统一信封 code/message/data
  348. /account/get_list@v1:
  349. post:
  350. summary: 成员账号列表
  351. description: 列登录名/手机号(掩码)/角色/主体/主-子账号标记/状态;运维侧全量,团队侧限本团队成员。⚠️「姓名」列⛔ 数源(`bos_user_binding` 无该列),见总则§18.3。
  352. operationId: account_get_list
  353. tags:
  354. - 账号管理
  355. x-require-auth: true
  356. x-resource-type: bos.account
  357. x-action: list
  358. x-version: v1
  359. x-permission-visibility: catalog
  360. requestBody:
  361. required: false
  362. description: 分页与过滤(page/page_size/keyword/role_code/subject_type/status),业务字段置于 data
  363. content:
  364. application/json:
  365. schema:
  366. type: object
  367. responses:
  368. "200":
  369. description: 成功。统一信封 code/message/data
  370. /ent_team/get_list@v1:
  371. post:
  372. summary: 运营团队列表
  373. description: 一条团队带负责人登录名、备注与成员数;仅 admin/opsMain/opsSub。⚠️ 出参⛔ `settle_mode`/`settle_value`——分成方是封闭的三类(运营商/合伙人/运维团队,第 4 册§5.1/§5.2),运营团队⛔ 分成方(2026-11-08 业主定案,总则§18.3 `PG-7` 路线 A=原型回改删两列)。
  374. operationId: ent_team_get_list
  375. tags:
  376. - 运营团队
  377. x-require-auth: true
  378. x-resource-type: bos.ent_team
  379. x-action: list
  380. x-version: v1
  381. x-permission-visibility: catalog
  382. requestBody:
  383. required: false
  384. description: 分页与过滤(page/page_size/keyword),业务字段置于 data。keyword=「按名称 / 备注」模糊匹配(`team_name_norm LIKE %q%` **OR** `remark LIKE %q%`,第 1 册 05 册§5.4 OR-09)
  385. content:
  386. application/json:
  387. schema:
  388. type: object
  389. responses:
  390. "200":
  391. description: '成功。统一信封 code/message/data;items[] 含 remark(备注,VARCHAR(200) NULL,未配置回 null)'
  392. /ops_team/get_list@v1:
  393. post:
  394. summary: 运维团队列表
  395. description: 一页列出全部团队,带可分配工单类型、成员数与派单/结算口径。⚠️「未完成工单」「超期未完成」两列负载暂无数源(工单表属第 2 册),回 null+顶层 load_pending,见总则§18.3。
  396. operationId: ops_team_get_list
  397. tags:
  398. - 运维团队
  399. x-require-auth: true
  400. x-resource-type: bos.ops_team
  401. x-action: list
  402. x-version: v1
  403. x-permission-visibility: catalog
  404. requestBody:
  405. required: false
  406. description: 分页与过滤(page/page_size/keyword/region_node_id),业务字段置于 data
  407. content:
  408. application/json:
  409. schema:
  410. type: object
  411. responses:
  412. "200":
  413. description: 成功。统一信封 code/message/data
  414. /audit/get_list@v1:
  415. post:
  416. summary: 审计日志检索
  417. description: SC-04 六列(时间/操作人/操作类型/对象/变更前/变更后);时间倒序+(occurred_at,id) 游标,⛔ OFFSET。⚠️ bos_audit_log 暂无写入口,落地前恒空集(前端逐字空态「可见范围内暂无记录」),见总则§18.3。
  418. operationId: audit_get_list
  419. tags:
  420. - 审计日志
  421. x-require-auth: true
  422. x-resource-type: bos.audit
  423. x-action: list
  424. x-version: v1
  425. x-permission-visibility: catalog
  426. requestBody:
  427. required: false
  428. description: 游标与检索条件(cursor/page_size/object_type/object_ref/actor_user_id/occurred_from/occurred_to/keyword),业务字段置于 data
  429. content:
  430. application/json:
  431. schema:
  432. type: object
  433. responses:
  434. "200":
  435. description: 成功。统一信封 code/message/data
  436. /account/provision@v1:
  437. post:
  438. summary: 开通账号
  439. description: 四入口共用开通管线。唯一性守卫(登录名/手机号)先于平台调用;角色与主体须一致。
  440. operationId: account_provision
  441. tags:
  442. - 账号管理
  443. x-require-auth: true
  444. x-resource-type: bos.account
  445. x-action: create
  446. x-version: v1
  447. x-permission-visibility: catalog
  448. requestBody:
  449. required: true
  450. description: JSON 请求体,业务字段置于 data
  451. content:
  452. application/json:
  453. schema:
  454. type: object
  455. description: 统一信封请求体,业务字段放在 data 内
  456. properties:
  457. data:
  458. type: object
  459. description: 业务参数
  460. properties:
  461. username:
  462. type: string
  463. description: 登录名(归一化后全站唯一)
  464. role_code:
  465. type: string
  466. description: 业务角色码
  467. subject_type:
  468. type: string
  469. description: 主体类型(operator/partner/ent_team/ops_team/customer 等)
  470. subject_id:
  471. type: string
  472. description: 主体 ID
  473. mobile:
  474. type: string
  475. description: 手机号(可选,唯一)
  476. required:
  477. - username
  478. - role_code
  479. - subject_type
  480. - subject_id
  481. required:
  482. - data
  483. responses:
  484. "200":
  485. description: 成功。统一信封 code/message/data
  486. /account/update_status@v1:
  487. post:
  488. summary: 停用或恢复账号
  489. description: 停用/恢复账号状态;不可操作当前登录账号。
  490. operationId: account_update_status
  491. tags:
  492. - 账号管理
  493. x-require-auth: true
  494. x-resource-type: bos.account
  495. x-action: manage
  496. x-version: v1
  497. x-permission-visibility: catalog
  498. requestBody:
  499. required: true
  500. description: JSON 请求体,业务字段置于 data
  501. content:
  502. application/json:
  503. schema:
  504. type: object
  505. description: 统一信封请求体,业务字段放在 data 内
  506. properties:
  507. data:
  508. type: object
  509. description: 业务参数
  510. properties:
  511. user_id:
  512. type: string
  513. description: 目标用户 ID
  514. status:
  515. type: string
  516. description: 目标状态(如 disabled/active)
  517. required:
  518. - user_id
  519. - status
  520. required:
  521. - data
  522. responses:
  523. "200":
  524. description: 成功。统一信封 code/message/data
  525. /account/reset_code@v1:
  526. post:
  527. summary: 重置激活码
  528. description: 仅未激活账号可重置;已激活拒绝。新码仅当次返回。
  529. operationId: account_reset_code
  530. tags:
  531. - 账号管理
  532. x-require-auth: true
  533. x-resource-type: bos.account
  534. x-action: manage
  535. x-version: v1
  536. x-permission-visibility: catalog
  537. requestBody:
  538. required: true
  539. description: JSON 请求体,业务字段置于 data
  540. content:
  541. application/json:
  542. schema:
  543. type: object
  544. description: 统一信封请求体,业务字段放在 data 内
  545. properties:
  546. data:
  547. type: object
  548. description: 业务参数
  549. properties:
  550. user_id:
  551. type: string
  552. description: 目标用户 ID
  553. required:
  554. - user_id
  555. required:
  556. - data
  557. responses:
  558. "200":
  559. description: 成功。统一信封 code/message/data
  560. /account/export_codes@v1:
  561. post:
  562. summary: 导出激活码
  563. description: 导出未设密账号激活码明文。必传收窄后的 user_ids,以及与令牌一致的 scope_type/scope_id;validity=expired/all 为写操作(先作废再换新码)。
  564. operationId: account_export_codes
  565. tags:
  566. - 账号管理
  567. x-require-auth: true
  568. x-resource-type: bos.account
  569. x-action: export
  570. x-version: v1
  571. x-permission-visibility: catalog
  572. requestBody:
  573. required: true
  574. description: JSON 请求体,业务字段置于 data
  575. content:
  576. application/json:
  577. schema:
  578. type: object
  579. description: 统一信封请求体,业务字段放在 data 内
  580. properties:
  581. data:
  582. type: object
  583. description: 业务参数
  584. properties:
  585. user_ids:
  586. type: array
  587. description: 按本人可见范围收窄后的用户 ID 列表(禁止空列表全量)
  588. items:
  589. type: string
  590. description: 用户 ID
  591. scope_type:
  592. type: string
  593. description: 作用域类型,须与所用令牌一致
  594. scope_id:
  595. type: string
  596. description: 作用域 ID,须与所用令牌一致
  597. validity:
  598. type: string
  599. description: 导出口径:active=仍有效;expired=已过期(写);all=全部(写)
  600. enum:
  601. - active
  602. - expired
  603. - all
  604. required:
  605. - user_ids
  606. - scope_type
  607. - scope_id
  608. - validity
  609. required:
  610. - data
  611. responses:
  612. "200":
  613. description: 成功。统一信封 code/message/data
  614. /account/change_password@v1:
  615. post:
  616. summary: 自助修改密码
  617. description: 已登录用户修改本人密码;新旧相同不保存。
  618. operationId: account_change_password
  619. tags:
  620. - 账号管理
  621. x-require-auth: true
  622. x-resource-type: bos.account
  623. x-action: manage
  624. x-version: v1
  625. x-permission-visibility: catalog
  626. requestBody:
  627. required: true
  628. description: JSON 请求体,业务字段置于 data
  629. content:
  630. application/json:
  631. schema:
  632. type: object
  633. description: 统一信封请求体,业务字段放在 data 内
  634. properties:
  635. data:
  636. type: object
  637. description: 业务参数
  638. properties:
  639. old_password:
  640. type: string
  641. description: 原密码
  642. new_password:
  643. type: string
  644. description: 新密码
  645. required:
  646. - old_password
  647. - new_password
  648. required:
  649. - data
  650. responses:
  651. "200":
  652. description: 成功。统一信封 code/message/data
  653. /activation/verify@v1:
  654. post:
  655. summary: 激活并设置密码
  656. description: 免登录豁免接口。校验激活码后设置新密码;按来源 IP+码窗口限流,不设失败计数锁死。
  657. operationId: activation_verify
  658. tags:
  659. - 认证与激活
  660. x-require-auth: false
  661. x-resource-type: bos.activation
  662. x-action: manage
  663. x-version: v1
  664. x-permission-visibility: catalog
  665. requestBody:
  666. required: true
  667. description: JSON 请求体,业务字段置于 data
  668. content:
  669. application/json:
  670. schema:
  671. type: object
  672. description: 统一信封请求体,业务字段放在 data 内
  673. properties:
  674. data:
  675. type: object
  676. description: 业务参数
  677. properties:
  678. code:
  679. type: string
  680. description: 激活码
  681. new_password:
  682. type: string
  683. description: 新密码(建议不少于 8 位)
  684. minLength: 8
  685. required:
  686. - code
  687. - new_password
  688. required:
  689. - data
  690. responses:
  691. "200":
  692. description: 成功。统一信封 code/message/data
  693. /operator/create@v1:
  694. post:
  695. summary: 新建运营商
  696. description: 运营商建档。所属区域必须是省级节点;同省份×品牌唯一;可写结算口径。
  697. operationId: operator_create
  698. tags:
  699. - 运营商
  700. x-require-auth: true
  701. x-resource-type: bos.operator
  702. x-action: create
  703. x-version: v1
  704. x-permission-visibility: catalog
  705. requestBody:
  706. required: true
  707. description: JSON 请求体,业务字段置于 data
  708. content:
  709. application/json:
  710. schema:
  711. type: object
  712. description: 统一信封请求体,业务字段放在 data 内
  713. properties:
  714. data:
  715. type: object
  716. description: 业务参数
  717. properties:
  718. name:
  719. type: string
  720. description: 运营商名称
  721. brand:
  722. type: string
  723. description: 品牌:移动/联通/电信
  724. region_node_id:
  725. type: string
  726. description: 建档区域节点 ID(必须省级)
  727. is_province_node:
  728. type: boolean
  729. description: 是否省级节点标记(服务端校验用,可选)
  730. settle_mode:
  731. type: string
  732. description: 结算方式:ratio=比例;amount=固定金额;per_account=每账号
  733. enum:
  734. - ratio
  735. - amount
  736. - per_account
  737. settle_value:
  738. type: number
  739. description: 结算值:比例时 0<x≤100;金额/每账号时为分且 >0
  740. required:
  741. - name
  742. - brand
  743. - region_node_id
  744. required:
  745. - data
  746. responses:
  747. "200":
  748. description: 成功。统一信封 code/message/data
  749. /operator/update@v1:
  750. post:
  751. summary: 编辑运营商
  752. description: 编辑运营商档案;改品牌/省份不得绕过省份×品牌唯一与省级节点校验。
  753. operationId: operator_update
  754. tags:
  755. - 运营商
  756. x-require-auth: true
  757. x-resource-type: bos.operator
  758. x-action: update
  759. x-version: v1
  760. x-permission-visibility: catalog
  761. requestBody:
  762. required: true
  763. description: JSON 请求体,业务字段置于 data
  764. content:
  765. application/json:
  766. schema:
  767. type: object
  768. description: 统一信封请求体,业务字段放在 data 内
  769. properties:
  770. data:
  771. type: object
  772. description: 业务参数
  773. properties:
  774. operator_id:
  775. type: string
  776. description: 运营商 ID
  777. name:
  778. type: string
  779. description: 运营商名称
  780. brand:
  781. type: string
  782. description: 品牌:移动/联通/电信
  783. region_node_id:
  784. type: string
  785. description: 建档区域节点 ID(必须省级)
  786. is_province_node:
  787. type: boolean
  788. description: 是否省级节点标记(可选)
  789. settle_mode:
  790. type: string
  791. description: 结算方式:ratio/amount/per_account
  792. settle_value:
  793. type: number
  794. description: 结算值
  795. row_version:
  796. type: integer
  797. description: 乐观锁版本(若启用)
  798. required:
  799. - operator_id
  800. - name
  801. - brand
  802. - region_node_id
  803. required:
  804. - data
  805. responses:
  806. "200":
  807. description: 成功。统一信封 code/message/data
  808. /operator/delete@v1:
  809. post:
  810. summary: 删除运营商
  811. description: 删除前六项检查并级联注销对账账号。
  812. operationId: operator_delete
  813. tags:
  814. - 运营商
  815. x-require-auth: true
  816. x-resource-type: bos.operator
  817. x-action: delete
  818. x-version: v1
  819. x-permission-visibility: catalog
  820. requestBody:
  821. required: true
  822. description: JSON 请求体,业务字段置于 data
  823. content:
  824. application/json:
  825. schema:
  826. type: object
  827. description: 统一信封请求体,业务字段放在 data 内
  828. properties:
  829. data:
  830. type: object
  831. description: 业务参数
  832. properties:
  833. operator_id:
  834. type: string
  835. description: 运营商 ID
  836. required:
  837. - operator_id
  838. required:
  839. - data
  840. responses:
  841. "200":
  842. description: 成功。统一信封 code/message/data
  843. /operator/get_list@v1:
  844. post:
  845. summary: 运营商列表
  846. description: 卡片口径:建档区域或下挂客户落在本可见范围。
  847. operationId: operator_get_list
  848. tags:
  849. - 运营商
  850. x-require-auth: true
  851. x-resource-type: bos.operator
  852. x-action: list
  853. x-version: v1
  854. x-permission-visibility: catalog
  855. requestBody:
  856. required: true
  857. description: JSON 请求体,业务字段置于 data
  858. content:
  859. application/json:
  860. schema:
  861. type: object
  862. description: 统一信封请求体,业务字段放在 data 内
  863. properties:
  864. data:
  865. type: object
  866. description: 列表筛选参数
  867. properties:
  868. page:
  869. type: integer
  870. description: 页码(0 基索引,默认 0)
  871. minimum: 0
  872. default: 0
  873. page_size:
  874. type: integer
  875. description: 每页条数(默认 20,上限 200)
  876. minimum: 1
  877. maximum: 200
  878. default: 20
  879. keyword:
  880. type: string
  881. description: 关键字筛选(可选)
  882. brand:
  883. type: string
  884. description: 品牌筛选(可选)
  885. required:
  886. - data
  887. responses:
  888. "200":
  889. description: 成功。统一信封 code/message/data
  890. /operator/recon_account/create@v1:
  891. post:
  892. summary: 创建对账账号
  893. description: 一家运营商至多一个对账账号;初始密码仅当次显示。
  894. operationId: operator_recon_account_create
  895. tags:
  896. - 运营商
  897. x-require-auth: true
  898. x-resource-type: bos.operator.recon_account
  899. x-action: create
  900. x-version: v1
  901. x-permission-visibility: catalog
  902. requestBody:
  903. required: true
  904. description: JSON 请求体,业务字段置于 data
  905. content:
  906. application/json:
  907. schema:
  908. type: object
  909. description: 统一信封请求体,业务字段放在 data 内
  910. properties:
  911. data:
  912. type: object
  913. description: 业务参数
  914. properties:
  915. operator_id:
  916. type: string
  917. description: 运营商 ID
  918. username:
  919. type: string
  920. description: 对账账号登录名
  921. mobile:
  922. type: string
  923. description: 手机号(可选)
  924. required:
  925. - operator_id
  926. - username
  927. required:
  928. - data
  929. responses:
  930. "200":
  931. description: 成功。统一信封 code/message/data
  932. /operator/recon_account/get@v1:
  933. post:
  934. summary: 查询对账账号
  935. description: 只回状态提示(如「未发送,线下告知本人」),不回密码。
  936. operationId: operator_recon_account_get
  937. tags:
  938. - 运营商
  939. x-require-auth: true
  940. x-resource-type: bos.operator.recon_account
  941. x-action: view
  942. x-version: v1
  943. x-permission-visibility: catalog
  944. requestBody:
  945. required: true
  946. description: JSON 请求体,业务字段置于 data
  947. content:
  948. application/json:
  949. schema:
  950. type: object
  951. description: 统一信封请求体,业务字段放在 data 内
  952. properties:
  953. data:
  954. type: object
  955. description: 业务参数
  956. properties:
  957. operator_id:
  958. type: string
  959. description: 运营商 ID
  960. required:
  961. - operator_id
  962. required:
  963. - data
  964. responses:
  965. "200":
  966. description: 成功。统一信封 code/message/data
  967. /partner/create@v1:
  968. post:
  969. summary: 新建合伙人
  970. description: 合伙人建档并同步开通账号;名称全站唯一;结算字段仅 admin 可写。
  971. operationId: partner_create
  972. tags:
  973. - 合伙人
  974. x-require-auth: true
  975. x-resource-type: bos.partner
  976. x-action: create
  977. x-version: v1
  978. x-permission-visibility: catalog
  979. requestBody:
  980. required: true
  981. description: JSON 请求体,业务字段置于 data
  982. content:
  983. application/json:
  984. schema:
  985. type: object
  986. description: 统一信封请求体,业务字段放在 data 内
  987. properties:
  988. data:
  989. type: object
  990. description: 业务参数
  991. properties:
  992. name:
  993. type: string
  994. description: 合伙人名称(全站唯一)
  995. duty_desc:
  996. type: string
  997. description: 职务说明(可选)
  998. region_node_id:
  999. type: string
  1000. description: 建档区域节点 ID
  1001. mobile:
  1002. type: string
  1003. description: 手机号(可选)
  1004. username:
  1005. type: string
  1006. description: 登录名(开通账号用)
  1007. settle_mode:
  1008. type: string
  1009. description: 结算方式(仅 admin 可写,可选)
  1010. settle_value:
  1011. type: number
  1012. description: 结算值(仅 admin 可写,可选)
  1013. required:
  1014. - name
  1015. - region_node_id
  1016. - username
  1017. required:
  1018. - data
  1019. responses:
  1020. "200":
  1021. description: 成功。统一信封 code/message/data
  1022. /partner/update@v1:
  1023. post:
  1024. summary: 编辑合伙人
  1025. description: 编辑合伙人资料;登录名不可改。
  1026. operationId: partner_update
  1027. tags:
  1028. - 合伙人
  1029. x-require-auth: true
  1030. x-resource-type: bos.partner
  1031. x-action: update
  1032. x-version: v1
  1033. x-permission-visibility: catalog
  1034. requestBody:
  1035. required: true
  1036. description: JSON 请求体,业务字段置于 data
  1037. content:
  1038. application/json:
  1039. schema:
  1040. type: object
  1041. description: 统一信封请求体,业务字段放在 data 内
  1042. properties:
  1043. data:
  1044. type: object
  1045. description: 业务参数
  1046. properties:
  1047. partner_id:
  1048. type: string
  1049. description: 合伙人 ID
  1050. name:
  1051. type: string
  1052. description: 合伙人名称(全站唯一)
  1053. duty_desc:
  1054. type: string
  1055. description: 职务说明(可选)
  1056. region_node_id:
  1057. type: string
  1058. description: 建档区域节点 ID
  1059. mobile:
  1060. type: string
  1061. description: 手机号(可选)
  1062. settle_mode:
  1063. type: string
  1064. description: 结算方式(仅 admin 可写,可选)
  1065. settle_value:
  1066. type: number
  1067. description: 结算值(仅 admin 可写,可选)
  1068. row_version:
  1069. type: integer
  1070. description: 乐观锁版本(若启用)
  1071. required:
  1072. - partner_id
  1073. - name
  1074. - region_node_id
  1075. required:
  1076. - data
  1077. responses:
  1078. "200":
  1079. description: 成功。统一信封 code/message/data
  1080. /partner/delete@v1:
  1081. post:
  1082. summary: 删除合伙人
  1083. description: 删除合伙人档案及相关授权。
  1084. operationId: partner_delete
  1085. tags:
  1086. - 合伙人
  1087. x-require-auth: true
  1088. x-resource-type: bos.partner
  1089. x-action: delete
  1090. x-version: v1
  1091. x-permission-visibility: catalog
  1092. requestBody:
  1093. required: true
  1094. description: JSON 请求体,业务字段置于 data
  1095. content:
  1096. application/json:
  1097. schema:
  1098. type: object
  1099. description: 统一信封请求体,业务字段放在 data 内
  1100. properties:
  1101. data:
  1102. type: object
  1103. description: 业务参数
  1104. properties:
  1105. partner_id:
  1106. type: string
  1107. description: 合伙人 ID
  1108. required:
  1109. - partner_id
  1110. required:
  1111. - data
  1112. responses:
  1113. "200":
  1114. description: 成功。统一信封 code/message/data
  1115. /partner/get_list@v1:
  1116. post:
  1117. summary: 合伙人列表
  1118. description: 卡片口径:建档区域落在本范围(含下级)。
  1119. operationId: partner_get_list
  1120. tags:
  1121. - 合伙人
  1122. x-require-auth: true
  1123. x-resource-type: bos.partner
  1124. x-action: list
  1125. x-version: v1
  1126. x-permission-visibility: catalog
  1127. requestBody:
  1128. required: true
  1129. description: JSON 请求体,业务字段置于 data
  1130. content:
  1131. application/json:
  1132. schema:
  1133. type: object
  1134. description: 统一信封请求体,业务字段放在 data 内
  1135. properties:
  1136. data:
  1137. type: object
  1138. description: 列表筛选参数
  1139. properties:
  1140. page:
  1141. type: integer
  1142. description: 页码(0 基索引,默认 0)
  1143. minimum: 0
  1144. default: 0
  1145. page_size:
  1146. type: integer
  1147. description: 每页条数(默认 20,上限 200)
  1148. minimum: 1
  1149. maximum: 200
  1150. default: 20
  1151. keyword:
  1152. type: string
  1153. description: 关键字筛选(可选)
  1154. required:
  1155. - data
  1156. responses:
  1157. "200":
  1158. description: 成功。统一信封 code/message/data
  1159. /partner/scope/get@v1:
  1160. post:
  1161. summary: 读取合伙人负责范围
  1162. description: 返回该合伙人的 region/customer 两类 bos_data_scope。⚠️ 2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。
  1163. operationId: partner_scope_get
  1164. tags:
  1165. - 合伙人
  1166. x-require-auth: true
  1167. x-resource-type: bos.partner.scope
  1168. x-action: view
  1169. x-version: v1
  1170. x-permission-visibility: catalog
  1171. requestBody:
  1172. required: true
  1173. description: 统一信封请求体(无业务参数)
  1174. content:
  1175. application/json:
  1176. schema:
  1177. type: object
  1178. properties:
  1179. data:
  1180. type: object
  1181. description: 无业务参数
  1182. required:
  1183. - data
  1184. responses:
  1185. "200":
  1186. description: 成功。统一信封 code/message/data
  1187. /partner/scope/save@v1:
  1188. post:
  1189. summary: 保存合伙人负责范围
  1190. description: 写入 bos_data_scope(holder_type=partner);允许保存为空;保存即 bump epoch。
  1191. operationId: partner_scope_save
  1192. tags:
  1193. - 合伙人
  1194. x-require-auth: true
  1195. x-resource-type: bos.partner.scope
  1196. x-action: manage
  1197. x-version: v1
  1198. x-permission-visibility: catalog
  1199. requestBody:
  1200. required: true
  1201. description: JSON 请求体,业务字段置于 data
  1202. content:
  1203. application/json:
  1204. schema:
  1205. type: object
  1206. description: 统一信封请求体,业务字段放在 data 内
  1207. properties:
  1208. data:
  1209. type: object
  1210. description: 业务参数
  1211. properties:
  1212. partner_id:
  1213. type: string
  1214. description: 合伙人 ID
  1215. region_node_ids:
  1216. type: array
  1217. description: 负责区域节点 ID 列表(可空)
  1218. items:
  1219. type: string
  1220. description: 区域节点 ID
  1221. customer_ids:
  1222. type: array
  1223. description: 负责客户 ID 列表(可空)
  1224. items:
  1225. type: string
  1226. description: 客户 ID
  1227. required:
  1228. - partner_id
  1229. required:
  1230. - data
  1231. responses:
  1232. "200":
  1233. description: 成功。统一信封 code/message/data
  1234. /ent_team/create@v1:
  1235. post:
  1236. summary: 新建运营团队
  1237. description: 仅 admin。新建运营团队,负责范围初始为空。
  1238. operationId: ent_team_create
  1239. tags:
  1240. - 运营团队
  1241. x-require-auth: true
  1242. x-resource-type: bos.ent_team
  1243. x-action: create
  1244. x-version: v1
  1245. x-permission-visibility: catalog
  1246. requestBody:
  1247. required: true
  1248. description: JSON 请求体,业务字段置于 data
  1249. content:
  1250. application/json:
  1251. schema:
  1252. type: object
  1253. description: 统一信封请求体,业务字段放在 data 内
  1254. properties:
  1255. data:
  1256. type: object
  1257. description: 业务参数
  1258. properties:
  1259. team_name:
  1260. type: string
  1261. description: 团队名称
  1262. primary_username:
  1263. type: string
  1264. description: 主账号登录名(可选)
  1265. primary_mobile:
  1266. type: string
  1267. description: 主账号手机号(可选)
  1268. remark:
  1269. type: string
  1270. maxLength: 200
  1271. description: 备注(可选,去空白后 ≤200 字符;`ent_team.remark VARCHAR(200) NULL`,缺省=落 NULL)。⛔ 参与唯一键、⛔ 参与算账与判权谓词
  1272. required:
  1273. - team_name
  1274. required:
  1275. - data
  1276. responses:
  1277. "200":
  1278. description: 成功。统一信封 code/message/data
  1279. /ent_team/update@v1:
  1280. post:
  1281. summary: 编辑运营团队
  1282. description: 仅 admin。编辑团队资料(改名/备注)。⚠️ 请求体与出参⛔ `settle_mode`/`settle_value`(运营团队⛔ 分成方,第 4 册§5.1/§5.2,总则§18.3 `PG-7` 路线 A)。备注变更须写审计前后值(记文字)。
  1283. operationId: ent_team_update
  1284. tags:
  1285. - 运营团队
  1286. x-require-auth: true
  1287. x-resource-type: bos.ent_team
  1288. x-action: update
  1289. x-version: v1
  1290. x-permission-visibility: catalog
  1291. requestBody:
  1292. required: true
  1293. description: JSON 请求体,业务字段置于 data
  1294. content:
  1295. application/json:
  1296. schema:
  1297. type: object
  1298. description: 统一信封请求体,业务字段放在 data 内
  1299. properties:
  1300. data:
  1301. type: object
  1302. description: 业务参数
  1303. properties:
  1304. team_id:
  1305. type: string
  1306. description: 团队 ID
  1307. team_name:
  1308. type: string
  1309. description: 团队名称
  1310. remark:
  1311. type: string
  1312. maxLength: 200
  1313. description: 备注(`ent_team.remark VARCHAR(200) NULL`)。三态语义:⛔ 本键=⛔ 改本列;带空白串=清空为 NULL;带文本=设值(去空白后 ≤200 字符)。变更写审计前后值
  1314. row_version:
  1315. type: integer
  1316. description: 乐观锁版本(若启用)
  1317. required:
  1318. - team_id
  1319. - team_name
  1320. required:
  1321. - data
  1322. responses:
  1323. "200":
  1324. description: 成功。统一信封 code/message/data
  1325. /ent_team/delete@v1:
  1326. post:
  1327. summary: 删除运营团队
  1328. description: 仅 admin。内置「总部·不限区域」团队不可删。
  1329. operationId: ent_team_delete
  1330. tags:
  1331. - 运营团队
  1332. x-require-auth: true
  1333. x-resource-type: bos.ent_team
  1334. x-action: delete
  1335. x-version: v1
  1336. x-permission-visibility: catalog
  1337. requestBody:
  1338. required: true
  1339. description: JSON 请求体,业务字段置于 data
  1340. content:
  1341. application/json:
  1342. schema:
  1343. type: object
  1344. description: 统一信封请求体,业务字段放在 data 内
  1345. properties:
  1346. data:
  1347. type: object
  1348. description: 业务参数
  1349. properties:
  1350. team_id:
  1351. type: string
  1352. description: 团队 ID
  1353. required:
  1354. - team_id
  1355. required:
  1356. - data
  1357. responses:
  1358. "200":
  1359. description: 成功。统一信封 code/message/data
  1360. /ent_team/member_add@v1:
  1361. post:
  1362. summary: 添加运营团队成员
  1363. description: 每团队有且仅有一个主账号;不可删除当前登录账号。
  1364. operationId: ent_team_member_add
  1365. tags:
  1366. - 运营团队
  1367. x-require-auth: true
  1368. x-resource-type: bos.ent_team
  1369. x-action: manage
  1370. x-version: v1
  1371. x-permission-visibility: catalog
  1372. requestBody:
  1373. required: true
  1374. description: JSON 请求体,业务字段置于 data
  1375. content:
  1376. application/json:
  1377. schema:
  1378. type: object
  1379. description: 统一信封请求体,业务字段放在 data 内
  1380. properties:
  1381. data:
  1382. type: object
  1383. description: 业务参数
  1384. properties:
  1385. team_id:
  1386. type: string
  1387. description: 团队 ID
  1388. username:
  1389. type: string
  1390. description: 成员登录名
  1391. mobile:
  1392. type: string
  1393. description: 手机号(可选)
  1394. is_primary:
  1395. type: boolean
  1396. description: 是否设为主账号(可选)
  1397. required:
  1398. - team_id
  1399. - username
  1400. required:
  1401. - data
  1402. responses:
  1403. "200":
  1404. description: 成功。统一信封 code/message/data
  1405. /ent_team/member_remove@v1:
  1406. post:
  1407. summary: 移除运营团队成员
  1408. description: 内置主账号不可删不可转交;不可删除当前登录账号。
  1409. operationId: ent_team_member_remove
  1410. tags:
  1411. - 运营团队
  1412. x-require-auth: true
  1413. x-resource-type: bos.ent_team
  1414. x-action: manage
  1415. x-version: v1
  1416. x-permission-visibility: catalog
  1417. requestBody:
  1418. required: true
  1419. description: JSON 请求体,业务字段置于 data
  1420. content:
  1421. application/json:
  1422. schema:
  1423. type: object
  1424. description: 统一信封请求体,业务字段放在 data 内
  1425. properties:
  1426. data:
  1427. type: object
  1428. description: 业务参数
  1429. properties:
  1430. team_id:
  1431. type: string
  1432. description: 团队 ID
  1433. user_id:
  1434. type: string
  1435. description: 成员用户 ID
  1436. required:
  1437. - team_id
  1438. - user_id
  1439. required:
  1440. - data
  1441. responses:
  1442. "200":
  1443. description: 成功。统一信封 code/message/data
  1444. /ent_team/transfer_primary@v1:
  1445. post:
  1446. summary: 转交运营团队主账号
  1447. description: 仅 admin。同事务切换 is_primary 标记并同步 role_code(opsMain↔opsSub)。
  1448. operationId: ent_team_transfer_primary
  1449. tags:
  1450. - 运营团队
  1451. x-require-auth: true
  1452. x-resource-type: bos.ent_team
  1453. x-action: manage
  1454. x-version: v1
  1455. x-permission-visibility: catalog
  1456. requestBody:
  1457. required: true
  1458. description: JSON 请求体,业务字段置于 data
  1459. content:
  1460. application/json:
  1461. schema:
  1462. type: object
  1463. description: 统一信封请求体,业务字段放在 data 内
  1464. properties:
  1465. data:
  1466. type: object
  1467. description: 业务参数
  1468. properties:
  1469. team_id:
  1470. type: string
  1471. description: 团队 ID
  1472. from_user_id:
  1473. type: string
  1474. description: 原主账号用户 ID
  1475. to_user_id:
  1476. type: string
  1477. description: 新主账号用户 ID
  1478. required:
  1479. - team_id
  1480. - from_user_id
  1481. - to_user_id
  1482. required:
  1483. - data
  1484. responses:
  1485. "200":
  1486. description: 成功。统一信封 code/message/data
  1487. /ent_team/scope/get@v1:
  1488. post:
  1489. summary: 读取运营团队负责范围
  1490. description: 仅 admin。返回团队区域负责范围。⚠️ 2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。
  1491. operationId: ent_team_scope_get
  1492. tags:
  1493. - 运营团队
  1494. x-require-auth: true
  1495. x-resource-type: bos.ent_team.scope
  1496. x-action: view
  1497. x-version: v1
  1498. x-permission-visibility: catalog
  1499. requestBody:
  1500. required: true
  1501. description: 统一信封请求体(无业务参数)
  1502. content:
  1503. application/json:
  1504. schema:
  1505. type: object
  1506. properties:
  1507. data:
  1508. type: object
  1509. description: 无业务参数
  1510. required:
  1511. - data
  1512. responses:
  1513. "200":
  1514. description: 成功。统一信封 code/message/data
  1515. /ent_team/scope/save@v1:
  1516. post:
  1517. summary: 保存运营团队负责范围
  1518. description: 仅 admin。勾选区域写入 bos_data_scope(holder=ent_team),成为区域删除的引用来源。
  1519. operationId: ent_team_scope_save
  1520. tags:
  1521. - 运营团队
  1522. x-require-auth: true
  1523. x-resource-type: bos.ent_team.scope
  1524. x-action: manage
  1525. x-version: v1
  1526. x-permission-visibility: catalog
  1527. requestBody:
  1528. required: true
  1529. description: JSON 请求体,业务字段置于 data
  1530. content:
  1531. application/json:
  1532. schema:
  1533. type: object
  1534. description: 统一信封请求体,业务字段放在 data 内
  1535. properties:
  1536. data:
  1537. type: object
  1538. description: 业务参数
  1539. properties:
  1540. team_id:
  1541. type: string
  1542. description: 团队 ID
  1543. region_node_ids:
  1544. type: array
  1545. description: 负责区域节点 ID 列表
  1546. items:
  1547. type: string
  1548. description: 区域节点 ID
  1549. required:
  1550. - team_id
  1551. - region_node_ids
  1552. required:
  1553. - data
  1554. responses:
  1555. "200":
  1556. description: 成功。统一信封 code/message/data
  1557. /ops_team/create@v1:
  1558. post:
  1559. summary: 新建运维团队
  1560. description: 须指定所属区域、可派工单类型≥1、分派方式与结算口径。⚠️ 2026-11-05 起团队不分类型(无 team_type 键)。
  1561. operationId: ops_team_create
  1562. tags:
  1563. - 运维团队与成员
  1564. x-require-auth: true
  1565. x-resource-type: bos.ops_team
  1566. x-action: create
  1567. x-version: v1
  1568. x-permission-visibility: catalog
  1569. requestBody:
  1570. required: true
  1571. description: JSON 请求体,业务字段置于 data
  1572. content:
  1573. application/json:
  1574. schema:
  1575. type: object
  1576. description: 统一信封请求体,业务字段放在 data 内
  1577. properties:
  1578. data:
  1579. type: object
  1580. description: 业务参数
  1581. properties:
  1582. team_name:
  1583. type: string
  1584. description: 团队名称
  1585. region_node_id:
  1586. type: string
  1587. description: 所属区域节点 ID
  1588. ticket_types:
  1589. type: array
  1590. description: 可派工单类型列表(至少 1 项)
  1591. items:
  1592. type: string
  1593. description: 工单类型码
  1594. dispatch_mode:
  1595. type: string
  1596. description: 分派方式:manual=手工;auto_avg=自动均分
  1597. enum:
  1598. - manual
  1599. - auto_avg
  1600. settle_mode:
  1601. type: string
  1602. description: 结算方式
  1603. settle_value:
  1604. type: number
  1605. description: 结算值
  1606. primary_username:
  1607. type: string
  1608. description: 主账号登录名(空则默认「{团队名}主账号」)
  1609. primary_mobile:
  1610. type: string
  1611. description: 主账号手机号(可选)
  1612. required:
  1613. - team_name
  1614. - region_node_id
  1615. - ticket_types
  1616. - dispatch_mode
  1617. required:
  1618. - data
  1619. responses:
  1620. "200":
  1621. description: 成功。统一信封 code/message/data
  1622. /ops_team/update@v1:
  1623. post:
  1624. summary: 编辑运维团队
  1625. description: 编辑团队资料。⚠️ 2026-11-05 起团队不分类型,请求体无 team_type 键。
  1626. operationId: ops_team_update
  1627. tags:
  1628. - 运维团队与成员
  1629. x-require-auth: true
  1630. x-resource-type: bos.ops_team
  1631. x-action: update
  1632. x-version: v1
  1633. x-permission-visibility: catalog
  1634. requestBody:
  1635. required: true
  1636. description: JSON 请求体,业务字段置于 data
  1637. content:
  1638. application/json:
  1639. schema:
  1640. type: object
  1641. description: 统一信封请求体,业务字段放在 data 内
  1642. properties:
  1643. data:
  1644. type: object
  1645. description: 业务参数
  1646. properties:
  1647. team_id:
  1648. type: string
  1649. description: 团队 ID
  1650. team_name:
  1651. type: string
  1652. description: 团队名称
  1653. region_node_id:
  1654. type: string
  1655. description: 所属区域节点 ID
  1656. ticket_types:
  1657. type: array
  1658. description: 可派工单类型列表
  1659. items:
  1660. type: string
  1661. description: 工单类型码
  1662. settle_mode:
  1663. type: string
  1664. description: 结算方式
  1665. settle_value:
  1666. type: number
  1667. description: 结算值
  1668. row_version:
  1669. type: integer
  1670. description: 乐观锁版本(若启用)
  1671. required:
  1672. - team_id
  1673. required:
  1674. - data
  1675. responses:
  1676. "200":
  1677. description: 成功。统一信封 code/message/data
  1678. /ops_team/delete@v1:
  1679. post:
  1680. summary: 删除运维团队
  1681. description: 删除前校验引用与未办完工单等守卫。
  1682. operationId: ops_team_delete
  1683. tags:
  1684. - 运维团队与成员
  1685. x-require-auth: true
  1686. x-resource-type: bos.ops_team
  1687. x-action: delete
  1688. x-version: v1
  1689. x-permission-visibility: catalog
  1690. requestBody:
  1691. required: true
  1692. description: JSON 请求体,业务字段置于 data
  1693. content:
  1694. application/json:
  1695. schema:
  1696. type: object
  1697. description: 统一信封请求体,业务字段放在 data 内
  1698. properties:
  1699. data:
  1700. type: object
  1701. description: 业务参数
  1702. properties:
  1703. team_id:
  1704. type: string
  1705. description: 团队 ID
  1706. required:
  1707. - team_id
  1708. required:
  1709. - data
  1710. responses:
  1711. "200":
  1712. description: 成功。统一信封 code/message/data
  1713. /ops_team/scope/save@v1:
  1714. post:
  1715. summary: 保存运维团队负责范围
  1716. description: 三个范围写入口之一。同事务校验范围包含关系与未办完工单守卫;失败两侧都不落库。
  1717. operationId: ops_team_scope_save
  1718. tags:
  1719. - 运维团队与成员
  1720. x-require-auth: true
  1721. x-resource-type: bos.ops_team.scope
  1722. x-action: manage
  1723. x-version: v1
  1724. x-permission-visibility: catalog
  1725. requestBody:
  1726. required: true
  1727. description: JSON 请求体,业务字段置于 data
  1728. content:
  1729. application/json:
  1730. schema:
  1731. type: object
  1732. description: 统一信封请求体,业务字段放在 data 内
  1733. properties:
  1734. data:
  1735. type: object
  1736. description: 业务参数
  1737. properties:
  1738. team_id:
  1739. type: string
  1740. description: 团队 ID
  1741. region_node_ids:
  1742. type: array
  1743. description: 负责区域节点 ID 列表
  1744. items:
  1745. type: string
  1746. description: 区域节点 ID
  1747. customer_ids:
  1748. type: array
  1749. description: 负责客户 ID 列表(可空)
  1750. items:
  1751. type: string
  1752. description: 客户 ID
  1753. required:
  1754. - team_id
  1755. required:
  1756. - data
  1757. responses:
  1758. "200":
  1759. description: 成功。统一信封 code/message/data
  1760. /ops_team/member_add@v1:
  1761. post:
  1762. summary: 添加运维成员
  1763. description: 新建成员档案并开通运维子账号(`role_code=ops`)。⚠️ 2026-11-05 起成员不分类型,服务侧只校验 `ticket_types` 是团队可分配类型的子集(`KLT-I105`,可为空=不接单)。
  1764. operationId: ops_team_member_add
  1765. tags:
  1766. - 运维团队与成员
  1767. x-require-auth: true
  1768. x-resource-type: bos.ops_team
  1769. x-action: manage
  1770. x-version: v1
  1771. x-permission-visibility: catalog
  1772. requestBody:
  1773. required: true
  1774. description: JSON 请求体,业务字段置于 data
  1775. content:
  1776. application/json:
  1777. schema:
  1778. type: object
  1779. description: 统一信封请求体,业务字段放在 data 内
  1780. properties:
  1781. data:
  1782. type: object
  1783. description: 业务参数
  1784. properties:
  1785. team_id:
  1786. type: string
  1787. description: 团队 ID
  1788. ticket_types:
  1789. type: array
  1790. description: 该成员可处理的工单类型(须为团队可分配类型的子集;空数组=不接单,如录入人员)
  1791. items:
  1792. type: string
  1793. description: 工单类型码
  1794. username:
  1795. type: string
  1796. description: 登录名
  1797. mobile:
  1798. type: string
  1799. description: 手机号(可选)
  1800. required:
  1801. - team_id
  1802. - username
  1803. required:
  1804. - data
  1805. responses:
  1806. "200":
  1807. description: 成功。统一信封 code/message/data
  1808. /ops_team/member_update@v1:
  1809. post:
  1810. summary: 更新运维成员
  1811. description: 可改手机号与可处理工单类型。⚠️ 2026-11-05 起成员不分类型,⛔ 不因类型变更改写 role_code;可接类型落 ops_member_ticket_type。
  1812. operationId: ops_team_member_update
  1813. tags:
  1814. - 运维团队与成员
  1815. x-require-auth: true
  1816. x-resource-type: bos.ops_team
  1817. x-action: manage
  1818. x-version: v1
  1819. x-permission-visibility: catalog
  1820. requestBody:
  1821. required: true
  1822. description: JSON 请求体,业务字段置于 data
  1823. content:
  1824. application/json:
  1825. schema:
  1826. type: object
  1827. description: 统一信封请求体,业务字段放在 data 内
  1828. properties:
  1829. data:
  1830. type: object
  1831. description: 业务参数
  1832. properties:
  1833. team_id:
  1834. type: string
  1835. description: 团队 ID
  1836. ticket_types:
  1837. type: array
  1838. description: 该成员可处理的工单类型(整体替换;须为团队可分配类型的子集;空数组=不接单)
  1839. items:
  1840. type: string
  1841. description: 工单类型码
  1842. member_id:
  1843. type: string
  1844. description: 成员 ID
  1845. mobile:
  1846. type: string
  1847. description: 手机号(可选)
  1848. required:
  1849. - team_id
  1850. - member_id
  1851. required:
  1852. - data
  1853. responses:
  1854. "200":
  1855. description: 成功。统一信封 code/message/data
  1856. /ops_team/member_remove@v1:
  1857. post:
  1858. summary: 移除运维成员
  1859. description: 删除前五项检查并注销账号。
  1860. operationId: ops_team_member_remove
  1861. tags:
  1862. - 运维团队与成员
  1863. x-require-auth: true
  1864. x-resource-type: bos.ops_team
  1865. x-action: manage
  1866. x-version: v1
  1867. x-permission-visibility: catalog
  1868. requestBody:
  1869. required: true
  1870. description: JSON 请求体,业务字段置于 data
  1871. content:
  1872. application/json:
  1873. schema:
  1874. type: object
  1875. description: 统一信封请求体,业务字段放在 data 内
  1876. properties:
  1877. data:
  1878. type: object
  1879. description: 业务参数
  1880. properties:
  1881. team_id:
  1882. type: string
  1883. description: 团队 ID
  1884. member_id:
  1885. type: string
  1886. description: 成员 ID
  1887. required:
  1888. - team_id
  1889. - member_id
  1890. required:
  1891. - data
  1892. responses:
  1893. "200":
  1894. description: 成功。统一信封 code/message/data
  1895. /ops_member/scope/save@v1:
  1896. post:
  1897. summary: 保存运维成员负责范围
  1898. description: 三个范围写入口之二。scope_mode∈follow_team/region/customer;越界报错不保存。
  1899. operationId: ops_member_scope_save
  1900. tags:
  1901. - 运维团队与成员
  1902. x-require-auth: true
  1903. x-resource-type: bos.ops_member.scope
  1904. x-action: manage
  1905. x-version: v1
  1906. x-permission-visibility: catalog
  1907. requestBody:
  1908. required: true
  1909. description: JSON 请求体,业务字段置于 data
  1910. content:
  1911. application/json:
  1912. schema:
  1913. type: object
  1914. description: 统一信封请求体,业务字段放在 data 内
  1915. properties:
  1916. data:
  1917. type: object
  1918. description: 业务参数
  1919. properties:
  1920. member_id:
  1921. type: string
  1922. description: 成员 ID
  1923. scope_mode:
  1924. type: string
  1925. description: 范围模式:follow_team=跟随团队;region=按区域;customer=按客户
  1926. enum:
  1927. - follow_team
  1928. - region
  1929. - customer
  1930. targets:
  1931. type: array
  1932. description: region/customer 模式下的目标 ID 列表
  1933. items:
  1934. type: string
  1935. description: 目标 ID
  1936. required:
  1937. - member_id
  1938. - scope_mode
  1939. required:
  1940. - data
  1941. responses:
  1942. "200":
  1943. description: 成功。统一信封 code/message/data
  1944. /ops_team/dispatch_mode/update@v1:
  1945. post:
  1946. summary: 更新分派方式
  1947. description: 与运营侧改同一字段,后写入者生效;默认补记审计。
  1948. operationId: ops_team_dispatch_mode_update
  1949. tags:
  1950. - 运维团队与成员
  1951. x-require-auth: true
  1952. x-resource-type: bos.ops_team.dispatch_mode
  1953. x-action: update
  1954. x-version: v1
  1955. x-permission-visibility: catalog
  1956. requestBody:
  1957. required: true
  1958. description: JSON 请求体,业务字段置于 data
  1959. content:
  1960. application/json:
  1961. schema:
  1962. type: object
  1963. description: 统一信封请求体,业务字段放在 data 内
  1964. properties:
  1965. data:
  1966. type: object
  1967. description: 业务参数
  1968. properties:
  1969. team_id:
  1970. type: string
  1971. description: 团队 ID
  1972. dispatch_mode:
  1973. type: string
  1974. description: 分派方式:manual=手工;auto_avg=自动均分
  1975. enum:
  1976. - manual
  1977. - auto_avg
  1978. required:
  1979. - team_id
  1980. - dispatch_mode
  1981. required:
  1982. - data
  1983. responses:
  1984. "200":
  1985. description: 成功。统一信封 code/message/data
  1986. /ops_team/coverage/get@v1:
  1987. post:
  1988. summary: 运维团队覆盖客户
  1989. description: 覆盖客户=团队区域范围(Tree) ∩ 本类型归属(Owner),与列表分页同源。⚠️ 2026-11-08 由 GET 改 POST(R-5)。
  1990. operationId: ops_team_coverage_get
  1991. tags:
  1992. - 运维团队与成员
  1993. x-require-auth: true
  1994. x-resource-type: bos.ops_team.coverage
  1995. x-action: view
  1996. x-version: v1
  1997. x-permission-visibility: catalog
  1998. x-enumeration-kind: list
  1999. requestBody:
  2000. required: true
  2001. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  2002. content:
  2003. application/json:
  2004. schema:
  2005. type: object
  2006. properties:
  2007. data:
  2008. type: object
  2009. description: 无业务参数
  2010. required:
  2011. - data
  2012. responses:
  2013. "200":
  2014. description: 成功。统一信封 code/message/data
  2015. /customer/create@v1:
  2016. post:
  2017. summary: 新建客户
  2018. description: 客户建档。须指定归属运营商;可选合伙人、挂载申请、父区域节点。完整弹窗字段还可含识别号、联系人、地址、运维团队、主账号、证照等。
  2019. operationId: customer_create
  2020. tags:
  2021. - 客户管理
  2022. x-require-auth: true
  2023. x-resource-type: bos.customer
  2024. x-action: create
  2025. x-version: v1
  2026. x-permission-visibility: catalog
  2027. requestBody:
  2028. required: true
  2029. description: JSON 请求体,业务字段置于 data
  2030. content:
  2031. application/json:
  2032. schema:
  2033. type: object
  2034. description: 统一信封请求体,业务字段放在 data 内
  2035. properties:
  2036. data:
  2037. type: object
  2038. description: 业务参数
  2039. properties:
  2040. customer_name:
  2041. type: string
  2042. description: 客户名称
  2043. subject_type:
  2044. type: string
  2045. description: 主体类型
  2046. operator_id:
  2047. type: string
  2048. description: 归属运营商 ID
  2049. partner_id:
  2050. type: string
  2051. description: 归属合伙人 ID(可选)
  2052. mount_request_id:
  2053. type: string
  2054. description: 挂载申请 ID(可选;有值表示已完成挂载前置)
  2055. parent_node_id:
  2056. type: string
  2057. description: 所挂区域父节点 ID(可选)
  2058. id_code:
  2059. type: string
  2060. description: 识别号(可选)
  2061. contact_name:
  2062. type: string
  2063. description: 联系人(可选)
  2064. contact_mobile:
  2065. type: string
  2066. description: 联系电话(可选)
  2067. address:
  2068. type: string
  2069. description: 地址(可选)
  2070. ops_team_ids:
  2071. type: array
  2072. description: 所挂运维团队 ID 列表(可选;至少一支时须在操作人负责范围内,多支之间允许可分配类型重叠)
  2073. items:
  2074. type: string
  2075. description: 运维团队 ID
  2076. primary_username:
  2077. type: string
  2078. description: 客户主账号登录名(可选)
  2079. primary_mobile:
  2080. type: string
  2081. description: 客户主账号手机号(可选)
  2082. required:
  2083. - customer_name
  2084. - subject_type
  2085. - operator_id
  2086. required:
  2087. - data
  2088. responses:
  2089. "200":
  2090. description: 成功。统一信封 code/message/data
  2091. /customer/get_list@v1:
  2092. post:
  2093. summary: 客户列表
  2094. description: 按可见范围返回客户列表,支持筛选与分页。
  2095. operationId: customer_get_list
  2096. tags:
  2097. - 客户管理
  2098. x-require-auth: true
  2099. x-resource-type: bos.customer
  2100. x-action: list
  2101. x-version: v1
  2102. x-permission-visibility: catalog
  2103. requestBody:
  2104. required: true
  2105. description: JSON 请求体,业务字段置于 data
  2106. content:
  2107. application/json:
  2108. schema:
  2109. type: object
  2110. description: 统一信封请求体,业务字段放在 data 内
  2111. properties:
  2112. data:
  2113. type: object
  2114. description: 列表筛选参数
  2115. properties:
  2116. page:
  2117. type: integer
  2118. description: 页码(0 基索引,默认 0)
  2119. minimum: 0
  2120. default: 0
  2121. page_size:
  2122. type: integer
  2123. description: 每页条数(默认 20,上限 200)
  2124. minimum: 1
  2125. maximum: 200
  2126. default: 20
  2127. keyword:
  2128. type: string
  2129. description: 关键字筛选(可选)
  2130. region_node_id:
  2131. type: string
  2132. description: 区域筛选(可选)
  2133. operator_id:
  2134. type: string
  2135. description: 运营商筛选(可选)
  2136. partner_id:
  2137. type: string
  2138. description: 合伙人筛选(可选)
  2139. status:
  2140. type: string
  2141. description: 状态筛选(可选)
  2142. required:
  2143. - data
  2144. responses:
  2145. "200":
  2146. description: 成功。统一信封 code/message/data
  2147. /customer/get@v1:
  2148. post:
  2149. summary: 客户详情
  2150. description: 按客户 ID 查询档案详情。
  2151. operationId: customer_get
  2152. tags:
  2153. - 客户管理
  2154. x-require-auth: true
  2155. x-resource-type: bos.customer
  2156. x-action: view
  2157. x-version: v1
  2158. x-permission-visibility: catalog
  2159. requestBody:
  2160. required: true
  2161. description: JSON 请求体,业务字段置于 data
  2162. content:
  2163. application/json:
  2164. schema:
  2165. type: object
  2166. description: 统一信封请求体,业务字段放在 data 内
  2167. properties:
  2168. data:
  2169. type: object
  2170. description: 业务参数
  2171. properties:
  2172. customer_id:
  2173. type: string
  2174. description: 客户 ID
  2175. required:
  2176. - customer_id
  2177. required:
  2178. - data
  2179. responses:
  2180. "200":
  2181. description: 成功。统一信封 code/message/data
  2182. /customer/update@v1:
  2183. post:
  2184. summary: 编辑客户
  2185. description: 编辑客户资料。拒收改写 customer_id/region_node_id/operator_id/partner_id;改识别号须带 change_basis。
  2186. operationId: customer_update
  2187. tags:
  2188. - 客户管理
  2189. x-require-auth: true
  2190. x-resource-type: bos.customer
  2191. x-action: update
  2192. x-version: v1
  2193. x-permission-visibility: catalog
  2194. requestBody:
  2195. required: true
  2196. description: JSON 请求体,业务字段置于 data
  2197. content:
  2198. application/json:
  2199. schema:
  2200. type: object
  2201. description: 统一信封请求体,业务字段放在 data 内
  2202. properties:
  2203. data:
  2204. type: object
  2205. description: 业务参数
  2206. properties:
  2207. customer_id:
  2208. type: string
  2209. description: 客户 ID
  2210. customer_name:
  2211. type: string
  2212. description: 客户名称
  2213. subject_type:
  2214. type: string
  2215. description: 主体类型
  2216. id_code:
  2217. type: string
  2218. description: 识别号
  2219. change_basis:
  2220. type: string
  2221. description: 改识别号时的变更依据
  2222. contact_name:
  2223. type: string
  2224. description: 联系人
  2225. contact_mobile:
  2226. type: string
  2227. description: 联系电话
  2228. address:
  2229. type: string
  2230. description: 地址
  2231. ops_team_ids:
  2232. type: array
  2233. description: 所挂运维团队 ID 列表(整体替换当前归属;多支之间允许可分配类型重叠)
  2234. items:
  2235. type: string
  2236. description: 运维团队 ID
  2237. row_version:
  2238. type: integer
  2239. description: 乐观锁版本(若启用)
  2240. required:
  2241. - customer_id
  2242. required:
  2243. - data
  2244. responses:
  2245. "200":
  2246. description: 成功。统一信封 code/message/data
  2247. /customer/delete_precheck@v1:
  2248. post:
  2249. summary: 客户删除前置检查
  2250. description: 返回 can_delete 与 reasons,供删除确认弹窗使用。
  2251. operationId: customer_delete_precheck
  2252. tags:
  2253. - 客户管理
  2254. x-require-auth: true
  2255. x-resource-type: bos.customer
  2256. x-action: view
  2257. x-version: v1
  2258. x-permission-visibility: catalog
  2259. requestBody:
  2260. required: true
  2261. description: JSON 请求体,业务字段置于 data
  2262. content:
  2263. application/json:
  2264. schema:
  2265. type: object
  2266. description: 统一信封请求体,业务字段放在 data 内
  2267. properties:
  2268. data:
  2269. type: object
  2270. description: 业务参数
  2271. properties:
  2272. customer_id:
  2273. type: string
  2274. description: 客户 ID
  2275. required:
  2276. - customer_id
  2277. required:
  2278. - data
  2279. responses:
  2280. "200":
  2281. description: 成功。统一信封 code/message/data
  2282. /customer/delete@v1:
  2283. post:
  2284. summary: 删除客户
  2285. description: 删除客户;须携带删除前置检查时的阻塞快照版本。
  2286. operationId: customer_delete
  2287. tags:
  2288. - 客户管理
  2289. x-require-auth: true
  2290. x-resource-type: bos.customer
  2291. x-action: delete
  2292. x-version: v1
  2293. x-permission-visibility: catalog
  2294. requestBody:
  2295. required: true
  2296. description: JSON 请求体,业务字段置于 data
  2297. content:
  2298. application/json:
  2299. schema:
  2300. type: object
  2301. description: 统一信封请求体,业务字段放在 data 内
  2302. properties:
  2303. data:
  2304. type: object
  2305. description: 业务参数
  2306. properties:
  2307. customer_id:
  2308. type: string
  2309. description: 客户 ID
  2310. precheck_version:
  2311. type: string
  2312. description: 删除前置检查快照版本
  2313. required:
  2314. - customer_id
  2315. required:
  2316. - data
  2317. responses:
  2318. "200":
  2319. description: 成功。统一信封 code/message/data
  2320. /customer/history@v1:
  2321. post:
  2322. summary: 客户变更历史
  2323. description: 查询客户档案变更流水。
  2324. operationId: customer_history
  2325. tags:
  2326. - 客户管理
  2327. x-require-auth: true
  2328. x-resource-type: bos.customer
  2329. x-action: view
  2330. x-version: v1
  2331. x-permission-visibility: catalog
  2332. requestBody:
  2333. required: true
  2334. description: JSON 请求体,业务字段置于 data
  2335. content:
  2336. application/json:
  2337. schema:
  2338. type: object
  2339. description: 统一信封请求体,业务字段放在 data 内
  2340. properties:
  2341. data:
  2342. type: object
  2343. description: 业务参数
  2344. properties:
  2345. customer_id:
  2346. type: string
  2347. description: 客户 ID
  2348. page:
  2349. type: integer
  2350. description: 页码(0 基索引,默认 0)
  2351. minimum: 0
  2352. default: 0
  2353. page_size:
  2354. type: integer
  2355. description: 每页条数(默认 20,上限 200)
  2356. minimum: 1
  2357. maximum: 200
  2358. default: 20
  2359. keyword:
  2360. type: string
  2361. description: 关键字筛选(可选)
  2362. required:
  2363. - customer_id
  2364. required:
  2365. - data
  2366. responses:
  2367. "200":
  2368. description: 成功。统一信封 code/message/data
  2369. /customer/mount_candidates@v1:
  2370. post:
  2371. summary: 改挂候选客户
  2372. description: 返回操作人可见范围内可作为改挂目标的候选客户列表。⚠️ 2026-11-08 由 GET 改 POST(R-5)。
  2373. operationId: customer_mount_candidates
  2374. tags:
  2375. - 客户管理
  2376. x-require-auth: true
  2377. x-resource-type: bos.customer
  2378. x-action: view
  2379. x-version: v1
  2380. x-permission-visibility: catalog
  2381. x-enumeration-kind: list
  2382. requestBody:
  2383. required: true
  2384. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  2385. content:
  2386. application/json:
  2387. schema:
  2388. type: object
  2389. properties:
  2390. data:
  2391. type: object
  2392. description: 无业务参数
  2393. required:
  2394. - data
  2395. responses:
  2396. "200":
  2397. description: 成功。统一信封 code/message/data
  2398. /customer/influence@v1:
  2399. post:
  2400. summary: 改挂影响面
  2401. description: 改挂前必做前置:未办完工单数、当前责任人与团队、当期是否已出账等。
  2402. operationId: customer_influence
  2403. tags:
  2404. - 客户管理
  2405. x-require-auth: true
  2406. x-resource-type: bos.customer
  2407. x-action: view
  2408. x-version: v1
  2409. x-permission-visibility: catalog
  2410. requestBody:
  2411. required: true
  2412. description: JSON 请求体,业务字段置于 data
  2413. content:
  2414. application/json:
  2415. schema:
  2416. type: object
  2417. description: 统一信封请求体,业务字段放在 data 内
  2418. properties:
  2419. data:
  2420. type: object
  2421. description: 业务参数
  2422. properties:
  2423. customer_id:
  2424. type: string
  2425. description: 客户 ID
  2426. required:
  2427. - customer_id
  2428. required:
  2429. - data
  2430. responses:
  2431. "200":
  2432. description: 成功。统一信封 code/message/data
  2433. /customer/move_region@v1:
  2434. post:
  2435. summary: 客户改挂区域
  2436. description: 复合事务改挂区域;新区域省份须等于归属运营商档案省份。
  2437. operationId: customer_move_region
  2438. tags:
  2439. - 客户管理
  2440. x-require-auth: true
  2441. x-resource-type: bos.customer
  2442. x-action: update
  2443. x-version: v1
  2444. x-permission-visibility: catalog
  2445. requestBody:
  2446. required: true
  2447. description: JSON 请求体,业务字段置于 data
  2448. content:
  2449. application/json:
  2450. schema:
  2451. type: object
  2452. description: 统一信封请求体,业务字段放在 data 内
  2453. properties:
  2454. data:
  2455. type: object
  2456. description: 业务参数
  2457. properties:
  2458. customer_id:
  2459. type: string
  2460. description: 客户 ID
  2461. new_region_node_id:
  2462. type: string
  2463. description: 新挂载区域节点 ID
  2464. ops_team_ids:
  2465. type: array
  2466. description: 所挂运维团队 ID 列表(可选,随改挂重绑)
  2467. items:
  2468. type: string
  2469. description: 运维团队 ID
  2470. required:
  2471. - customer_id
  2472. - new_region_node_id
  2473. required:
  2474. - data
  2475. responses:
  2476. "200":
  2477. description: 成功。统一信封 code/message/data
  2478. /customer/attribution/update@v1:
  2479. post:
  2480. summary: 更新客户归属
  2481. description: 改归属运营商/合伙人;改运营商时档案省份须等于客户所挂区域省份。
  2482. operationId: customer_attribution_update
  2483. tags:
  2484. - 客户管理
  2485. x-require-auth: true
  2486. x-resource-type: bos.customer.attribution
  2487. x-action: update
  2488. x-version: v1
  2489. x-permission-visibility: catalog
  2490. requestBody:
  2491. required: true
  2492. description: JSON 请求体,业务字段置于 data
  2493. content:
  2494. application/json:
  2495. schema:
  2496. type: object
  2497. description: 统一信封请求体,业务字段放在 data 内
  2498. properties:
  2499. data:
  2500. type: object
  2501. description: 业务参数
  2502. properties:
  2503. customer_id:
  2504. type: string
  2505. description: 客户 ID
  2506. operator_id:
  2507. type: string
  2508. description: 新归属运营商 ID(可选)
  2509. partner_id:
  2510. type: string
  2511. description: 新归属合伙人 ID(可选,可清空)
  2512. required:
  2513. - customer_id
  2514. required:
  2515. - data
  2516. responses:
  2517. "200":
  2518. description: 成功。统一信封 code/message/data
  2519. /import_batch/template_download@v1:
  2520. get:
  2521. summary: 下载导入模板
  2522. description: 返回 14 列 xlsx 模板说明(format/columns/max_rows)。
  2523. operationId: import_batch_template_download
  2524. tags:
  2525. - 批量导入
  2526. x-require-auth: true
  2527. x-resource-type: bos.import_batch
  2528. x-action: export
  2529. x-version: v1
  2530. x-permission-visibility: catalog
  2531. responses:
  2532. "200":
  2533. description: 成功。统一信封 code/message/data
  2534. /import_batch/submit@v1:
  2535. post:
  2536. summary: 提交客户批量导入
  2537. description: 提交导入行对象列表,单批上限 500 行。列含客户名称、识别号、主体类型、联系人、电话、地址、区域、运营商、合伙人、运维团队、主账号等。
  2538. operationId: import_batch_submit
  2539. tags:
  2540. - 批量导入
  2541. x-require-auth: true
  2542. x-resource-type: bos.import_batch
  2543. x-action: create
  2544. x-version: v1
  2545. x-permission-visibility: catalog
  2546. requestBody:
  2547. required: true
  2548. description: JSON 请求体,业务字段置于 data
  2549. content:
  2550. application/json:
  2551. schema:
  2552. type: object
  2553. description: 统一信封请求体,业务字段放在 data 内
  2554. properties:
  2555. data:
  2556. type: object
  2557. description: 业务参数
  2558. properties:
  2559. rows:
  2560. type: array
  2561. description: 导入行对象列表(≤500)
  2562. maxItems: 500
  2563. items:
  2564. type: object
  2565. description: 单行导入字段(14 列)
  2566. properties:
  2567. row_no:
  2568. type: integer
  2569. description: 行编号
  2570. customer_name:
  2571. type: string
  2572. description: 客户名称
  2573. id_code:
  2574. type: string
  2575. description: 识别号
  2576. subject_type:
  2577. type: string
  2578. description: 主体类型
  2579. contact_name:
  2580. type: string
  2581. description: 联系人
  2582. contact_mobile:
  2583. type: string
  2584. description: 联系电话
  2585. address:
  2586. type: string
  2587. description: 地址
  2588. region_name:
  2589. type: string
  2590. description: 所挂区域
  2591. operator_name:
  2592. type: string
  2593. description: 运营商
  2594. partner_name:
  2595. type: string
  2596. description: 合伙人
  2597. ops_team_names:
  2598. type: array
  2599. description: 所挂运维团队名称列表(多支时逐项列出)
  2600. items:
  2601. type: string
  2602. description: 运维团队名称
  2603. primary_username:
  2604. type: string
  2605. description: 主账号登录名
  2606. primary_mobile:
  2607. type: string
  2608. description: 主账号手机号
  2609. required:
  2610. - rows
  2611. required:
  2612. - data
  2613. responses:
  2614. "200":
  2615. description: 成功。统一信封 code/message/data
  2616. /import_batch/get_list@v1:
  2617. post:
  2618. summary: 导入批次列表
  2619. description: 查询本人可见范围内的导入批次。
  2620. operationId: import_batch_get_list
  2621. tags:
  2622. - 批量导入
  2623. x-require-auth: true
  2624. x-resource-type: bos.import_batch
  2625. x-action: list
  2626. x-version: v1
  2627. x-permission-visibility: catalog
  2628. requestBody:
  2629. required: true
  2630. description: JSON 请求体,业务字段置于 data
  2631. content:
  2632. application/json:
  2633. schema:
  2634. type: object
  2635. description: 统一信封请求体,业务字段放在 data 内
  2636. properties:
  2637. data:
  2638. type: object
  2639. description: 列表筛选参数
  2640. properties:
  2641. page:
  2642. type: integer
  2643. description: 页码(0 基索引,默认 0)
  2644. minimum: 0
  2645. default: 0
  2646. page_size:
  2647. type: integer
  2648. description: 每页条数(默认 20,上限 200)
  2649. minimum: 1
  2650. maximum: 200
  2651. default: 20
  2652. keyword:
  2653. type: string
  2654. description: 关键字筛选(可选)
  2655. required:
  2656. - data
  2657. responses:
  2658. "200":
  2659. description: 成功。统一信封 code/message/data
  2660. /import_batch/get@v1:
  2661. post:
  2662. summary: 导入批次详情
  2663. description: 按批次 ID/编号查询详情与行状态。
  2664. operationId: import_batch_get
  2665. tags:
  2666. - 批量导入
  2667. x-require-auth: true
  2668. x-resource-type: bos.import_batch
  2669. x-action: view
  2670. x-version: v1
  2671. x-permission-visibility: catalog
  2672. requestBody:
  2673. required: true
  2674. description: JSON 请求体,业务字段置于 data
  2675. content:
  2676. application/json:
  2677. schema:
  2678. type: object
  2679. description: 统一信封请求体,业务字段放在 data 内
  2680. properties:
  2681. data:
  2682. type: object
  2683. description: 业务参数
  2684. properties:
  2685. batch_id:
  2686. type: string
  2687. description: 批次 ID(与 batch_no 二选一)
  2688. batch_no:
  2689. type: string
  2690. description: 批次编号(与 batch_id 二选一)
  2691. required:
  2692. - data
  2693. responses:
  2694. "200":
  2695. description: 成功。统一信封 code/message/data
  2696. /import_batch/resume@v1:
  2697. post:
  2698. summary: 失败行续传
  2699. description: 针对失败行提交续传数据,行号对应原 row_no。
  2700. operationId: import_batch_resume
  2701. tags:
  2702. - 批量导入
  2703. x-require-auth: true
  2704. x-resource-type: bos.import_batch
  2705. x-action: update
  2706. x-version: v1
  2707. x-permission-visibility: catalog
  2708. requestBody:
  2709. required: true
  2710. description: JSON 请求体,业务字段置于 data
  2711. content:
  2712. application/json:
  2713. schema:
  2714. type: object
  2715. description: 统一信封请求体,业务字段放在 data 内
  2716. properties:
  2717. data:
  2718. type: object
  2719. description: 业务参数
  2720. properties:
  2721. batch_id:
  2722. type: string
  2723. description: 批次 ID
  2724. rows:
  2725. type: array
  2726. description: 续传行列表(含原 row_no)
  2727. items:
  2728. type: object
  2729. required:
  2730. - batch_id
  2731. - rows
  2732. required:
  2733. - data
  2734. responses:
  2735. "200":
  2736. description: 成功。统一信封 code/message/data
  2737. /import_batch/export_codes@v1:
  2738. post:
  2739. summary: 按批次导出激活码
  2740. description: 语义同账号导出;须传收窄后的 user_ids 与 scope。
  2741. operationId: import_batch_export_codes
  2742. tags:
  2743. - 批量导入
  2744. x-require-auth: true
  2745. x-resource-type: bos.import_batch
  2746. x-action: export
  2747. x-version: v1
  2748. x-permission-visibility: catalog
  2749. requestBody:
  2750. required: true
  2751. description: JSON 请求体,业务字段置于 data
  2752. content:
  2753. application/json:
  2754. schema:
  2755. type: object
  2756. description: 统一信封请求体,业务字段放在 data 内
  2757. properties:
  2758. data:
  2759. type: object
  2760. description: 业务参数
  2761. properties:
  2762. batch_id:
  2763. type: string
  2764. description: 批次 ID
  2765. user_ids:
  2766. type: array
  2767. description: 收窄后的用户 ID 列表
  2768. items:
  2769. type: string
  2770. description: 用户 ID
  2771. scope_type:
  2772. type: string
  2773. description: 作用域类型
  2774. scope_id:
  2775. type: string
  2776. description: 作用域 ID
  2777. validity:
  2778. type: string
  2779. description: 导出口径:active/expired/all
  2780. enum:
  2781. - active
  2782. - expired
  2783. - all
  2784. required:
  2785. - batch_id
  2786. - user_ids
  2787. - scope_type
  2788. - scope_id
  2789. - validity
  2790. required:
  2791. - data
  2792. responses:
  2793. "200":
  2794. description: 成功。统一信封 code/message/data
  2795. /import_batch/export_customers@v1:
  2796. post:
  2797. summary: 按批次导出客户
  2798. description: 按导入批次导出客户 15 列结果。
  2799. operationId: import_batch_export_customers
  2800. tags:
  2801. - 批量导入
  2802. x-require-auth: true
  2803. x-resource-type: bos.import_batch
  2804. x-action: export
  2805. x-version: v1
  2806. x-permission-visibility: catalog
  2807. requestBody:
  2808. required: true
  2809. description: JSON 请求体,业务字段置于 data
  2810. content:
  2811. application/json:
  2812. schema:
  2813. type: object
  2814. description: 统一信封请求体,业务字段放在 data 内
  2815. properties:
  2816. data:
  2817. type: object
  2818. description: 业务参数
  2819. properties:
  2820. batch_id:
  2821. type: string
  2822. description: 批次 ID
  2823. required:
  2824. - batch_id
  2825. required:
  2826. - data
  2827. responses:
  2828. "200":
  2829. description: 成功。统一信封 code/message/data
  2830. /sub_account/get_list@v1:
  2831. post:
  2832. summary: 分账号列表
  2833. description: 查询客户下属分账号列表。
  2834. operationId: sub_account_get_list
  2835. tags:
  2836. - 账号管理
  2837. x-require-auth: true
  2838. x-resource-type: bos.sub_account
  2839. x-action: list
  2840. x-version: v1
  2841. x-permission-visibility: catalog
  2842. requestBody:
  2843. required: true
  2844. description: JSON 请求体,业务字段置于 data
  2845. content:
  2846. application/json:
  2847. schema:
  2848. type: object
  2849. description: 统一信封请求体,业务字段放在 data 内
  2850. properties:
  2851. data:
  2852. type: object
  2853. description: 业务参数
  2854. properties:
  2855. customer_id:
  2856. type: string
  2857. description: 客户 ID
  2858. page:
  2859. type: integer
  2860. description: 页码(0 基索引,默认 0)
  2861. minimum: 0
  2862. default: 0
  2863. page_size:
  2864. type: integer
  2865. description: 每页条数(默认 20,上限 200)
  2866. minimum: 1
  2867. maximum: 200
  2868. default: 20
  2869. keyword:
  2870. type: string
  2871. description: 关键字筛选(可选)
  2872. required:
  2873. - customer_id
  2874. required:
  2875. - data
  2876. responses:
  2877. "200":
  2878. description: 成功。统一信封 code/message/data
  2879. /sub_account/update@v1:
  2880. post:
  2881. summary: 更新分账号
  2882. description: 运营可改 display_name 与 network_account_name;客户主账号只许改 display_name。
  2883. operationId: sub_account_update
  2884. tags:
  2885. - 账号管理
  2886. x-require-auth: true
  2887. x-resource-type: bos.sub_account
  2888. x-action: update
  2889. x-version: v1
  2890. x-permission-visibility: catalog
  2891. requestBody:
  2892. required: true
  2893. description: JSON 请求体,业务字段置于 data
  2894. content:
  2895. application/json:
  2896. schema:
  2897. type: object
  2898. description: 统一信封请求体,业务字段放在 data 内
  2899. properties:
  2900. data:
  2901. type: object
  2902. description: 业务参数
  2903. properties:
  2904. sub_account_id:
  2905. type: string
  2906. description: 分账号 ID
  2907. display_name:
  2908. type: string
  2909. description: 显示名称/用途说明
  2910. network_account_name:
  2911. type: string
  2912. description: 网络侧账号名(运营可改)
  2913. required:
  2914. - sub_account_id
  2915. required:
  2916. - data
  2917. responses:
  2918. "200":
  2919. description: 成功。统一信封 code/message/data
  2920. /catalog/create@v1:
  2921. post:
  2922. summary: 新建套餐档位
  2923. description: 新建固定/自定义档位。拒收 monthly_settle_cents、sub_mode、first_referred_at。自定义档必填 customer_id。
  2924. operationId: catalog_create
  2925. tags:
  2926. - 套餐档位
  2927. x-require-auth: true
  2928. x-resource-type: bos.catalog
  2929. x-action: create
  2930. x-version: v1
  2931. x-permission-visibility: catalog
  2932. requestBody:
  2933. required: true
  2934. description: JSON 请求体,业务字段置于 data
  2935. content:
  2936. application/json:
  2937. schema:
  2938. type: object
  2939. description: 统一信封请求体,业务字段放在 data 内
  2940. properties:
  2941. data:
  2942. type: object
  2943. description: 业务参数
  2944. properties:
  2945. plan_kind:
  2946. type: string
  2947. description: 档位类型:fixed=固定;custom=自定义
  2948. enum:
  2949. - fixed
  2950. - custom
  2951. plan_name:
  2952. type: string
  2953. description: 档位名称
  2954. use_category:
  2955. type: string
  2956. description: 用途分类:office/live/ai/value_add/customized
  2957. annual_price_cents:
  2958. type: integer
  2959. description: 年价(分)
  2960. sub_account_quota:
  2961. type: integer
  2962. description: 分账号配额
  2963. bandwidth_committed:
  2964. type: boolean
  2965. description: 是否承诺带宽(界面「是否承诺带宽」开关):true=承诺(缺省,同列 DEFAULT TRUE);false=该档「不承诺带宽」,此时上行/下行两字段一律不传
  2966. bandwidth_up_mbps:
  2967. type: integer
  2968. description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填。⛔ 不再有单值 total_bandwidth_mbps(2026-11-05 D8 关闭=该列退役,「总带宽」只是显示列名)
  2969. bandwidth_down_mbps:
  2970. type: integer
  2971. description: 下行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填;与上行同值时界面并显「上下行 N 兆」,不等显「下行 X 兆 / 上行 Y 兆」
  2972. customer_id:
  2973. type: string
  2974. description: 自定义档所属客户 ID(custom 必填)
  2975. required:
  2976. - plan_kind
  2977. - plan_name
  2978. - use_category
  2979. - annual_price_cents
  2980. required:
  2981. - data
  2982. responses:
  2983. "200":
  2984. description: 成功。统一信封 code/message/data
  2985. /catalog/update@v1:
  2986. post:
  2987. summary: 编辑套餐档位
  2988. description: 编辑档位;use_category 建后不可改;被订阅引用冻结后多数字段只读。
  2989. operationId: catalog_update
  2990. tags:
  2991. - 套餐档位
  2992. x-require-auth: true
  2993. x-resource-type: bos.catalog
  2994. x-action: update
  2995. x-version: v1
  2996. x-permission-visibility: catalog
  2997. requestBody:
  2998. required: true
  2999. description: JSON 请求体,业务字段置于 data
  3000. content:
  3001. application/json:
  3002. schema:
  3003. type: object
  3004. description: 统一信封请求体,业务字段放在 data 内
  3005. properties:
  3006. data:
  3007. type: object
  3008. description: 业务参数
  3009. properties:
  3010. plan_id:
  3011. type: string
  3012. description: 档位 ID
  3013. plan_name:
  3014. type: string
  3015. description: 档位名称
  3016. annual_price_cents:
  3017. type: integer
  3018. description: 年价(分)
  3019. sub_account_quota:
  3020. type: integer
  3021. description: 分账号配额
  3022. bandwidth_committed:
  3023. type: boolean
  3024. description: 是否承诺带宽:true=承诺(缺省);false=该档「不承诺带宽」,上下行两字段一律不传
  3025. bandwidth_up_mbps:
  3026. type: integer
  3027. description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填,关闭「是否承诺带宽」时必不传(档位被订阅引用后随整单只读,K204)
  3028. bandwidth_down_mbps:
  3029. type: integer
  3030. description: 下行带宽(Mbps,整数 1~1000);必填规则同上,两值⛔ 不折算为单值
  3031. row_version:
  3032. type: integer
  3033. description: 乐观锁版本(若启用)
  3034. required:
  3035. - plan_id
  3036. required:
  3037. - data
  3038. responses:
  3039. "200":
  3040. description: 成功。统一信封 code/message/data
  3041. /catalog/get_list@v1:
  3042. post:
  3043. summary: 套餐档位列表
  3044. description: 按 plan_kind 等条件筛选档位列表。
  3045. operationId: catalog_get_list
  3046. tags:
  3047. - 套餐档位
  3048. x-require-auth: true
  3049. x-resource-type: bos.catalog
  3050. x-action: list
  3051. x-version: v1
  3052. x-permission-visibility: catalog
  3053. requestBody:
  3054. required: true
  3055. description: JSON 请求体,业务字段置于 data
  3056. content:
  3057. application/json:
  3058. schema:
  3059. type: object
  3060. description: 统一信封请求体,业务字段放在 data 内
  3061. properties:
  3062. data:
  3063. type: object
  3064. description: 列表筛选参数
  3065. properties:
  3066. page:
  3067. type: integer
  3068. description: 页码(0 基索引,默认 0)
  3069. minimum: 0
  3070. default: 0
  3071. page_size:
  3072. type: integer
  3073. description: 每页条数(默认 20,上限 200)
  3074. minimum: 1
  3075. maximum: 200
  3076. default: 20
  3077. keyword:
  3078. type: string
  3079. description: 关键字筛选(可选)
  3080. plan_kind:
  3081. type: string
  3082. description: 档位类型筛选:fixed/custom
  3083. use_category:
  3084. type: string
  3085. description: 用途分类筛选
  3086. customer_id:
  3087. type: string
  3088. description: 自定义档客户筛选
  3089. required:
  3090. - data
  3091. responses:
  3092. "200":
  3093. description: 成功。统一信封 code/message/data
  3094. /catalog/get@v1:
  3095. post:
  3096. summary: 套餐档位详情
  3097. description: 按档位 ID 查询详情。
  3098. operationId: catalog_get
  3099. tags:
  3100. - 套餐档位
  3101. x-require-auth: true
  3102. x-resource-type: bos.catalog
  3103. x-action: view
  3104. x-version: v1
  3105. x-permission-visibility: catalog
  3106. requestBody:
  3107. required: true
  3108. description: JSON 请求体,业务字段置于 data
  3109. content:
  3110. application/json:
  3111. schema:
  3112. type: object
  3113. description: 统一信封请求体,业务字段放在 data 内
  3114. properties:
  3115. data:
  3116. type: object
  3117. description: 业务参数
  3118. properties:
  3119. plan_id:
  3120. type: string
  3121. description: 档位 ID
  3122. required:
  3123. - plan_id
  3124. required:
  3125. - data
  3126. responses:
  3127. "200":
  3128. description: 成功。统一信封 code/message/data
  3129. /catalog/delete@v1:
  3130. post:
  3131. summary: 套餐档位条件删除
  3132. description: 按档位 ID 条件删除(第3册§3.7):引用份数+两栏阻塞清单(subscriptions/items),在用⇒KLT-K205;固定档仅 Admin。
  3133. operationId: catalog_delete
  3134. tags:
  3135. - 套餐档位
  3136. x-require-auth: true
  3137. x-resource-type: bos.catalog
  3138. x-action: delete
  3139. x-version: v1
  3140. x-permission-visibility: catalog
  3141. requestBody:
  3142. required: true
  3143. description: JSON 请求体,业务字段置于 data
  3144. content:
  3145. application/json:
  3146. schema:
  3147. type: object
  3148. description: 统一信封请求体,业务字段放在 data 内
  3149. properties:
  3150. data:
  3151. type: object
  3152. description: 业务参数
  3153. properties:
  3154. plan_id:
  3155. type: string
  3156. description: 档位 ID
  3157. required:
  3158. - plan_id
  3159. required:
  3160. - data
  3161. responses:
  3162. "200":
  3163. description: 成功。统一信封 code/message/data
  3164. /catalog/customer_options@v1:
  3165. post:
  3166. summary: 归属客户下拉
  3167. description: 只列操作人可见客户(自定义档归属客户下拉,第3册§3.2);硬上限 500 行⇒truncated。
  3168. operationId: catalog_customer_options
  3169. tags:
  3170. - 套餐档位
  3171. x-require-auth: true
  3172. x-resource-type: bos.catalog
  3173. x-action: list
  3174. x-version: v1
  3175. x-permission-visibility: catalog
  3176. requestBody:
  3177. required: true
  3178. description: JSON 请求体,业务字段置于 data
  3179. content:
  3180. application/json:
  3181. schema:
  3182. type: object
  3183. description: 统一信封请求体,业务字段放在 data 内
  3184. properties:
  3185. data:
  3186. type: object
  3187. description: 列表筛选参数
  3188. properties:
  3189. keyword:
  3190. type: string
  3191. description: 客户名称关键字(可选)
  3192. required:
  3193. - data
  3194. responses:
  3195. "200":
  3196. description: 成功。统一信封 code/message/data
  3197. /plan_cost_item/get_list@v1:
  3198. post:
  3199. summary: 档位随附成本项列表
  3200. description: 按档位读取随附成本项(第3册§3.5):名称是弱引用,⛔ 校验是否在全局清单;frozen 仅供前端提示。
  3201. operationId: plan_cost_item_get_list
  3202. tags:
  3203. - 套餐档位
  3204. x-require-auth: true
  3205. x-resource-type: bos.catalog
  3206. x-action: list
  3207. x-version: v1
  3208. x-permission-visibility: catalog
  3209. requestBody:
  3210. required: true
  3211. description: JSON 请求体,业务字段置于 data
  3212. content:
  3213. application/json:
  3214. schema:
  3215. type: object
  3216. description: 统一信封请求体,业务字段放在 data 内
  3217. properties:
  3218. data:
  3219. type: object
  3220. description: 业务参数
  3221. properties:
  3222. plan_id:
  3223. type: string
  3224. description: 档位 ID
  3225. required:
  3226. - plan_id
  3227. required:
  3228. - data
  3229. responses:
  3230. "200":
  3231. description: 成功。统一信封 code/message/data
  3232. /plan_cost_item/save@v1:
  3233. post:
  3234. summary: 档位随附成本项整段全量替换
  3235. description: 一次提交该档位全部成本项(先按 plan_id 删净再逐条插,第3册§3.5);同档位名称重复⇒KLT-K206。
  3236. operationId: plan_cost_item_save
  3237. tags:
  3238. - 套餐档位
  3239. x-require-auth: true
  3240. x-resource-type: bos.catalog
  3241. x-action: update
  3242. x-version: v1
  3243. x-permission-visibility: catalog
  3244. requestBody:
  3245. required: true
  3246. description: JSON 请求体,业务字段置于 data
  3247. content:
  3248. application/json:
  3249. schema:
  3250. type: object
  3251. description: 统一信封请求体,业务字段放在 data 内
  3252. properties:
  3253. data:
  3254. type: object
  3255. description: 业务参数
  3256. properties:
  3257. plan_id:
  3258. type: string
  3259. description: 档位 ID
  3260. items:
  3261. type: array
  3262. description: 成本项整段(全量替换,上限 50 条)
  3263. maxItems: 50
  3264. items:
  3265. type: object
  3266. description: 成本项条目
  3267. properties:
  3268. item_name:
  3269. type: string
  3270. description: 成本项名称(弱引用,1~128 字)
  3271. amount_cents:
  3272. type: integer
  3273. description: 金额(分,≥0)
  3274. minimum: 0
  3275. billing_unit:
  3276. type: string
  3277. description: 计费单位(可选)
  3278. enum:
  3279. - per_customer
  3280. - per_account
  3281. - per_copy
  3282. category:
  3283. type: string
  3284. description: 成本项分类(可选)
  3285. enum:
  3286. - intl_resource
  3287. - device_purchase
  3288. - project_fee
  3289. remark:
  3290. type: string
  3291. description: 备注(可选,上限 512 字)
  3292. sort_no:
  3293. type: integer
  3294. description: 排序号(≥0)
  3295. minimum: 0
  3296. required:
  3297. - item_name
  3298. - amount_cents
  3299. required:
  3300. - plan_id
  3301. required:
  3302. - data
  3303. responses:
  3304. "200":
  3305. description: 成功。统一信封 code/message/data
  3306. /contract/create@v1:
  3307. post:
  3308. summary: 新建合同
  3309. description: 客户段+合同段+服务构成条目+IP 条件一次提交。拒收 source(服务端定)。
  3310. operationId: contract_create
  3311. tags:
  3312. - 合同
  3313. x-require-auth: true
  3314. x-resource-type: bos.contract
  3315. x-action: create
  3316. x-version: v1
  3317. x-permission-visibility: catalog
  3318. requestBody:
  3319. required: true
  3320. description: JSON 请求体,业务字段置于 data
  3321. content:
  3322. application/json:
  3323. schema:
  3324. type: object
  3325. description: 统一信封请求体,业务字段放在 data 内
  3326. properties:
  3327. data:
  3328. type: object
  3329. description: 业务参数
  3330. properties:
  3331. customer_id:
  3332. type: string
  3333. description: 签约客户 ID(或改用内联建档字段)
  3334. contract_no:
  3335. type: string
  3336. description: 合同编号(空则服务端发号)
  3337. external_no:
  3338. type: string
  3339. description: 外部合同号(可选)
  3340. contract_amount_cents:
  3341. type: integer
  3342. description: 合同金额(分,可选)
  3343. pay_cycle:
  3344. type: string
  3345. description: 付款周期:yearly/quarterly/monthly
  3346. enum:
  3347. - yearly
  3348. - quarterly
  3349. - monthly
  3350. start_date:
  3351. type: string
  3352. description: 合同开始日期(YYYY-MM-DD)
  3353. format: date
  3354. end_date:
  3355. type: string
  3356. description: 合同结束日期(YYYY-MM-DD)
  3357. format: date
  3358. agent_name:
  3359. type: string
  3360. description: 经办人姓名
  3361. agent_mobile:
  3362. type: string
  3363. description: 经办人手机
  3364. agent_handover_on:
  3365. type: string
  3366. description: 经办交接日期(可选)
  3367. format: date
  3368. agent_org:
  3369. type: string
  3370. description: 经办组织(可选)
  3371. attachment_url:
  3372. type: string
  3373. description: 附件地址(可选)
  3374. service_items:
  3375. type: array
  3376. description: 服务构成条目列表
  3377. items:
  3378. type: object
  3379. description: 服务条目
  3380. properties:
  3381. item_kind:
  3382. type: string
  3383. description: 条目类型:plan_based/custom_spec
  3384. plan_id:
  3385. type: string
  3386. description: 档位 ID(plan_based)
  3387. quantity:
  3388. type: integer
  3389. description: 数量
  3390. account_count:
  3391. type: integer
  3392. description: 账号数(custom_spec)
  3393. bandwidth_up_mbps:
  3394. type: integer
  3395. description: 上行带宽(Mbps,整数 1~1000,custom_spec);与下行至少填一侧,只填一侧时按上下行对称填同一值
  3396. bandwidth_down_mbps:
  3397. type: integer
  3398. description: 下行带宽(Mbps,整数 1~1000,custom_spec);两值原样投影到派生自定义档,⛔ 不折算(2026-11-05 D8 关闭)
  3399. line_exits:
  3400. type: array
  3401. description: 线路出口列表
  3402. items:
  3403. type: string
  3404. description: 出口标识
  3405. ip_entries:
  3406. type: array
  3407. description: IP 条件条目(可选)
  3408. items:
  3409. type: object
  3410. description: IP 条目
  3411. required:
  3412. - pay_cycle
  3413. - start_date
  3414. - end_date
  3415. required:
  3416. - data
  3417. responses:
  3418. "200":
  3419. description: 成功。统一信封 code/message/data
  3420. /contract/update@v1:
  3421. post:
  3422. summary: 编辑合同
  3423. description: 编号与签约客户不可改;条目按 item_id 三向对比增删改。
  3424. operationId: contract_update
  3425. tags:
  3426. - 合同
  3427. x-require-auth: true
  3428. x-resource-type: bos.contract
  3429. x-action: update
  3430. x-version: v1
  3431. x-permission-visibility: catalog
  3432. requestBody:
  3433. required: true
  3434. description: JSON 请求体,业务字段置于 data
  3435. content:
  3436. application/json:
  3437. schema:
  3438. type: object
  3439. description: 统一信封请求体,业务字段放在 data 内
  3440. properties:
  3441. data:
  3442. type: object
  3443. description: 业务参数
  3444. properties:
  3445. contract_id:
  3446. type: string
  3447. description: 合同 ID
  3448. row_version:
  3449. type: integer
  3450. description: 乐观锁版本
  3451. external_no:
  3452. type: string
  3453. description: 外部合同号
  3454. contract_amount_cents:
  3455. type: integer
  3456. description: 合同金额(分)
  3457. pay_cycle:
  3458. type: string
  3459. description: 付款周期
  3460. start_date:
  3461. type: string
  3462. description: 开始日期
  3463. format: date
  3464. end_date:
  3465. type: string
  3466. description: 结束日期
  3467. format: date
  3468. agent_name:
  3469. type: string
  3470. description: 经办人姓名
  3471. agent_mobile:
  3472. type: string
  3473. description: 经办人手机
  3474. agent_handover_on:
  3475. type: string
  3476. description: 经办交接日期
  3477. agent_org:
  3478. type: string
  3479. description: 经办组织
  3480. attachment_url:
  3481. type: string
  3482. description: 附件地址
  3483. service_items:
  3484. type: array
  3485. description: 服务构成条目(含 item_id 的增删改)
  3486. items:
  3487. type: object
  3488. ip_entries:
  3489. type: array
  3490. description: IP 条件条目
  3491. items:
  3492. type: object
  3493. required:
  3494. - contract_id
  3495. - row_version
  3496. required:
  3497. - data
  3498. responses:
  3499. "200":
  3500. description: 成功。统一信封 code/message/data
  3501. /contract/get_list@v1:
  3502. post:
  3503. summary: 合同列表
  3504. description: 按客户/状态等筛选合同列表。
  3505. operationId: contract_get_list
  3506. tags:
  3507. - 合同
  3508. x-require-auth: true
  3509. x-resource-type: bos.contract
  3510. x-action: list
  3511. x-version: v1
  3512. x-permission-visibility: catalog
  3513. requestBody:
  3514. required: true
  3515. description: JSON 请求体,业务字段置于 data
  3516. content:
  3517. application/json:
  3518. schema:
  3519. type: object
  3520. description: 统一信封请求体,业务字段放在 data 内
  3521. properties:
  3522. data:
  3523. type: object
  3524. description: 列表筛选参数
  3525. properties:
  3526. page:
  3527. type: integer
  3528. description: 页码(0 基索引,默认 0)
  3529. minimum: 0
  3530. default: 0
  3531. page_size:
  3532. type: integer
  3533. description: 每页条数(默认 20,上限 200)
  3534. minimum: 1
  3535. maximum: 200
  3536. default: 20
  3537. keyword:
  3538. type: string
  3539. description: 关键字筛选(可选)
  3540. customer_id:
  3541. type: string
  3542. description: 客户 ID 筛选
  3543. status:
  3544. type: string
  3545. description: 状态筛选
  3546. opened:
  3547. type: boolean
  3548. description: 是否已开通筛选(三态:true/false/缺省不筛)
  3549. required:
  3550. - data
  3551. responses:
  3552. "200":
  3553. description: 成功。统一信封 code/message/data
  3554. /contract/get@v1:
  3555. post:
  3556. summary: 合同详情
  3557. description: 按合同 ID 查询详情(含服务条目与 IP 条件)。
  3558. operationId: contract_get
  3559. tags:
  3560. - 合同
  3561. x-require-auth: true
  3562. x-resource-type: bos.contract
  3563. x-action: view
  3564. x-version: v1
  3565. x-permission-visibility: catalog
  3566. requestBody:
  3567. required: true
  3568. description: JSON 请求体,业务字段置于 data
  3569. content:
  3570. application/json:
  3571. schema:
  3572. type: object
  3573. description: 统一信封请求体,业务字段放在 data 内
  3574. properties:
  3575. data:
  3576. type: object
  3577. description: 业务参数
  3578. properties:
  3579. contract_id:
  3580. type: string
  3581. description: 合同 ID
  3582. required:
  3583. - contract_id
  3584. required:
  3585. - data
  3586. responses:
  3587. "200":
  3588. description: 成功。统一信封 code/message/data
  3589. /contract/customer_lookup@v1:
  3590. post:
  3591. summary: 合同客户身份解析
  3592. description: 第3册§4.2 第 1 步:query_type=credit_code 主体号精确点查/identity 归一化精确点查/keyword 客户名称模糊联想;未命中=matched:false 成功响应(⛔ 报错),越权读单客户=11104。
  3593. operationId: contract_customer_lookup
  3594. tags:
  3595. - 合同
  3596. x-require-auth: true
  3597. x-resource-type: bos.contract
  3598. x-action: list
  3599. x-version: v1
  3600. x-permission-visibility: catalog
  3601. requestBody:
  3602. required: true
  3603. description: JSON 请求体,业务字段置于 data
  3604. content:
  3605. application/json:
  3606. schema:
  3607. type: object
  3608. description: 统一信封请求体,业务字段放在 data 内
  3609. properties:
  3610. data:
  3611. type: object
  3612. description: 业务参数
  3613. properties:
  3614. query_type:
  3615. type: string
  3616. description: 查询通道
  3617. enum:
  3618. - credit_code
  3619. - identity
  3620. - keyword
  3621. value:
  3622. type: string
  3623. description: 查询值(主体号/识别号/客户名称关键字)
  3624. required:
  3625. - query_type
  3626. - value
  3627. required:
  3628. - data
  3629. responses:
  3630. "200":
  3631. description: 成功。统一信封 code/message/data
  3632. /contract/delete@v1:
  3633. post:
  3634. summary: 合同条件删除
  3635. description: 第3册§4.8:两类阻塞分栏(subscriptions/tickets),有阻塞⇒KLT-L213;工单取数失败⇒KLT-S406(⛔ 中途放行)。
  3636. operationId: contract_delete
  3637. tags:
  3638. - 合同
  3639. x-require-auth: true
  3640. x-resource-type: bos.contract
  3641. x-action: delete
  3642. x-version: v1
  3643. x-permission-visibility: catalog
  3644. requestBody:
  3645. required: true
  3646. description: JSON 请求体,业务字段置于 data
  3647. content:
  3648. application/json:
  3649. schema:
  3650. type: object
  3651. description: 统一信封请求体,业务字段放在 data 内
  3652. properties:
  3653. data:
  3654. type: object
  3655. description: 业务参数
  3656. properties:
  3657. contract_id:
  3658. type: string
  3659. description: 合同 ID
  3660. required:
  3661. - contract_id
  3662. required:
  3663. - data
  3664. responses:
  3665. "200":
  3666. description: 成功。统一信封 code/message/data
  3667. /subscription/create@v1:
  3668. post:
  3669. summary: 新建订阅
  3670. description: 拒收 line_exits、sub_mode、order_no、新建时的 end_date、opened_at。
  3671. operationId: subscription_create
  3672. tags:
  3673. - 订阅
  3674. x-require-auth: true
  3675. x-resource-type: bos.subscription
  3676. x-action: create
  3677. x-version: v1
  3678. x-permission-visibility: catalog
  3679. requestBody:
  3680. required: true
  3681. description: JSON 请求体,业务字段置于 data
  3682. content:
  3683. application/json:
  3684. schema:
  3685. type: object
  3686. description: 统一信封请求体,业务字段放在 data 内
  3687. properties:
  3688. data:
  3689. type: object
  3690. description: 业务参数
  3691. properties:
  3692. customer_id:
  3693. type: string
  3694. description: 客户 ID
  3695. plan_id:
  3696. type: string
  3697. description: 档位 ID
  3698. contract_id:
  3699. type: string
  3700. description: 合同 ID
  3701. contract_item_id:
  3702. type: string
  3703. description: 合同服务条目 ID
  3704. start_date:
  3705. type: string
  3706. description: 订阅开始日期
  3707. format: date
  3708. annual_price_cents:
  3709. type: integer
  3710. description: 年价(分)
  3711. monthly_settle_cents:
  3712. type: integer
  3713. description: 月结算金额(分)
  3714. use_category:
  3715. type: string
  3716. description: 派生档用途分类(需要时填写)
  3717. term:
  3718. type: string
  3719. description: 账期(三态:yearly/quarterly/monthly)
  3720. enum:
  3721. - yearly
  3722. - quarterly
  3723. - monthly
  3724. trial_months:
  3725. type: integer
  3726. description: 试用月数(默认 0,≥0)
  3727. minimum: 0
  3728. discount_monthly_cents:
  3729. type: integer
  3730. description: 每月优惠金额(分,默认 0,≥0)
  3731. minimum: 0
  3732. required:
  3733. - customer_id
  3734. - plan_id
  3735. - contract_id
  3736. - contract_item_id
  3737. - start_date
  3738. - annual_price_cents
  3739. - monthly_settle_cents
  3740. required:
  3741. - data
  3742. responses:
  3743. "200":
  3744. description: 成功。统一信封 code/message/data
  3745. /subscription/change@v1:
  3746. post:
  3747. summary: 订阅升降配
  3748. description: 升降配须填 replaces_subscription_id,且须使用新的 contract_id(不得沿用原合同)。
  3749. operationId: subscription_change
  3750. tags:
  3751. - 订阅
  3752. x-require-auth: true
  3753. x-resource-type: bos.subscription
  3754. x-action: update
  3755. x-version: v1
  3756. x-permission-visibility: catalog
  3757. requestBody:
  3758. required: true
  3759. description: JSON 请求体,业务字段置于 data
  3760. content:
  3761. application/json:
  3762. schema:
  3763. type: object
  3764. description: 统一信封请求体,业务字段放在 data 内
  3765. properties:
  3766. data:
  3767. type: object
  3768. description: 业务参数
  3769. properties:
  3770. replaces_subscription_id:
  3771. type: string
  3772. description: 被替换的原订阅 ID
  3773. customer_id:
  3774. type: string
  3775. description: 客户 ID
  3776. plan_id:
  3777. type: string
  3778. description: 新档位 ID
  3779. contract_id:
  3780. type: string
  3781. description: 新合同 ID(不得沿用原合同)
  3782. contract_item_id:
  3783. type: string
  3784. description: 新合同服务条目 ID
  3785. start_date:
  3786. type: string
  3787. description: 新订阅开始日期
  3788. format: date
  3789. annual_price_cents:
  3790. type: integer
  3791. description: 年价(分)
  3792. monthly_settle_cents:
  3793. type: integer
  3794. description: 月结算金额(分)
  3795. use_category:
  3796. type: string
  3797. description: 派生档用途分类(需要时填写)
  3798. term:
  3799. type: string
  3800. description: 账期(三态:yearly/quarterly/monthly)
  3801. enum:
  3802. - yearly
  3803. - quarterly
  3804. - monthly
  3805. trial_months:
  3806. type: integer
  3807. description: 试用月数(默认 0,≥0)
  3808. minimum: 0
  3809. discount_monthly_cents:
  3810. type: integer
  3811. description: 每月优惠金额(分,默认 0,≥0)
  3812. minimum: 0
  3813. row_version:
  3814. type: integer
  3815. description: 乐观锁版本号(可选,缺省不校验)
  3816. required:
  3817. - replaces_subscription_id
  3818. - customer_id
  3819. - plan_id
  3820. - contract_id
  3821. - contract_item_id
  3822. - start_date
  3823. - annual_price_cents
  3824. - monthly_settle_cents
  3825. required:
  3826. - data
  3827. responses:
  3828. "200":
  3829. description: 成功。统一信封 code/message/data
  3830. /subscription/stack@v1:
  3831. post:
  3832. summary: 订阅叠加或白名单更新
  3833. description: 叠加开通或更新白名单字段(两金额+end_date);其余只读键拒绝。
  3834. operationId: subscription_stack
  3835. tags:
  3836. - 订阅
  3837. x-require-auth: true
  3838. x-resource-type: bos.subscription
  3839. x-action: create
  3840. x-version: v1
  3841. x-permission-visibility: catalog
  3842. requestBody:
  3843. required: true
  3844. description: JSON 请求体,业务字段置于 data
  3845. content:
  3846. application/json:
  3847. schema:
  3848. type: object
  3849. description: 统一信封请求体,业务字段放在 data 内
  3850. properties:
  3851. data:
  3852. type: object
  3853. description: 业务参数
  3854. properties:
  3855. subscription_id:
  3856. type: string
  3857. description: 订阅 ID(更新场景)
  3858. customer_id:
  3859. type: string
  3860. description: 客户 ID(叠加新建时)
  3861. plan_id:
  3862. type: string
  3863. description: 档位 ID(叠加新建时)
  3864. contract_id:
  3865. type: string
  3866. description: 合同 ID
  3867. contract_item_id:
  3868. type: string
  3869. description: 合同服务条目 ID
  3870. annual_price_cents:
  3871. type: integer
  3872. description: 年价(分,可改)
  3873. monthly_settle_cents:
  3874. type: integer
  3875. description: 月结算金额(分,可改)
  3876. end_date:
  3877. type: string
  3878. description: 结束日期(可改)
  3879. format: date
  3880. start_date:
  3881. type: string
  3882. description: 开始日期(叠加新建时)
  3883. format: date
  3884. row_version:
  3885. type: integer
  3886. description: 乐观锁版本号(可选,缺省不校验)
  3887. required:
  3888. - data
  3889. responses:
  3890. "200":
  3891. description: 成功。统一信封 code/message/data
  3892. /subscription/get_list@v1:
  3893. post:
  3894. summary: 订阅列表
  3895. description: 按客户等维度筛选订阅列表。
  3896. operationId: subscription_get_list
  3897. tags:
  3898. - 订阅
  3899. x-require-auth: true
  3900. x-resource-type: bos.subscription
  3901. x-action: list
  3902. x-version: v1
  3903. x-permission-visibility: catalog
  3904. requestBody:
  3905. required: true
  3906. description: JSON 请求体,业务字段置于 data
  3907. content:
  3908. application/json:
  3909. schema:
  3910. type: object
  3911. description: 统一信封请求体,业务字段放在 data 内
  3912. properties:
  3913. data:
  3914. type: object
  3915. description: 列表筛选参数
  3916. properties:
  3917. customer_id:
  3918. type: string
  3919. description: 客户 ID(常必填)
  3920. page:
  3921. type: integer
  3922. description: 页码(0 基索引,默认 0)
  3923. minimum: 0
  3924. default: 0
  3925. page_size:
  3926. type: integer
  3927. description: 每页条数(默认 20,上限 200)
  3928. minimum: 1
  3929. maximum: 200
  3930. default: 20
  3931. keyword:
  3932. type: string
  3933. description: 关键字筛选(可选)
  3934. status:
  3935. type: string
  3936. description: 状态筛选
  3937. contract_id:
  3938. type: string
  3939. description: 合同 ID 筛选
  3940. region_ids:
  3941. type: array
  3942. description: 区域 ID 集合(经客户挂载区域展开)
  3943. items:
  3944. type: string
  3945. description: 区域 ID
  3946. required:
  3947. - data
  3948. responses:
  3949. "200":
  3950. description: 成功。统一信封 code/message/data
  3951. /subscription/get@v1:
  3952. post:
  3953. summary: 订阅详情
  3954. description: 按订阅 ID 查询详情。
  3955. operationId: subscription_get
  3956. tags:
  3957. - 订阅
  3958. x-require-auth: true
  3959. x-resource-type: bos.subscription
  3960. x-action: view
  3961. x-version: v1
  3962. x-permission-visibility: catalog
  3963. requestBody:
  3964. required: true
  3965. description: JSON 请求体,业务字段置于 data
  3966. content:
  3967. application/json:
  3968. schema:
  3969. type: object
  3970. description: 统一信封请求体,业务字段放在 data 内
  3971. properties:
  3972. data:
  3973. type: object
  3974. description: 业务参数
  3975. properties:
  3976. subscription_id:
  3977. type: string
  3978. description: 订阅 ID
  3979. required:
  3980. - subscription_id
  3981. required:
  3982. - data
  3983. responses:
  3984. "200":
  3985. description: 成功。统一信封 code/message/data
  3986. /subscription/plan_options@v1:
  3987. post:
  3988. summary: 订阅档位候选
  3989. description: 第3册§5.2 第 3 步:本客户自定义档(含合同条目派生档)+全部固定档,⛔ 他客户自定义档;行内带只读 sub_mode 与 available/unavailable_reason。
  3990. operationId: subscription_plan_options
  3991. tags:
  3992. - 订阅
  3993. x-require-auth: true
  3994. x-resource-type: bos.subscription
  3995. x-action: list
  3996. x-version: v1
  3997. x-permission-visibility: catalog
  3998. requestBody:
  3999. required: true
  4000. description: JSON 请求体,业务字段置于 data
  4001. content:
  4002. application/json:
  4003. schema:
  4004. type: object
  4005. description: 统一信封请求体,业务字段放在 data 内
  4006. properties:
  4007. data:
  4008. type: object
  4009. description: 业务参数
  4010. properties:
  4011. customer_id:
  4012. type: string
  4013. description: 客户 ID(必填)
  4014. keyword:
  4015. type: string
  4016. description: 套餐名称关键字(仅本口有)
  4017. required:
  4018. - customer_id
  4019. required:
  4020. - data
  4021. responses:
  4022. "200":
  4023. description: 成功。统一信封 code/message/data
  4024. /subscription/contract_options@v1:
  4025. post:
  4026. summary: 未开通合同与服务条目候选
  4027. description: 第3册§5.2 第 2 步:只出「未开通」合同及其尚未被订阅引用的条目;开通态取数失败⇒KLT-S406;无可选合同⇒KLT-M222。
  4028. operationId: subscription_contract_options
  4029. tags:
  4030. - 订阅
  4031. x-require-auth: true
  4032. x-resource-type: bos.subscription
  4033. x-action: list
  4034. x-version: v1
  4035. x-permission-visibility: catalog
  4036. requestBody:
  4037. required: true
  4038. description: JSON 请求体,业务字段置于 data
  4039. content:
  4040. application/json:
  4041. schema:
  4042. type: object
  4043. description: 统一信封请求体,业务字段放在 data 内
  4044. properties:
  4045. data:
  4046. type: object
  4047. description: 业务参数
  4048. properties:
  4049. customer_id:
  4050. type: string
  4051. description: 客户 ID(必填)
  4052. keyword:
  4053. type: string
  4054. description: 合同名称关键字(仅本口有)
  4055. required:
  4056. - customer_id
  4057. required:
  4058. - data
  4059. responses:
  4060. "200":
  4061. description: 成功。统一信封 code/message/data
  4062. /subscription/update@v1:
  4063. post:
  4064. summary: 订阅修改(白名单)
  4065. description: 第3册§5.6:可改字段只有 trial_months/discount_monthly_cents;row_version 必填,落空⇒KLT-S407;换套餐/换合同⇒KLT-M229。
  4066. operationId: subscription_update
  4067. tags:
  4068. - 订阅
  4069. x-require-auth: true
  4070. x-resource-type: bos.subscription
  4071. x-action: update
  4072. x-version: v1
  4073. x-permission-visibility: catalog
  4074. requestBody:
  4075. required: true
  4076. description: JSON 请求体,业务字段置于 data
  4077. content:
  4078. application/json:
  4079. schema:
  4080. type: object
  4081. description: 统一信封请求体,业务字段放在 data 内
  4082. properties:
  4083. data:
  4084. type: object
  4085. description: 业务参数
  4086. properties:
  4087. subscription_id:
  4088. type: string
  4089. description: 订阅 ID
  4090. row_version:
  4091. type: integer
  4092. description: 乐观锁版本号(必填,落空⇒KLT-S407)
  4093. trial_months:
  4094. type: integer
  4095. description: 试用月数(白名单可改)
  4096. minimum: 0
  4097. discount_monthly_cents:
  4098. type: integer
  4099. description: 每月优惠金额(分,白名单可改)
  4100. minimum: 0
  4101. required:
  4102. - subscription_id
  4103. - row_version
  4104. required:
  4105. - data
  4106. responses:
  4107. "200":
  4108. description: 成功。统一信封 code/message/data
  4109. /subscription/delete_check@v1:
  4110. post:
  4111. summary: 订阅删除前阻塞检查
  4112. description: 第3册§5.6:两栏阻塞分列(账单明细⇒KLT-M227、升降配链原订阅⇒KLT-M230);账单只读口未接线⇒billing_state=unconfigured。
  4113. operationId: subscription_delete_check
  4114. tags:
  4115. - 订阅
  4116. x-require-auth: true
  4117. x-resource-type: bos.subscription
  4118. x-action: view
  4119. x-version: v1
  4120. x-permission-visibility: catalog
  4121. requestBody:
  4122. required: true
  4123. description: JSON 请求体,业务字段置于 data
  4124. content:
  4125. application/json:
  4126. schema:
  4127. type: object
  4128. description: 统一信封请求体,业务字段放在 data 内
  4129. properties:
  4130. data:
  4131. type: object
  4132. description: 业务参数
  4133. properties:
  4134. subscription_id:
  4135. type: string
  4136. description: 订阅 ID
  4137. required:
  4138. - subscription_id
  4139. required:
  4140. - data
  4141. responses:
  4142. "200":
  4143. description: 成功。统一信封 code/message/data
  4144. /subscription/delete@v1:
  4145. post:
  4146. summary: 删除订阅并回退额度
  4147. description: 第3册§5.6:删除前复算阻塞;终态⇒11103;同事务回退 customer.quota_cents,档位 first_referred_at 打点⛔ 回滚。
  4148. operationId: subscription_delete
  4149. tags:
  4150. - 订阅
  4151. x-require-auth: true
  4152. x-resource-type: bos.subscription
  4153. x-action: delete
  4154. x-version: v1
  4155. x-permission-visibility: catalog
  4156. requestBody:
  4157. required: true
  4158. description: JSON 请求体,业务字段置于 data
  4159. content:
  4160. application/json:
  4161. schema:
  4162. type: object
  4163. description: 统一信封请求体,业务字段放在 data 内
  4164. properties:
  4165. data:
  4166. type: object
  4167. description: 业务参数
  4168. properties:
  4169. subscription_id:
  4170. type: string
  4171. description: 订阅 ID
  4172. required:
  4173. - subscription_id
  4174. required:
  4175. - data
  4176. responses:
  4177. "200":
  4178. description: 成功。统一信封 code/message/data
  4179. /subscription/list_all@v1:
  4180. post:
  4181. summary: 全部订阅(跨客户)
  4182. description: 第3册§5.8:跨客户订阅列表,customer_id 可选;region_ids 经客户挂载区域展开;⛔ 客户名称/合同编号检索。
  4183. operationId: subscription_list_all
  4184. tags:
  4185. - 订阅
  4186. x-require-auth: true
  4187. x-resource-type: bos.subscription
  4188. x-action: list
  4189. x-version: v1
  4190. x-permission-visibility: catalog
  4191. requestBody:
  4192. required: true
  4193. description: JSON 请求体,业务字段置于 data
  4194. content:
  4195. application/json:
  4196. schema:
  4197. type: object
  4198. description: 统一信封请求体,业务字段放在 data 内
  4199. properties:
  4200. data:
  4201. type: object
  4202. description: 列表筛选参数
  4203. properties:
  4204. page:
  4205. type: integer
  4206. description: 页码
  4207. minimum: 1
  4208. page_size:
  4209. type: integer
  4210. description: 每页条数
  4211. minimum: 1
  4212. maximum: 500
  4213. keyword:
  4214. type: string
  4215. description: 关键字筛选
  4216. customer_id:
  4217. type: string
  4218. description: 客户 ID 筛选(跨客户列表下可选)
  4219. contract_id:
  4220. type: string
  4221. description: 合同 ID 筛选
  4222. status:
  4223. type: string
  4224. description: 状态筛选
  4225. region_ids:
  4226. type: array
  4227. description: 区域 ID 集合(经客户挂载区域展开)
  4228. items:
  4229. type: string
  4230. description: 区域 ID
  4231. required:
  4232. - data
  4233. responses:
  4234. "200":
  4235. description: 成功。统一信封 code/message/data
  4236. /cost_item/save@v1:
  4237. post:
  4238. summary: 保存成本项定义
  4239. description: 仅 admin。增改成本项定义。拒收金额、客户、运营商、省份、cycle、is_system。
  4240. operationId: cost_item_save
  4241. tags:
  4242. - 成本与分成
  4243. x-require-auth: true
  4244. x-resource-type: bos.cost_item
  4245. x-action: manage
  4246. x-version: v1
  4247. x-permission-visibility: catalog
  4248. requestBody:
  4249. required: true
  4250. description: JSON 请求体,业务字段置于 data
  4251. content:
  4252. application/json:
  4253. schema:
  4254. type: object
  4255. description: 统一信封请求体,业务字段放在 data 内
  4256. properties:
  4257. data:
  4258. type: object
  4259. description: 业务参数
  4260. properties:
  4261. cost_item_id:
  4262. type: string
  4263. description: 成本项 ID(更新时必填)
  4264. category:
  4265. type: string
  4266. description: 类别:intl_resource/device_purchase/project_fee
  4267. enum:
  4268. - intl_resource
  4269. - device_purchase
  4270. - project_fee
  4271. item_name:
  4272. type: string
  4273. description: 成本项名称
  4274. billing_unit:
  4275. type: string
  4276. description: 计费单位:per_customer/per_account/per_copy
  4277. enum:
  4278. - per_customer
  4279. - per_account
  4280. - per_copy
  4281. is_amortized:
  4282. type: boolean
  4283. description: 是否摊销
  4284. amortization_months:
  4285. type: integer
  4286. description: 摊销月数(勾选摊销时可空=每月摊销不结束)
  4287. deduct_from_base:
  4288. type: boolean
  4289. description: 是否从基数扣除
  4290. remark:
  4291. type: string
  4292. description: 备注
  4293. row_version:
  4294. type: integer
  4295. description: 乐观锁版本(更新时)
  4296. required:
  4297. - category
  4298. - item_name
  4299. - billing_unit
  4300. - is_amortized
  4301. - deduct_from_base
  4302. required:
  4303. - data
  4304. responses:
  4305. "200":
  4306. description: 成功。统一信封 code/message/data
  4307. /cost_item/get_list@v1:
  4308. post:
  4309. summary: 成本项列表
  4310. description: 全局成本项目录;可选类别/名称关键字;无客户过滤。
  4311. operationId: cost_item_get_list
  4312. tags:
  4313. - 成本与分成
  4314. x-require-auth: true
  4315. x-resource-type: bos.cost_item
  4316. x-action: list
  4317. x-version: v1
  4318. x-permission-visibility: catalog
  4319. requestBody:
  4320. required: true
  4321. description: JSON 请求体,业务字段置于 data
  4322. content:
  4323. application/json:
  4324. schema:
  4325. type: object
  4326. description: 统一信封请求体,业务字段放在 data 内
  4327. properties:
  4328. data:
  4329. type: object
  4330. description: 列表筛选参数
  4331. properties:
  4332. page:
  4333. type: integer
  4334. description: 页码(0 基索引,默认 0)
  4335. minimum: 0
  4336. default: 0
  4337. page_size:
  4338. type: integer
  4339. description: 每页条数(默认 20,上限 200)
  4340. minimum: 1
  4341. maximum: 200
  4342. default: 20
  4343. keyword:
  4344. type: string
  4345. description: 关键字筛选(可选)
  4346. category:
  4347. type: string
  4348. description: 类别筛选
  4349. required:
  4350. - data
  4351. responses:
  4352. "200":
  4353. description: 成功。统一信封 code/message/data
  4354. /cost_amount/save@v1:
  4355. post:
  4356. summary: 保存成本金额
  4357. description: 按「省份×运营商×成本项」只写差异金额;留空项表示删除该差异。
  4358. operationId: cost_amount_save
  4359. tags:
  4360. - 成本与分成
  4361. x-require-auth: true
  4362. x-resource-type: bos.cost_amount
  4363. x-action: manage
  4364. x-version: v1
  4365. x-permission-visibility: catalog
  4366. requestBody:
  4367. required: true
  4368. description: JSON 请求体,业务字段置于 data
  4369. content:
  4370. application/json:
  4371. schema:
  4372. type: object
  4373. description: 统一信封请求体,业务字段放在 data 内
  4374. properties:
  4375. data:
  4376. type: object
  4377. description: 业务参数
  4378. properties:
  4379. province_node_id:
  4380. type: string
  4381. description: 省份节点 ID
  4382. operator_id:
  4383. type: string
  4384. description: 运营商 ID
  4385. items:
  4386. type: array
  4387. description: 变更项列表;留空金额表示删除该差异行
  4388. items:
  4389. type: object
  4390. properties:
  4391. cost_item_id:
  4392. type: string
  4393. description: 成本项 ID
  4394. amount_cents:
  4395. type: integer
  4396. description: 金额(分);空/省略表示删除
  4397. row_version:
  4398. type: integer
  4399. description: 乐观锁版本
  4400. required:
  4401. - cost_item_id
  4402. required:
  4403. - province_node_id
  4404. - operator_id
  4405. - items
  4406. required:
  4407. - data
  4408. responses:
  4409. "200":
  4410. description: 成功。统一信封 code/message/data
  4411. /cost_amount/get_list@v1:
  4412. post:
  4413. summary: 成本金额一览
  4414. description: 透视表;admin 全量,区域运营按可见省/运营商收窄。
  4415. operationId: cost_amount_get_list
  4416. tags:
  4417. - 成本与分成
  4418. x-require-auth: true
  4419. x-resource-type: bos.cost_amount
  4420. x-action: list
  4421. x-version: v1
  4422. x-permission-visibility: catalog
  4423. requestBody:
  4424. required: true
  4425. description: JSON 请求体,业务字段置于 data
  4426. content:
  4427. application/json:
  4428. schema:
  4429. type: object
  4430. description: 统一信封请求体,业务字段放在 data 内
  4431. properties:
  4432. data:
  4433. type: object
  4434. description: 列表筛选参数
  4435. properties:
  4436. province_node_id:
  4437. type: string
  4438. description: 省份筛选
  4439. operator_id:
  4440. type: string
  4441. description: 运营商筛选
  4442. page:
  4443. type: integer
  4444. description: 页码(0 基索引,默认 0)
  4445. minimum: 0
  4446. default: 0
  4447. page_size:
  4448. type: integer
  4449. description: 每页条数(默认 20,上限 200)
  4450. minimum: 1
  4451. maximum: 200
  4452. default: 20
  4453. keyword:
  4454. type: string
  4455. description: 关键字筛选(可选)
  4456. required:
  4457. - data
  4458. responses:
  4459. "200":
  4460. description: 成功。统一信封 code/message/data
  4461. /share_rule/save@v1:
  4462. post:
  4463. summary: 保存分成规则
  4464. description: holder_type 仅 operator/ops_team(无 partner)。share_value 填 0/负表示删除该行。
  4465. operationId: share_rule_save
  4466. tags:
  4467. - 成本与分成
  4468. x-require-auth: true
  4469. x-resource-type: bos.share_rule
  4470. x-action: manage
  4471. x-version: v1
  4472. x-permission-visibility: catalog
  4473. requestBody:
  4474. required: true
  4475. description: JSON 请求体,业务字段置于 data
  4476. content:
  4477. application/json:
  4478. schema:
  4479. type: object
  4480. description: 统一信封请求体,业务字段放在 data 内
  4481. properties:
  4482. data:
  4483. type: object
  4484. description: 业务参数
  4485. properties:
  4486. holder_type:
  4487. type: string
  4488. description: 持有方类型:operator/ops_team
  4489. enum:
  4490. - operator
  4491. - ops_team
  4492. holder_id:
  4493. type: string
  4494. description: 持有方 ID
  4495. rules:
  4496. type: array
  4497. description: 规则行列表
  4498. items:
  4499. type: object
  4500. properties:
  4501. rule_id:
  4502. type: string
  4503. description: 规则 ID(更新/删除时)
  4504. customer_id:
  4505. type: string
  4506. description: 客户 ID
  4507. rule_level:
  4508. type: string
  4509. description: 规则层级:contract_addon/region_regular
  4510. enum:
  4511. - contract_addon
  4512. - region_regular
  4513. share_mode:
  4514. type: string
  4515. description: 分成方式:ratio_total/per_account/fixed_amount
  4516. enum:
  4517. - ratio_total
  4518. - per_account
  4519. - fixed_amount
  4520. share_value:
  4521. type: number
  4522. description: 分成值:比例 (0,1];金额/每账号>0 分;0/负=删除该行
  4523. remark:
  4524. type: string
  4525. description: 备注
  4526. required:
  4527. - holder_type
  4528. - holder_id
  4529. - rules
  4530. required:
  4531. - data
  4532. responses:
  4533. "200":
  4534. description: 成功。统一信封 code/message/data
  4535. /share_rule/get_list@v1:
  4536. post:
  4537. summary: 分成规则列表
  4538. description: 按持有方等条件列出分成规则。
  4539. operationId: share_rule_get_list
  4540. tags:
  4541. - 成本与分成
  4542. x-require-auth: true
  4543. x-resource-type: bos.share_rule
  4544. x-action: list
  4545. x-version: v1
  4546. x-permission-visibility: catalog
  4547. requestBody:
  4548. required: true
  4549. description: JSON 请求体,业务字段置于 data
  4550. content:
  4551. application/json:
  4552. schema:
  4553. type: object
  4554. description: 统一信封请求体,业务字段放在 data 内
  4555. properties:
  4556. data:
  4557. type: object
  4558. description: 列表筛选参数
  4559. properties:
  4560. holder_type:
  4561. type: string
  4562. description: 持有方类型
  4563. holder_id:
  4564. type: string
  4565. description: 持有方 ID
  4566. page:
  4567. type: integer
  4568. description: 页码(0 基索引,默认 0)
  4569. minimum: 0
  4570. default: 0
  4571. page_size:
  4572. type: integer
  4573. description: 每页条数(默认 20,上限 200)
  4574. minimum: 1
  4575. maximum: 200
  4576. default: 20
  4577. keyword:
  4578. type: string
  4579. description: 关键字筛选(可选)
  4580. required:
  4581. - data
  4582. responses:
  4583. "200":
  4584. description: 成功。统一信封 code/message/data
  4585. /share_rule/get@v1:
  4586. post:
  4587. summary: 分成规则详情
  4588. description: 按持有方一次返回四卡摘要与规则表。
  4589. operationId: share_rule_get
  4590. tags:
  4591. - 成本与分成
  4592. x-require-auth: true
  4593. x-resource-type: bos.share_rule
  4594. x-action: view
  4595. x-version: v1
  4596. x-permission-visibility: catalog
  4597. requestBody:
  4598. required: true
  4599. description: JSON 请求体,业务字段置于 data
  4600. content:
  4601. application/json:
  4602. schema:
  4603. type: object
  4604. description: 统一信封请求体,业务字段放在 data 内
  4605. properties:
  4606. data:
  4607. type: object
  4608. description: 业务参数
  4609. properties:
  4610. holder_type:
  4611. type: string
  4612. description: 持有方类型:operator/ops_team
  4613. holder_id:
  4614. type: string
  4615. description: 持有方 ID
  4616. required:
  4617. - holder_type
  4618. - holder_id
  4619. required:
  4620. - data
  4621. responses:
  4622. "200":
  4623. description: 成功。统一信封 code/message/data
  4624. /share_rule/delete@v1:
  4625. post:
  4626. summary: 删除分成规则
  4627. description: 按 rule_id 删除单条分成规则(亦可在 save 内以 0/负值删除)。
  4628. operationId: share_rule_delete
  4629. tags:
  4630. - 成本与分成
  4631. x-require-auth: true
  4632. x-resource-type: bos.share_rule
  4633. x-action: delete
  4634. x-version: v1
  4635. x-permission-visibility: catalog
  4636. requestBody:
  4637. required: true
  4638. description: JSON 请求体,业务字段置于 data
  4639. content:
  4640. application/json:
  4641. schema:
  4642. type: object
  4643. description: 统一信封请求体,业务字段放在 data 内
  4644. properties:
  4645. data:
  4646. type: object
  4647. description: 业务参数
  4648. properties:
  4649. rule_id:
  4650. type: string
  4651. description: 规则 ID
  4652. required:
  4653. - rule_id
  4654. required:
  4655. - data
  4656. responses:
  4657. "200":
  4658. description: 成功。统一信封 code/message/data
  4659. /opsview/home@v1:
  4660. get:
  4661. summary: 运维只读首页
  4662. description: 运维侧只读首页(U-60),返回工单/逾期等概览数据。
  4663. operationId: opsview_home
  4664. tags:
  4665. - 运维视图
  4666. x-require-auth: true
  4667. x-resource-type: bos.opsview
  4668. x-action: view
  4669. x-version: v1
  4670. x-permission-visibility: catalog
  4671. responses:
  4672. "200":
  4673. description: 成功。统一信封 code/message/data
  4674. /jobs/get_list@v1:
  4675. get:
  4676. summary: 定时作业清单
  4677. description: 返回已注册作业规格列表(key/name/cron_hint 等)。
  4678. operationId: jobs_get_list
  4679. tags:
  4680. - 定时作业
  4681. x-require-auth: true
  4682. x-resource-type: bos.jobs
  4683. x-action: list
  4684. x-version: v1
  4685. x-permission-visibility: catalog
  4686. responses:
  4687. "200":
  4688. description: 成功。统一信封 code/message/data
  4689. /jobs/toggle@v1:
  4690. post:
  4691. summary: 启停定时作业
  4692. description: 仅 admin。按作业 key 启停。
  4693. operationId: jobs_toggle
  4694. tags:
  4695. - 定时作业
  4696. x-require-auth: true
  4697. x-resource-type: bos.jobs
  4698. x-action: manage
  4699. x-version: v1
  4700. x-permission-visibility: catalog
  4701. requestBody:
  4702. required: true
  4703. description: JSON 请求体,业务字段置于 data
  4704. content:
  4705. application/json:
  4706. schema:
  4707. type: object
  4708. description: 统一信封请求体,业务字段放在 data 内
  4709. properties:
  4710. data:
  4711. type: object
  4712. description: 业务参数
  4713. properties:
  4714. key:
  4715. type: string
  4716. description: 作业键
  4717. enabled:
  4718. type: boolean
  4719. description: 是否启用
  4720. required:
  4721. - key
  4722. - enabled
  4723. required:
  4724. - data
  4725. responses:
  4726. "200":
  4727. description: 成功。统一信封 code/message/data
  4728. /jobs/runs@v1:
  4729. post:
  4730. summary: 作业执行记录
  4731. description: 查询指定作业的执行记录。
  4732. operationId: jobs_runs
  4733. tags:
  4734. - 定时作业
  4735. x-require-auth: true
  4736. x-resource-type: bos.jobs
  4737. x-action: view
  4738. x-version: v1
  4739. x-permission-visibility: catalog
  4740. requestBody:
  4741. required: true
  4742. description: JSON 请求体,业务字段置于 data
  4743. content:
  4744. application/json:
  4745. schema:
  4746. type: object
  4747. description: 统一信封请求体,业务字段放在 data 内
  4748. properties:
  4749. data:
  4750. type: object
  4751. description: 业务参数
  4752. properties:
  4753. key:
  4754. type: string
  4755. description: 作业键
  4756. required:
  4757. - key
  4758. required:
  4759. - data
  4760. responses:
  4761. "200":
  4762. description: 成功。统一信封 code/message/data
  4763. /jobs/run_once@v1:
  4764. post:
  4765. summary: 补跑作业一次
  4766. description: 触发一次指定作业。prod 环境仅总运营可补跑。可选 key:SUB-EFF/STOP-GEN/OVERDUE/DELEGATION-SYNC/OPEN-GEN/SVC-GEN/RECON。
  4767. operationId: jobs_run_once
  4768. tags:
  4769. - 定时作业
  4770. x-require-auth: true
  4771. x-resource-type: bos.jobs
  4772. x-action: manage
  4773. x-version: v1
  4774. x-permission-visibility: catalog
  4775. requestBody:
  4776. required: true
  4777. description: JSON 请求体,业务字段置于 data
  4778. content:
  4779. application/json:
  4780. schema:
  4781. type: object
  4782. description: 统一信封请求体,业务字段放在 data 内
  4783. properties:
  4784. data:
  4785. type: object
  4786. description: 业务参数
  4787. properties:
  4788. key:
  4789. type: string
  4790. description: 作业键
  4791. enum:
  4792. - SUB-EFF
  4793. - STOP-GEN
  4794. - OVERDUE
  4795. - DELEGATION-SYNC
  4796. - OPEN-GEN
  4797. - SVC-GEN
  4798. - RECON
  4799. required:
  4800. - key
  4801. required:
  4802. - data
  4803. responses:
  4804. "200":
  4805. description: 成功。统一信封 code/message/data
  4806. components:
  4807. schemas:
  4808. ApiEnvelope:
  4809. type: object
  4810. description: 统一响应信封
  4811. properties:
  4812. code:
  4813. type: integer
  4814. description: 业务/协议码,0 表示成功
  4815. message:
  4816. type: string
  4817. description: 提示信息
  4818. error_code:
  4819. type: string
  4820. description: 稳定错误码(失败时)
  4821. data:
  4822. description: 业务数据载荷
  4823. required:
  4824. - code
  4825. - message
  4826. PageQuery:
  4827. type: object
  4828. description: 分页查询(0 基)
  4829. properties:
  4830. page:
  4831. type: integer
  4832. description: 页码(0 基索引,默认 0)
  4833. minimum: 0
  4834. default: 0
  4835. page_size:
  4836. type: integer
  4837. description: 每页条数(默认 20,上限 200)
  4838. minimum: 1
  4839. maximum: 200
  4840. default: 20
  4841. keyword:
  4842. type: string
  4843. description: 关键字筛选(可选)