openapi.yaml 210 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523
  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: 列登录名/手机号(掩码)/角色/主体/主-子账号标记/启停状态,并下发激活码生命周期(交付、激活、设密时间与有效截止日)。`status`=账号启停(`bos_user_binding.status`),`activation_status`=激活态(`bos_account_ext.status`),两者正交。运维侧全量,团队侧限本团队成员。注意:「姓名」列无数据源(`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/subject_id/status/activation_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: 一条团队带负责人登录名、备注、成员数与成员明细(`members[]`,含 `name`/`display_name`/`username` 与账号启停 `binding_status`;主/子账号一并下发);仅 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 一律服务端派生(`scope_type=end_user` +项目空间 ID),不收客户端的 scope_type/scope_id;validity 默认 `valid`(只读),`expired`/`all` 为写操作(先作废再换新码),不接受 `active`(平台非法值)。明文=调平台 `bootstrap_credential/export@v1`(调用身份=项目服务授权主体 keypair 六头,不用用户令牌/内部令牌),>200 人自动按 200 分片并按 `pagination.total` 翻页(不得漏页冒充成功)。出参 `data.items[].plaintext` **只随本次应答回显一次**、平台侧不落库 ⇒ 每次调用(含失败)逐次写审计,`data.audit_written` 如实回布尔。
  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. minItems: 1
  589. items:
  590. type: string
  591. description: 用户 ID
  592. validity:
  593. type: string
  594. description: 导出口径(平台取值域):valid=仍有效(只读,缺省);expired=已过期(写);all=全部(写)。不接受 active——平台合法值是 valid,传 active 会被 11103 拒收
  595. default: valid
  596. enum:
  597. - valid
  598. - expired
  599. - all
  600. required:
  601. - user_ids
  602. required:
  603. - data
  604. responses:
  605. "200":
  606. description: 成功。统一信封 code/message/data
  607. /account/change_password@v1:
  608. post:
  609. summary: 自助修改密码
  610. description: 已登录用户修改本人密码;新旧相同不保存。
  611. operationId: account_change_password
  612. tags:
  613. - 账号管理
  614. x-require-auth: true
  615. # AC-05 明定「任何已登录角色」:不挂业务权限键(`bos.account.manage` 只授给运营侧,
  616. # 客户/分账号/合伙人/运营商会被网关 11001 挡掉)。登录即可=复用所有人都在的
  617. # `bos.auth.view@v1`,身份边界由 handler 的「只改本人」保证。
  618. x-resource-type: bos.auth
  619. x-action: view
  620. x-version: v1
  621. x-permission-visibility: catalog
  622. requestBody:
  623. required: true
  624. description: JSON 请求体,业务字段置于 data
  625. content:
  626. application/json:
  627. schema:
  628. type: object
  629. description: 统一信封请求体,业务字段放在 data 内
  630. properties:
  631. data:
  632. type: object
  633. description: 业务参数
  634. properties:
  635. old_password:
  636. type: string
  637. description: 原密码
  638. new_password:
  639. type: string
  640. description: 新密码
  641. required:
  642. - old_password
  643. - new_password
  644. required:
  645. - data
  646. responses:
  647. "200":
  648. description: 成功。统一信封 code/message/data
  649. /account/profile/update@v1:
  650. post:
  651. summary: 本人维护姓名
  652. description: AC-05 个人资料;仅限本人。只写账号级自填姓名(bos_account_ext.display_name),不改主体档案(客户联系人/运营商名/团队名归运营侧)。空串或 null=清除自填、回落到档案派生名;超 64 字符或含控制字符 ⇒ 60004。
  653. operationId: account_profile_update
  654. tags:
  655. - 账号管理
  656. x-require-auth: true
  657. # AC-05:任何已登录角色且仅限本人 ⇒ 登录即可,不挂业务权限键(`bos.account.manage` 会把客户等角色挡在网关)。
  658. x-resource-type: bos.auth
  659. x-action: view
  660. x-version: v1
  661. x-permission-visibility: catalog
  662. requestBody:
  663. required: true
  664. description: JSON 请求体,业务字段置于 data
  665. content:
  666. application/json:
  667. schema:
  668. type: object
  669. description: 统一信封请求体,业务字段放在 data 内
  670. properties:
  671. data:
  672. type: object
  673. description: 业务参数
  674. properties:
  675. display_name:
  676. type: string
  677. maxLength: 64
  678. description: 本人姓名;空串或 null=清除自填(回落到档案派生名)
  679. required:
  680. - data
  681. responses:
  682. "200":
  683. description: 成功。统一信封 code/message/data
  684. /account/notify_pref@v1:
  685. get:
  686. summary: 读通知投递偏好
  687. description: AC-06;只读本人三通道(站内/邮箱/短信)的 enabled/available/address_hint。站内恒开不可关;地址摘要一律脱敏。任何已登录角色。
  688. operationId: account_notify_pref
  689. tags:
  690. - 账号管理
  691. x-require-auth: true
  692. # AC-06:任何已登录角色只读本人;不挂业务权限键(见 06-接口清单「登录即可」)。
  693. x-resource-type: bos.auth
  694. x-action: view
  695. x-version: v1
  696. x-permission-visibility: catalog
  697. responses:
  698. "200":
  699. description: 成功。统一信封 code/message/data
  700. /account/notify_pref/save@v1:
  701. post:
  702. summary: 保存通知投递开关
  703. description: AC-06;仅限本人(user_id 取登录上下文)。站内投递不可关闭(KLT-A004/60092);未绑定手机号不能开启短信(KLT-A005/60093)。关闭是合法动作、不发码。
  704. operationId: account_notify_pref_save
  705. tags:
  706. - 账号管理
  707. x-require-auth: true
  708. # AC-06:任何已登录角色且仅限本人 ⇒ 登录即可,不挂业务权限键。
  709. x-resource-type: bos.auth
  710. x-action: view
  711. x-version: v1
  712. x-permission-visibility: catalog
  713. requestBody:
  714. required: true
  715. description: JSON 请求体,业务字段置于 data
  716. content:
  717. application/json:
  718. schema:
  719. type: object
  720. description: 统一信封请求体,业务字段放在 data 内
  721. properties:
  722. data:
  723. type: object
  724. description: 业务参数
  725. properties:
  726. inapp_enabled:
  727. type: boolean
  728. description: 站内投递开关;只接受 true/缺省,false ⇒ KLT-A004
  729. mail_enabled:
  730. type: boolean
  731. description: 邮箱投递开关
  732. sms_enabled:
  733. type: boolean
  734. description: 短信投递开关;无绑定手机号时 true ⇒ KLT-A005
  735. required:
  736. - mail_enabled
  737. - sms_enabled
  738. required:
  739. - data
  740. responses:
  741. "200":
  742. description: 成功。统一信封 code/message/data
  743. /account/notify_email@v1:
  744. post:
  745. summary: 本人维护通知投递邮箱
  746. description: AC-06;仅限本人。空串=清空登记(合法动作);格式或长度不符 ⇒ KLT-A006/60094。不要求全站唯一。
  747. operationId: account_notify_email
  748. tags:
  749. - 账号管理
  750. x-require-auth: true
  751. # AC-06:任何已登录角色且仅限本人 ⇒ 登录即可,不挂业务权限键。
  752. x-resource-type: bos.auth
  753. x-action: view
  754. x-version: v1
  755. x-permission-visibility: catalog
  756. requestBody:
  757. required: true
  758. description: JSON 请求体,业务字段置于 data
  759. content:
  760. application/json:
  761. schema:
  762. type: object
  763. description: 统一信封请求体,业务字段放在 data 内
  764. properties:
  765. data:
  766. type: object
  767. description: 业务参数
  768. properties:
  769. email:
  770. type: string
  771. maxLength: 254
  772. description: 通知投递邮箱;空串或 null=清空登记
  773. required:
  774. - data
  775. responses:
  776. "200":
  777. description: 成功。统一信封 code/message/data
  778. /account/notify_email/set@v1:
  779. post:
  780. summary: 运营代办维护通知投递邮箱
  781. description: AC-06;admin 全域、opsMain 负责范围内(opsSub 只读)。与本人自助口同一套格式校验(KLT-A006/60094),范围外按 11104 语义拒绝。
  782. operationId: account_notify_email_set
  783. tags:
  784. - 账号管理
  785. x-require-auth: true
  786. x-resource-type: bos.account
  787. x-action: manage
  788. x-version: v1
  789. x-permission-visibility: catalog
  790. requestBody:
  791. required: true
  792. description: JSON 请求体,业务字段置于 data
  793. content:
  794. application/json:
  795. schema:
  796. type: object
  797. description: 统一信封请求体,业务字段放在 data 内
  798. properties:
  799. data:
  800. type: object
  801. description: 业务参数
  802. properties:
  803. user_id:
  804. type: string
  805. description: 目标账号 ID
  806. email:
  807. type: string
  808. maxLength: 254
  809. description: 通知投递邮箱;空串或 null=清空登记
  810. required:
  811. - user_id
  812. required:
  813. - data
  814. responses:
  815. "200":
  816. description: 成功。统一信封 code/message/data
  817. /activation/verify@v1:
  818. post:
  819. summary: 激活并设置密码
  820. description: 免登录豁免接口。校验激活码后设置新密码;按来源 IP+码窗口限流,不设失败计数锁死。
  821. operationId: activation_verify
  822. tags:
  823. - 认证与激活
  824. x-require-auth: false
  825. x-resource-type: bos.activation
  826. x-action: manage
  827. x-version: v1
  828. x-permission-visibility: catalog
  829. requestBody:
  830. required: true
  831. description: JSON 请求体,业务字段置于 data
  832. content:
  833. application/json:
  834. schema:
  835. type: object
  836. description: 统一信封请求体,业务字段放在 data 内
  837. properties:
  838. data:
  839. type: object
  840. description: 业务参数
  841. properties:
  842. code:
  843. type: string
  844. description: 激活码
  845. new_password:
  846. type: string
  847. description: 新密码(建议不少于 8 位)
  848. minLength: 8
  849. required:
  850. - code
  851. - new_password
  852. required:
  853. - data
  854. responses:
  855. "200":
  856. description: 成功。统一信封 code/message/data
  857. /activation/precheck@v1:
  858. post:
  859. summary: 激活第 1 步预校验(登录名与激活状态)
  860. description: 免登录豁免接口。在设密步之前按登录名校验账号侧前置:已激活/已停用/未发码/已过期四类在第 1 步拦下;激活码明文仍由平台 bootstrap/consume 核销。
  861. operationId: activation_precheck
  862. tags:
  863. - 认证与激活
  864. x-require-auth: false
  865. x-resource-type: bos.activation
  866. x-action: manage
  867. x-version: v1
  868. x-permission-visibility: catalog
  869. requestBody:
  870. required: true
  871. description: JSON 请求体,业务字段置于 data
  872. content:
  873. application/json:
  874. schema:
  875. type: object
  876. description: 统一信封请求体,业务字段放在 data 内
  877. properties:
  878. data:
  879. type: object
  880. description: 业务参数
  881. properties:
  882. login_name:
  883. type: string
  884. description: 登录名(平台定位账号的必填参数)
  885. code:
  886. type: string
  887. description: 激活码(仅作限流隔离键;码值由平台核销)
  888. required:
  889. - login_name
  890. required:
  891. - data
  892. x-error-codes: [60006, 60052, 60076, 60088]
  893. responses:
  894. "200":
  895. description: 成功。统一信封 code/message/data
  896. /operator/create@v1:
  897. post:
  898. summary: 新建运营商
  899. description: 运营商建档。所属区域必须是省级节点;同省份×品牌唯一;可写结算口径。
  900. operationId: operator_create
  901. tags:
  902. - 运营商
  903. x-require-auth: true
  904. x-resource-type: bos.operator
  905. x-action: create
  906. x-version: v1
  907. x-permission-visibility: catalog
  908. requestBody:
  909. required: true
  910. description: JSON 请求体,业务字段置于 data
  911. content:
  912. application/json:
  913. schema:
  914. type: object
  915. description: 统一信封请求体,业务字段放在 data 内
  916. properties:
  917. data:
  918. type: object
  919. description: 业务参数
  920. properties:
  921. name:
  922. type: string
  923. description: 运营商名称
  924. brand:
  925. type: string
  926. description: 品牌:移动/联通/电信
  927. region_node_id:
  928. type: string
  929. description: 建档区域节点 ID(必须省级)
  930. is_province_node:
  931. type: boolean
  932. description: 是否省级节点标记(服务端校验用,可选)
  933. settle_mode:
  934. type: string
  935. description: 结算方式:ratio=比例;amount=固定金额;per_account=每账号
  936. enum:
  937. - ratio
  938. - amount
  939. - per_account
  940. settle_value:
  941. type: number
  942. description: 结算值:比例时 0<x≤100;金额/每账号时为分且 >0
  943. required:
  944. - name
  945. - brand
  946. - region_node_id
  947. required:
  948. - data
  949. responses:
  950. "200":
  951. description: 成功。统一信封 code/message/data
  952. /operator/update@v1:
  953. post:
  954. summary: 编辑运营商
  955. description: 编辑运营商档案;改品牌/省份不得绕过省份×品牌唯一与省级节点校验。
  956. operationId: operator_update
  957. tags:
  958. - 运营商
  959. x-require-auth: true
  960. x-resource-type: bos.operator
  961. x-action: update
  962. x-version: v1
  963. x-permission-visibility: catalog
  964. requestBody:
  965. required: true
  966. description: JSON 请求体,业务字段置于 data
  967. content:
  968. application/json:
  969. schema:
  970. type: object
  971. description: 统一信封请求体,业务字段放在 data 内
  972. properties:
  973. data:
  974. type: object
  975. description: 业务参数
  976. properties:
  977. operator_id:
  978. type: string
  979. description: 运营商 ID
  980. name:
  981. type: string
  982. description: 运营商名称
  983. brand:
  984. type: string
  985. description: 品牌:移动/联通/电信
  986. region_node_id:
  987. type: string
  988. description: 建档区域节点 ID(必须省级)
  989. is_province_node:
  990. type: boolean
  991. description: 是否省级节点标记(可选)
  992. settle_mode:
  993. type: string
  994. description: 结算方式:ratio/amount/per_account
  995. settle_value:
  996. type: number
  997. description: 结算值
  998. row_version:
  999. type: integer
  1000. description: 乐观锁版本(若启用)
  1001. required:
  1002. - operator_id
  1003. - name
  1004. - brand
  1005. - region_node_id
  1006. required:
  1007. - data
  1008. responses:
  1009. "200":
  1010. description: 成功。统一信封 code/message/data
  1011. /operator/delete@v1:
  1012. post:
  1013. summary: 删除运营商
  1014. description: 删除前六项检查并级联注销对账账号。
  1015. operationId: operator_delete
  1016. tags:
  1017. - 运营商
  1018. x-require-auth: true
  1019. x-resource-type: bos.operator
  1020. x-action: delete
  1021. x-version: v1
  1022. x-permission-visibility: catalog
  1023. requestBody:
  1024. required: true
  1025. description: JSON 请求体,业务字段置于 data
  1026. content:
  1027. application/json:
  1028. schema:
  1029. type: object
  1030. description: 统一信封请求体,业务字段放在 data 内
  1031. properties:
  1032. data:
  1033. type: object
  1034. description: 业务参数
  1035. properties:
  1036. operator_id:
  1037. type: string
  1038. description: 运营商 ID
  1039. required:
  1040. - operator_id
  1041. required:
  1042. - data
  1043. responses:
  1044. "200":
  1045. description: 成功。统一信封 code/message/data
  1046. /operator/get_list@v1:
  1047. post:
  1048. summary: 运营商列表
  1049. description: 卡片口径:建档区域或下挂客户落在本可见范围。
  1050. operationId: operator_get_list
  1051. tags:
  1052. - 运营商
  1053. x-require-auth: true
  1054. x-resource-type: bos.operator
  1055. x-action: list
  1056. x-version: v1
  1057. x-permission-visibility: catalog
  1058. requestBody:
  1059. required: true
  1060. description: JSON 请求体,业务字段置于 data
  1061. content:
  1062. application/json:
  1063. schema:
  1064. type: object
  1065. description: 统一信封请求体,业务字段放在 data 内
  1066. properties:
  1067. data:
  1068. type: object
  1069. description: 列表筛选参数
  1070. properties:
  1071. page:
  1072. type: integer
  1073. description: 页码(0 基索引,默认 0)
  1074. minimum: 0
  1075. default: 0
  1076. page_size:
  1077. type: integer
  1078. description: 每页条数(默认 20,上限 200)
  1079. minimum: 1
  1080. maximum: 200
  1081. default: 20
  1082. keyword:
  1083. type: string
  1084. description: 关键字筛选(可选)
  1085. brand:
  1086. type: string
  1087. description: 品牌筛选(可选)
  1088. required:
  1089. - data
  1090. responses:
  1091. "200":
  1092. description: 成功。统一信封 code/message/data
  1093. /operator/recon_account/create@v1:
  1094. post:
  1095. summary: 创建对账账号
  1096. description: 一家运营商至多一个对账账号;初始密码仅当次显示。
  1097. operationId: operator_recon_account_create
  1098. tags:
  1099. - 运营商
  1100. x-require-auth: true
  1101. x-resource-type: bos.operator.recon_account
  1102. x-action: create
  1103. x-version: v1
  1104. x-permission-visibility: catalog
  1105. requestBody:
  1106. required: true
  1107. description: JSON 请求体,业务字段置于 data
  1108. content:
  1109. application/json:
  1110. schema:
  1111. type: object
  1112. description: 统一信封请求体,业务字段放在 data 内
  1113. properties:
  1114. data:
  1115. type: object
  1116. description: 业务参数
  1117. properties:
  1118. operator_id:
  1119. type: string
  1120. description: 运营商 ID
  1121. username:
  1122. type: string
  1123. description: 对账账号登录名
  1124. mobile:
  1125. type: string
  1126. description: 手机号(可选)
  1127. required:
  1128. - operator_id
  1129. - username
  1130. required:
  1131. - data
  1132. responses:
  1133. "200":
  1134. description: 成功。统一信封 code/message/data
  1135. /operator/recon_account/get@v1:
  1136. post:
  1137. summary: 查询对账账号
  1138. description: 只回状态提示(如「未发送,线下告知本人」),不回密码。
  1139. operationId: operator_recon_account_get
  1140. tags:
  1141. - 运营商
  1142. x-require-auth: true
  1143. x-resource-type: bos.operator.recon_account
  1144. x-action: view
  1145. x-version: v1
  1146. x-permission-visibility: catalog
  1147. requestBody:
  1148. required: true
  1149. description: JSON 请求体,业务字段置于 data
  1150. content:
  1151. application/json:
  1152. schema:
  1153. type: object
  1154. description: 统一信封请求体,业务字段放在 data 内
  1155. properties:
  1156. data:
  1157. type: object
  1158. description: 业务参数
  1159. properties:
  1160. operator_id:
  1161. type: string
  1162. description: 运营商 ID
  1163. required:
  1164. - operator_id
  1165. required:
  1166. - data
  1167. responses:
  1168. "200":
  1169. description: 成功。统一信封 code/message/data
  1170. /partner/create@v1:
  1171. post:
  1172. summary: 新建合伙人
  1173. description: 合伙人建档并同步开通账号;名称全站唯一;结算字段仅 admin 可写。
  1174. operationId: partner_create
  1175. tags:
  1176. - 合伙人
  1177. x-require-auth: true
  1178. x-resource-type: bos.partner
  1179. x-action: create
  1180. x-version: v1
  1181. x-permission-visibility: catalog
  1182. requestBody:
  1183. required: true
  1184. description: JSON 请求体,业务字段置于 data
  1185. content:
  1186. application/json:
  1187. schema:
  1188. type: object
  1189. description: 统一信封请求体,业务字段放在 data 内
  1190. properties:
  1191. data:
  1192. type: object
  1193. description: 业务参数
  1194. properties:
  1195. name:
  1196. type: string
  1197. description: 合伙人名称(全站唯一)
  1198. duty_desc:
  1199. type: string
  1200. description: 职务说明(可选)
  1201. region_node_id:
  1202. type: string
  1203. description: 建档区域节点 ID
  1204. mobile:
  1205. type: string
  1206. description: 手机号(可选)
  1207. username:
  1208. type: string
  1209. description: 登录名(开通账号用)
  1210. settle_mode:
  1211. type: string
  1212. description: 结算方式(仅 admin 可写,可选)
  1213. settle_value:
  1214. type: number
  1215. description: 结算值(仅 admin 可写,可选)
  1216. required:
  1217. - name
  1218. - region_node_id
  1219. - username
  1220. required:
  1221. - data
  1222. responses:
  1223. "200":
  1224. description: 成功。统一信封 code/message/data
  1225. /partner/update@v1:
  1226. post:
  1227. summary: 编辑合伙人
  1228. description: 编辑合伙人资料;登录名不可改。
  1229. operationId: partner_update
  1230. tags:
  1231. - 合伙人
  1232. x-require-auth: true
  1233. x-resource-type: bos.partner
  1234. x-action: update
  1235. x-version: v1
  1236. x-permission-visibility: catalog
  1237. requestBody:
  1238. required: true
  1239. description: JSON 请求体,业务字段置于 data
  1240. content:
  1241. application/json:
  1242. schema:
  1243. type: object
  1244. description: 统一信封请求体,业务字段放在 data 内
  1245. properties:
  1246. data:
  1247. type: object
  1248. description: 业务参数
  1249. properties:
  1250. partner_id:
  1251. type: string
  1252. description: 合伙人 ID
  1253. name:
  1254. type: string
  1255. description: 合伙人名称(全站唯一)
  1256. duty_desc:
  1257. type: string
  1258. description: 职务说明(可选)
  1259. region_node_id:
  1260. type: string
  1261. description: 建档区域节点 ID
  1262. mobile:
  1263. type: string
  1264. description: 手机号(可选)
  1265. settle_mode:
  1266. type: string
  1267. description: 结算方式(仅 admin 可写,可选)
  1268. settle_value:
  1269. type: number
  1270. description: 结算值(仅 admin 可写,可选)
  1271. row_version:
  1272. type: integer
  1273. description: 乐观锁版本(若启用)
  1274. required:
  1275. - partner_id
  1276. - name
  1277. - region_node_id
  1278. required:
  1279. - data
  1280. responses:
  1281. "200":
  1282. description: 成功。统一信封 code/message/data
  1283. /partner/delete@v1:
  1284. post:
  1285. summary: 删除合伙人
  1286. description: 删除合伙人档案及相关授权。
  1287. operationId: partner_delete
  1288. tags:
  1289. - 合伙人
  1290. x-require-auth: true
  1291. x-resource-type: bos.partner
  1292. x-action: delete
  1293. x-version: v1
  1294. x-permission-visibility: catalog
  1295. requestBody:
  1296. required: true
  1297. description: JSON 请求体,业务字段置于 data
  1298. content:
  1299. application/json:
  1300. schema:
  1301. type: object
  1302. description: 统一信封请求体,业务字段放在 data 内
  1303. properties:
  1304. data:
  1305. type: object
  1306. description: 业务参数
  1307. properties:
  1308. partner_id:
  1309. type: string
  1310. description: 合伙人 ID
  1311. required:
  1312. - partner_id
  1313. required:
  1314. - data
  1315. responses:
  1316. "200":
  1317. description: 成功。统一信封 code/message/data
  1318. /partner/get_list@v1:
  1319. post:
  1320. summary: 合伙人列表
  1321. description: 卡片口径:建档区域落在本范围(含下级)。
  1322. operationId: partner_get_list
  1323. tags:
  1324. - 合伙人
  1325. x-require-auth: true
  1326. x-resource-type: bos.partner
  1327. x-action: list
  1328. x-version: v1
  1329. x-permission-visibility: catalog
  1330. requestBody:
  1331. required: true
  1332. description: JSON 请求体,业务字段置于 data
  1333. content:
  1334. application/json:
  1335. schema:
  1336. type: object
  1337. description: 统一信封请求体,业务字段放在 data 内
  1338. properties:
  1339. data:
  1340. type: object
  1341. description: 列表筛选参数
  1342. properties:
  1343. page:
  1344. type: integer
  1345. description: 页码(0 基索引,默认 0)
  1346. minimum: 0
  1347. default: 0
  1348. page_size:
  1349. type: integer
  1350. description: 每页条数(默认 20,上限 200)
  1351. minimum: 1
  1352. maximum: 200
  1353. default: 20
  1354. keyword:
  1355. type: string
  1356. description: 关键字筛选(可选)
  1357. required:
  1358. - data
  1359. responses:
  1360. "200":
  1361. description: 成功。统一信封 code/message/data
  1362. /partner/scope/get@v1:
  1363. post:
  1364. summary: 读取合伙人负责范围
  1365. description: 返回该合伙人的 region/customer 两类 bos_data_scope。注意:2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。
  1366. operationId: partner_scope_get
  1367. tags:
  1368. - 合伙人
  1369. x-require-auth: true
  1370. x-resource-type: bos.partner.scope
  1371. x-action: view
  1372. x-version: v1
  1373. x-permission-visibility: catalog
  1374. requestBody:
  1375. required: true
  1376. description: 统一信封请求体(无业务参数)
  1377. content:
  1378. application/json:
  1379. schema:
  1380. type: object
  1381. properties:
  1382. data:
  1383. type: object
  1384. description: 无业务参数
  1385. required:
  1386. - data
  1387. responses:
  1388. "200":
  1389. description: 成功。统一信封 code/message/data
  1390. /partner/scope/save@v1:
  1391. post:
  1392. summary: 保存合伙人负责范围
  1393. description: 写入 bos_data_scope(holder_type=partner);允许保存为空;保存即 bump epoch。
  1394. operationId: partner_scope_save
  1395. tags:
  1396. - 合伙人
  1397. x-require-auth: true
  1398. x-resource-type: bos.partner.scope
  1399. x-action: manage
  1400. x-version: v1
  1401. x-permission-visibility: catalog
  1402. requestBody:
  1403. required: true
  1404. description: JSON 请求体,业务字段置于 data
  1405. content:
  1406. application/json:
  1407. schema:
  1408. type: object
  1409. description: 统一信封请求体,业务字段放在 data 内
  1410. properties:
  1411. data:
  1412. type: object
  1413. description: 业务参数
  1414. properties:
  1415. partner_id:
  1416. type: string
  1417. description: 合伙人 ID
  1418. region_node_ids:
  1419. type: array
  1420. description: 负责区域节点 ID 列表(可空)
  1421. items:
  1422. type: string
  1423. description: 区域节点 ID
  1424. customer_ids:
  1425. type: array
  1426. description: 负责客户 ID 列表(可空)
  1427. items:
  1428. type: string
  1429. description: 客户 ID
  1430. required:
  1431. - partner_id
  1432. required:
  1433. - data
  1434. responses:
  1435. "200":
  1436. description: 成功。统一信封 code/message/data
  1437. /ent_team/create@v1:
  1438. post:
  1439. summary: 新建运营团队
  1440. description: 仅 admin。新建运营团队,负责范围初始为空。
  1441. operationId: ent_team_create
  1442. tags:
  1443. - 运营团队
  1444. x-require-auth: true
  1445. x-resource-type: bos.ent_team
  1446. x-action: create
  1447. x-version: v1
  1448. x-permission-visibility: catalog
  1449. requestBody:
  1450. required: true
  1451. description: JSON 请求体,业务字段置于 data
  1452. content:
  1453. application/json:
  1454. schema:
  1455. type: object
  1456. description: 统一信封请求体,业务字段放在 data 内
  1457. properties:
  1458. data:
  1459. type: object
  1460. description: 业务参数
  1461. properties:
  1462. team_name:
  1463. type: string
  1464. description: 团队名称
  1465. primary_username:
  1466. type: string
  1467. description: 主账号登录名(可选)
  1468. primary_mobile:
  1469. type: string
  1470. description: 主账号手机号(可选)
  1471. primary_name:
  1472. type: string
  1473. maxLength: 64
  1474. description: 主账号姓名(可选,落 `bos_account_ext.display_name`;下拉框按姓名选人,前端必填,未带=回落登录名)
  1475. remark:
  1476. type: string
  1477. maxLength: 200
  1478. description: 备注(可选,去空白后 ≤200 字符;`ent_team.remark VARCHAR(200) NULL`,缺省=落 NULL)。不参与唯一键、不参与算账与判权谓词
  1479. required:
  1480. - team_name
  1481. required:
  1482. - data
  1483. responses:
  1484. "200":
  1485. description: 成功。统一信封 code/message/data
  1486. /ent_team/update@v1:
  1487. post:
  1488. summary: 编辑运营团队
  1489. description: 仅 admin。编辑团队资料(改名/备注)。注意:请求体与出参不含 `settle_mode`/`settle_value`(运营团队不是分成方,第 4 册§5.1/§5.2,总则§18.3 `PG-7` 路线 A)。备注变更须写审计前后值(记文字)。
  1490. operationId: ent_team_update
  1491. tags:
  1492. - 运营团队
  1493. x-require-auth: true
  1494. x-resource-type: bos.ent_team
  1495. x-action: update
  1496. x-version: v1
  1497. x-permission-visibility: catalog
  1498. requestBody:
  1499. required: true
  1500. description: JSON 请求体,业务字段置于 data
  1501. content:
  1502. application/json:
  1503. schema:
  1504. type: object
  1505. description: 统一信封请求体,业务字段放在 data 内
  1506. properties:
  1507. data:
  1508. type: object
  1509. description: 业务参数
  1510. properties:
  1511. team_id:
  1512. type: string
  1513. description: 团队 ID
  1514. team_name:
  1515. type: string
  1516. description: 团队名称
  1517. remark:
  1518. type: string
  1519. maxLength: 200
  1520. description: 备注(`ent_team.remark VARCHAR(200) NULL`)。三态语义:不带本键=不改本列;带空白串=清空为 NULL;带文本=设值(去空白后 ≤200 字符)。变更写审计前后值
  1521. row_version:
  1522. type: integer
  1523. description: 乐观锁版本(若启用)
  1524. required:
  1525. - team_id
  1526. - team_name
  1527. required:
  1528. - data
  1529. responses:
  1530. "200":
  1531. description: 成功。统一信封 code/message/data
  1532. /ent_team/delete@v1:
  1533. post:
  1534. summary: 删除运营团队
  1535. description: 仅 admin。内置「总部·不限区域」团队不可删。
  1536. operationId: ent_team_delete
  1537. tags:
  1538. - 运营团队
  1539. x-require-auth: true
  1540. x-resource-type: bos.ent_team
  1541. x-action: delete
  1542. x-version: v1
  1543. x-permission-visibility: catalog
  1544. requestBody:
  1545. required: true
  1546. description: JSON 请求体,业务字段置于 data
  1547. content:
  1548. application/json:
  1549. schema:
  1550. type: object
  1551. description: 统一信封请求体,业务字段放在 data 内
  1552. properties:
  1553. data:
  1554. type: object
  1555. description: 业务参数
  1556. properties:
  1557. team_id:
  1558. type: string
  1559. description: 团队 ID
  1560. required:
  1561. - team_id
  1562. required:
  1563. - data
  1564. responses:
  1565. "200":
  1566. description: 成功。统一信封 code/message/data
  1567. /ent_team/member_add@v1:
  1568. post:
  1569. summary: 添加运营团队成员
  1570. description: 每团队有且仅有一个主账号;首个成员即主账号;成员姓名(`name`)落 `bos_account_ext.display_name`(未带=回落登录名)。不可删除当前登录账号。
  1571. operationId: ent_team_member_add
  1572. tags:
  1573. - 运营团队
  1574. x-require-auth: true
  1575. x-resource-type: bos.ent_team
  1576. x-action: manage
  1577. x-version: v1
  1578. x-permission-visibility: catalog
  1579. requestBody:
  1580. required: true
  1581. description: JSON 请求体,业务字段置于 data
  1582. content:
  1583. application/json:
  1584. schema:
  1585. type: object
  1586. description: 统一信封请求体,业务字段放在 data 内
  1587. properties:
  1588. data:
  1589. type: object
  1590. description: 业务参数
  1591. properties:
  1592. team_id:
  1593. type: string
  1594. description: 团队 ID
  1595. username:
  1596. type: string
  1597. description: 成员登录名
  1598. name:
  1599. type: string
  1600. maxLength: 64
  1601. description: 成员姓名(落 `bos_account_ext.display_name`;前端必填,未带=回落登录名)
  1602. mobile:
  1603. type: string
  1604. description: 手机号(可选)
  1605. is_primary:
  1606. type: boolean
  1607. description: 是否设为主账号(可选)
  1608. required:
  1609. - team_id
  1610. - username
  1611. required:
  1612. - data
  1613. responses:
  1614. "200":
  1615. description: 成功。统一信封 code/message/data
  1616. /ent_team/member_update@v1:
  1617. post:
  1618. summary: 编辑运营团队成员资料
  1619. description: 仅 admin。改姓名(`bos_account_ext.display_name`)与手机号;登录名与本/子身份不变(改名办 `ent_team/transfer_primary@v1`)。
  1620. operationId: ent_team_member_update
  1621. tags:
  1622. - 运营团队
  1623. x-require-auth: true
  1624. x-resource-type: bos.ent_team
  1625. x-action: manage
  1626. x-version: v1
  1627. x-permission-visibility: catalog
  1628. requestBody:
  1629. required: true
  1630. description: JSON 请求体,业务字段置于 data
  1631. content:
  1632. application/json:
  1633. schema:
  1634. type: object
  1635. description: 统一信封请求体,业务字段放在 data 内
  1636. properties:
  1637. data:
  1638. type: object
  1639. description: 业务参数
  1640. properties:
  1641. team_id:
  1642. type: string
  1643. description: 团队 ID
  1644. user_id:
  1645. type: string
  1646. description: 成员用户 ID
  1647. name:
  1648. type: string
  1649. maxLength: 64
  1650. description: 姓名(可选;缺省=不改;空白串=拒绝,姓名是下拉框选人的展示值)
  1651. mobile:
  1652. type: string
  1653. description: 手机号(可选;缺省/空串=不改;全站唯一)
  1654. required:
  1655. - team_id
  1656. - user_id
  1657. required:
  1658. - data
  1659. responses:
  1660. "200":
  1661. description: 成功。统一信封 code/message/data
  1662. /ent_team/member_remove@v1:
  1663. post:
  1664. summary: 移除运营团队成员
  1665. description: 内置主账号不可删不可转交;不可删除当前登录账号。
  1666. operationId: ent_team_member_remove
  1667. tags:
  1668. - 运营团队
  1669. x-require-auth: true
  1670. x-resource-type: bos.ent_team
  1671. x-action: manage
  1672. x-version: v1
  1673. x-permission-visibility: catalog
  1674. requestBody:
  1675. required: true
  1676. description: JSON 请求体,业务字段置于 data
  1677. content:
  1678. application/json:
  1679. schema:
  1680. type: object
  1681. description: 统一信封请求体,业务字段放在 data 内
  1682. properties:
  1683. data:
  1684. type: object
  1685. description: 业务参数
  1686. properties:
  1687. team_id:
  1688. type: string
  1689. description: 团队 ID
  1690. user_id:
  1691. type: string
  1692. description: 成员用户 ID
  1693. required:
  1694. - team_id
  1695. - user_id
  1696. required:
  1697. - data
  1698. responses:
  1699. "200":
  1700. description: 成功。统一信封 code/message/data
  1701. /ent_team/transfer_primary@v1:
  1702. post:
  1703. summary: 转交运营团队主账号
  1704. description: 仅 admin。同事务切换 is_primary 标记并同步 role_code(opsMain↔opsSub)。
  1705. operationId: ent_team_transfer_primary
  1706. tags:
  1707. - 运营团队
  1708. x-require-auth: true
  1709. x-resource-type: bos.ent_team
  1710. x-action: manage
  1711. x-version: v1
  1712. x-permission-visibility: catalog
  1713. requestBody:
  1714. required: true
  1715. description: JSON 请求体,业务字段置于 data
  1716. content:
  1717. application/json:
  1718. schema:
  1719. type: object
  1720. description: 统一信封请求体,业务字段放在 data 内
  1721. properties:
  1722. data:
  1723. type: object
  1724. description: 业务参数
  1725. properties:
  1726. team_id:
  1727. type: string
  1728. description: 团队 ID
  1729. from_user_id:
  1730. type: string
  1731. description: 原主账号用户 ID
  1732. to_user_id:
  1733. type: string
  1734. description: 新主账号用户 ID
  1735. required:
  1736. - team_id
  1737. - from_user_id
  1738. - to_user_id
  1739. required:
  1740. - data
  1741. responses:
  1742. "200":
  1743. description: 成功。统一信封 code/message/data
  1744. /ent_team/scope/get@v1:
  1745. post:
  1746. summary: 读取运营团队负责范围
  1747. description: 仅 admin。返回团队区域负责范围。注意:2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。
  1748. operationId: ent_team_scope_get
  1749. tags:
  1750. - 运营团队
  1751. x-require-auth: true
  1752. x-resource-type: bos.ent_team.scope
  1753. x-action: view
  1754. x-version: v1
  1755. x-permission-visibility: catalog
  1756. requestBody:
  1757. required: true
  1758. description: 统一信封请求体(无业务参数)
  1759. content:
  1760. application/json:
  1761. schema:
  1762. type: object
  1763. properties:
  1764. data:
  1765. type: object
  1766. description: 无业务参数
  1767. required:
  1768. - data
  1769. responses:
  1770. "200":
  1771. description: 成功。统一信封 code/message/data
  1772. /ent_team/scope/save@v1:
  1773. post:
  1774. summary: 保存运营团队负责范围
  1775. description: 仅 admin。勾选区域写入 bos_data_scope(holder=ent_team),成为区域删除的引用来源。
  1776. operationId: ent_team_scope_save
  1777. tags:
  1778. - 运营团队
  1779. x-require-auth: true
  1780. x-resource-type: bos.ent_team.scope
  1781. x-action: manage
  1782. x-version: v1
  1783. x-permission-visibility: catalog
  1784. requestBody:
  1785. required: true
  1786. description: JSON 请求体,业务字段置于 data
  1787. content:
  1788. application/json:
  1789. schema:
  1790. type: object
  1791. description: 统一信封请求体,业务字段放在 data 内
  1792. properties:
  1793. data:
  1794. type: object
  1795. description: 业务参数
  1796. properties:
  1797. team_id:
  1798. type: string
  1799. description: 团队 ID
  1800. region_node_ids:
  1801. type: array
  1802. description: 负责区域节点 ID 列表
  1803. items:
  1804. type: string
  1805. description: 区域节点 ID
  1806. required:
  1807. - team_id
  1808. - region_node_ids
  1809. required:
  1810. - data
  1811. responses:
  1812. "200":
  1813. description: 成功。统一信封 code/message/data
  1814. /ops_team/create@v1:
  1815. post:
  1816. summary: 新建运维团队
  1817. description: 须指定所属区域、可派工单类型≥1、分派方式与结算口径。注意:2026-11-05 起团队不分类型(无 team_type 键)。
  1818. operationId: ops_team_create
  1819. tags:
  1820. - 运维团队与成员
  1821. x-require-auth: true
  1822. x-resource-type: bos.ops_team
  1823. x-action: create
  1824. x-version: v1
  1825. x-permission-visibility: catalog
  1826. requestBody:
  1827. required: true
  1828. description: JSON 请求体,业务字段置于 data
  1829. content:
  1830. application/json:
  1831. schema:
  1832. type: object
  1833. description: 统一信封请求体,业务字段放在 data 内
  1834. properties:
  1835. data:
  1836. type: object
  1837. description: 业务参数
  1838. properties:
  1839. team_name:
  1840. type: string
  1841. description: 团队名称
  1842. region_node_id:
  1843. type: string
  1844. description: 所属区域节点 ID
  1845. ticket_types:
  1846. type: array
  1847. description: 可派工单类型列表(至少 1 项)
  1848. items:
  1849. type: string
  1850. description: 工单类型码
  1851. dispatch_mode:
  1852. type: string
  1853. description: 分派方式:manual=手工;auto_avg=自动均分
  1854. enum:
  1855. - manual
  1856. - auto_avg
  1857. settle_mode:
  1858. type: string
  1859. description: 结算方式
  1860. settle_value:
  1861. type: number
  1862. description: 结算值
  1863. primary_username:
  1864. type: string
  1865. description: 主账号登录名(空则默认「{团队名}主账号」)
  1866. primary_name:
  1867. type: string
  1868. description: 主账号姓名(档案名,1~64 字符;空=未填,列表回落显示登录名)
  1869. primary_mobile:
  1870. type: string
  1871. description: 主账号手机号(可选)
  1872. required:
  1873. - team_name
  1874. - region_node_id
  1875. - ticket_types
  1876. - dispatch_mode
  1877. required:
  1878. - data
  1879. responses:
  1880. "200":
  1881. description: 成功。统一信封 code/message/data
  1882. /ops_team/update@v1:
  1883. post:
  1884. summary: 编辑运维团队
  1885. description: 编辑团队资料。注意:2026-11-05 起团队不分类型,请求体无 team_type 键。
  1886. operationId: ops_team_update
  1887. tags:
  1888. - 运维团队与成员
  1889. x-require-auth: true
  1890. x-resource-type: bos.ops_team
  1891. x-action: update
  1892. x-version: v1
  1893. x-permission-visibility: catalog
  1894. requestBody:
  1895. required: true
  1896. description: JSON 请求体,业务字段置于 data
  1897. content:
  1898. application/json:
  1899. schema:
  1900. type: object
  1901. description: 统一信封请求体,业务字段放在 data 内
  1902. properties:
  1903. data:
  1904. type: object
  1905. description: 业务参数
  1906. properties:
  1907. team_id:
  1908. type: string
  1909. description: 团队 ID
  1910. team_name:
  1911. type: string
  1912. description: 团队名称
  1913. region_node_id:
  1914. type: string
  1915. description: 所属区域节点 ID
  1916. ticket_types:
  1917. type: array
  1918. description: 可派工单类型列表
  1919. items:
  1920. type: string
  1921. description: 工单类型码
  1922. settle_mode:
  1923. type: string
  1924. description: 结算方式
  1925. settle_value:
  1926. type: number
  1927. description: 结算值
  1928. row_version:
  1929. type: integer
  1930. description: 乐观锁版本(若启用)
  1931. required:
  1932. - team_id
  1933. required:
  1934. - data
  1935. responses:
  1936. "200":
  1937. description: 成功。统一信封 code/message/data
  1938. /ops_team/delete@v1:
  1939. post:
  1940. summary: 删除运维团队
  1941. description: 删除前校验引用与未办完工单等守卫。
  1942. operationId: ops_team_delete
  1943. tags:
  1944. - 运维团队与成员
  1945. x-require-auth: true
  1946. x-resource-type: bos.ops_team
  1947. x-action: delete
  1948. x-version: v1
  1949. x-permission-visibility: catalog
  1950. requestBody:
  1951. required: true
  1952. description: JSON 请求体,业务字段置于 data
  1953. content:
  1954. application/json:
  1955. schema:
  1956. type: object
  1957. description: 统一信封请求体,业务字段放在 data 内
  1958. properties:
  1959. data:
  1960. type: object
  1961. description: 业务参数
  1962. properties:
  1963. team_id:
  1964. type: string
  1965. description: 团队 ID
  1966. required:
  1967. - team_id
  1968. required:
  1969. - data
  1970. responses:
  1971. "200":
  1972. description: 成功。统一信封 code/message/data
  1973. /ops_team/scope/save@v1:
  1974. post:
  1975. summary: 保存运维团队负责范围
  1976. description: 三个范围写入口之一。同事务校验范围包含关系与未办完工单守卫;失败两侧都不落库。
  1977. operationId: ops_team_scope_save
  1978. tags:
  1979. - 运维团队与成员
  1980. x-require-auth: true
  1981. x-resource-type: bos.ops_team.scope
  1982. x-action: manage
  1983. x-version: v1
  1984. x-permission-visibility: catalog
  1985. requestBody:
  1986. required: true
  1987. description: JSON 请求体,业务字段置于 data
  1988. content:
  1989. application/json:
  1990. schema:
  1991. type: object
  1992. description: 统一信封请求体,业务字段放在 data 内
  1993. properties:
  1994. data:
  1995. type: object
  1996. description: 业务参数
  1997. properties:
  1998. team_id:
  1999. type: string
  2000. description: 团队 ID
  2001. region_node_ids:
  2002. type: array
  2003. description: 负责区域节点 ID 列表
  2004. items:
  2005. type: string
  2006. description: 区域节点 ID
  2007. customer_ids:
  2008. type: array
  2009. description: 负责客户 ID 列表(可空)
  2010. items:
  2011. type: string
  2012. description: 客户 ID
  2013. required:
  2014. - team_id
  2015. required:
  2016. - data
  2017. responses:
  2018. "200":
  2019. description: 成功。统一信封 code/message/data
  2020. /ops_team/member_add@v1:
  2021. post:
  2022. summary: 添加运维成员
  2023. description: 新建成员档案(含成员姓名)并开通运维子账号(`role_code=ops`)。注意:2026-11-05 起成员不分类型,服务侧只校验 `ticket_types` 是团队可分配类型的子集(`KLT-I105`,可为空=不接单)。注意:2026-11-16 起 `ticket_mode` 与负责范围同构:`follow_team`=随团队(成员级零行),`custom`=勾选子集。
  2024. operationId: ops_team_member_add
  2025. tags:
  2026. - 运维团队与成员
  2027. x-require-auth: true
  2028. x-resource-type: bos.ops_team
  2029. x-action: manage
  2030. x-version: v1
  2031. x-permission-visibility: catalog
  2032. requestBody:
  2033. required: true
  2034. description: JSON 请求体,业务字段置于 data
  2035. content:
  2036. application/json:
  2037. schema:
  2038. type: object
  2039. description: 统一信封请求体,业务字段放在 data 内
  2040. properties:
  2041. data:
  2042. type: object
  2043. description: 业务参数
  2044. properties:
  2045. team_id:
  2046. type: string
  2047. description: 团队 ID
  2048. ticket_types:
  2049. type: array
  2050. description: 该成员可处理的工单类型(须为团队可分配类型的子集;空数组=不接单,如录入人员)。`ticket_mode=follow_team` 时不得传本键
  2051. items:
  2052. type: string
  2053. description: 工单类型码
  2054. ticket_mode:
  2055. type: string
  2056. description: 可处理类型形态:follow_team=随团队可分配类型(成员级零行,团队改类型自动跟随);custom=勾选子集。缺省=custom(不带 ticket_mode 时按 ticket_types 落子集,不带=不接单)
  2057. enum:
  2058. - follow_team
  2059. - custom
  2060. username:
  2061. type: string
  2062. description: 登录名
  2063. display_name:
  2064. type: string
  2065. description: 成员姓名(必填;1~64 字符、不含控制字符)。与登录名分列,列表「成员」列显示该值
  2066. mobile:
  2067. type: string
  2068. description: 手机号(可选)
  2069. required:
  2070. - team_id
  2071. - username
  2072. - display_name
  2073. required:
  2074. - data
  2075. responses:
  2076. "200":
  2077. description: 成功。统一信封 code/message/data
  2078. /ops_team/member_update@v1:
  2079. post:
  2080. summary: 更新运维成员
  2081. description: 可改成员姓名、手机号与可处理工单类型(形态+子集,各字段缺省=不改)。注意:2026-11-05 起成员不分类型,不因类型变更改写 role_code;`custom` 时子集落 ops_member_ticket_type,`follow_team` 时清空该成员行并随团队类型。
  2082. operationId: ops_team_member_update
  2083. tags:
  2084. - 运维团队与成员
  2085. x-require-auth: true
  2086. x-resource-type: bos.ops_team
  2087. x-action: manage
  2088. x-version: v1
  2089. x-permission-visibility: catalog
  2090. requestBody:
  2091. required: true
  2092. description: JSON 请求体,业务字段置于 data
  2093. content:
  2094. application/json:
  2095. schema:
  2096. type: object
  2097. description: 统一信封请求体,业务字段放在 data 内
  2098. properties:
  2099. data:
  2100. type: object
  2101. description: 业务参数
  2102. properties:
  2103. team_id:
  2104. type: string
  2105. description: 团队 ID
  2106. ticket_types:
  2107. type: array
  2108. description: 该成员可处理的工单类型(整体替换;须为团队可分配类型的子集;空数组=不接单)。`ticket_mode=follow_team` 时不得传本键
  2109. items:
  2110. type: string
  2111. description: 工单类型码
  2112. ticket_mode:
  2113. type: string
  2114. description: 可处理类型形态:follow_team=随团队(清空该成员的类型行);custom=按 ticket_types 整体替换。缺省且带 ticket_types ⇒ 按 custom;都不带 ⇒ 不动类型
  2115. enum:
  2116. - follow_team
  2117. - custom
  2118. member_id:
  2119. type: string
  2120. description: 成员 ID
  2121. display_name:
  2122. type: string
  2123. description: 成员姓名新值;1~64 字符、不含控制字符;缺省=不改,空串非法
  2124. mobile:
  2125. type: string
  2126. description: 手机号(可选)
  2127. required:
  2128. - team_id
  2129. - member_id
  2130. required:
  2131. - data
  2132. responses:
  2133. "200":
  2134. description: 成功。统一信封 code/message/data
  2135. /ops_team/member_remove@v1:
  2136. post:
  2137. summary: 移除运维成员
  2138. description: 删除前五项检查并注销账号。
  2139. operationId: ops_team_member_remove
  2140. tags:
  2141. - 运维团队与成员
  2142. x-require-auth: true
  2143. x-resource-type: bos.ops_team
  2144. x-action: manage
  2145. x-version: v1
  2146. x-permission-visibility: catalog
  2147. requestBody:
  2148. required: true
  2149. description: JSON 请求体,业务字段置于 data
  2150. content:
  2151. application/json:
  2152. schema:
  2153. type: object
  2154. description: 统一信封请求体,业务字段放在 data 内
  2155. properties:
  2156. data:
  2157. type: object
  2158. description: 业务参数
  2159. properties:
  2160. team_id:
  2161. type: string
  2162. description: 团队 ID
  2163. member_id:
  2164. type: string
  2165. description: 成员 ID
  2166. required:
  2167. - team_id
  2168. - member_id
  2169. required:
  2170. - data
  2171. responses:
  2172. "200":
  2173. description: 成功。统一信封 code/message/data
  2174. /ops_member/scope/save@v1:
  2175. post:
  2176. summary: 保存运维成员负责范围
  2177. description: 三个范围写入口之二。scope_mode∈follow_team/region/customer;越界报错不保存。
  2178. operationId: ops_member_scope_save
  2179. tags:
  2180. - 运维团队与成员
  2181. x-require-auth: true
  2182. x-resource-type: bos.ops_member.scope
  2183. x-action: manage
  2184. x-version: v1
  2185. x-permission-visibility: catalog
  2186. requestBody:
  2187. required: true
  2188. description: JSON 请求体,业务字段置于 data
  2189. content:
  2190. application/json:
  2191. schema:
  2192. type: object
  2193. description: 统一信封请求体,业务字段放在 data 内
  2194. properties:
  2195. data:
  2196. type: object
  2197. description: 业务参数
  2198. properties:
  2199. member_id:
  2200. type: string
  2201. description: 成员 ID
  2202. scope_mode:
  2203. type: string
  2204. description: 范围模式:follow_team=跟随团队;region=按区域;customer=按客户
  2205. enum:
  2206. - follow_team
  2207. - region
  2208. - customer
  2209. targets:
  2210. type: array
  2211. description: region/customer 模式下的目标 ID 列表
  2212. items:
  2213. type: string
  2214. description: 目标 ID
  2215. required:
  2216. - member_id
  2217. - scope_mode
  2218. required:
  2219. - data
  2220. responses:
  2221. "200":
  2222. description: 成功。统一信封 code/message/data
  2223. /ops_team/dispatch_mode/update@v1:
  2224. post:
  2225. summary: 更新分派方式
  2226. description: 与运营侧改同一字段,后写入者生效;默认补记审计。
  2227. operationId: ops_team_dispatch_mode_update
  2228. tags:
  2229. - 运维团队与成员
  2230. x-require-auth: true
  2231. x-resource-type: bos.ops_team.dispatch_mode
  2232. x-action: update
  2233. x-version: v1
  2234. x-permission-visibility: catalog
  2235. requestBody:
  2236. required: true
  2237. description: JSON 请求体,业务字段置于 data
  2238. content:
  2239. application/json:
  2240. schema:
  2241. type: object
  2242. description: 统一信封请求体,业务字段放在 data 内
  2243. properties:
  2244. data:
  2245. type: object
  2246. description: 业务参数
  2247. properties:
  2248. team_id:
  2249. type: string
  2250. description: 团队 ID
  2251. dispatch_mode:
  2252. type: string
  2253. description: 分派方式:manual=手工;auto_avg=自动均分
  2254. enum:
  2255. - manual
  2256. - auto_avg
  2257. required:
  2258. - team_id
  2259. - dispatch_mode
  2260. required:
  2261. - data
  2262. responses:
  2263. "200":
  2264. description: 成功。统一信封 code/message/data
  2265. /ops_team/coverage/get@v1:
  2266. post:
  2267. summary: 运维团队覆盖客户
  2268. description: 覆盖客户=团队区域范围(Tree) ∩ 本类型归属(Owner),与列表分页同源。注意:2026-11-08 由 GET 改 POST(R-5)。
  2269. operationId: ops_team_coverage_get
  2270. tags:
  2271. - 运维团队与成员
  2272. x-require-auth: true
  2273. x-resource-type: bos.ops_team.coverage
  2274. x-action: view
  2275. x-version: v1
  2276. x-permission-visibility: catalog
  2277. x-enumeration-kind: list
  2278. requestBody:
  2279. required: true
  2280. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  2281. content:
  2282. application/json:
  2283. schema:
  2284. type: object
  2285. properties:
  2286. data:
  2287. type: object
  2288. description: 无业务参数
  2289. required:
  2290. - data
  2291. responses:
  2292. "200":
  2293. description: 成功。统一信封 code/message/data
  2294. /customer/create@v1:
  2295. post:
  2296. summary: 新建客户
  2297. description: 客户建档(Opt-11 先挂树后建档)。`mount_request_id` 与 `parent_node_id` 至少给一个:给 `parent_node_id` 时由本接口完成「发号 → 平台资源树注册客户实例 → 回填挂载事实」;给 `mount_request_id` 时就近认领已存在的挂载申请。同时按 组织§4.5 为客户开通主账号(`primary_username` 留空=按主体号自动派生)。完整弹窗字段还可含识别号、联系人、地址、运维团队等。
  2298. operationId: customer_create
  2299. tags:
  2300. - 客户管理
  2301. x-require-auth: true
  2302. x-resource-type: bos.customer
  2303. x-action: create
  2304. x-version: v1
  2305. x-permission-visibility: catalog
  2306. requestBody:
  2307. required: true
  2308. description: JSON 请求体,业务字段置于 data
  2309. content:
  2310. application/json:
  2311. schema:
  2312. type: object
  2313. description: 统一信封请求体,业务字段放在 data 内
  2314. properties:
  2315. data:
  2316. type: object
  2317. description: 业务参数
  2318. properties:
  2319. customer_name:
  2320. type: string
  2321. description: 客户名称
  2322. subject_type:
  2323. type: string
  2324. description: 主体类型
  2325. operator_id:
  2326. type: string
  2327. description: 归属运营商 ID
  2328. partner_id:
  2329. type: string
  2330. description: 归属合伙人 ID(可选)
  2331. mount_request_id:
  2332. type: string
  2333. description: 挂载申请 ID(与 parent_node_id 二选一;有值=认领已有的挂载事实)
  2334. parent_node_id:
  2335. type: string
  2336. description: 所挂区域父节点 ID(与 mount_request_id 二选一;有值=由本接口完成平台挂树并回填挂载事实)
  2337. id_code:
  2338. type: string
  2339. description: 识别号(可选)
  2340. contact_name:
  2341. type: string
  2342. description: 联系人(可选)
  2343. contact_mobile:
  2344. type: string
  2345. description: 联系电话(可选)
  2346. address:
  2347. type: string
  2348. description: 地址(可选)
  2349. ops_team_ids:
  2350. type: array
  2351. description: 所挂运维团队 ID(**单支定案** 2026-11-12:建档必填**恰好 1 支**,数组形态仅兼容调用方;缺支/空数组/>1 支一律拒绝,且须在操作人负责范围内)
  2352. items:
  2353. type: string
  2354. description: 运维团队 ID
  2355. primary_username:
  2356. type: string
  2357. description: 客户主账号登录名(可选;留空=按主体号自动派生)。本接口自行调平台 iam-user/user/create@v1 建号
  2358. primary_mobile:
  2359. type: string
  2360. description: 客户主账号手机号(可选)
  2361. license:
  2362. type: object
  2363. description: 登记材料(营业执照影像,客户§2.1/§3.5;`U-97` 2026-11-03 定案)。影像本体由浏览器持自身账号票直传平台 `unified-oss`(本服务不收字节流、不开上传接口),建档只回报落库用的对象键+原始文件名。`object_key` 必须落在 `klt/customer/license/` 前缀下
  2364. properties:
  2365. object_key:
  2366. type: string
  2367. description: 平台 unified-oss 逻辑键(1–512 字符,须以 klt/customer/license/ 开头;不得是 URL/签名链接)
  2368. file_name:
  2369. type: string
  2370. description: 原始文件名(1–128 字符,不含路径分隔符;仅供页面展示)
  2371. required:
  2372. - object_key
  2373. - file_name
  2374. required:
  2375. - customer_name
  2376. - subject_type
  2377. - operator_id
  2378. required:
  2379. - data
  2380. responses:
  2381. "200":
  2382. description: 成功。统一信封 code/message/data
  2383. /customer/get_list@v1:
  2384. post:
  2385. summary: 客户列表
  2386. description: 按可见范围返回客户列表,支持筛选与分页。
  2387. operationId: customer_get_list
  2388. tags:
  2389. - 客户管理
  2390. x-require-auth: true
  2391. x-resource-type: bos.customer
  2392. x-action: list
  2393. x-version: v1
  2394. x-permission-visibility: catalog
  2395. requestBody:
  2396. required: true
  2397. description: JSON 请求体,业务字段置于 data
  2398. content:
  2399. application/json:
  2400. schema:
  2401. type: object
  2402. description: 统一信封请求体,业务字段放在 data 内
  2403. properties:
  2404. data:
  2405. type: object
  2406. description: 列表筛选参数
  2407. properties:
  2408. page:
  2409. type: integer
  2410. description: 页码(0 基索引,默认 0)
  2411. minimum: 0
  2412. default: 0
  2413. page_size:
  2414. type: integer
  2415. description: 每页条数(默认 20,上限 200)
  2416. minimum: 1
  2417. maximum: 200
  2418. default: 20
  2419. keyword:
  2420. type: string
  2421. description: 关键字筛选(可选)
  2422. region_node_id:
  2423. type: string
  2424. description: 区域筛选(可选)
  2425. operator_id:
  2426. type: string
  2427. description: 运营商筛选(可选)
  2428. partner_id:
  2429. type: string
  2430. description: 合伙人筛选(可选)
  2431. status:
  2432. type: string
  2433. description: 状态筛选(可选)
  2434. required:
  2435. - data
  2436. responses:
  2437. "200":
  2438. description: 成功。统一信封 code/message/data
  2439. /customer/get@v1:
  2440. post:
  2441. summary: 客户详情
  2442. description: 按客户 ID 查询档案详情;回显主体资料(含经办联系人/联系电话/地址,脱敏识别号)与当期团队、区域挂载、分账号数,以及登记材料摘要 `license{file_name, status, view_url, view_url_expires_at}`(客户§3.5 第八分区)。`status ∈ none/viewable/expired`:`none`=未登记影像,`viewable`=可查看(`view_url` 为平台 `unified-oss` 短时效下载签名、TTL 取平台通道默认),`expired`=`now − customer.created_at > license_image_retention_days`(默认 3650 天,起算点=建档日、重新上传不重置)⇒ 两格为 `null`。注意:对象键不上响应体、签名不落库。
  2443. operationId: customer_get
  2444. tags:
  2445. - 客户管理
  2446. x-require-auth: true
  2447. x-resource-type: bos.customer
  2448. x-action: view
  2449. x-version: v1
  2450. x-permission-visibility: catalog
  2451. requestBody:
  2452. required: true
  2453. description: JSON 请求体,业务字段置于 data
  2454. content:
  2455. application/json:
  2456. schema:
  2457. type: object
  2458. description: 统一信封请求体,业务字段放在 data 内
  2459. properties:
  2460. data:
  2461. type: object
  2462. description: 业务参数
  2463. properties:
  2464. customer_id:
  2465. type: string
  2466. description: 客户 ID
  2467. required:
  2468. - customer_id
  2469. required:
  2470. - data
  2471. responses:
  2472. "200":
  2473. description: 成功。统一信封 code/message/data
  2474. /customer/update@v1:
  2475. post:
  2476. summary: 编辑客户
  2477. description: 编辑客户资料。拒收改写 customer_id/region_node_id/operator_id/partner_id;改识别号须带 change_basis。
  2478. operationId: customer_update
  2479. tags:
  2480. - 客户管理
  2481. x-require-auth: true
  2482. x-resource-type: bos.customer
  2483. x-action: update
  2484. x-version: v1
  2485. x-permission-visibility: catalog
  2486. requestBody:
  2487. required: true
  2488. description: JSON 请求体,业务字段置于 data
  2489. content:
  2490. application/json:
  2491. schema:
  2492. type: object
  2493. description: 统一信封请求体,业务字段放在 data 内
  2494. properties:
  2495. data:
  2496. type: object
  2497. description: 业务参数
  2498. properties:
  2499. customer_id:
  2500. type: string
  2501. description: 客户 ID
  2502. customer_name:
  2503. type: string
  2504. description: 客户名称
  2505. subject_type:
  2506. type: string
  2507. description: 主体类型
  2508. id_code:
  2509. type: string
  2510. description: 识别号
  2511. change_basis:
  2512. type: string
  2513. description: 改识别号时的变更依据
  2514. contact_name:
  2515. type: string
  2516. description: 联系人
  2517. contact_mobile:
  2518. type: string
  2519. description: 联系电话
  2520. address:
  2521. type: string
  2522. description: 地址
  2523. ops_team_ids:
  2524. type: array
  2525. description: 改派运维团队(整体替换当前归属;**单支定案**:最多 1 支——空数组=清空归属⇒拒绝,>1 支⇒拒绝;不提交=不改动)
  2526. items:
  2527. type: string
  2528. description: 运维团队 ID
  2529. row_version:
  2530. type: integer
  2531. description: 乐观锁版本(若启用)
  2532. license:
  2533. type: object
  2534. description: 登记材料(营业执照影像)**整对替换**(客户§3.5 补传/替换,写入口只在本分区)。不提交=本次不动影像(不清空);**唯一例外**:本次把 `subject_type` 改为非企业(`individual`/`sole_proprietor`)且库内有影像 ⇒ 影像随本笔**同批撤销**(两列置 `NULL`+`license_file_name` 变更留痕,见 2026-11-15 死锁修复);企业→企业不带 `license` 一律不动影像;企业客户库内无影像且本次也不提交 ⇒ 按企业条件必填拒绝(`11103` 口径)。`object_key` 须落在 `klt/customer/license/` 下
  2535. properties:
  2536. object_key:
  2537. type: string
  2538. description: 平台 unified-oss 逻辑键(1–512 字符,须以 klt/customer/license/ 开头)
  2539. file_name:
  2540. type: string
  2541. description: 原始文件名(1–128 字符,不含路径分隔符)
  2542. required:
  2543. - object_key
  2544. - file_name
  2545. required:
  2546. - customer_id
  2547. required:
  2548. - data
  2549. responses:
  2550. "200":
  2551. description: 成功。统一信封 code/message/data
  2552. /customer/delete_precheck@v1:
  2553. post:
  2554. summary: 客户删除前置检查
  2555. description: 返回 can_delete 与 reasons,供删除确认弹窗使用。
  2556. operationId: customer_delete_precheck
  2557. tags:
  2558. - 客户管理
  2559. x-require-auth: true
  2560. x-resource-type: bos.customer
  2561. x-action: view
  2562. x-version: v1
  2563. x-permission-visibility: catalog
  2564. requestBody:
  2565. required: true
  2566. description: JSON 请求体,业务字段置于 data
  2567. content:
  2568. application/json:
  2569. schema:
  2570. type: object
  2571. description: 统一信封请求体,业务字段放在 data 内
  2572. properties:
  2573. data:
  2574. type: object
  2575. description: 业务参数
  2576. properties:
  2577. customer_id:
  2578. type: string
  2579. description: 客户 ID
  2580. required:
  2581. - customer_id
  2582. required:
  2583. - data
  2584. responses:
  2585. "200":
  2586. description: 成功。统一信封 code/message/data
  2587. /customer/delete@v1:
  2588. post:
  2589. summary: 删除客户
  2590. description: 删除客户;须携带删除前置检查时的阻塞快照版本。
  2591. operationId: customer_delete
  2592. tags:
  2593. - 客户管理
  2594. x-require-auth: true
  2595. x-resource-type: bos.customer
  2596. x-action: delete
  2597. x-version: v1
  2598. x-permission-visibility: catalog
  2599. requestBody:
  2600. required: true
  2601. description: JSON 请求体,业务字段置于 data
  2602. content:
  2603. application/json:
  2604. schema:
  2605. type: object
  2606. description: 统一信封请求体,业务字段放在 data 内
  2607. properties:
  2608. data:
  2609. type: object
  2610. description: 业务参数
  2611. properties:
  2612. customer_id:
  2613. type: string
  2614. description: 客户 ID
  2615. precheck_version:
  2616. type: string
  2617. description: 删除前置检查快照版本
  2618. required:
  2619. - customer_id
  2620. required:
  2621. - data
  2622. responses:
  2623. "200":
  2624. description: 成功。统一信封 code/message/data
  2625. /customer/history@v1:
  2626. post:
  2627. summary: 客户变更历史
  2628. description: 查询客户档案变更流水。
  2629. operationId: customer_history
  2630. tags:
  2631. - 客户管理
  2632. x-require-auth: true
  2633. x-resource-type: bos.customer
  2634. x-action: view
  2635. x-version: v1
  2636. x-permission-visibility: catalog
  2637. requestBody:
  2638. required: true
  2639. description: JSON 请求体,业务字段置于 data
  2640. content:
  2641. application/json:
  2642. schema:
  2643. type: object
  2644. description: 统一信封请求体,业务字段放在 data 内
  2645. properties:
  2646. data:
  2647. type: object
  2648. description: 业务参数
  2649. properties:
  2650. customer_id:
  2651. type: string
  2652. description: 客户 ID
  2653. page:
  2654. type: integer
  2655. description: 页码(0 基索引,默认 0)
  2656. minimum: 0
  2657. default: 0
  2658. page_size:
  2659. type: integer
  2660. description: 每页条数(默认 20,上限 200)
  2661. minimum: 1
  2662. maximum: 200
  2663. default: 20
  2664. keyword:
  2665. type: string
  2666. description: 关键字筛选(可选)
  2667. required:
  2668. - customer_id
  2669. required:
  2670. - data
  2671. responses:
  2672. "200":
  2673. description: 成功。统一信封 code/message/data
  2674. /customer/mount_candidates@v1:
  2675. post:
  2676. summary: 改挂候选客户
  2677. description: 返回操作人可见范围内可作为改挂目标的候选客户列表。注意:2026-11-08 由 GET 改 POST(R-5)。
  2678. operationId: customer_mount_candidates
  2679. tags:
  2680. - 客户管理
  2681. x-require-auth: true
  2682. x-resource-type: bos.customer
  2683. x-action: view
  2684. x-version: v1
  2685. x-permission-visibility: catalog
  2686. x-enumeration-kind: list
  2687. requestBody:
  2688. required: true
  2689. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  2690. content:
  2691. application/json:
  2692. schema:
  2693. type: object
  2694. properties:
  2695. data:
  2696. type: object
  2697. description: 无业务参数
  2698. required:
  2699. - data
  2700. responses:
  2701. "200":
  2702. description: 成功。统一信封 code/message/data
  2703. /customer/influence@v1:
  2704. post:
  2705. summary: 改挂影响面
  2706. description: 改挂前必做前置:未办完工单数、当前责任人与团队、当期是否已出账等。
  2707. operationId: customer_influence
  2708. tags:
  2709. - 客户管理
  2710. x-require-auth: true
  2711. x-resource-type: bos.customer
  2712. x-action: view
  2713. x-version: v1
  2714. x-permission-visibility: catalog
  2715. requestBody:
  2716. required: true
  2717. description: JSON 请求体,业务字段置于 data
  2718. content:
  2719. application/json:
  2720. schema:
  2721. type: object
  2722. description: 统一信封请求体,业务字段放在 data 内
  2723. properties:
  2724. data:
  2725. type: object
  2726. description: 业务参数
  2727. properties:
  2728. customer_id:
  2729. type: string
  2730. description: 客户 ID
  2731. required:
  2732. - customer_id
  2733. required:
  2734. - data
  2735. responses:
  2736. "200":
  2737. description: 成功。统一信封 code/message/data
  2738. /customer/move_region@v1:
  2739. post:
  2740. summary: 客户改挂区域
  2741. description: 复合事务改挂区域;新区域省份须等于归属运营商档案省份。
  2742. operationId: customer_move_region
  2743. tags:
  2744. - 客户管理
  2745. x-require-auth: true
  2746. x-resource-type: bos.customer
  2747. x-action: update
  2748. x-version: v1
  2749. x-permission-visibility: catalog
  2750. requestBody:
  2751. required: true
  2752. description: JSON 请求体,业务字段置于 data
  2753. content:
  2754. application/json:
  2755. schema:
  2756. type: object
  2757. description: 统一信封请求体,业务字段放在 data 内
  2758. properties:
  2759. data:
  2760. type: object
  2761. description: 业务参数
  2762. properties:
  2763. customer_id:
  2764. type: string
  2765. description: 客户 ID
  2766. new_region_node_id:
  2767. type: string
  2768. description: 新挂载区域节点 ID
  2769. ops_team_ids:
  2770. type: array
  2771. description: 随改挂重绑的运维团队(**单支定案**:最多 1 支;不提交=不改动)
  2772. items:
  2773. type: string
  2774. description: 运维团队 ID
  2775. required:
  2776. - customer_id
  2777. - new_region_node_id
  2778. required:
  2779. - data
  2780. responses:
  2781. "200":
  2782. description: 成功。统一信封 code/message/data
  2783. /customer/attribution/update@v1:
  2784. post:
  2785. summary: 更新客户归属
  2786. description: 改归属运营商/合伙人;改运营商时档案省份须等于客户所挂区域省份。
  2787. operationId: customer_attribution_update
  2788. tags:
  2789. - 客户管理
  2790. x-require-auth: true
  2791. x-resource-type: bos.customer.attribution
  2792. x-action: update
  2793. x-version: v1
  2794. x-permission-visibility: catalog
  2795. requestBody:
  2796. required: true
  2797. description: JSON 请求体,业务字段置于 data
  2798. content:
  2799. application/json:
  2800. schema:
  2801. type: object
  2802. description: 统一信封请求体,业务字段放在 data 内
  2803. properties:
  2804. data:
  2805. type: object
  2806. description: 业务参数
  2807. properties:
  2808. customer_id:
  2809. type: string
  2810. description: 客户 ID
  2811. operator_id:
  2812. type: string
  2813. description: 新归属运营商 ID(可选)
  2814. partner_id:
  2815. type: string
  2816. description: 新归属合伙人 ID(可选,可清空)
  2817. required:
  2818. - customer_id
  2819. required:
  2820. - data
  2821. responses:
  2822. "200":
  2823. description: 成功。统一信封 code/message/data
  2824. /import_batch/template_download@v1:
  2825. get:
  2826. summary: 下载导入模板
  2827. description: 返回 14 列 xlsx 模板说明(format/columns/max_rows)。
  2828. operationId: import_batch_template_download
  2829. tags:
  2830. - 批量导入
  2831. x-require-auth: true
  2832. x-resource-type: bos.import_batch
  2833. x-action: export
  2834. x-version: v1
  2835. x-permission-visibility: catalog
  2836. responses:
  2837. "200":
  2838. description: 成功。统一信封 code/message/data
  2839. /import_batch/submit@v1:
  2840. post:
  2841. summary: 提交客户批量导入
  2842. description: 提交导入行对象列表,单批上限 500 行。列含客户名称、识别号、主体类型、联系人、电话、地址、区域、运营商、合伙人、运维团队、主账号等。
  2843. operationId: import_batch_submit
  2844. tags:
  2845. - 批量导入
  2846. x-require-auth: true
  2847. x-resource-type: bos.import_batch
  2848. x-action: create
  2849. x-version: v1
  2850. x-permission-visibility: catalog
  2851. requestBody:
  2852. required: true
  2853. description: JSON 请求体,业务字段置于 data
  2854. content:
  2855. application/json:
  2856. schema:
  2857. type: object
  2858. description: 统一信封请求体,业务字段放在 data 内
  2859. properties:
  2860. data:
  2861. type: object
  2862. description: 业务参数
  2863. properties:
  2864. rows:
  2865. type: array
  2866. description: 导入行对象列表(≤500)
  2867. maxItems: 500
  2868. items:
  2869. type: object
  2870. description: 单行导入字段(14 列)
  2871. properties:
  2872. row_no:
  2873. type: integer
  2874. description: 行编号
  2875. customer_name:
  2876. type: string
  2877. description: 客户名称
  2878. id_code:
  2879. type: string
  2880. description: 识别号
  2881. subject_type:
  2882. type: string
  2883. description: 主体类型
  2884. contact_name:
  2885. type: string
  2886. description: 联系人
  2887. contact_mobile:
  2888. type: string
  2889. description: 联系电话
  2890. address:
  2891. type: string
  2892. description: 地址
  2893. region_name:
  2894. type: string
  2895. description: 所挂区域
  2896. operator_name:
  2897. type: string
  2898. description: 运营商
  2899. partner_name:
  2900. type: string
  2901. description: 合伙人
  2902. ops_team_names:
  2903. type: array
  2904. description: 所挂运维团队名称(**单支定案** 2026-11-12:建档必填**恰好 1 支**——一格只填一支名称,不得用「;」分隔多支;留空或多支=该行校验失败)
  2905. items:
  2906. type: string
  2907. description: 运维团队名称
  2908. primary_username:
  2909. type: string
  2910. description: 主账号登录名
  2911. primary_mobile:
  2912. type: string
  2913. description: 主账号手机号
  2914. required:
  2915. - rows
  2916. required:
  2917. - data
  2918. responses:
  2919. "200":
  2920. description: 成功。统一信封 code/message/data
  2921. /import_batch/get_list@v1:
  2922. post:
  2923. summary: 导入批次列表
  2924. description: 查询本人可见范围内的导入批次。
  2925. operationId: import_batch_get_list
  2926. tags:
  2927. - 批量导入
  2928. x-require-auth: true
  2929. x-resource-type: bos.import_batch
  2930. x-action: list
  2931. x-version: v1
  2932. x-permission-visibility: catalog
  2933. requestBody:
  2934. required: true
  2935. description: JSON 请求体,业务字段置于 data
  2936. content:
  2937. application/json:
  2938. schema:
  2939. type: object
  2940. description: 统一信封请求体,业务字段放在 data 内
  2941. properties:
  2942. data:
  2943. type: object
  2944. description: 列表筛选参数
  2945. properties:
  2946. page:
  2947. type: integer
  2948. description: 页码(0 基索引,默认 0)
  2949. minimum: 0
  2950. default: 0
  2951. page_size:
  2952. type: integer
  2953. description: 每页条数(默认 20,上限 200)
  2954. minimum: 1
  2955. maximum: 200
  2956. default: 20
  2957. keyword:
  2958. type: string
  2959. description: 关键字筛选(可选)
  2960. required:
  2961. - data
  2962. responses:
  2963. "200":
  2964. description: 成功。统一信封 code/message/data
  2965. /import_batch/get@v1:
  2966. post:
  2967. summary: 导入批次详情
  2968. description: 按批次 ID/编号查询详情与行状态。
  2969. operationId: import_batch_get
  2970. tags:
  2971. - 批量导入
  2972. x-require-auth: true
  2973. x-resource-type: bos.import_batch
  2974. x-action: view
  2975. x-version: v1
  2976. x-permission-visibility: catalog
  2977. requestBody:
  2978. required: true
  2979. description: JSON 请求体,业务字段置于 data
  2980. content:
  2981. application/json:
  2982. schema:
  2983. type: object
  2984. description: 统一信封请求体,业务字段放在 data 内
  2985. properties:
  2986. data:
  2987. type: object
  2988. description: 业务参数
  2989. properties:
  2990. batch_id:
  2991. type: string
  2992. description: 批次 ID(与 batch_no 二选一)
  2993. batch_no:
  2994. type: string
  2995. description: 批次编号(与 batch_id 二选一)
  2996. required:
  2997. - data
  2998. responses:
  2999. "200":
  3000. description: 成功。统一信封 code/message/data
  3001. /import_batch/resume@v1:
  3002. post:
  3003. summary: 失败行续传
  3004. description: 针对失败行提交续传数据,行号对应原 row_no。
  3005. operationId: import_batch_resume
  3006. tags:
  3007. - 批量导入
  3008. x-require-auth: true
  3009. x-resource-type: bos.import_batch
  3010. x-action: update
  3011. x-version: v1
  3012. x-permission-visibility: catalog
  3013. requestBody:
  3014. required: true
  3015. description: JSON 请求体,业务字段置于 data
  3016. content:
  3017. application/json:
  3018. schema:
  3019. type: object
  3020. description: 统一信封请求体,业务字段放在 data 内
  3021. properties:
  3022. data:
  3023. type: object
  3024. description: 业务参数
  3025. properties:
  3026. batch_id:
  3027. type: string
  3028. description: 批次 ID
  3029. rows:
  3030. type: array
  3031. description: 续传行列表(含原 row_no)
  3032. items:
  3033. type: object
  3034. required:
  3035. - batch_id
  3036. - rows
  3037. required:
  3038. - data
  3039. responses:
  3040. "200":
  3041. description: 成功。统一信封 code/message/data
  3042. /import_batch/export_codes@v1:
  3043. post:
  3044. summary: 按批次导出激活码
  3045. description: 语义同账号导出(与 `/account/export_codes@v1` 共用分片/翻页/审计/出参);须传批次与按本人可见范围收窄后的 user_ids(不可传空列表:空值=项目内全量);scope 服务端派生,不收 scope_type/scope_id;validity 默认 `valid`,不接受 `active`。出参含 `batch_id`/`batch_no` 与 `items[].plaintext`(只回显一次,逐次审计);批次可见性先过第一道收窄。D-84 口径(产品 2026-11-15 确认):「按批次」只是取数入口,交付范围=本人可见账号集(`user_ids` 已与本人可见范围求交),不再与 `import_batch_row` 的批次行账号求交;调用方因此不得把该接口理解为「只导出该批次产生的账号」。
  3046. operationId: import_batch_export_codes
  3047. tags:
  3048. - 批量导入
  3049. x-require-auth: true
  3050. x-resource-type: bos.import_batch
  3051. x-action: export
  3052. x-version: v1
  3053. x-permission-visibility: catalog
  3054. requestBody:
  3055. required: true
  3056. description: JSON 请求体,业务字段置于 data
  3057. content:
  3058. application/json:
  3059. schema:
  3060. type: object
  3061. description: 统一信封请求体,业务字段放在 data 内
  3062. properties:
  3063. data:
  3064. type: object
  3065. description: 业务参数
  3066. properties:
  3067. batch_id:
  3068. type: string
  3069. description: 批次 ID
  3070. user_ids:
  3071. type: array
  3072. description: 按本人可见范围收窄后的用户 ID 列表(不可传空列表:平台侧空值=项目内全量导出)
  3073. minItems: 1
  3074. items:
  3075. type: string
  3076. description: 用户 ID
  3077. validity:
  3078. type: string
  3079. description: 导出口径(平台取值域):valid=仍有效(只读,缺省);expired=已过期(写);all=全部(写)。不接受 active
  3080. default: valid
  3081. enum:
  3082. - valid
  3083. - expired
  3084. - all
  3085. required:
  3086. - batch_id
  3087. - user_ids
  3088. required:
  3089. - data
  3090. responses:
  3091. "200":
  3092. description: 成功。统一信封 code/message/data
  3093. /import_batch/export_customers@v1:
  3094. post:
  3095. summary: 按批次导出客户
  3096. description: 按导入批次导出客户 15 列结果。
  3097. operationId: import_batch_export_customers
  3098. tags:
  3099. - 批量导入
  3100. x-require-auth: true
  3101. x-resource-type: bos.import_batch
  3102. x-action: export
  3103. x-version: v1
  3104. x-permission-visibility: catalog
  3105. requestBody:
  3106. required: true
  3107. description: JSON 请求体,业务字段置于 data
  3108. content:
  3109. application/json:
  3110. schema:
  3111. type: object
  3112. description: 统一信封请求体,业务字段放在 data 内
  3113. properties:
  3114. data:
  3115. type: object
  3116. description: 业务参数
  3117. properties:
  3118. batch_id:
  3119. type: string
  3120. description: 批次 ID
  3121. required:
  3122. - batch_id
  3123. required:
  3124. - data
  3125. responses:
  3126. "200":
  3127. description: 成功。统一信封 code/message/data
  3128. /sub_account/get_list@v1:
  3129. post:
  3130. summary: 分账号列表
  3131. description: 查询客户下属分账号列表。
  3132. operationId: sub_account_get_list
  3133. tags:
  3134. - 账号管理
  3135. x-require-auth: true
  3136. x-resource-type: bos.sub_account
  3137. x-action: list
  3138. x-version: v1
  3139. x-permission-visibility: catalog
  3140. requestBody:
  3141. required: true
  3142. description: JSON 请求体,业务字段置于 data
  3143. content:
  3144. application/json:
  3145. schema:
  3146. type: object
  3147. description: 统一信封请求体,业务字段放在 data 内
  3148. properties:
  3149. data:
  3150. type: object
  3151. description: 业务参数
  3152. properties:
  3153. customer_id:
  3154. type: string
  3155. description: 客户 ID
  3156. page:
  3157. type: integer
  3158. description: 页码(0 基索引,默认 0)
  3159. minimum: 0
  3160. default: 0
  3161. page_size:
  3162. type: integer
  3163. description: 每页条数(默认 20,上限 200)
  3164. minimum: 1
  3165. maximum: 200
  3166. default: 20
  3167. keyword:
  3168. type: string
  3169. description: 关键字筛选(可选)
  3170. required:
  3171. - customer_id
  3172. required:
  3173. - data
  3174. responses:
  3175. "200":
  3176. description: 成功。统一信封 code/message/data
  3177. /sub_account/update@v1:
  3178. post:
  3179. summary: 更新分账号
  3180. description: 运营可改 display_name 与 network_account_name;客户主账号只许改 display_name。
  3181. operationId: sub_account_update
  3182. tags:
  3183. - 账号管理
  3184. x-require-auth: true
  3185. x-resource-type: bos.sub_account
  3186. x-action: update
  3187. x-version: v1
  3188. x-permission-visibility: catalog
  3189. requestBody:
  3190. required: true
  3191. description: JSON 请求体,业务字段置于 data
  3192. content:
  3193. application/json:
  3194. schema:
  3195. type: object
  3196. description: 统一信封请求体,业务字段放在 data 内
  3197. properties:
  3198. data:
  3199. type: object
  3200. description: 业务参数
  3201. properties:
  3202. sub_account_id:
  3203. type: string
  3204. description: 分账号 ID
  3205. display_name:
  3206. type: string
  3207. description: 显示名称/用途说明
  3208. network_account_name:
  3209. type: string
  3210. description: 网络侧账号名(运营可改)
  3211. required:
  3212. - sub_account_id
  3213. required:
  3214. - data
  3215. responses:
  3216. "200":
  3217. description: 成功。统一信封 code/message/data
  3218. /line_exit/get_list@v1:
  3219. post:
  3220. summary: 线路出口目录列表
  3221. description: 套餐配置统一维护的线路出口(去空白+小写去重)。合同条目、IP 条目等页面只从这里选择;任何登录角色可读。每条带 ref_count/ref_summary(被合同条目、IP 备案、派生档、订阅引用的合计与构成),>0 即目录侧不允许删除。
  3222. operationId: line_exit_get_list
  3223. tags:
  3224. - 套餐档位
  3225. x-require-auth: true
  3226. x-resource-type: bos.catalog
  3227. x-action: list
  3228. x-version: v1
  3229. x-permission-visibility: catalog
  3230. responses:
  3231. "200":
  3232. description: 成功。统一信封 code/message/data(data.items[]=exit_name/exit_key/sort_no/ref_count/ref_summary)
  3233. /line_exit/save@v1:
  3234. post:
  3235. summary: 线路出口目录整段全量替换
  3236. description: 总运营/运营主账号可写;数组顺序即展示顺序。被合同条目、IP 备案、派生档或订阅引用的出口不可删除(整单拒绝并点名引用数)。
  3237. operationId: line_exit_save
  3238. tags:
  3239. - 套餐档位
  3240. x-require-auth: true
  3241. x-resource-type: bos.catalog
  3242. x-action: update
  3243. x-version: v1
  3244. x-permission-visibility: catalog
  3245. requestBody:
  3246. required: true
  3247. description: JSON 请求体,业务字段置于 data
  3248. content:
  3249. application/json:
  3250. schema:
  3251. type: object
  3252. description: 统一信封请求体,业务字段放在 data 内
  3253. properties:
  3254. data:
  3255. type: object
  3256. description: 业务参数
  3257. properties:
  3258. items:
  3259. type: array
  3260. description: 线路出口整段(全量替换,上限 200 条)
  3261. maxItems: 200
  3262. items:
  3263. type: object
  3264. description: 单个出口
  3265. properties:
  3266. exit_name:
  3267. type: string
  3268. description: 国家/地区名称原文(1~64 字;去空白+小写后不可重复)
  3269. required:
  3270. - exit_name
  3271. required:
  3272. - items
  3273. required:
  3274. - data
  3275. responses:
  3276. "200":
  3277. description: 成功。统一信封 code/message/data
  3278. /ip_bandwidth_tier/get_list@v1:
  3279. post:
  3280. summary: IP 带宽档位目录列表
  3281. description: 套餐配置「线路出口」tab 内统一维护的 IP 带宽档位(2026-11-16 业主裁定:档位不再写死 5/10/30 兆),默认含 5/10/30 兆与「不承诺带宽」;合同固定 IP 条目只从这里选择;任何登录角色可读。每条带 ref_count/ref_summary(被合同 IP 备案引用的条数),>0 即目录侧不允许删除。
  3282. operationId: ip_bandwidth_tier_get_list
  3283. tags:
  3284. - 套餐档位
  3285. x-require-auth: true
  3286. x-resource-type: bos.catalog
  3287. x-action: list
  3288. x-version: v1
  3289. x-permission-visibility: catalog
  3290. responses:
  3291. "200":
  3292. description: 成功。统一信封 code/message/data(data.items[]=tier_key/tier_name/bandwidth_tier_mbps/bandwidth_committed/sort_no/ref_count/ref_summary)
  3293. /ip_bandwidth_tier/save@v1:
  3294. post:
  3295. summary: IP 带宽档位目录整段全量替换
  3296. description: 总运营/运营主账号可写;数组顺序即展示顺序;同一兆数只允许一条,「不承诺带宽」(bandwidth_tier_mbps 缺省或 null)全表唯一。被合同 IP 备案引用的档位不可删除(整单拒绝并点名引用条数)。
  3297. operationId: ip_bandwidth_tier_save
  3298. tags:
  3299. - 套餐档位
  3300. x-require-auth: true
  3301. x-resource-type: bos.catalog
  3302. x-action: update
  3303. x-version: v1
  3304. x-permission-visibility: catalog
  3305. requestBody:
  3306. required: true
  3307. description: JSON 请求体,业务字段置于 data
  3308. content:
  3309. application/json:
  3310. schema:
  3311. type: object
  3312. description: 统一信封请求体,业务字段放在 data 内
  3313. properties:
  3314. data:
  3315. type: object
  3316. description: 业务参数
  3317. properties:
  3318. items:
  3319. type: array
  3320. description: 带宽档位整段(全量替换,上限 50 条)
  3321. maxItems: 50
  3322. items:
  3323. type: object
  3324. description: 单个档位
  3325. properties:
  3326. tier_name:
  3327. type: string
  3328. description: 展示名称(1~64 字,如「10 兆」「不承诺带宽」)
  3329. bandwidth_tier_mbps:
  3330. type: integer
  3331. nullable: true
  3332. description: 带宽兆数(1~10000);缺省或 null=「不承诺带宽」
  3333. required:
  3334. - tier_name
  3335. required:
  3336. - items
  3337. required:
  3338. - data
  3339. responses:
  3340. "200":
  3341. description: 成功。统一信封 code/message/data
  3342. /catalog/create@v1:
  3343. post:
  3344. summary: 新建套餐档位
  3345. description: 新建固定/自定义档位。拒收 monthly_settle_cents、sub_mode、first_referred_at。自定义档必填 customer_id。
  3346. operationId: catalog_create
  3347. tags:
  3348. - 套餐档位
  3349. x-require-auth: true
  3350. x-resource-type: bos.catalog
  3351. x-action: create
  3352. x-version: v1
  3353. x-permission-visibility: catalog
  3354. requestBody:
  3355. required: true
  3356. description: JSON 请求体,业务字段置于 data
  3357. content:
  3358. application/json:
  3359. schema:
  3360. type: object
  3361. description: 统一信封请求体,业务字段放在 data 内
  3362. properties:
  3363. data:
  3364. type: object
  3365. description: 业务参数
  3366. properties:
  3367. plan_kind:
  3368. type: string
  3369. description: 档位类型:fixed=固定;custom=自定义
  3370. enum:
  3371. - fixed
  3372. - custom
  3373. plan_name:
  3374. type: string
  3375. description: 档位名称
  3376. plan_desc:
  3377. type: string
  3378. description: 套餐说明(报价单权益口径,可空;去首尾空白后 ≤512 字符,超长报 11103)。引用冻结后仍可改(与名称、随附成本项同档)
  3379. use_category:
  3380. type: string
  3381. description: 用途分类:office/live/ai/value_add/customized
  3382. annual_price_cents:
  3383. type: integer
  3384. description: 年价(分)
  3385. sub_account_quota:
  3386. type: integer
  3387. description: 分账号配额
  3388. bandwidth_committed:
  3389. type: boolean
  3390. description: 是否承诺带宽(界面「是否承诺带宽」开关):true=承诺(缺省,同列 DEFAULT TRUE);false=该档「不承诺带宽」,此时上行/下行两字段一律不传
  3391. bandwidth_up_mbps:
  3392. type: integer
  3393. description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填。不再有单值 total_bandwidth_mbps(2026-11-05 D8 关闭=该列退役,「总带宽」只是显示列名)
  3394. bandwidth_down_mbps:
  3395. type: integer
  3396. description: 下行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填;与上行同值时界面并显「上下行 N 兆」,不等显「下行 X 兆 / 上行 Y 兆」
  3397. customer_id:
  3398. type: string
  3399. description: 自定义档所属客户 ID(custom 必填)
  3400. required:
  3401. - plan_kind
  3402. - plan_name
  3403. - use_category
  3404. - annual_price_cents
  3405. required:
  3406. - data
  3407. responses:
  3408. "200":
  3409. description: 成功。统一信封 code/message/data
  3410. /catalog/update@v1:
  3411. post:
  3412. summary: 编辑套餐档位
  3413. description: 编辑档位;use_category 建后不可改;被订阅引用冻结后多数字段只读。
  3414. operationId: catalog_update
  3415. tags:
  3416. - 套餐档位
  3417. x-require-auth: true
  3418. x-resource-type: bos.catalog
  3419. x-action: update
  3420. x-version: v1
  3421. x-permission-visibility: catalog
  3422. requestBody:
  3423. required: true
  3424. description: JSON 请求体,业务字段置于 data
  3425. content:
  3426. application/json:
  3427. schema:
  3428. type: object
  3429. description: 统一信封请求体,业务字段放在 data 内
  3430. properties:
  3431. data:
  3432. type: object
  3433. description: 业务参数
  3434. properties:
  3435. plan_id:
  3436. type: string
  3437. description: 档位 ID
  3438. plan_name:
  3439. type: string
  3440. description: 档位名称
  3441. plan_desc:
  3442. type: string
  3443. description: 套餐说明(可空;传空串=清空成 null;≤512 字符)。引用冻结后仍可改
  3444. annual_price_cents:
  3445. type: integer
  3446. description: 年价(分)
  3447. sub_account_quota:
  3448. type: integer
  3449. description: 分账号配额
  3450. bandwidth_committed:
  3451. type: boolean
  3452. description: 是否承诺带宽:true=承诺(缺省);false=该档「不承诺带宽」,上下行两字段一律不传
  3453. bandwidth_up_mbps:
  3454. type: integer
  3455. description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填,关闭「是否承诺带宽」时必不传(档位被订阅引用后随整单只读,K204)
  3456. bandwidth_down_mbps:
  3457. type: integer
  3458. description: 下行带宽(Mbps,整数 1~1000);必填规则同上,两值不折算为单值
  3459. row_version:
  3460. type: integer
  3461. description: 乐观锁版本(若启用)
  3462. required:
  3463. - plan_id
  3464. required:
  3465. - data
  3466. responses:
  3467. "200":
  3468. description: 成功。统一信封 code/message/data
  3469. /catalog/get_list@v1:
  3470. post:
  3471. summary: 套餐档位列表
  3472. description: 按 plan_kind 等条件筛选档位列表。
  3473. operationId: catalog_get_list
  3474. tags:
  3475. - 套餐档位
  3476. x-require-auth: true
  3477. x-resource-type: bos.catalog
  3478. x-action: list
  3479. x-version: v1
  3480. x-permission-visibility: catalog
  3481. requestBody:
  3482. required: true
  3483. description: JSON 请求体,业务字段置于 data
  3484. content:
  3485. application/json:
  3486. schema:
  3487. type: object
  3488. description: 统一信封请求体,业务字段放在 data 内
  3489. properties:
  3490. data:
  3491. type: object
  3492. description: 列表筛选参数
  3493. properties:
  3494. page:
  3495. type: integer
  3496. description: 页码(0 基索引,默认 0)
  3497. minimum: 0
  3498. default: 0
  3499. page_size:
  3500. type: integer
  3501. description: 每页条数(默认 20,上限 200)
  3502. minimum: 1
  3503. maximum: 200
  3504. default: 20
  3505. keyword:
  3506. type: string
  3507. description: 关键字筛选(可选)
  3508. plan_kind:
  3509. type: string
  3510. description: 档位类型筛选:fixed/custom
  3511. use_category:
  3512. type: string
  3513. description: 用途分类筛选
  3514. customer_id:
  3515. type: string
  3516. description: 自定义档客户筛选
  3517. required:
  3518. - data
  3519. responses:
  3520. "200":
  3521. description: 成功。统一信封 code/message/data
  3522. /catalog/get@v1:
  3523. post:
  3524. summary: 套餐档位详情
  3525. description: 按档位 ID 查询详情。
  3526. operationId: catalog_get
  3527. tags:
  3528. - 套餐档位
  3529. x-require-auth: true
  3530. x-resource-type: bos.catalog
  3531. x-action: view
  3532. x-version: v1
  3533. x-permission-visibility: catalog
  3534. requestBody:
  3535. required: true
  3536. description: JSON 请求体,业务字段置于 data
  3537. content:
  3538. application/json:
  3539. schema:
  3540. type: object
  3541. description: 统一信封请求体,业务字段放在 data 内
  3542. properties:
  3543. data:
  3544. type: object
  3545. description: 业务参数
  3546. properties:
  3547. plan_id:
  3548. type: string
  3549. description: 档位 ID
  3550. required:
  3551. - plan_id
  3552. required:
  3553. - data
  3554. responses:
  3555. "200":
  3556. description: 成功。统一信封 code/message/data
  3557. /catalog/delete@v1:
  3558. post:
  3559. summary: 套餐档位条件删除
  3560. description: 按档位 ID 条件删除(第3册§3.7):引用份数+两栏阻塞清单(subscriptions/items),在用⇒KLT-K205;固定档仅 Admin。
  3561. operationId: catalog_delete
  3562. tags:
  3563. - 套餐档位
  3564. x-require-auth: true
  3565. x-resource-type: bos.catalog
  3566. x-action: delete
  3567. x-version: v1
  3568. x-permission-visibility: catalog
  3569. requestBody:
  3570. required: true
  3571. description: JSON 请求体,业务字段置于 data
  3572. content:
  3573. application/json:
  3574. schema:
  3575. type: object
  3576. description: 统一信封请求体,业务字段放在 data 内
  3577. properties:
  3578. data:
  3579. type: object
  3580. description: 业务参数
  3581. properties:
  3582. plan_id:
  3583. type: string
  3584. description: 档位 ID
  3585. required:
  3586. - plan_id
  3587. required:
  3588. - data
  3589. responses:
  3590. "200":
  3591. description: 成功。统一信封 code/message/data
  3592. /catalog/customer_options@v1:
  3593. post:
  3594. summary: 归属客户下拉
  3595. description: 只列操作人可见客户(自定义档归属客户下拉,第3册§3.2);硬上限 500 行⇒truncated。
  3596. operationId: catalog_customer_options
  3597. tags:
  3598. - 套餐档位
  3599. x-require-auth: true
  3600. x-resource-type: bos.catalog
  3601. x-action: list
  3602. x-version: v1
  3603. x-permission-visibility: catalog
  3604. requestBody:
  3605. required: true
  3606. description: JSON 请求体,业务字段置于 data
  3607. content:
  3608. application/json:
  3609. schema:
  3610. type: object
  3611. description: 统一信封请求体,业务字段放在 data 内
  3612. properties:
  3613. data:
  3614. type: object
  3615. description: 列表筛选参数
  3616. properties:
  3617. keyword:
  3618. type: string
  3619. description: 客户名称关键字(可选)
  3620. required:
  3621. - data
  3622. responses:
  3623. "200":
  3624. description: 成功。统一信封 code/message/data
  3625. /plan_cost_item/get_list@v1:
  3626. post:
  3627. summary: 档位随附成本项列表
  3628. description: 按档位读取随附成本项(第3册§3.5):名称是弱引用,不校验是否在全局清单;frozen 仅供前端提示。
  3629. operationId: plan_cost_item_get_list
  3630. tags:
  3631. - 套餐档位
  3632. x-require-auth: true
  3633. x-resource-type: bos.catalog
  3634. x-action: list
  3635. x-version: v1
  3636. x-permission-visibility: catalog
  3637. requestBody:
  3638. required: true
  3639. description: JSON 请求体,业务字段置于 data
  3640. content:
  3641. application/json:
  3642. schema:
  3643. type: object
  3644. description: 统一信封请求体,业务字段放在 data 内
  3645. properties:
  3646. data:
  3647. type: object
  3648. description: 业务参数
  3649. properties:
  3650. plan_id:
  3651. type: string
  3652. description: 档位 ID
  3653. required:
  3654. - plan_id
  3655. required:
  3656. - data
  3657. responses:
  3658. "200":
  3659. description: 成功。统一信封 code/message/data
  3660. /plan_cost_item/save@v1:
  3661. post:
  3662. summary: 档位随附成本项整段全量替换
  3663. description: 一次提交该档位全部成本项(先按 plan_id 删净再逐条插,第3册§3.5);同档位名称重复⇒KLT-K206。
  3664. operationId: plan_cost_item_save
  3665. tags:
  3666. - 套餐档位
  3667. x-require-auth: true
  3668. x-resource-type: bos.catalog
  3669. x-action: update
  3670. x-version: v1
  3671. x-permission-visibility: catalog
  3672. requestBody:
  3673. required: true
  3674. description: JSON 请求体,业务字段置于 data
  3675. content:
  3676. application/json:
  3677. schema:
  3678. type: object
  3679. description: 统一信封请求体,业务字段放在 data 内
  3680. properties:
  3681. data:
  3682. type: object
  3683. description: 业务参数
  3684. properties:
  3685. plan_id:
  3686. type: string
  3687. description: 档位 ID
  3688. items:
  3689. type: array
  3690. description: 成本项整段(全量替换,上限 50 条)
  3691. maxItems: 50
  3692. items:
  3693. type: object
  3694. description: 成本项条目
  3695. properties:
  3696. item_name:
  3697. type: string
  3698. description: 成本项名称(弱引用,1~128 字)
  3699. amount_cents:
  3700. type: integer
  3701. description: 金额(分,≥0)
  3702. minimum: 0
  3703. billing_unit:
  3704. type: string
  3705. description: 计费单位(可选)
  3706. enum:
  3707. - per_customer
  3708. - per_account
  3709. - per_copy
  3710. category:
  3711. type: string
  3712. description: 成本项分类(可选)
  3713. enum:
  3714. - intl_resource
  3715. - device_purchase
  3716. - project_fee
  3717. remark:
  3718. type: string
  3719. description: 备注(可选,上限 512 字)
  3720. sort_no:
  3721. type: integer
  3722. description: 排序号(≥0)
  3723. minimum: 0
  3724. required:
  3725. - item_name
  3726. - amount_cents
  3727. required:
  3728. - plan_id
  3729. required:
  3730. - data
  3731. responses:
  3732. "200":
  3733. description: 成功。统一信封 code/message/data
  3734. /contract/create@v1:
  3735. post:
  3736. summary: 新建合同
  3737. description: 客户段+合同段+服务构成条目+IP 条件一次提交。客户未命中时用 data.customer_inline 随合同建档(先建档、后签合同,两个事务),成功时 data.inline_customer 回显客户号/主账号/激活码发放态/影像待补(激活码明文不在应答内,走客户列表「导出激活码」)。拒收 source(服务端定);created_by/created_by_name/created_by_org/created_by_mobile(录入经办人:机构/姓名/联系方式)由服务端从鉴权上下文写入、不取入参;agent_* 是运营商交接单上的经办人(姓名/电话/交接单日期必填、机构选填)。
  3738. operationId: contract_create
  3739. tags:
  3740. - 合同
  3741. x-require-auth: true
  3742. x-resource-type: bos.contract
  3743. x-action: create
  3744. x-version: v1
  3745. x-permission-visibility: catalog
  3746. requestBody:
  3747. required: true
  3748. description: JSON 请求体,业务字段置于 data
  3749. content:
  3750. application/json:
  3751. schema:
  3752. type: object
  3753. description: 统一信封请求体,业务字段放在 data 内
  3754. properties:
  3755. data:
  3756. type: object
  3757. description: 业务参数
  3758. properties:
  3759. customer_id:
  3760. type: string
  3761. description: 签约客户 ID。与 customer_inline **只可二选一**:命中已有客户填本项;未命中改用内联建档段
  3762. customer_inline:
  3763. type: object
  3764. description: >-
  3765. 客户未命中时的内联建档段(需求 §5.3 CU-13;业主 2026-11-16 定案关闭 CU-41)。
  3766. 本段先按 `/customer/create@v1` 的同一套规则建档(两个事务:建档 → 合同,不合并),
  3767. 再签本合同;建档含客户主账号(未设初始口令 ⇒ 待激活、发激活码,明文不在本响应内下发)。
  3768. 注意:唯一与页面建档不同的判据=企业营业执照影像**可留空**(本通道例外),
  3769. 建档后到客户档案「登记材料」格补传/替换。主体类型非企业时不收 license。
  3770. properties:
  3771. customer_name:
  3772. type: string
  3773. description: 客户名称(必填;允许重名,查重靠识别号)
  3774. subject_type:
  3775. type: string
  3776. description: 主体类型(必填):enterprise/individual/sole_proprietor
  3777. enum:
  3778. - enterprise
  3779. - individual
  3780. - sole_proprietor
  3781. id_code:
  3782. type: string
  3783. description: 客户识别号(必填):既是安全存储载体,也是合同事务失败后重试的幂等键(不得省略)
  3784. contact_name:
  3785. type: string
  3786. description: 客户经办联系人
  3787. contact_mobile:
  3788. type: string
  3789. description: 联系电话
  3790. address:
  3791. type: string
  3792. description: 客户地址
  3793. parent_node_id:
  3794. type: string
  3795. description: 挂载区域(必填;区域树节点 ID,与 /customer/create@v1 的 parent_node_id 同义)
  3796. operator_id:
  3797. type: string
  3798. description: 归属运营商(必填;候选=所挂区域省份下可见的运营商档案,须同省)
  3799. ops_team_ids:
  3800. type: array
  3801. description: 运维团队(必填且**恰好 1 支**,单支定案;不得为空数组/不得传多支)
  3802. items:
  3803. type: string
  3804. description: 团队 ID
  3805. license:
  3806. type: object
  3807. description: 营业执照影像(本通道**可留空**;非企业主体不收)。两键成对
  3808. properties:
  3809. object_key:
  3810. type: string
  3811. description: 平台对象存储对象键(浏览器直传后回报,须在客户影像前缀下)
  3812. file_name:
  3813. type: string
  3814. description: 原始文件名(仅展示)
  3815. required:
  3816. - object_key
  3817. - file_name
  3818. primary_username:
  3819. type: string
  3820. description: 客户主账号登录名(选填;留空按主体号派生)
  3821. primary_mobile:
  3822. type: string
  3823. description: 主账号绑定手机号(选填,11 位)
  3824. required:
  3825. - customer_name
  3826. - subject_type
  3827. - id_code
  3828. - parent_node_id
  3829. - operator_id
  3830. - ops_team_ids
  3831. contract_no:
  3832. type: string
  3833. description: 合同编号(空则服务端发号)
  3834. external_no:
  3835. type: string
  3836. description: 外部合同号(可选)
  3837. contract_amount_cents:
  3838. type: integer
  3839. description: 合同金额(分,可选)
  3840. pay_cycle:
  3841. type: string
  3842. description: 付款周期:yearly/quarterly/monthly
  3843. enum:
  3844. - yearly
  3845. - quarterly
  3846. - monthly
  3847. start_date:
  3848. type: string
  3849. description: 合同开始日期(YYYY-MM-DD)
  3850. format: date
  3851. end_date:
  3852. type: string
  3853. description: 合同结束日期(YYYY-MM-DD)
  3854. format: date
  3855. agent_name:
  3856. type: string
  3857. description: 运营商经办人姓名(交接单三段之二,必填;不是录入账号 created_by)
  3858. agent_mobile:
  3859. type: string
  3860. description: 运营商经办人联系方式(交接单三段之三,必填)
  3861. agent_handover_on:
  3862. type: string
  3863. description: 经办交接日期(可选)
  3864. format: date
  3865. agent_org:
  3866. type: string
  3867. description: 运营商经办人机构(交接单三段之一,选填)
  3868. attachment_url:
  3869. type: string
  3870. maxLength: 512
  3871. description: >-
  3872. 合同附件(单值,可选):外部 http(s) 链接,或浏览器直传平台对象存储
  3873. (seoh-unified-oss 两段式)成功后回报的对象键,前缀必须为
  3874. klt/contract/attachment/。空串=清空。对象键不得当作可直接打开的链接,
  3875. 详情读口另下发 attachment_view_url(短时效现签)。
  3876. service_items:
  3877. type: array
  3878. description: 服务构成条目列表
  3879. items:
  3880. type: object
  3881. description: 服务条目
  3882. properties:
  3883. item_kind:
  3884. type: string
  3885. description: 条目类型:plan_based/custom_spec
  3886. plan_id:
  3887. type: string
  3888. description: 档位 ID(plan_based)
  3889. quantity:
  3890. type: integer
  3891. description: 数量
  3892. account_count:
  3893. type: integer
  3894. description: 账号数(custom_spec)
  3895. bandwidth_up_mbps:
  3896. type: integer
  3897. description: 上行带宽(Mbps,整数 1~1000,custom_spec);与下行至少填一侧,只填一侧时按上下行对称填同一值
  3898. bandwidth_down_mbps:
  3899. type: integer
  3900. description: 下行带宽(Mbps,整数 1~1000,custom_spec);两值原样投影到派生自定义档,不折算(2026-11-05 D8 关闭)
  3901. line_exits:
  3902. type: array
  3903. description: 线路出口列表
  3904. items:
  3905. type: string
  3906. description: 出口标识
  3907. ip_entries:
  3908. type: array
  3909. description: 固定 IP 条目(可选;勾选 has_fixed_ip 时整表替换)。档位只从「套餐配置 → 线路出口」的带宽档位清单里选,或选「不承诺带宽」
  3910. items:
  3911. type: object
  3912. description: IP 条目=线路出口+带宽档位(或「不承诺带宽」)+IP 数量
  3913. properties:
  3914. line_exit:
  3915. type: string
  3916. description: 线路出口原文(须命中「套餐配置 → 线路出口」清单)
  3917. bandwidth_tier_mbps:
  3918. type: integer
  3919. nullable: true
  3920. description: 带宽档位(兆);取值须命中「套餐配置 → 线路出口」的带宽档位清单。声明不承诺带宽时须缺省或为 null
  3921. bandwidth_committed:
  3922. type: boolean
  3923. description: 是否承诺带宽;缺省=按 bandwidth_tier_mbps 是否给值推导。false=不承诺带宽(bandwidth_tier_mbps 落库 NULL),此时不得再给兆数
  3924. ip_count:
  3925. type: integer
  3926. description: IP 数量(1–9999)
  3927. required:
  3928. - pay_cycle
  3929. - start_date
  3930. - end_date
  3931. required:
  3932. - data
  3933. responses:
  3934. "200":
  3935. description: 成功。统一信封 code/message/data
  3936. /contract/update@v1:
  3937. post:
  3938. summary: 编辑合同
  3939. description: 编号与签约客户不可改;条目按 item_id 三向对比增删改。可改范围=bos-invariant::contract_edit_scope 的两条轴(billing:金额/付款周期/期间/服务构成/IP;archive:外部单号/交接单日期),两轴独立判定、source=operator_sync 全只读(KLT-L220)、已开通两轴全冻(KLT-L219)、录后 72 小时内两轴全开、未生效只放 billing、未到期只放 archive;经办人(created_by 与录入经办人机构/姓名/联系方式)建后恒只读(KLT-L221);agent_* 为运营商交接单上的经办人,受各自轴约束。保存形态=只提交变了的字段(键缺席=保持现值);审计 INSERT 与业务语句同批提交。
  3940. operationId: contract_update
  3941. tags:
  3942. - 合同
  3943. x-require-auth: true
  3944. x-resource-type: bos.contract
  3945. x-action: update
  3946. x-version: v1
  3947. x-permission-visibility: catalog
  3948. requestBody:
  3949. required: true
  3950. description: JSON 请求体,业务字段置于 data
  3951. content:
  3952. application/json:
  3953. schema:
  3954. type: object
  3955. description: 统一信封请求体,业务字段放在 data 内
  3956. properties:
  3957. data:
  3958. type: object
  3959. description: 业务参数
  3960. properties:
  3961. contract_id:
  3962. type: string
  3963. description: 合同 ID
  3964. row_version:
  3965. type: integer
  3966. description: 乐观锁版本
  3967. external_no:
  3968. type: string
  3969. description: 外部合同号
  3970. contract_amount_cents:
  3971. type: integer
  3972. description: 合同金额(分)
  3973. pay_cycle:
  3974. type: string
  3975. description: 付款周期
  3976. start_date:
  3977. type: string
  3978. description: 开始日期
  3979. format: date
  3980. end_date:
  3981. type: string
  3982. description: 结束日期
  3983. format: date
  3984. agent_name:
  3985. type: string
  3986. description: 运营商经办人姓名(交接单口径,不是录入账号 created_by);受 billing/archive 轴约束,冻结时提交改动值 ⇒ KLT-L219/L220
  3987. agent_mobile:
  3988. type: string
  3989. description: 运营商经办人联系方式(交接单三段之三;archive 轴)
  3990. agent_handover_on:
  3991. type: string
  3992. description: 交接单日期(archive 轴)
  3993. agent_org:
  3994. type: string
  3995. description: 运营商经办人机构(交接单三段之一;选填,archive 轴)
  3996. attachment_url:
  3997. type: string
  3998. maxLength: 512
  3999. description: >-
  4000. 合同附件(单值,archive 轴):外部 http(s) 链接,或前缀为
  4001. klt/contract/attachment/ 的对象键;空串=清空附件。
  4002. source:
  4003. type: string
  4004. description: 合同来源枚举 manual|import|operator_sync(04 册§4.2:写入时由服务端定、之后只读,不取入参;一期只有 manual 真产生值)
  4005. source_label:
  4006. type: string
  4007. description: 合同来源中文口径(界面录入/批量导入/运营商同步;04 册§4.7 列表与详情按来源标注)
  4008. service_items:
  4009. type: array
  4010. description: 服务构成条目(含 item_id 的增删改)
  4011. items:
  4012. type: object
  4013. ip_entries:
  4014. type: array
  4015. description: 固定 IP 条目(整表替换;键缺席=不碰)。档位只从「套餐配置 → 线路出口」的带宽档位清单里选,或选「不承诺带宽」
  4016. items:
  4017. type: object
  4018. description: IP 条目=线路出口+带宽档位(或「不承诺带宽」)+IP 数量
  4019. properties:
  4020. line_exit:
  4021. type: string
  4022. description: 线路出口原文(须命中「套餐配置 → 线路出口」清单)
  4023. bandwidth_tier_mbps:
  4024. type: integer
  4025. nullable: true
  4026. description: 带宽档位(兆);取值须命中「套餐配置 → 线路出口」的带宽档位清单。声明不承诺带宽时须缺省或为 null
  4027. bandwidth_committed:
  4028. type: boolean
  4029. description: 是否承诺带宽;缺省=按 bandwidth_tier_mbps 是否给值推导。false=不承诺带宽(bandwidth_tier_mbps 落库 NULL),此时不得再给兆数
  4030. ip_count:
  4031. type: integer
  4032. description: IP 数量(1–9999)
  4033. required:
  4034. - contract_id
  4035. - row_version
  4036. required:
  4037. - data
  4038. responses:
  4039. "200":
  4040. description: 成功。统一信封 code/message/data
  4041. /contract/get_list@v1:
  4042. post:
  4043. summary: 合同列表
  4044. description: >-
  4045. 按客户/状态等筛选合同列表。每行随 `attachment_kind`(none/link/object/other)说明附件形态;
  4046. `attachment_view_url` 在列表口恒 null(签名只在详情读口现签,不按行 N 次调平台)。
  4047. operationId: contract_get_list
  4048. tags:
  4049. - 合同
  4050. x-require-auth: true
  4051. x-resource-type: bos.contract
  4052. x-action: list
  4053. x-version: v1
  4054. x-permission-visibility: catalog
  4055. requestBody:
  4056. required: true
  4057. description: JSON 请求体,业务字段置于 data
  4058. content:
  4059. application/json:
  4060. schema:
  4061. type: object
  4062. description: 统一信封请求体,业务字段放在 data 内
  4063. properties:
  4064. data:
  4065. type: object
  4066. description: 列表筛选参数
  4067. properties:
  4068. page:
  4069. type: integer
  4070. description: 页码(0 基索引,默认 0)
  4071. minimum: 0
  4072. default: 0
  4073. page_size:
  4074. type: integer
  4075. description: 每页条数(默认 20,上限 200)
  4076. minimum: 1
  4077. maximum: 200
  4078. default: 20
  4079. keyword:
  4080. type: string
  4081. description: 关键字筛选(可选)
  4082. customer_id:
  4083. type: string
  4084. description: 客户 ID 筛选
  4085. status:
  4086. type: string
  4087. description: 状态筛选
  4088. opened:
  4089. type: boolean
  4090. description: 是否已开通筛选(三态:true/false/缺省不筛)
  4091. required:
  4092. - data
  4093. responses:
  4094. "200":
  4095. description: 成功。统一信封 code/message/data
  4096. /contract/get@v1:
  4097. post:
  4098. summary: 合同详情
  4099. description: >-
  4100. 按合同 ID 查询详情(含服务条目与 IP 条件)。出参含 edit_scope(billing/archive 两轴 editable+reason,判据=bos-invariant::contract_edit_scope)、created_by/created_by_name/created_by_org/created_by_mobile(录入经办人=录入账号的机构/姓名/联系方式,录入时由账号自动带入、建后只读;联系方式已按需求 §3.3 掩码)。
  4101. 附件(单值):`attachment_url` 原值照回(外部链接或 klt/contract/attachment/ 下的对象键),
  4102. `attachment_kind` 说明形态,`attachment_view_url`/`attachment_view_url_expires_at`
  4103. 为读口现签的短时效下载地址(`link` 形态=原链接);对象键不得当作可直接打开的链接。
  4104. operationId: contract_get
  4105. tags:
  4106. - 合同
  4107. x-require-auth: true
  4108. x-resource-type: bos.contract
  4109. x-action: view
  4110. x-version: v1
  4111. x-permission-visibility: catalog
  4112. requestBody:
  4113. required: true
  4114. description: JSON 请求体,业务字段置于 data
  4115. content:
  4116. application/json:
  4117. schema:
  4118. type: object
  4119. description: 统一信封请求体,业务字段放在 data 内
  4120. properties:
  4121. data:
  4122. type: object
  4123. description: 业务参数
  4124. properties:
  4125. contract_id:
  4126. type: string
  4127. description: 合同 ID
  4128. required:
  4129. - contract_id
  4130. required:
  4131. - data
  4132. responses:
  4133. "200":
  4134. description: 成功。统一信封 code/message/data
  4135. /contract/change_log@v1:
  4136. post:
  4137. summary: 合同修改记录
  4138. description: 本合同在 bos_audit_log 的 contract.* 流水(时间倒序+(occurred_at,id) 游标,不用 OFFSET)。先过合同可见性(与详情同一条谓词,越权=11104),再按 resource_type='contract' AND resource_id=$contract_id 取行——不复用 audit/get_list@v1(其对 TeamLead/Ops 按本团队成员过滤,会把可见合同的历史滤空)。行内含 detail.fields(字段级 {old,new})、items_diff/ip_diff(条目与 IP 条目的多重集增删)。
  4139. operationId: contract_change_log
  4140. tags:
  4141. - 合同
  4142. x-require-auth: true
  4143. x-resource-type: bos.contract
  4144. x-action: list
  4145. x-version: v1
  4146. x-permission-visibility: catalog
  4147. requestBody:
  4148. required: true
  4149. description: JSON 请求体,业务字段置于 data
  4150. content:
  4151. application/json:
  4152. schema:
  4153. type: object
  4154. description: 统一信封请求体,业务字段放在 data 内
  4155. properties:
  4156. data:
  4157. type: object
  4158. description: 业务参数
  4159. properties:
  4160. contract_id:
  4161. type: string
  4162. description: 合同 ID
  4163. page_size:
  4164. type: integer
  4165. description: 每页条数(默认 20,夹在 1~50)
  4166. minimum: 1
  4167. maximum: 50
  4168. default: 20
  4169. cursor:
  4170. type: string
  4171. description: 游标,形态 occurred_at|id(与审计页同形态);由上一页响应的 next_cursor 原样带回
  4172. required:
  4173. - contract_id
  4174. required:
  4175. - data
  4176. responses:
  4177. "200":
  4178. description: 成功。统一信封 code/message/data(items/page_size/next_cursor/cursor_usable)
  4179. /contract/customer_lookup@v1:
  4180. post:
  4181. summary: 合同客户身份解析
  4182. description: 第3册§4.2 第 1 步:query_type=credit_code 主体号精确点查/identity 归一化精确点查/keyword 客户名称模糊联想;未命中=matched:false 成功响应(不报错),越权读单客户=11104。
  4183. operationId: contract_customer_lookup
  4184. tags:
  4185. - 合同
  4186. x-require-auth: true
  4187. x-resource-type: bos.contract
  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. query_type:
  4205. type: string
  4206. description: 查询通道
  4207. enum:
  4208. - credit_code
  4209. - identity
  4210. - keyword
  4211. value:
  4212. type: string
  4213. description: 查询值(主体号/识别号/客户名称关键字)
  4214. required:
  4215. - query_type
  4216. - value
  4217. required:
  4218. - data
  4219. responses:
  4220. "200":
  4221. description: 成功。统一信封 code/message/data
  4222. /contract/delete@v1:
  4223. post:
  4224. summary: 合同条件删除
  4225. description: 第3册§4.8:两类阻塞分栏(subscriptions/tickets),有阻塞⇒KLT-L213;工单取数失败⇒KLT-S406(不得中途放行)。
  4226. operationId: contract_delete
  4227. tags:
  4228. - 合同
  4229. x-require-auth: true
  4230. x-resource-type: bos.contract
  4231. x-action: delete
  4232. x-version: v1
  4233. x-permission-visibility: catalog
  4234. requestBody:
  4235. required: true
  4236. description: JSON 请求体,业务字段置于 data
  4237. content:
  4238. application/json:
  4239. schema:
  4240. type: object
  4241. description: 统一信封请求体,业务字段放在 data 内
  4242. properties:
  4243. data:
  4244. type: object
  4245. description: 业务参数
  4246. properties:
  4247. contract_id:
  4248. type: string
  4249. description: 合同 ID
  4250. required:
  4251. - contract_id
  4252. required:
  4253. - data
  4254. responses:
  4255. "200":
  4256. description: 成功。统一信封 code/message/data
  4257. /contract/attachment_discard@v1:
  4258. post:
  4259. summary: 回收无人引用的上传附件(孤儿对象)
  4260. description: >-
  4261. 还原 2026-11-16 定案的孤儿附件回收:浏览器直传是「先上传、后落库」,用户换文件/移除/
  4262. 取消编辑/保存被拦时会在桶里留下无引用对象。平台 unified-oss 明确「不做后台遍历删对象、
  4263. 不按业务字段回收」,只有即时删除一条通道(object/delete@v1),故回收由本服务在引用面判定后发起。
  4264. 三条安全线:object_key 必须是本服务前缀下无路径穿越的对象键;查库确认没有任何合同仍指向它;
  4265. 角色限 Admin/OpsMain(与合同写口同一道闸)。referenced=true 与「对象已不在」都不算失败(幂等)。
  4266. operationId: contract_attachment_discard
  4267. tags:
  4268. - 合同
  4269. x-require-auth: true
  4270. x-resource-type: bos.contract
  4271. x-action: update
  4272. x-version: v1
  4273. x-permission-visibility: catalog
  4274. requestBody:
  4275. required: true
  4276. description: JSON 请求体,业务字段置于 data
  4277. content:
  4278. application/json:
  4279. schema:
  4280. type: object
  4281. description: 统一信封请求体,业务字段放在 data 内
  4282. properties:
  4283. data:
  4284. type: object
  4285. description: 业务参数
  4286. properties:
  4287. object_key:
  4288. type: string
  4289. description: 直传回报的对象键(klt/contract/attachment/ 前缀下)
  4290. required:
  4291. - object_key
  4292. required:
  4293. - data
  4294. responses:
  4295. "200":
  4296. description: 成功。统一信封 code/message/data
  4297. /subscription/create@v1:
  4298. post:
  4299. summary: 新建订阅
  4300. description: 拒收 line_exits、sub_mode、order_no、新建时的 end_date、opened_at。
  4301. operationId: subscription_create
  4302. tags:
  4303. - 订阅
  4304. x-require-auth: true
  4305. x-resource-type: bos.subscription
  4306. x-action: create
  4307. x-version: v1
  4308. x-permission-visibility: catalog
  4309. requestBody:
  4310. required: true
  4311. description: JSON 请求体,业务字段置于 data
  4312. content:
  4313. application/json:
  4314. schema:
  4315. type: object
  4316. description: 统一信封请求体,业务字段放在 data 内
  4317. properties:
  4318. data:
  4319. type: object
  4320. description: 业务参数
  4321. properties:
  4322. customer_id:
  4323. type: string
  4324. description: 客户 ID
  4325. plan_id:
  4326. type: string
  4327. description: 档位 ID
  4328. contract_id:
  4329. type: string
  4330. description: 合同 ID
  4331. contract_item_id:
  4332. type: string
  4333. description: 合同服务条目 ID
  4334. start_date:
  4335. type: string
  4336. description: 订阅开始日期
  4337. format: date
  4338. annual_price_cents:
  4339. type: integer
  4340. description: 年价(分)
  4341. monthly_settle_cents:
  4342. type: integer
  4343. description: 月结算金额(分)
  4344. use_category:
  4345. type: string
  4346. description: 派生档用途分类(需要时填写)
  4347. term:
  4348. type: string
  4349. description: 账期(三态:yearly/quarterly/monthly)
  4350. enum:
  4351. - yearly
  4352. - quarterly
  4353. - monthly
  4354. trial_months:
  4355. type: integer
  4356. description: 试用月数(默认 0,≥0)
  4357. minimum: 0
  4358. discount_monthly_cents:
  4359. type: integer
  4360. description: 每月优惠金额(分,默认 0,≥0)
  4361. minimum: 0
  4362. required:
  4363. - customer_id
  4364. - plan_id
  4365. - contract_id
  4366. - contract_item_id
  4367. - start_date
  4368. - annual_price_cents
  4369. - monthly_settle_cents
  4370. required:
  4371. - data
  4372. responses:
  4373. "200":
  4374. description: 成功。统一信封 code/message/data
  4375. /subscription/change@v1:
  4376. post:
  4377. summary: 订阅升降配
  4378. description: 升降配须填 replaces_subscription_id,且须使用新的 contract_id(不得沿用原合同)。
  4379. operationId: subscription_change
  4380. tags:
  4381. - 订阅
  4382. x-require-auth: true
  4383. x-resource-type: bos.subscription
  4384. x-action: update
  4385. x-version: v1
  4386. x-permission-visibility: catalog
  4387. requestBody:
  4388. required: true
  4389. description: JSON 请求体,业务字段置于 data
  4390. content:
  4391. application/json:
  4392. schema:
  4393. type: object
  4394. description: 统一信封请求体,业务字段放在 data 内
  4395. properties:
  4396. data:
  4397. type: object
  4398. description: 业务参数
  4399. properties:
  4400. replaces_subscription_id:
  4401. type: string
  4402. description: 被替换的原订阅 ID
  4403. customer_id:
  4404. type: string
  4405. description: 客户 ID
  4406. plan_id:
  4407. type: string
  4408. description: 新档位 ID
  4409. contract_id:
  4410. type: string
  4411. description: 新合同 ID(不得沿用原合同)
  4412. contract_item_id:
  4413. type: string
  4414. description: 新合同服务条目 ID
  4415. start_date:
  4416. type: string
  4417. description: 新订阅开始日期
  4418. format: date
  4419. annual_price_cents:
  4420. type: integer
  4421. description: 年价(分)
  4422. monthly_settle_cents:
  4423. type: integer
  4424. description: 月结算金额(分)
  4425. use_category:
  4426. type: string
  4427. description: 派生档用途分类(需要时填写)
  4428. term:
  4429. type: string
  4430. description: 账期(三态:yearly/quarterly/monthly)
  4431. enum:
  4432. - yearly
  4433. - quarterly
  4434. - monthly
  4435. trial_months:
  4436. type: integer
  4437. description: 试用月数(默认 0,≥0)
  4438. minimum: 0
  4439. discount_monthly_cents:
  4440. type: integer
  4441. description: 每月优惠金额(分,默认 0,≥0)
  4442. minimum: 0
  4443. row_version:
  4444. type: integer
  4445. description: 乐观锁版本号(可选,缺省不校验)
  4446. required:
  4447. - replaces_subscription_id
  4448. - customer_id
  4449. - plan_id
  4450. - contract_id
  4451. - contract_item_id
  4452. - start_date
  4453. - annual_price_cents
  4454. - monthly_settle_cents
  4455. required:
  4456. - data
  4457. responses:
  4458. "200":
  4459. description: 成功。统一信封 code/message/data
  4460. /subscription/stack@v1:
  4461. post:
  4462. summary: 订阅叠加或白名单更新
  4463. description: 叠加开通或更新白名单字段(两金额+end_date);其余只读键拒绝。
  4464. operationId: subscription_stack
  4465. tags:
  4466. - 订阅
  4467. x-require-auth: true
  4468. x-resource-type: bos.subscription
  4469. x-action: create
  4470. x-version: v1
  4471. x-permission-visibility: catalog
  4472. requestBody:
  4473. required: true
  4474. description: JSON 请求体,业务字段置于 data
  4475. content:
  4476. application/json:
  4477. schema:
  4478. type: object
  4479. description: 统一信封请求体,业务字段放在 data 内
  4480. properties:
  4481. data:
  4482. type: object
  4483. description: 业务参数
  4484. properties:
  4485. subscription_id:
  4486. type: string
  4487. description: 订阅 ID(更新场景)
  4488. customer_id:
  4489. type: string
  4490. description: 客户 ID(叠加新建时)
  4491. plan_id:
  4492. type: string
  4493. description: 档位 ID(叠加新建时)
  4494. contract_id:
  4495. type: string
  4496. description: 合同 ID
  4497. contract_item_id:
  4498. type: string
  4499. description: 合同服务条目 ID
  4500. annual_price_cents:
  4501. type: integer
  4502. description: 年价(分,可改)
  4503. monthly_settle_cents:
  4504. type: integer
  4505. description: 月结算金额(分,可改)
  4506. end_date:
  4507. type: string
  4508. description: 结束日期(可改)
  4509. format: date
  4510. start_date:
  4511. type: string
  4512. description: 开始日期(叠加新建时)
  4513. format: date
  4514. row_version:
  4515. type: integer
  4516. description: 乐观锁版本号(可选,缺省不校验)
  4517. required:
  4518. - data
  4519. responses:
  4520. "200":
  4521. description: 成功。统一信封 code/message/data
  4522. /subscription/get_list@v1:
  4523. post:
  4524. summary: 订阅列表
  4525. description: 按客户等维度筛选订阅列表。
  4526. operationId: subscription_get_list
  4527. tags:
  4528. - 订阅
  4529. x-require-auth: true
  4530. x-resource-type: bos.subscription
  4531. x-action: list
  4532. x-version: v1
  4533. x-permission-visibility: catalog
  4534. requestBody:
  4535. required: true
  4536. description: JSON 请求体,业务字段置于 data
  4537. content:
  4538. application/json:
  4539. schema:
  4540. type: object
  4541. description: 统一信封请求体,业务字段放在 data 内
  4542. properties:
  4543. data:
  4544. type: object
  4545. description: 列表筛选参数
  4546. properties:
  4547. customer_id:
  4548. type: string
  4549. description: 客户 ID(常必填)
  4550. page:
  4551. type: integer
  4552. description: 页码(0 基索引,默认 0)
  4553. minimum: 0
  4554. default: 0
  4555. page_size:
  4556. type: integer
  4557. description: 每页条数(默认 20,上限 200)
  4558. minimum: 1
  4559. maximum: 200
  4560. default: 20
  4561. keyword:
  4562. type: string
  4563. description: 关键字筛选(可选)
  4564. status:
  4565. type: string
  4566. description: 状态筛选
  4567. contract_id:
  4568. type: string
  4569. description: 合同 ID 筛选
  4570. region_ids:
  4571. type: array
  4572. description: 区域 ID 集合(经客户挂载区域展开)
  4573. items:
  4574. type: string
  4575. description: 区域 ID
  4576. required:
  4577. - data
  4578. responses:
  4579. "200":
  4580. description: 成功。统一信封 code/message/data
  4581. /subscription/get@v1:
  4582. post:
  4583. summary: 订阅详情
  4584. description: 按订阅 ID 查询详情。
  4585. operationId: subscription_get
  4586. tags:
  4587. - 订阅
  4588. x-require-auth: true
  4589. x-resource-type: bos.subscription
  4590. x-action: view
  4591. x-version: v1
  4592. x-permission-visibility: catalog
  4593. requestBody:
  4594. required: true
  4595. description: JSON 请求体,业务字段置于 data
  4596. content:
  4597. application/json:
  4598. schema:
  4599. type: object
  4600. description: 统一信封请求体,业务字段放在 data 内
  4601. properties:
  4602. data:
  4603. type: object
  4604. description: 业务参数
  4605. properties:
  4606. subscription_id:
  4607. type: string
  4608. description: 订阅 ID
  4609. required:
  4610. - subscription_id
  4611. required:
  4612. - data
  4613. responses:
  4614. "200":
  4615. description: 成功。统一信封 code/message/data
  4616. /subscription/plan_options@v1:
  4617. post:
  4618. summary: 订阅档位候选
  4619. description: 第3册§5.2 第 3 步:本客户自定义档(含合同条目派生档)+全部固定档,不含他客户自定义档;行内带只读 sub_mode 与 available/unavailable_reason。
  4620. operationId: subscription_plan_options
  4621. tags:
  4622. - 订阅
  4623. x-require-auth: true
  4624. x-resource-type: bos.subscription
  4625. x-action: list
  4626. x-version: v1
  4627. x-permission-visibility: catalog
  4628. requestBody:
  4629. required: true
  4630. description: JSON 请求体,业务字段置于 data
  4631. content:
  4632. application/json:
  4633. schema:
  4634. type: object
  4635. description: 统一信封请求体,业务字段放在 data 内
  4636. properties:
  4637. data:
  4638. type: object
  4639. description: 业务参数
  4640. properties:
  4641. customer_id:
  4642. type: string
  4643. description: 客户 ID(必填)
  4644. keyword:
  4645. type: string
  4646. description: 套餐名称关键字(仅本口有)
  4647. required:
  4648. - customer_id
  4649. required:
  4650. - data
  4651. responses:
  4652. "200":
  4653. description: 成功。统一信封 code/message/data
  4654. /subscription/contract_options@v1:
  4655. post:
  4656. summary: 未开通合同与服务条目候选
  4657. description: 第3册§5.2 第 2 步:只出「未开通」合同及其尚未被订阅引用的条目;开通态取数失败⇒KLT-S406;无可选合同⇒KLT-M222。
  4658. operationId: subscription_contract_options
  4659. tags:
  4660. - 订阅
  4661. x-require-auth: true
  4662. x-resource-type: bos.subscription
  4663. x-action: list
  4664. x-version: v1
  4665. x-permission-visibility: catalog
  4666. requestBody:
  4667. required: true
  4668. description: JSON 请求体,业务字段置于 data
  4669. content:
  4670. application/json:
  4671. schema:
  4672. type: object
  4673. description: 统一信封请求体,业务字段放在 data 内
  4674. properties:
  4675. data:
  4676. type: object
  4677. description: 业务参数
  4678. properties:
  4679. customer_id:
  4680. type: string
  4681. description: 客户 ID(必填)
  4682. keyword:
  4683. type: string
  4684. description: 合同名称关键字(仅本口有)
  4685. required:
  4686. - customer_id
  4687. required:
  4688. - data
  4689. responses:
  4690. "200":
  4691. description: 成功。统一信封 code/message/data
  4692. /subscription/update@v1:
  4693. post:
  4694. summary: 订阅修改(白名单)
  4695. description: 第3册§5.6:可改字段只有 trial_months/discount_monthly_cents;row_version 必填,落空⇒KLT-S407;换套餐/换合同⇒KLT-M229。
  4696. operationId: subscription_update
  4697. tags:
  4698. - 订阅
  4699. x-require-auth: true
  4700. x-resource-type: bos.subscription
  4701. x-action: update
  4702. x-version: v1
  4703. x-permission-visibility: catalog
  4704. requestBody:
  4705. required: true
  4706. description: JSON 请求体,业务字段置于 data
  4707. content:
  4708. application/json:
  4709. schema:
  4710. type: object
  4711. description: 统一信封请求体,业务字段放在 data 内
  4712. properties:
  4713. data:
  4714. type: object
  4715. description: 业务参数
  4716. properties:
  4717. subscription_id:
  4718. type: string
  4719. description: 订阅 ID
  4720. row_version:
  4721. type: integer
  4722. description: 乐观锁版本号(必填,落空⇒KLT-S407)
  4723. trial_months:
  4724. type: integer
  4725. description: 试用月数(白名单可改)
  4726. minimum: 0
  4727. discount_monthly_cents:
  4728. type: integer
  4729. description: 每月优惠金额(分,白名单可改)
  4730. minimum: 0
  4731. required:
  4732. - subscription_id
  4733. - row_version
  4734. required:
  4735. - data
  4736. responses:
  4737. "200":
  4738. description: 成功。统一信封 code/message/data
  4739. /subscription/delete_check@v1:
  4740. post:
  4741. summary: 订阅删除前阻塞检查
  4742. description: 第3册§5.6:两栏阻塞分列(账单明细⇒KLT-M227、升降配链原订阅⇒KLT-M230);账单只读口未接线⇒billing_state=unconfigured。
  4743. operationId: subscription_delete_check
  4744. tags:
  4745. - 订阅
  4746. x-require-auth: true
  4747. x-resource-type: bos.subscription
  4748. x-action: view
  4749. x-version: v1
  4750. x-permission-visibility: catalog
  4751. requestBody:
  4752. required: true
  4753. description: JSON 请求体,业务字段置于 data
  4754. content:
  4755. application/json:
  4756. schema:
  4757. type: object
  4758. description: 统一信封请求体,业务字段放在 data 内
  4759. properties:
  4760. data:
  4761. type: object
  4762. description: 业务参数
  4763. properties:
  4764. subscription_id:
  4765. type: string
  4766. description: 订阅 ID
  4767. required:
  4768. - subscription_id
  4769. required:
  4770. - data
  4771. responses:
  4772. "200":
  4773. description: 成功。统一信封 code/message/data
  4774. /subscription/delete@v1:
  4775. post:
  4776. summary: 删除订阅并回退额度
  4777. description: 第3册§5.6:删除前复算阻塞;终态⇒11103;同事务回退 customer.quota_cents,档位 first_referred_at 打点不回滚。
  4778. operationId: subscription_delete
  4779. tags:
  4780. - 订阅
  4781. x-require-auth: true
  4782. x-resource-type: bos.subscription
  4783. x-action: delete
  4784. x-version: v1
  4785. x-permission-visibility: catalog
  4786. requestBody:
  4787. required: true
  4788. description: JSON 请求体,业务字段置于 data
  4789. content:
  4790. application/json:
  4791. schema:
  4792. type: object
  4793. description: 统一信封请求体,业务字段放在 data 内
  4794. properties:
  4795. data:
  4796. type: object
  4797. description: 业务参数
  4798. properties:
  4799. subscription_id:
  4800. type: string
  4801. description: 订阅 ID
  4802. required:
  4803. - subscription_id
  4804. required:
  4805. - data
  4806. responses:
  4807. "200":
  4808. description: 成功。统一信封 code/message/data
  4809. /subscription/list_all@v1:
  4810. post:
  4811. summary: 全部订阅(跨客户)
  4812. description: 第3册§5.8:跨客户订阅列表,customer_id 可选;region_ids 经客户挂载区域展开;不按客户名称/合同编号检索。
  4813. operationId: subscription_list_all
  4814. tags:
  4815. - 订阅
  4816. x-require-auth: true
  4817. x-resource-type: bos.subscription
  4818. x-action: list
  4819. x-version: v1
  4820. x-permission-visibility: catalog
  4821. requestBody:
  4822. required: true
  4823. description: JSON 请求体,业务字段置于 data
  4824. content:
  4825. application/json:
  4826. schema:
  4827. type: object
  4828. description: 统一信封请求体,业务字段放在 data 内
  4829. properties:
  4830. data:
  4831. type: object
  4832. description: 列表筛选参数
  4833. properties:
  4834. page:
  4835. type: integer
  4836. description: 页码
  4837. minimum: 1
  4838. page_size:
  4839. type: integer
  4840. description: 每页条数
  4841. minimum: 1
  4842. maximum: 500
  4843. keyword:
  4844. type: string
  4845. description: 关键字筛选
  4846. customer_id:
  4847. type: string
  4848. description: 客户 ID 筛选(跨客户列表下可选)
  4849. contract_id:
  4850. type: string
  4851. description: 合同 ID 筛选
  4852. status:
  4853. type: string
  4854. description: 状态筛选
  4855. region_ids:
  4856. type: array
  4857. description: 区域 ID 集合(经客户挂载区域展开)
  4858. items:
  4859. type: string
  4860. description: 区域 ID
  4861. required:
  4862. - data
  4863. responses:
  4864. "200":
  4865. description: 成功。统一信封 code/message/data
  4866. /cost_item/save@v1:
  4867. post:
  4868. summary: 保存成本项定义
  4869. description: 仅 admin。增改成本项定义。拒收金额、客户、运营商、省份、cycle、is_system。
  4870. operationId: cost_item_save
  4871. tags:
  4872. - 成本与分成
  4873. x-require-auth: true
  4874. x-resource-type: bos.cost_item
  4875. x-action: manage
  4876. x-version: v1
  4877. x-permission-visibility: catalog
  4878. requestBody:
  4879. required: true
  4880. description: JSON 请求体,业务字段置于 data
  4881. content:
  4882. application/json:
  4883. schema:
  4884. type: object
  4885. description: 统一信封请求体,业务字段放在 data 内
  4886. properties:
  4887. data:
  4888. type: object
  4889. description: 业务参数
  4890. properties:
  4891. cost_item_id:
  4892. type: string
  4893. description: 成本项 ID(更新时必填)
  4894. category:
  4895. type: string
  4896. description: 类别:intl_resource/device_purchase/project_fee
  4897. enum:
  4898. - intl_resource
  4899. - device_purchase
  4900. - project_fee
  4901. item_name:
  4902. type: string
  4903. description: 成本项名称
  4904. billing_unit:
  4905. type: string
  4906. description: 计费单位:per_customer/per_account/per_copy
  4907. enum:
  4908. - per_customer
  4909. - per_account
  4910. - per_copy
  4911. is_amortized:
  4912. type: boolean
  4913. description: 是否摊销
  4914. amortization_months:
  4915. type: integer
  4916. description: 摊销月数(勾选摊销时可空=每月摊销不结束)
  4917. deduct_from_base:
  4918. type: boolean
  4919. description: 是否从基数扣除
  4920. remark:
  4921. type: string
  4922. description: 备注
  4923. row_version:
  4924. type: integer
  4925. description: 乐观锁版本(更新时)
  4926. required:
  4927. - category
  4928. - item_name
  4929. - billing_unit
  4930. - is_amortized
  4931. - deduct_from_base
  4932. required:
  4933. - data
  4934. responses:
  4935. "200":
  4936. description: 成功。统一信封 code/message/data
  4937. /cost_item/get_list@v1:
  4938. post:
  4939. summary: 成本项列表
  4940. description: 全局成本项目录;可选类别/名称关键字;无客户过滤。
  4941. operationId: cost_item_get_list
  4942. tags:
  4943. - 成本与分成
  4944. x-require-auth: true
  4945. x-resource-type: bos.cost_item
  4946. x-action: list
  4947. x-version: v1
  4948. x-permission-visibility: catalog
  4949. requestBody:
  4950. required: true
  4951. description: JSON 请求体,业务字段置于 data
  4952. content:
  4953. application/json:
  4954. schema:
  4955. type: object
  4956. description: 统一信封请求体,业务字段放在 data 内
  4957. properties:
  4958. data:
  4959. type: object
  4960. description: 列表筛选参数
  4961. properties:
  4962. page:
  4963. type: integer
  4964. description: 页码(0 基索引,默认 0)
  4965. minimum: 0
  4966. default: 0
  4967. page_size:
  4968. type: integer
  4969. description: 每页条数(默认 20,上限 200)
  4970. minimum: 1
  4971. maximum: 200
  4972. default: 20
  4973. keyword:
  4974. type: string
  4975. description: 关键字筛选(可选)
  4976. category:
  4977. type: string
  4978. description: 类别筛选
  4979. required:
  4980. - data
  4981. responses:
  4982. "200":
  4983. description: 成功。统一信封 code/message/data
  4984. /cost_amount/save@v1:
  4985. post:
  4986. summary: 保存成本金额
  4987. description: 按「省份×运营商×成本项」只写差异金额;留空项表示删除该差异。
  4988. operationId: cost_amount_save
  4989. tags:
  4990. - 成本与分成
  4991. x-require-auth: true
  4992. x-resource-type: bos.cost_amount
  4993. x-action: manage
  4994. x-version: v1
  4995. x-permission-visibility: catalog
  4996. requestBody:
  4997. required: true
  4998. description: JSON 请求体,业务字段置于 data
  4999. content:
  5000. application/json:
  5001. schema:
  5002. type: object
  5003. description: 统一信封请求体,业务字段放在 data 内
  5004. properties:
  5005. data:
  5006. type: object
  5007. description: 业务参数
  5008. properties:
  5009. province_node_id:
  5010. type: string
  5011. description: 省份节点 ID
  5012. operator_id:
  5013. type: string
  5014. description: 运营商 ID
  5015. items:
  5016. type: array
  5017. description: 变更项列表;留空金额表示删除该差异行
  5018. items:
  5019. type: object
  5020. properties:
  5021. cost_item_id:
  5022. type: string
  5023. description: 成本项 ID
  5024. amount_cents:
  5025. type: integer
  5026. description: 金额(分);空/省略表示删除
  5027. row_version:
  5028. type: integer
  5029. description: 乐观锁版本
  5030. required:
  5031. - cost_item_id
  5032. required:
  5033. - province_node_id
  5034. - operator_id
  5035. - items
  5036. required:
  5037. - data
  5038. responses:
  5039. "200":
  5040. description: 成功。统一信封 code/message/data
  5041. /cost_amount/get_list@v1:
  5042. post:
  5043. summary: 成本金额一览
  5044. description: 透视表;admin 全量,区域运营按可见省/运营商收窄。
  5045. operationId: cost_amount_get_list
  5046. tags:
  5047. - 成本与分成
  5048. x-require-auth: true
  5049. x-resource-type: bos.cost_amount
  5050. x-action: list
  5051. x-version: v1
  5052. x-permission-visibility: catalog
  5053. requestBody:
  5054. required: true
  5055. description: JSON 请求体,业务字段置于 data
  5056. content:
  5057. application/json:
  5058. schema:
  5059. type: object
  5060. description: 统一信封请求体,业务字段放在 data 内
  5061. properties:
  5062. data:
  5063. type: object
  5064. description: 列表筛选参数
  5065. properties:
  5066. province_node_id:
  5067. type: string
  5068. description: 省份筛选
  5069. operator_id:
  5070. type: string
  5071. description: 运营商筛选
  5072. page:
  5073. type: integer
  5074. description: 页码(0 基索引,默认 0)
  5075. minimum: 0
  5076. default: 0
  5077. page_size:
  5078. type: integer
  5079. description: 每页条数(默认 20,上限 200)
  5080. minimum: 1
  5081. maximum: 200
  5082. default: 20
  5083. keyword:
  5084. type: string
  5085. description: 关键字筛选(可选)
  5086. required:
  5087. - data
  5088. responses:
  5089. "200":
  5090. description: 成功。统一信封 code/message/data
  5091. /share_rule/save@v1:
  5092. post:
  5093. summary: 保存分成规则
  5094. description: holder_type 仅 operator/ops_team(无 partner)。share_value 填 0/负表示删除该行。
  5095. operationId: share_rule_save
  5096. tags:
  5097. - 成本与分成
  5098. x-require-auth: true
  5099. x-resource-type: bos.share_rule
  5100. x-action: manage
  5101. x-version: v1
  5102. x-permission-visibility: catalog
  5103. requestBody:
  5104. required: true
  5105. description: JSON 请求体,业务字段置于 data
  5106. content:
  5107. application/json:
  5108. schema:
  5109. type: object
  5110. description: 统一信封请求体,业务字段放在 data 内
  5111. properties:
  5112. data:
  5113. type: object
  5114. description: 业务参数
  5115. properties:
  5116. holder_type:
  5117. type: string
  5118. description: 持有方类型:operator/ops_team
  5119. enum:
  5120. - operator
  5121. - ops_team
  5122. holder_id:
  5123. type: string
  5124. description: 持有方 ID
  5125. rules:
  5126. type: array
  5127. description: 规则行列表
  5128. items:
  5129. type: object
  5130. properties:
  5131. rule_id:
  5132. type: string
  5133. description: 规则 ID(更新/删除时)
  5134. customer_id:
  5135. type: string
  5136. description: 客户 ID
  5137. rule_level:
  5138. type: string
  5139. description: 规则层级:contract_addon/region_regular
  5140. enum:
  5141. - contract_addon
  5142. - region_regular
  5143. share_mode:
  5144. type: string
  5145. description: 分成方式:ratio_total/per_account/fixed_amount
  5146. enum:
  5147. - ratio_total
  5148. - per_account
  5149. - fixed_amount
  5150. share_value:
  5151. type: number
  5152. description: 分成值:比例 (0,1];金额/每账号>0 分;0/负=删除该行
  5153. remark:
  5154. type: string
  5155. description: 备注
  5156. required:
  5157. - holder_type
  5158. - holder_id
  5159. - rules
  5160. required:
  5161. - data
  5162. responses:
  5163. "200":
  5164. description: 成功。统一信封 code/message/data
  5165. /share_rule/get_list@v1:
  5166. post:
  5167. summary: 分成规则列表
  5168. description: 按持有方等条件列出分成规则。
  5169. operationId: share_rule_get_list
  5170. tags:
  5171. - 成本与分成
  5172. x-require-auth: true
  5173. x-resource-type: bos.share_rule
  5174. x-action: list
  5175. x-version: v1
  5176. x-permission-visibility: catalog
  5177. requestBody:
  5178. required: true
  5179. description: JSON 请求体,业务字段置于 data
  5180. content:
  5181. application/json:
  5182. schema:
  5183. type: object
  5184. description: 统一信封请求体,业务字段放在 data 内
  5185. properties:
  5186. data:
  5187. type: object
  5188. description: 列表筛选参数
  5189. properties:
  5190. holder_type:
  5191. type: string
  5192. description: 持有方类型
  5193. holder_id:
  5194. type: string
  5195. description: 持有方 ID
  5196. page:
  5197. type: integer
  5198. description: 页码(0 基索引,默认 0)
  5199. minimum: 0
  5200. default: 0
  5201. page_size:
  5202. type: integer
  5203. description: 每页条数(默认 20,上限 200)
  5204. minimum: 1
  5205. maximum: 200
  5206. default: 20
  5207. keyword:
  5208. type: string
  5209. description: 关键字筛选(可选)
  5210. required:
  5211. - data
  5212. responses:
  5213. "200":
  5214. description: 成功。统一信封 code/message/data
  5215. /share_rule/get@v1:
  5216. post:
  5217. summary: 分成规则详情
  5218. description: 按持有方一次返回四卡摘要与规则表。
  5219. operationId: share_rule_get
  5220. tags:
  5221. - 成本与分成
  5222. x-require-auth: true
  5223. x-resource-type: bos.share_rule
  5224. x-action: view
  5225. x-version: v1
  5226. x-permission-visibility: catalog
  5227. requestBody:
  5228. required: true
  5229. description: JSON 请求体,业务字段置于 data
  5230. content:
  5231. application/json:
  5232. schema:
  5233. type: object
  5234. description: 统一信封请求体,业务字段放在 data 内
  5235. properties:
  5236. data:
  5237. type: object
  5238. description: 业务参数
  5239. properties:
  5240. holder_type:
  5241. type: string
  5242. description: 持有方类型:operator/ops_team
  5243. holder_id:
  5244. type: string
  5245. description: 持有方 ID
  5246. required:
  5247. - holder_type
  5248. - holder_id
  5249. required:
  5250. - data
  5251. responses:
  5252. "200":
  5253. description: 成功。统一信封 code/message/data
  5254. /share_rule/delete@v1:
  5255. post:
  5256. summary: 删除分成规则
  5257. description: 按 rule_id 删除单条分成规则(亦可在 save 内以 0/负值删除)。
  5258. operationId: share_rule_delete
  5259. tags:
  5260. - 成本与分成
  5261. x-require-auth: true
  5262. x-resource-type: bos.share_rule
  5263. x-action: delete
  5264. x-version: v1
  5265. x-permission-visibility: catalog
  5266. requestBody:
  5267. required: true
  5268. description: JSON 请求体,业务字段置于 data
  5269. content:
  5270. application/json:
  5271. schema:
  5272. type: object
  5273. description: 统一信封请求体,业务字段放在 data 内
  5274. properties:
  5275. data:
  5276. type: object
  5277. description: 业务参数
  5278. properties:
  5279. rule_id:
  5280. type: string
  5281. description: 规则 ID
  5282. required:
  5283. - rule_id
  5284. required:
  5285. - data
  5286. responses:
  5287. "200":
  5288. description: 成功。统一信封 code/message/data
  5289. /opsview/home@v1:
  5290. get:
  5291. summary: 运维只读首页
  5292. description: 运维侧只读首页(U-60),返回工单/逾期等概览数据。
  5293. operationId: opsview_home
  5294. tags:
  5295. - 运维视图
  5296. x-require-auth: true
  5297. x-resource-type: bos.opsview
  5298. x-action: view
  5299. x-version: v1
  5300. x-permission-visibility: catalog
  5301. responses:
  5302. "200":
  5303. description: 成功。统一信封 code/message/data
  5304. /jobs/get_list@v1:
  5305. get:
  5306. summary: 定时作业清单
  5307. description: 返回第 10 册 13 行清单(注册位 11 +标注行 2)及运行态:启用态、可操作性位、最近执行、五格计数、累计轮次、KPI 五卡与待补跑轮次。运行态取数失败时仍返回 13 行,runtime_available=false。
  5308. operationId: jobs_get_list
  5309. tags:
  5310. - 定时作业
  5311. x-require-auth: true
  5312. x-resource-type: bos.jobs
  5313. x-action: list
  5314. x-version: v1
  5315. x-permission-visibility: catalog
  5316. responses:
  5317. "200":
  5318. description: 成功。统一信封 code/message/data
  5319. /jobs/toggle@v1:
  5320. post:
  5321. summary: 启停定时作业
  5322. description: 仅 admin。按作业 key 启停并写 bos_audit_log(bos.job.toggle);重复点击幂等不写第二条。标注行/无页面开关的作业返回 KLT-R20902(detail.reason_code=no_switch);CAS 不匹配返回 KLT-S407;审计失败返回 KLT-S405(启停已生效)。
  5323. operationId: jobs_toggle
  5324. tags:
  5325. - 定时作业
  5326. x-require-auth: true
  5327. x-resource-type: bos.jobs
  5328. x-action: manage
  5329. x-version: v1
  5330. x-permission-visibility: catalog
  5331. requestBody:
  5332. required: true
  5333. description: JSON 请求体,业务字段置于 data
  5334. content:
  5335. application/json:
  5336. schema:
  5337. type: object
  5338. description: 统一信封请求体,业务字段放在 data 内
  5339. properties:
  5340. data:
  5341. type: object
  5342. description: 业务参数
  5343. properties:
  5344. key:
  5345. type: string
  5346. description: 作业键(兼容旧字段名;与 job_key 二选一)
  5347. job_key:
  5348. type: string
  5349. description: 作业键(契约字段名)
  5350. enabled:
  5351. type: boolean
  5352. description: 目标状态
  5353. expect_enabled:
  5354. type: boolean
  5355. description: CAS 校验值=页面读到的当前状态;缺省不做并发校验
  5356. request_id:
  5357. type: string
  5358. description: 幂等请求号(客户端生成)
  5359. required:
  5360. - enabled
  5361. required:
  5362. - data
  5363. responses:
  5364. "200":
  5365. description: 成功。统一信封 code/message/data
  5366. /jobs/runs@v1:
  5367. post:
  5368. summary: 作业执行记录
  5369. description: 查询执行记录,支持任务、关键字(执行编号/任务/结果说明,不检索对象级明细)、触发方式、执行结果与日期区间筛选;分页 page 0 基、page_size 默认 50。标注行返回空流水并标记 annotation=true。
  5370. operationId: jobs_runs
  5371. tags:
  5372. - 定时作业
  5373. x-require-auth: true
  5374. x-resource-type: bos.jobs
  5375. x-action: view
  5376. x-version: v1
  5377. x-permission-visibility: catalog
  5378. requestBody:
  5379. required: true
  5380. description: JSON 请求体,业务字段置于 data
  5381. content:
  5382. application/json:
  5383. schema:
  5384. type: object
  5385. description: 统一信封请求体,业务字段放在 data 内
  5386. properties:
  5387. data:
  5388. type: object
  5389. description: 业务参数
  5390. properties:
  5391. key:
  5392. type: string
  5393. description: 作业键(可省略=全部任务)
  5394. job_key:
  5395. type: string
  5396. description: 作业键(契约字段名,可省略)
  5397. keyword:
  5398. type: string
  5399. description: 关键字(执行编号/任务/结果说明;不检索对象级明细)
  5400. trigger:
  5401. type: string
  5402. description: 触发方式
  5403. enum:
  5404. - 定时
  5405. - 事件
  5406. - 人工
  5407. result:
  5408. type: string
  5409. description: 执行结果
  5410. enum:
  5411. - 成功
  5412. - 部分成功
  5413. - 失败
  5414. - 异常
  5415. date_from:
  5416. type: string
  5417. description: 开始日期(YYYY-MM-DD,Asia/Shanghai 日界)
  5418. pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
  5419. date_to:
  5420. type: string
  5421. description: 结束日期(YYYY-MM-DD,含当日)
  5422. pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
  5423. page:
  5424. type: integer
  5425. description: 页码(0 基,默认 0)
  5426. minimum: 0
  5427. default: 0
  5428. page_size:
  5429. type: integer
  5430. description: 每页条数(默认 50,上限 200)
  5431. minimum: 1
  5432. maximum: 200
  5433. default: 50
  5434. required:
  5435. - data
  5436. responses:
  5437. "200":
  5438. description: 成功。统一信封 code/message/data
  5439. /jobs/run_once@v1:
  5440. post:
  5441. summary: 补跑作业一次
  5442. description: 触发一次指定作业。prod 环境仅总运营可补跑。可选 key:SUB-EFF/SNAPSHOT-FREEZE/DELEG-SYNC/STOP-GEN/OVERDUE/AUTO-CLOSE/RECON/ORPHAN-CLEAN/REGION-WARM/ONEDIR-CHECK/OSS-ORPHAN-CLEAN。执行轮次落 bos_job_run,返回本轮五格计数与对象级明细。
  5443. operationId: jobs_run_once
  5444. tags:
  5445. - 定时作业
  5446. x-require-auth: true
  5447. x-resource-type: bos.jobs
  5448. x-action: manage
  5449. x-version: v1
  5450. x-permission-visibility: catalog
  5451. requestBody:
  5452. required: true
  5453. description: JSON 请求体,业务字段置于 data
  5454. content:
  5455. application/json:
  5456. schema:
  5457. type: object
  5458. description: 统一信封请求体,业务字段放在 data 内
  5459. properties:
  5460. data:
  5461. type: object
  5462. description: 业务参数
  5463. properties:
  5464. key:
  5465. type: string
  5466. description: 作业键
  5467. enum:
  5468. - SUB-EFF
  5469. - SNAPSHOT-FREEZE
  5470. - DELEG-SYNC
  5471. - STOP-GEN
  5472. - OVERDUE
  5473. - AUTO-CLOSE
  5474. - RECON
  5475. - ORPHAN-CLEAN
  5476. - REGION-WARM
  5477. - ONEDIR-CHECK
  5478. - OSS-ORPHAN-CLEAN
  5479. required:
  5480. - key
  5481. required:
  5482. - data
  5483. responses:
  5484. "200":
  5485. description: 成功。统一信封 code/message/data
  5486. components:
  5487. schemas:
  5488. ApiEnvelope:
  5489. type: object
  5490. description: 统一响应信封
  5491. properties:
  5492. code:
  5493. type: integer
  5494. description: 业务/协议码,0 表示成功
  5495. message:
  5496. type: string
  5497. description: 提示信息
  5498. error_code:
  5499. type: string
  5500. description: 稳定错误码(失败时)
  5501. data:
  5502. description: 业务数据载荷
  5503. required:
  5504. - code
  5505. - message
  5506. PageQuery:
  5507. type: object
  5508. description: 分页查询(0 基)
  5509. properties:
  5510. page:
  5511. type: integer
  5512. description: 页码(0 基索引,默认 0)
  5513. minimum: 0
  5514. default: 0
  5515. page_size:
  5516. type: integer
  5517. description: 每页条数(默认 20,上限 200)
  5518. minimum: 1
  5519. maximum: 200
  5520. default: 20
  5521. keyword:
  5522. type: string
  5523. description: 关键字筛选(可选)