| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756 |
- openapi: 3.0.0
- info:
- title: klt-bos
- version: 0.1.0
- description: |
- 恪澜通运营支撑扩展微服务(klt-bos)。
- 统一请求信封:`{ "data": { … } }`;统一响应信封:`{ code, message, error_code?, data }`。
- 业务错误码段 60000–60999(注意:2026-11-07 平台新口径:`60000` 以前平台已保留 ⇒
- 原 20000–20999 **整体 +40000 平移**,块结构与段内顺位不变;这是第二次对外契约破坏性平移)。
- 本服务**产出**的数字码落在该段内;唯一在册例外=**鉴权失败类透传平台原码**:
- 未认证 `11000`、无权限 `11001`(业主 2026-11-07 裁定=不收段,含平台 SDK 鉴权闸门
- 在本进程内产出的响应,业务侧不得改写)。其余平台通用码(11100/11103/11104/10110)
- 仍由 `S` 段自造码承接,平台原码在 `message` 原文保留。
- 通用块 60000–60049(`S` 段):`KLT-S407`/60001 通用冲突、`KLT-S20002`/11000 未认证(透传)、
- `KLT-S20003`/11001 无权限(透传)、`KLT-S20004`/60004 参数缺失或格式错误、`KLT-S20005`/60005 对象不存在、
- `KLT-S20006`/60006 下游依赖失败、`KLT-S20007`/60007 内部错误、`KLT-S20008`/60008 功能未实现;
- 注意:`KLT-*` 字符串不随段位改名(对外稳定契约)⇒ 字符串内嵌数字与 `code` 已脱钩。
- 成功码沿用平台统一值 10000。调用方断言**只绑** `error_code`(`KLT-*`),不绑数字顺位。
- 经网关对外前缀:`/api/klt/klt-bos/{resource}/{action}@v1`(本文件路径不含 namespace 前缀;
- 前缀口径=注册中心 `services/registry.rs:707` `format!("/api/{namespace}/{service_name}{path}")`,
- ⇒ namespace=`klt` + service_name=`klt-bos`。注意:此前写成的 `/api/klt/bos/` 系**前缀漂移**,
- 若本服务以 `prefix_mode=strip_prefix` 注册会被剥掉一段而全链路 404(平台 v1.5 件 §2.4)。)
- 分页约定:请求页码 0 基;呈现时再转为 1 基。
- x-error-code-range:
- start: 60000
- end: 60999
- servers:
- - url: /
- tags:
- - name: 系统健康
- description: 服务存活与状态探测,不含业务写操作。
- - name: 认证与激活
- description: 当前登录上下文查询;免登录的激活码校验与密码设置。
- - name: 区域管理
- description: 区域树节点新建、改名、删除与可见范围查询。
- - name: 账号管理
- description: 账号开通、状态、激活码、改密与客户分账号。
- - name: 运营商
- description: 运营商建档与对账账号。
- - name: 合伙人
- description: 合伙人建档、负责范围读写。
- - name: 运营团队
- description: 运营团队(ent_team)档案、成员与负责范围。
- - name: 运维团队与成员
- description: 运维团队建档、成员、分派方式、覆盖客户与成员范围。
- - name: 客户管理
- description: 客户建档、改挂区域、归属变更与变更历史。
- - name: 批量导入
- description: 客户批量导入模板、提交、批次、续传与导出。
- - name: 交付现状
- description: 在册资源一览与导出(讨论稿§7.7:客户详情页签、订阅详情当前资源、门户摘要三处共用台账取数)
- - name: 套餐档位
- description: 固定/自定义套餐档位维护。
- - name: 合同
- description: 合同新建、编辑与查询(含服务条目与 IP 条件)。
- - name: 订阅
- description: 订阅开通、升降配、叠加与查询。
- - name: 成本与分成
- description: 成本项定义、成本金额与分成规则。
- - name: 运维视图
- description: 运维侧只读首页概览。
- - name: 定时作业
- description: 已注册作业清单、启停、执行记录与补跑。
- paths:
- /health:
- get:
- summary: 健康检查
- description: 服务存活探测,无需登录。
- operationId: health
- tags:
- - 系统健康
- x-require-auth: false
- x-resource-type: bos.health
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /health@v1:
- get:
- summary: 健康检查(v1)
- description: 服务存活探测,无需登录。
- operationId: health_v1
- tags:
- - 系统健康
- x-require-auth: false
- x-resource-type: bos.health
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ping@v1:
- get:
- summary: 存活探测
- description: 需登录的轻量探测,返回服务状态与绑定信息。
- operationId: ping
- tags:
- - 系统健康
- x-require-auth: true
- x-resource-type: bos.ping
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /auth/context@v1:
- get:
- summary: 当前登录上下文
- description: 返回当前登录身份、业务角色、主体类型/ID、可见形态等;首次业务请求在此完成未激活/已过期拦截。
- operationId: auth_context
- tags:
- - 认证与激活
- x-require-auth: true
- x-resource-type: bos.auth
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /region/create@v1:
- post:
- summary: 新建区域节点
- description: 在区域树下新建省/市/区县节点。admin 任意层级;区域运营主/子账号仅限本团队负责范围内已有省份下建市/区县。
- operationId: region_create
- tags:
- - 区域管理
- x-require-auth: true
- x-resource-type: bos.region
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 新建区域参数
- properties:
- parent_node_id:
- type: string
- description: 父节点 ID;根下建省时可空
- node_name:
- type: string
- description: 本级区域名称
- level:
- type: string
- description: 层级提示(省/市/区县等,业务侧自持,可选)
- required:
- - node_name
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /region/rename@v1:
- post:
- summary: 重命名区域节点
- description: 仅修改节点名称 node_name,不改层级与父子关系。
- operationId: region_rename
- tags:
- - 区域管理
- x-require-auth: true
- x-resource-type: bos.region
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- node_id:
- type: string
- description: 区域节点 ID
- node_name:
- type: string
- description: 新名称
- required:
- - node_id
- - node_name
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /region/delete@v1:
- post:
- summary: 删除区域节点
- description: 仅 admin。须提交 confirm_name(与当前区域名逐字一致)并通过三重守卫(无下级/无挂载客户/无引用)。
- operationId: region_delete
- tags:
- - 区域管理
- x-require-auth: true
- x-resource-type: bos.region
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- node_id:
- type: string
- description: 待删除区域节点 ID
- confirm_name:
- type: string
- description: 确认名称,须与当前区域名逐字一致
- required:
- - node_id
- - confirm_name
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /region/tree@v1:
- post:
- summary: 查询可见区域树
- description: 按操作人可见范围返回区域节点集合/树;运营主/子账号只见本范围及下级。注意:2026-11-08 由 GET 改 POST(R-5:GET 无请求体,网关无法注入授权上界)。
- operationId: region_tree
- tags:
- - 区域管理
- x-require-auth: true
- x-resource-type: bos.region
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- x-enumeration-kind: tree
- requestBody:
- required: true
- description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- description: 无业务参数
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /region/subtree@v1:
- post:
- summary: 查询区域子树
- description: 挂载弹窗左树、区域钻取共用;按可见范围裁剪。
- operationId: region_subtree
- tags:
- - 区域管理
- x-require-auth: true
- x-resource-type: bos.region
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 子树查询参数
- properties:
- node_id:
- type: string
- description: 根节点 ID(可选;空则按可见根展开)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /region/change_log@v1:
- get:
- summary: 区域变更流水
- description: 仅 admin 可见;运营子账号可见节点但不可见变更流水。
- operationId: region_change_log
- tags:
- - 区域管理
- x-require-auth: true
- x-resource-type: bos.region
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /region/orphans@v1:
- post:
- summary: 悬空区域节点
- description: 查询悬空/孤儿节点;按节点所在区域分派可见性,admin 全量。注意:2026-11-08 由 GET 改 POST(R-5)。
- operationId: region_orphans
- tags:
- - 区域管理
- x-require-auth: true
- x-resource-type: bos.region
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- x-enumeration-kind: tree
- requestBody:
- required: true
- description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- description: 无业务参数
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/get_list@v1:
- post:
- summary: 成员账号列表
- description: 列登录名/手机号(掩码)/角色/主体/主-子账号标记/启停状态,并下发激活码生命周期(交付、激活、设密时间与有效截止日)。`status`=账号启停(`bos_user_binding.status`),`activation_status`=激活态(`bos_account_ext.status`),两者正交。运维侧全量,团队侧限本团队成员。注意:「姓名」列无数据源(`bos_user_binding` 无该列),见总则§18.3。
- operationId: account_get_list
- tags:
- - 账号管理
- x-require-auth: true
- x-resource-type: bos.account
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: false
- description: 分页与过滤(page/page_size/keyword/role_code/subject_type/subject_id/status/activation_status),业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/get_list@v1:
- post:
- summary: 运营团队列表
- 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=原型回改删两列)。
- operationId: ent_team_get_list
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: false
- description: 分页与过滤(page/page_size/keyword),业务字段置于 data。keyword=「按名称 / 备注」模糊匹配(`team_name_norm LIKE %q%` **OR** `remark LIKE %q%`,第 1 册 05 册§5.4 OR-09)
- content:
- application/json:
- schema:
- type: object
- responses:
- "200":
- description: '成功。统一信封 code/message/data;items[] 含 remark(备注,VARCHAR(200) NULL,未配置回 null)'
- /ops_team/get_list@v1:
- post:
- summary: 运维团队列表
- description: 一页列出全部团队,带可分配工单类型、成员数与派单/结算口径。注意:「未完成工单」「超期未完成」两列负载暂无数源(工单表属第 2 册),回 null+顶层 load_pending,见总则§18.3。
- operationId: ops_team_get_list
- tags:
- - 运维团队
- x-require-auth: true
- x-resource-type: bos.ops_team
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: false
- description: 分页与过滤(page/page_size/keyword/region_node_id),业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /audit/get_list@v1:
- post:
- summary: 审计日志检索
- description: SC-04 六列(时间/操作人/操作类型/对象/变更前/变更后);时间倒序+(occurred_at,id) 游标,不用 OFFSET。注意:bos_audit_log 暂无写入口,落地前恒空集(前端逐字空态「可见范围内暂无记录」),见总则§18.3。
- operationId: audit_get_list
- tags:
- - 审计日志
- x-require-auth: true
- x-resource-type: bos.audit
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: false
- description: 游标与检索条件(cursor/page_size/object_type/object_ref/actor_user_id/occurred_from/occurred_to/keyword),业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/provision@v1:
- post:
- summary: 开通账号
- description: 四入口共用开通管线。唯一性守卫(登录名/手机号)先于平台调用;角色与主体须一致。
- operationId: account_provision
- tags:
- - 账号管理
- x-require-auth: true
- x-resource-type: bos.account
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- username:
- type: string
- description: 登录名(归一化后全站唯一)
- role_code:
- type: string
- description: 业务角色码
- subject_type:
- type: string
- description: 主体类型(operator/partner/ent_team/ops_team/customer 等)
- subject_id:
- type: string
- description: 主体 ID
- mobile:
- type: string
- description: 手机号(可选,唯一)
- required:
- - username
- - role_code
- - subject_type
- - subject_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/update_status@v1:
- post:
- summary: 停用或恢复账号
- description: 停用/恢复账号状态;不可操作当前登录账号。
- operationId: account_update_status
- tags:
- - 账号管理
- x-require-auth: true
- x-resource-type: bos.account
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- user_id:
- type: string
- description: 目标用户 ID
- status:
- type: string
- description: 目标状态(如 disabled/active)
- required:
- - user_id
- - status
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/reset_code@v1:
- post:
- summary: 重置激活码
- description: 仅未激活账号可重置;已激活拒绝。新码仅当次返回。
- operationId: account_reset_code
- tags:
- - 账号管理
- x-require-auth: true
- x-resource-type: bos.account
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- user_id:
- type: string
- description: 目标用户 ID
- required:
- - user_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/export_codes@v1:
- post:
- summary: 导出激活码
- 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` 如实回布尔。
- operationId: account_export_codes
- tags:
- - 账号管理
- x-require-auth: true
- x-resource-type: bos.account
- x-action: export
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- user_ids:
- type: array
- description: 按本人可见范围收窄后的用户 ID 列表(不可传空列表:平台侧空值=项目内全量导出)
- minItems: 1
- items:
- type: string
- description: 用户 ID
- validity:
- type: string
- description: 导出口径(平台取值域):valid=仍有效(只读,缺省);expired=已过期(写);all=全部(写)。不接受 active——平台合法值是 valid,传 active 会被 11103 拒收
- default: valid
- enum:
- - valid
- - expired
- - all
- required:
- - user_ids
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/change_password@v1:
- post:
- summary: 自助修改密码
- description: 已登录用户修改本人密码;新旧相同不保存。
- operationId: account_change_password
- tags:
- - 账号管理
- x-require-auth: true
- # AC-05 明定「任何已登录角色」:不挂业务权限键(`bos.account.manage` 只授给运营侧,
- # 客户/分账号/合伙人/运营商会被网关 11001 挡掉)。登录即可=复用所有人都在的
- # `bos.auth.view@v1`,身份边界由 handler 的「只改本人」保证。
- x-resource-type: bos.auth
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- old_password:
- type: string
- description: 原密码
- new_password:
- type: string
- description: 新密码
- required:
- - old_password
- - new_password
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/profile/update@v1:
- post:
- summary: 本人维护姓名
- description: AC-05 个人资料;仅限本人。只写账号级自填姓名(bos_account_ext.display_name),不改主体档案(客户联系人/运营商名/团队名归运营侧)。空串或 null=清除自填、回落到档案派生名;超 64 字符或含控制字符 ⇒ 60004。
- operationId: account_profile_update
- tags:
- - 账号管理
- x-require-auth: true
- # AC-05:任何已登录角色且仅限本人 ⇒ 登录即可,不挂业务权限键(`bos.account.manage` 会把客户等角色挡在网关)。
- x-resource-type: bos.auth
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- display_name:
- type: string
- maxLength: 64
- description: 本人姓名;空串或 null=清除自填(回落到档案派生名)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/notify_pref@v1:
- get:
- summary: 读通知投递偏好
- description: AC-06;只读本人三通道(站内/邮箱/短信)的 enabled/available/address_hint。站内恒开不可关;地址摘要一律脱敏。任何已登录角色。
- operationId: account_notify_pref
- tags:
- - 账号管理
- x-require-auth: true
- # AC-06:任何已登录角色只读本人;不挂业务权限键(见 06-接口清单「登录即可」)。
- x-resource-type: bos.auth
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/notify_pref/save@v1:
- post:
- summary: 保存通知投递开关
- description: AC-06;仅限本人(user_id 取登录上下文)。站内投递不可关闭(KLT-A004/60092);未绑定手机号不能开启短信(KLT-A005/60093)。关闭是合法动作、不发码。
- operationId: account_notify_pref_save
- tags:
- - 账号管理
- x-require-auth: true
- # AC-06:任何已登录角色且仅限本人 ⇒ 登录即可,不挂业务权限键。
- x-resource-type: bos.auth
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- inapp_enabled:
- type: boolean
- description: 站内投递开关;只接受 true/缺省,false ⇒ KLT-A004
- mail_enabled:
- type: boolean
- description: 邮箱投递开关
- sms_enabled:
- type: boolean
- description: 短信投递开关;无绑定手机号时 true ⇒ KLT-A005
- required:
- - mail_enabled
- - sms_enabled
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/notify_email@v1:
- post:
- summary: 本人维护通知投递邮箱
- description: AC-06;仅限本人。空串=清空登记(合法动作);格式或长度不符 ⇒ KLT-A006/60094。不要求全站唯一。
- operationId: account_notify_email
- tags:
- - 账号管理
- x-require-auth: true
- # AC-06:任何已登录角色且仅限本人 ⇒ 登录即可,不挂业务权限键。
- x-resource-type: bos.auth
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- email:
- type: string
- maxLength: 254
- description: 通知投递邮箱;空串或 null=清空登记
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /account/notify_email/set@v1:
- post:
- summary: 运营代办维护通知投递邮箱
- description: AC-06;admin 全域、opsMain 负责范围内(opsSub 只读)。与本人自助口同一套格式校验(KLT-A006/60094),范围外按 11104 语义拒绝。
- operationId: account_notify_email_set
- tags:
- - 账号管理
- x-require-auth: true
- x-resource-type: bos.account
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- user_id:
- type: string
- description: 目标账号 ID
- email:
- type: string
- maxLength: 254
- description: 通知投递邮箱;空串或 null=清空登记
- required:
- - user_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /activation/verify@v1:
- post:
- summary: 激活并设置密码
- description: 免登录豁免接口。校验激活码后设置新密码;按来源 IP+码窗口限流,不设失败计数锁死。
- operationId: activation_verify
- tags:
- - 认证与激活
- x-require-auth: false
- x-resource-type: bos.activation
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- code:
- type: string
- description: 激活码
- new_password:
- type: string
- description: 新密码(建议不少于 8 位)
- minLength: 8
- required:
- - code
- - new_password
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /activation/precheck@v1:
- post:
- summary: 激活第 1 步预校验(登录名与激活状态)
- description: 免登录豁免接口。在设密步之前按登录名校验账号侧前置:已激活/已停用/未发码/已过期四类在第 1 步拦下;激活码明文仍由平台 bootstrap/consume 核销。
- operationId: activation_precheck
- tags:
- - 认证与激活
- x-require-auth: false
- x-resource-type: bos.activation
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- login_name:
- type: string
- description: 登录名(平台定位账号的必填参数)
- code:
- type: string
- description: 激活码(仅作限流隔离键;码值由平台核销)
- required:
- - login_name
- required:
- - data
- x-error-codes: [60006, 60052, 60076, 60088]
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /operator/create@v1:
- post:
- summary: 新建运营商
- description: 运营商建档。所属区域必须是省级节点;同省份×品牌唯一;可写结算口径。
- operationId: operator_create
- tags:
- - 运营商
- x-require-auth: true
- x-resource-type: bos.operator
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- name:
- type: string
- description: 运营商名称
- brand:
- type: string
- description: 品牌:移动/联通/电信
- region_node_id:
- type: string
- description: 建档区域节点 ID(必须省级)
- is_province_node:
- type: boolean
- description: 是否省级节点标记(服务端校验用,可选)
- settle_mode:
- type: string
- description: 结算方式:ratio=比例;amount=固定金额;per_account=每账号
- enum:
- - ratio
- - amount
- - per_account
- settle_value:
- type: number
- description: 结算值:比例时 0<x≤100;金额/每账号时为分且 >0
- required:
- - name
- - brand
- - region_node_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /operator/update@v1:
- post:
- summary: 编辑运营商
- description: 编辑运营商档案;改品牌/省份不得绕过省份×品牌唯一与省级节点校验。
- operationId: operator_update
- tags:
- - 运营商
- x-require-auth: true
- x-resource-type: bos.operator
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- operator_id:
- type: string
- description: 运营商 ID
- name:
- type: string
- description: 运营商名称
- brand:
- type: string
- description: 品牌:移动/联通/电信
- region_node_id:
- type: string
- description: 建档区域节点 ID(必须省级)
- is_province_node:
- type: boolean
- description: 是否省级节点标记(可选)
- settle_mode:
- type: string
- description: 结算方式:ratio/amount/per_account
- settle_value:
- type: number
- description: 结算值
- row_version:
- type: integer
- description: 乐观锁版本(若启用)
- required:
- - operator_id
- - name
- - brand
- - region_node_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /operator/delete@v1:
- post:
- summary: 删除运营商
- description: 删除前六项检查并级联注销对账账号。
- operationId: operator_delete
- tags:
- - 运营商
- x-require-auth: true
- x-resource-type: bos.operator
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- operator_id:
- type: string
- description: 运营商 ID
- required:
- - operator_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /operator/get_list@v1:
- post:
- summary: 运营商列表
- description: 卡片口径:建档区域或下挂客户落在本可见范围。
- operationId: operator_get_list
- tags:
- - 运营商
- x-require-auth: true
- x-resource-type: bos.operator
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- brand:
- type: string
- description: 品牌筛选(可选)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /operator/recon_account/create@v1:
- post:
- summary: 创建对账账号
- description: 一家运营商至多一个对账账号;初始密码仅当次显示。
- operationId: operator_recon_account_create
- tags:
- - 运营商
- x-require-auth: true
- x-resource-type: bos.operator.recon_account
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- operator_id:
- type: string
- description: 运营商 ID
- username:
- type: string
- description: 对账账号登录名
- mobile:
- type: string
- description: 手机号(可选)
- required:
- - operator_id
- - username
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /operator/recon_account/get@v1:
- post:
- summary: 查询对账账号
- description: 只回状态提示(如「未发送,线下告知本人」),不回密码。
- operationId: operator_recon_account_get
- tags:
- - 运营商
- x-require-auth: true
- x-resource-type: bos.operator.recon_account
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- operator_id:
- type: string
- description: 运营商 ID
- required:
- - operator_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /partner/create@v1:
- post:
- summary: 新建合伙人
- description: 合伙人建档并同步开通账号;名称全站唯一;结算字段仅 admin 可写。
- operationId: partner_create
- tags:
- - 合伙人
- x-require-auth: true
- x-resource-type: bos.partner
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- name:
- type: string
- description: 合伙人名称(全站唯一)
- duty_desc:
- type: string
- description: 职务说明(可选)
- region_node_id:
- type: string
- description: 建档区域节点 ID
- mobile:
- type: string
- description: 手机号(可选)
- username:
- type: string
- description: 登录名(开通账号用)
- settle_mode:
- type: string
- description: 结算方式(仅 admin 可写,可选)
- settle_value:
- type: number
- description: 结算值(仅 admin 可写,可选)
- required:
- - name
- - region_node_id
- - username
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /partner/update@v1:
- post:
- summary: 编辑合伙人
- description: 编辑合伙人资料;登录名不可改。
- operationId: partner_update
- tags:
- - 合伙人
- x-require-auth: true
- x-resource-type: bos.partner
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- partner_id:
- type: string
- description: 合伙人 ID
- name:
- type: string
- description: 合伙人名称(全站唯一)
- duty_desc:
- type: string
- description: 职务说明(可选)
- region_node_id:
- type: string
- description: 建档区域节点 ID
- mobile:
- type: string
- description: 手机号(可选)
- settle_mode:
- type: string
- description: 结算方式(仅 admin 可写,可选)
- settle_value:
- type: number
- description: 结算值(仅 admin 可写,可选)
- row_version:
- type: integer
- description: 乐观锁版本(若启用)
- required:
- - partner_id
- - name
- - region_node_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /partner/delete@v1:
- post:
- summary: 删除合伙人
- description: 删除合伙人档案及相关授权。
- operationId: partner_delete
- tags:
- - 合伙人
- x-require-auth: true
- x-resource-type: bos.partner
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- partner_id:
- type: string
- description: 合伙人 ID
- required:
- - partner_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /partner/get_list@v1:
- post:
- summary: 合伙人列表
- description: 卡片口径:建档区域落在本范围(含下级)。
- operationId: partner_get_list
- tags:
- - 合伙人
- x-require-auth: true
- x-resource-type: bos.partner
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /partner/scope/get@v1:
- post:
- summary: 读取合伙人负责范围
- description: 返回该合伙人的 region/customer 两类 bos_data_scope。注意:2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。
- operationId: partner_scope_get
- tags:
- - 合伙人
- x-require-auth: true
- x-resource-type: bos.partner.scope
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: 统一信封请求体(无业务参数)
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- description: 无业务参数
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /partner/scope/save@v1:
- post:
- summary: 保存合伙人负责范围
- description: 写入 bos_data_scope(holder_type=partner);允许保存为空;保存即 bump epoch。
- operationId: partner_scope_save
- tags:
- - 合伙人
- x-require-auth: true
- x-resource-type: bos.partner.scope
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- partner_id:
- type: string
- description: 合伙人 ID
- region_node_ids:
- type: array
- description: 负责区域节点 ID 列表(可空)
- items:
- type: string
- description: 区域节点 ID
- customer_ids:
- type: array
- description: 负责客户 ID 列表(可空)
- items:
- type: string
- description: 客户 ID
- required:
- - partner_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/create@v1:
- post:
- summary: 新建运营团队
- description: 仅 admin。新建运营团队,负责范围初始为空。
- operationId: ent_team_create
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_name:
- type: string
- description: 团队名称
- primary_username:
- type: string
- description: 主账号登录名(可选)
- primary_mobile:
- type: string
- description: 主账号手机号(可选)
- primary_name:
- type: string
- maxLength: 64
- description: 主账号姓名(可选,落 `bos_account_ext.display_name`;下拉框按姓名选人,前端必填,未带=回落登录名)
- remark:
- type: string
- maxLength: 200
- description: 备注(可选,去空白后 ≤200 字符;`ent_team.remark VARCHAR(200) NULL`,缺省=落 NULL)。不参与唯一键、不参与算账与判权谓词
- required:
- - team_name
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/update@v1:
- post:
- summary: 编辑运营团队
- description: 仅 admin。编辑团队资料(改名/备注)。注意:请求体与出参不含 `settle_mode`/`settle_value`(运营团队不是分成方,第 4 册§5.1/§5.2,总则§18.3 `PG-7` 路线 A)。备注变更须写审计前后值(记文字)。
- operationId: ent_team_update
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- team_name:
- type: string
- description: 团队名称
- remark:
- type: string
- maxLength: 200
- description: 备注(`ent_team.remark VARCHAR(200) NULL`)。三态语义:不带本键=不改本列;带空白串=清空为 NULL;带文本=设值(去空白后 ≤200 字符)。变更写审计前后值
- row_version:
- type: integer
- description: 乐观锁版本(若启用)
- required:
- - team_id
- - team_name
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/delete@v1:
- post:
- summary: 删除运营团队
- description: 仅 admin。内置「总部·不限区域」团队不可删。
- operationId: ent_team_delete
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- required:
- - team_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/member_add@v1:
- post:
- summary: 添加运营团队成员
- description: 每团队有且仅有一个主账号;首个成员即主账号;成员姓名(`name`)落 `bos_account_ext.display_name`(未带=回落登录名)。不可删除当前登录账号。
- operationId: ent_team_member_add
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- username:
- type: string
- description: 成员登录名
- name:
- type: string
- maxLength: 64
- description: 成员姓名(落 `bos_account_ext.display_name`;前端必填,未带=回落登录名)
- mobile:
- type: string
- description: 手机号(可选)
- is_primary:
- type: boolean
- description: 是否设为主账号(可选)
- required:
- - team_id
- - username
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/member_update@v1:
- post:
- summary: 编辑运营团队成员资料
- description: 仅 admin。改姓名(`bos_account_ext.display_name`)、手机号与运营账号可承接工单类型清单(`ticket_types`);登录名与本/子身份不变(改名办 `ent_team/transfer_primary@v1`)。
- operationId: ent_team_member_update
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- user_id:
- type: string
- description: 成员用户 ID
- name:
- type: string
- maxLength: 64
- description: 姓名(可选;缺省=不改;空白串=拒绝,姓名是下拉框选人的展示值)
- mobile:
- type: string
- description: 手机号(可选;缺省/空串=不改;全站唯一)
- ticket_types:
- type: array
- items:
- type: string
- description: 可承接工单类型清单(`ops_account_ticket_type`,工单§3.4.2 判据二,2026-11-17 新增):缺省=不改;非空=整体替换,且**必须含 `renewal`**(续签单只由运营账号受理,清单不可清空;`[]` 或漏掉续签一律拒绝)。取值限八类型码(`open`/`service_open`/`updown`/`expiry_stop`/`service_stop`/`fault`/`after_sale`/`renewal`),只对 `role_code ∈ opsMain/opsSub` 的账号生效。新建与存量账号默认只播种 `renewal`
- required:
- - team_id
- - user_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/member_remove@v1:
- post:
- summary: 移除运营团队成员
- description: 内置主账号不可删不可转交;不可删除当前登录账号。
- operationId: ent_team_member_remove
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- user_id:
- type: string
- description: 成员用户 ID
- required:
- - team_id
- - user_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/transfer_primary@v1:
- post:
- summary: 转交运营团队主账号
- description: 总运营可办理任意团队;运营主账号(opsMain)只能转交本团队(限本人所属团队)。同事务切换两人的 is_primary 标记并同步 role_code(opsMain↔opsSub),登录名与负责范围不变;内置总运营团队不可转交,跨团队接收方直接拒。审计记转出与转入账号名。
- operationId: ent_team_transfer_primary
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- from_user_id:
- type: string
- description: 原主账号用户 ID
- to_user_id:
- type: string
- description: 新主账号用户 ID
- required:
- - team_id
- - from_user_id
- - to_user_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/scope/get@v1:
- post:
- summary: 读取运营团队负责范围
- description: 仅 admin。返回团队区域负责范围。注意:2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。
- operationId: ent_team_scope_get
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team.scope
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: 统一信封请求体(无业务参数)
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- description: 无业务参数
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ent_team/scope/save@v1:
- post:
- summary: 保存运营团队负责范围
- description: 仅 admin。勾选区域写入 bos_data_scope(holder=ent_team),成为区域删除的引用来源。
- operationId: ent_team_scope_save
- tags:
- - 运营团队
- x-require-auth: true
- x-resource-type: bos.ent_team.scope
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- region_node_ids:
- type: array
- description: 负责区域节点 ID 列表
- items:
- type: string
- description: 区域节点 ID
- required:
- - team_id
- - region_node_ids
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_team/create@v1:
- post:
- summary: 新建运维团队
- description: 须指定所属区域、可派工单类型≥1、分派方式与结算口径。注意:2026-11-05 起团队不分类型(无 team_type 键)。
- operationId: ops_team_create
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_team
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_name:
- type: string
- description: 团队名称
- region_node_id:
- type: string
- description: 所属区域节点 ID
- ticket_types:
- type: array
- description: 可派工单类型列表(至少 1 项;⛔ 含 `renewal`——续签单只由运营账号受理,业主 2026-11-17)
- items:
- type: string
- description: 工单类型码
- dispatch_mode:
- type: string
- description: 分派方式:manual=手工;auto_avg=自动均分
- enum:
- - manual
- - auto_avg
- settle_mode:
- type: string
- description: 结算方式
- settle_value:
- type: number
- description: 结算值
- primary_username:
- type: string
- description: 主账号登录名(空则默认「{团队名}主账号」)
- primary_name:
- type: string
- description: 主账号姓名(档案名,1~64 字符;空=未填,列表回落显示登录名)
- primary_mobile:
- type: string
- description: 主账号手机号(可选)
- required:
- - team_name
- - region_node_id
- - ticket_types
- - dispatch_mode
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_team/update@v1:
- post:
- summary: 编辑运维团队
- description: 编辑团队资料。注意:2026-11-05 起团队不分类型,请求体无 team_type 键。
- operationId: ops_team_update
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_team
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- team_name:
- type: string
- description: 团队名称
- region_node_id:
- type: string
- description: 所属区域节点 ID
- ticket_types:
- type: array
- description: 可派工单类型列表(整体替换,至少 1 项;⛔ 含 `renewal`——续签单只由运营账号受理)
- items:
- type: string
- description: 工单类型码
- settle_mode:
- type: string
- description: 结算方式
- settle_value:
- type: number
- description: 结算值
- row_version:
- type: integer
- description: 乐观锁版本(若启用)
- required:
- - team_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_team/delete@v1:
- post:
- summary: 删除运维团队
- description: 删除前校验引用与未办完工单等守卫。
- operationId: ops_team_delete
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_team
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- required:
- - team_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_team/scope/save@v1:
- post:
- summary: 保存运维团队负责范围
- description: 三个范围写入口之一。同事务校验范围包含关系与未办完工单守卫;失败两侧都不落库。
- operationId: ops_team_scope_save
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_team.scope
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- region_node_ids:
- type: array
- description: 负责区域节点 ID 列表
- items:
- type: string
- description: 区域节点 ID
- customer_ids:
- type: array
- description: 负责客户 ID 列表(可空)
- items:
- type: string
- description: 客户 ID
- required:
- - team_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_team/member_add@v1:
- post:
- summary: 添加运维成员
- description: 新建成员档案(含成员姓名)并开通运维子账号(`role_code=ops`)。注意:2026-11-05 起成员不分类型,服务侧只校验 `ticket_types` 是团队可分配类型的子集(`KLT-I105`,可为空=不接单)。注意:2026-11-16 起 `ticket_mode` 与负责范围同构:`follow_team`=随团队(成员级零行),`custom`=勾选子集。注意:`renewal` 不属于运维可承接类型(续签单只由运营账号受理,业主 2026-11-17),传入即拒。
- operationId: ops_team_member_add
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_team
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- ticket_types:
- type: array
- description: 该成员可处理的工单类型(须为团队可分配类型的子集;空数组=不接单,如录入人员;⛔ 含 `renewal`——续签单只由运营账号受理)。`ticket_mode=follow_team` 时不得传本键
- items:
- type: string
- description: 工单类型码
- ticket_mode:
- type: string
- description: 可处理类型形态:follow_team=随团队可分配类型(成员级零行,团队改类型自动跟随);custom=勾选子集。缺省=custom(不带 ticket_mode 时按 ticket_types 落子集,不带=不接单)
- enum:
- - follow_team
- - custom
- username:
- type: string
- description: 登录名
- display_name:
- type: string
- description: 成员姓名(必填;1~64 字符、不含控制字符)。与登录名分列,列表「成员」列显示该值
- mobile:
- type: string
- description: 手机号(可选)
- required:
- - team_id
- - username
- - display_name
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_team/member_update@v1:
- post:
- summary: 更新运维成员
- description: 可改成员姓名、手机号与可处理工单类型(形态+子集,各字段缺省=不改)。注意:2026-11-05 起成员不分类型,不因类型变更改写 role_code;`custom` 时子集落 ops_member_ticket_type,`follow_team` 时清空该成员行并随团队类型。
- operationId: ops_team_member_update
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_team
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- ticket_types:
- type: array
- description: 该成员可处理的工单类型(整体替换;须为团队可分配类型的子集;空数组=不接单;⛔ 含 `renewal`——续签单只由运营账号受理)。`ticket_mode=follow_team` 时不得传本键
- items:
- type: string
- description: 工单类型码
- ticket_mode:
- type: string
- description: 可处理类型形态:follow_team=随团队(清空该成员的类型行);custom=按 ticket_types 整体替换。缺省且带 ticket_types ⇒ 按 custom;都不带 ⇒ 不动类型
- enum:
- - follow_team
- - custom
- member_id:
- type: string
- description: 成员 ID
- display_name:
- type: string
- description: 成员姓名新值;1~64 字符、不含控制字符;缺省=不改,空串非法
- mobile:
- type: string
- description: 手机号(可选)
- required:
- - team_id
- - member_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_team/member_remove@v1:
- post:
- summary: 移除运维成员
- description: 删除前五项检查并注销账号。
- operationId: ops_team_member_remove
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_team
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- member_id:
- type: string
- description: 成员 ID
- required:
- - team_id
- - member_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_member/scope/save@v1:
- post:
- summary: 保存运维成员负责范围
- description: 三个范围写入口之二。scope_mode∈follow_team/region/customer;越界报错不保存。
- operationId: ops_member_scope_save
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_member.scope
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- member_id:
- type: string
- description: 成员 ID
- scope_mode:
- type: string
- description: 范围模式:follow_team=跟随团队;region=按区域;customer=按客户
- enum:
- - follow_team
- - region
- - customer
- targets:
- type: array
- description: region/customer 模式下的目标 ID 列表
- items:
- type: string
- description: 目标 ID
- required:
- - member_id
- - scope_mode
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_team/dispatch_mode/update@v1:
- post:
- summary: 更新分派方式
- description: 与运营侧改同一字段,后写入者生效;默认补记审计。
- operationId: ops_team_dispatch_mode_update
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_team.dispatch_mode
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- team_id:
- type: string
- description: 团队 ID
- dispatch_mode:
- type: string
- description: 分派方式:manual=手工;auto_avg=自动均分
- enum:
- - manual
- - auto_avg
- required:
- - team_id
- - dispatch_mode
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ops_team/coverage/get@v1:
- post:
- summary: 运维团队覆盖客户
- description: 覆盖客户=团队区域范围(Tree) ∩ 本类型归属(Owner),与列表分页同源。注意:2026-11-08 由 GET 改 POST(R-5)。
- operationId: ops_team_coverage_get
- tags:
- - 运维团队与成员
- x-require-auth: true
- x-resource-type: bos.ops_team.coverage
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- x-enumeration-kind: list
- requestBody:
- required: true
- description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- description: 无业务参数
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/create@v1:
- post:
- summary: 新建客户
- description: 客户建档(Opt-11 先挂树后建档)。`mount_request_id` 与 `parent_node_id` 至少给一个:给 `parent_node_id` 时由本接口完成「发号 → 平台资源树注册客户实例 → 回填挂载事实」;给 `mount_request_id` 时就近认领已存在的挂载申请。同时按 组织§4.5 为客户开通主账号(`primary_username` 留空=按主体号自动派生)。完整弹窗字段还可含识别号、联系人、地址、运维团队等。
- operationId: customer_create
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_name:
- type: string
- description: 客户名称
- subject_type:
- type: string
- description: 主体类型
- operator_id:
- type: string
- description: 归属运营商 ID
- partner_id:
- type: string
- description: 归属合伙人 ID(可选)
- mount_request_id:
- type: string
- description: 挂载申请 ID(与 parent_node_id 二选一;有值=认领已有的挂载事实)
- parent_node_id:
- type: string
- description: 所挂区域父节点 ID(与 mount_request_id 二选一;有值=由本接口完成平台挂树并回填挂载事实)
- id_code:
- type: string
- description: 识别号(可选)
- contact_name:
- type: string
- description: 联系人(可选)
- contact_mobile:
- type: string
- description: 联系电话(可选)
- tech_contact_name:
- type: string
- description: 技术联系人姓名(可选)
- tech_contact_mobile:
- type: string
- description: 技术联系人电话(可选)
- finance_contact_name:
- type: string
- description: 财务联系人姓名(可选)
- finance_contact_mobile:
- type: string
- description: 财务联系人电话(可选)
- remark:
- type: string
- description: 客户备注(可选,≤512 字)
- address:
- type: string
- description: 地址(可选)
- ops_team_ids:
- type: array
- description: 所挂运维团队 ID(**单支定案** 2026-11-12:建档必填**恰好 1 支**,数组形态仅兼容调用方;缺支/空数组/>1 支一律拒绝,且须在操作人负责范围内)
- items:
- type: string
- description: 运维团队 ID
- primary_username:
- type: string
- description: 客户主账号登录名(可选;留空=按主体号自动派生)。本接口自行调平台 iam-user/user/create@v1 建号
- primary_mobile:
- type: string
- description: 客户主账号手机号(可选)
- license:
- type: object
- description: 登记材料(营业执照影像,客户§2.1/§3.5;`U-97` 2026-11-03 定案)。**选填**(业主 2026-11-19 定案,⛔ 强制登记)。影像本体由浏览器持自身账号票直传平台 `unified-oss`(本服务不收字节流、不开上传接口),建档只回报落库用的对象键+原始文件名。`object_key` 必须落在 `klt/customer/license/` 前缀下
- properties:
- object_key:
- type: string
- description: 平台 unified-oss 逻辑键(1–512 字符,须以 klt/customer/license/ 开头;不得是 URL/签名链接)
- file_name:
- type: string
- description: 原始文件名(1–128 字符,不含路径分隔符;仅供页面展示)
- required:
- - object_key
- - file_name
- required:
- - customer_name
- - subject_type
- - operator_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/get_list@v1:
- post:
- summary: 客户列表
- description: 按可见范围返回客户列表,支持筛选与分页。
- operationId: customer_get_list
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- region_node_id:
- type: string
- description: 区域筛选(可选)
- operator_id:
- type: string
- description: 运营商筛选(可选)
- partner_id:
- type: string
- description: 合伙人筛选(可选)
- status:
- type: string
- description: 状态筛选(可选)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/get@v1:
- post:
- summary: 客户详情
- 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`。注意:对象键不上响应体、签名不落库。
- operationId: customer_get
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/update@v1:
- post:
- summary: 编辑客户
- description: 编辑客户资料。拒收改写 customer_id/region_node_id/operator_id/partner_id;改识别号须带 change_basis。
- operationId: customer_update
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- customer_name:
- type: string
- description: 客户名称
- subject_type:
- type: string
- description: 主体类型
- id_code:
- type: string
- description: 识别号
- change_basis:
- type: string
- description: 改识别号时的变更依据
- contact_name:
- type: string
- description: 联系人
- contact_mobile:
- type: string
- description: 联系电话
- tech_contact_name:
- type: string
- description: 技术联系人姓名(给了才改)
- tech_contact_mobile:
- type: string
- description: 技术联系人电话(给了才改)
- finance_contact_name:
- type: string
- description: 财务联系人姓名(给了才改)
- finance_contact_mobile:
- type: string
- description: 财务联系人电话(给了才改)
- remark:
- type: string
- description: 客户备注(给了才改;空串=清空;≤512 字)
- address:
- type: string
- description: 地址
- ops_team_ids:
- type: array
- description: 改派运维团队(整体替换当前归属;**单支定案**:最多 1 支——空数组=清空归属⇒拒绝,>1 支⇒拒绝;不提交=不改动)
- items:
- type: string
- description: 运维团队 ID
- row_version:
- type: integer
- description: 乐观锁版本(若启用)
- license:
- type: object
- description: 登记材料(营业执照影像)**整对替换**(客户§3.5 补传/替换,写入口只在本分区)。**选填**(业主 2026-11-19 定案,⛔ 强制登记)。不提交=本次不动影像(不清空);**唯一例外**:本次把 `subject_type` 改为非企业(`individual`/`sole_proprietor`)且库内有影像 ⇒ 影像随本笔**同批撤销**(两列置 `NULL`+`license_file_name` 变更留痕,见 2026-11-15 死锁修复);企业→企业不带 `license` 一律不动影像;库内无影像且本次也不提交时**照常保存其余字段**。`object_key` 须落在 `klt/customer/license/` 下
- properties:
- object_key:
- type: string
- description: 平台 unified-oss 逻辑键(1–512 字符,须以 klt/customer/license/ 开头)
- file_name:
- type: string
- description: 原始文件名(1–128 字符,不含路径分隔符)
- required:
- - object_key
- - file_name
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/delete_precheck@v1:
- post:
- summary: 客户删除前置检查
- description: 返回 can_delete 与 reasons,供删除确认弹窗使用。
- operationId: customer_delete_precheck
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/delete@v1:
- post:
- summary: 删除客户
- description: 删除客户;须携带删除前置检查时的阻塞快照版本。
- operationId: customer_delete
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- precheck_version:
- type: string
- description: 删除前置检查快照版本
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/history@v1:
- post:
- summary: 客户变更历史
- description: 查询客户档案变更流水。
- operationId: customer_history
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/mount_candidates@v1:
- post:
- summary: 改挂候选客户
- description: 返回操作人可见范围内可作为改挂目标的候选客户列表。注意:2026-11-08 由 GET 改 POST(R-5)。
- operationId: customer_mount_candidates
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- x-enumeration-kind: list
- requestBody:
- required: true
- description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- description: 无业务参数
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/influence@v1:
- post:
- summary: 改挂影响面
- description: 改挂前必做前置:未办完工单数、当前责任人与团队、当期是否已出账等。
- operationId: customer_influence
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/move_region@v1:
- post:
- summary: 客户改挂区域
- description: 复合事务改挂区域;新区域省份须等于归属运营商档案省份。
- operationId: customer_move_region
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- new_region_node_id:
- type: string
- description: 新挂载区域节点 ID
- ops_team_ids:
- type: array
- description: 随改挂重绑的运维团队(**单支定案**:最多 1 支;不提交=不改动)
- items:
- type: string
- description: 运维团队 ID
- required:
- - customer_id
- - new_region_node_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /customer/attribution/update@v1:
- post:
- summary: 更新客户归属
- description: 改归属运营商/合伙人;改运营商时档案省份须等于客户所挂区域省份。
- operationId: customer_attribution_update
- tags:
- - 客户管理
- x-require-auth: true
- x-resource-type: bos.customer.attribution
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- operator_id:
- type: string
- description: 新归属运营商 ID(可选)
- partner_id:
- type: string
- description: 新归属合伙人 ID(可选,可清空)
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /import_batch/template_download@v1:
- get:
- summary: 下载导入模板
- description: 返回 14 列 xlsx 模板说明(format/columns/max_rows)。
- operationId: import_batch_template_download
- tags:
- - 批量导入
- x-require-auth: true
- x-resource-type: bos.import_batch
- x-action: export
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /import_batch/submit@v1:
- post:
- summary: 提交客户批量导入
- description: 提交导入行对象列表,单批上限 500 行。列含客户名称、识别号、主体类型、联系人、电话、地址、区域、运营商、合伙人、运维团队、主账号等。
- operationId: import_batch_submit
- tags:
- - 批量导入
- x-require-auth: true
- x-resource-type: bos.import_batch
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- rows:
- type: array
- description: 导入行对象列表(≤500)
- maxItems: 500
- items:
- type: object
- description: 单行导入字段(14 列)
- properties:
- row_no:
- type: integer
- description: 行编号
- customer_name:
- type: string
- description: 客户名称
- id_code:
- type: string
- description: 识别号
- subject_type:
- type: string
- description: 主体类型
- contact_name:
- type: string
- description: 联系人
- contact_mobile:
- type: string
- description: 联系电话
- address:
- type: string
- description: 地址
- region_name:
- type: string
- description: 所挂区域
- operator_name:
- type: string
- description: 运营商
- partner_name:
- type: string
- description: 合伙人
- ops_team_names:
- type: array
- description: 所挂运维团队名称(**单支定案** 2026-11-12:建档必填**恰好 1 支**——一格只填一支名称,不得用「;」分隔多支;留空或多支=该行校验失败)
- items:
- type: string
- description: 运维团队名称
- primary_username:
- type: string
- description: 主账号登录名
- primary_mobile:
- type: string
- description: 主账号手机号
- required:
- - rows
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /import_batch/get_list@v1:
- post:
- summary: 导入批次列表
- description: 查询本人可见范围内的导入批次。
- operationId: import_batch_get_list
- tags:
- - 批量导入
- x-require-auth: true
- x-resource-type: bos.import_batch
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /import_batch/get@v1:
- post:
- summary: 导入批次详情
- description: 按批次 ID/编号查询详情与行状态。
- operationId: import_batch_get
- tags:
- - 批量导入
- x-require-auth: true
- x-resource-type: bos.import_batch
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- batch_id:
- type: string
- description: 批次 ID(与 batch_no 二选一)
- batch_no:
- type: string
- description: 批次编号(与 batch_id 二选一)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /import_batch/resume@v1:
- post:
- summary: 失败行续传
- description: 针对失败行提交续传数据,行号对应原 row_no。
- operationId: import_batch_resume
- tags:
- - 批量导入
- x-require-auth: true
- x-resource-type: bos.import_batch
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- batch_id:
- type: string
- description: 批次 ID
- rows:
- type: array
- description: 续传行列表(含原 row_no)
- items:
- type: object
- required:
- - batch_id
- - rows
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /import_batch/export_codes@v1:
- post:
- summary: 按批次导出激活码
- 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` 的批次行账号求交;调用方因此不得把该接口理解为「只导出该批次产生的账号」。
- operationId: import_batch_export_codes
- tags:
- - 批量导入
- x-require-auth: true
- x-resource-type: bos.import_batch
- x-action: export
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- batch_id:
- type: string
- description: 批次 ID
- user_ids:
- type: array
- description: 按本人可见范围收窄后的用户 ID 列表(不可传空列表:平台侧空值=项目内全量导出)
- minItems: 1
- items:
- type: string
- description: 用户 ID
- validity:
- type: string
- description: 导出口径(平台取值域):valid=仍有效(只读,缺省);expired=已过期(写);all=全部(写)。不接受 active
- default: valid
- enum:
- - valid
- - expired
- - all
- required:
- - batch_id
- - user_ids
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /import_batch/export_customers@v1:
- post:
- summary: 按批次导出客户
- description: 按导入批次导出客户 15 列结果。
- operationId: import_batch_export_customers
- tags:
- - 批量导入
- x-require-auth: true
- x-resource-type: bos.import_batch
- x-action: export
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- batch_id:
- type: string
- description: 批次 ID
- required:
- - batch_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /sub_account/get_list@v1:
- post:
- summary: 分账号列表
- description: 查询客户下属分账号列表。
- operationId: sub_account_get_list
- tags:
- - 账号管理
- x-require-auth: true
- x-resource-type: bos.sub_account
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /sub_account/update@v1:
- post:
- summary: 更新分账号
- description: 运营可改 display_name 与 network_account_name;客户主账号只许改 display_name。
- operationId: sub_account_update
- tags:
- - 账号管理
- x-require-auth: true
- x-resource-type: bos.sub_account
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- sub_account_id:
- type: string
- description: 分账号 ID
- display_name:
- type: string
- description: 显示名称/用途说明
- network_account_name:
- type: string
- description: 网络侧账号名(运营可改)
- required:
- - sub_account_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /delivery/list@v1:
- post:
- summary: 交付现状(在册资源一览)
- description: '讨论稿§7.7:客户详情「交付现状」页签与订阅详情「当前资源」区块共用。在册资源只认台账 subscription_ip_assignment(released_at IS NULL),⛔ 用“最新一单”;实测参数只取该账号最近一次成功开通回填并随行下发 measured_at。三态:在用/已到期待回收/已回收(默认只显示前两态)。合同出口与实测出口两列并排,不一致时 exit_mismatch=true。输出不含 port_start/port_end。可见范围复用 customer_scope_pred。'
- operationId: delivery_list
- tags:
- - 交付现状
- x-require-auth: true
- x-resource-type: bos.delivery
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: false
- description: 分页与筛选(page/page_size/customer_id/subscription_id/sub_account_id/keyword/state/include_released),业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /delivery/export@v1:
- post:
- summary: 交付现状导出
- description: '入参与 /delivery/list@v1 逐字同构(同一份 DTO、同一段谓词),导出不另立判据;CSV(UTF-8 带 BOM)首行为 `#` 说明行;行数上限 20000,超限 KLT-R20903 且不产文件、不写审计、不落 OSS;产出成功写 object_type=delivery_export 留痕,留痕失败 KLT-S405。角色 admin/opsMain/opsSub/teamLead。'
- operationId: delivery_export
- tags:
- - 交付现状
- x-require-auth: true
- x-resource-type: bos.delivery
- x-action: export
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: false
- description: 与 /delivery/list@v1 同构的筛选条件(page/page_size 不参与导出)
- content:
- application/json:
- schema:
- type: object
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /line_exit/get_list@v1:
- post:
- summary: 线路出口目录列表
- description: 套餐配置统一维护的线路出口(去空白+小写去重)。合同条目等页面只从这里选择;任何登录角色可读。每条带 ref_count/ref_summary(被合同条目、存量 IP 备案、派生档、订阅引用的合计与构成;IP 备案表自 2026-11-17 起停写,只计入历史行),>0 即目录侧不允许删除。
- operationId: line_exit_get_list
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data(data.items[]=exit_name/exit_key/sort_no/ref_count/ref_summary)
- /line_exit/save@v1:
- post:
- summary: 线路出口目录整段全量替换
- description: 总运营/运营主账号可写;数组顺序即展示顺序。被合同条目、IP 备案、派生档或订阅引用的出口不可删除(整单拒绝并点名引用数)。
- operationId: line_exit_save
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- items:
- type: array
- description: 线路出口整段(全量替换,上限 200 条)
- maxItems: 200
- items:
- type: object
- description: 单个出口
- properties:
- exit_name:
- type: string
- description: 国家/地区名称原文(1~64 字;去空白+小写后不可重复)
- required:
- - exit_name
- required:
- - items
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /ip_bandwidth_tier/get_list@v1:
- post:
- summary: 带宽档位目录列表
- description: 套餐配置「线路出口」tab 内统一维护的带宽档位。✅ 2026-11-17 改用途:主要作为**固定套餐/自定义套餐配置中带宽权益录入的快捷预设**(档位编辑器「03 带宽与权益」点一条即带出上/下行同值),另兼存量 IP 备案的历史引用;⛔ 与工单回填的 5/10/30 封闭三值互不约束。任何登录角色可读。每条带 ref_count/ref_summary(被存量 IP 备案引用的条数;该表自 2026-11-17 起停写),>0 即目录侧不允许删除。
- operationId: ip_bandwidth_tier_get_list
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data(data.items[]=tier_key/tier_name/bandwidth_tier_mbps/bandwidth_committed/sort_no/ref_count/ref_summary)
- /ip_bandwidth_tier/save@v1:
- post:
- summary: 带宽档位目录整段全量替换
- description: 总运营/运营主账号可写;数组顺序即展示顺序(也是套餐编辑器里预设胶囊的顺序);同一兆数只允许一条,「不承诺带宽」(bandwidth_tier_mbps 缺省或 null)全表唯一。被存量 IP 备案引用的档位不可删除(整单拒绝并点名引用条数)。⚠️ 本清单是套餐带宽权益的**快捷预设**,⛔ 反向约束套餐上手填的兆数。
- operationId: ip_bandwidth_tier_save
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- items:
- type: array
- description: 带宽档位整段(全量替换,上限 50 条)
- maxItems: 50
- items:
- type: object
- description: 单个档位
- properties:
- tier_name:
- type: string
- description: 展示名称(1~64 字,如「10 兆」「不承诺带宽」)
- bandwidth_tier_mbps:
- type: integer
- nullable: true
- description: 带宽兆数(1~10000);缺省或 null=「不承诺带宽」
- required:
- - tier_name
- required:
- - items
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /catalog/create@v1:
- post:
- summary: 新建套餐档位
- description: 新建固定/自定义档位。拒收 sub_mode、first_referred_at。自定义档必填 customer_id。Ops 角色只能建自定义档(D-16);created_by=鉴权账号、created_team_id=建档团队快照(D-17)。
- operationId: catalog_create
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- plan_kind:
- type: string
- description: 档位类型:fixed=固定;custom=自定义
- enum:
- - fixed
- - custom
- plan_name:
- type: string
- description: 档位名称
- plan_desc:
- type: string
- description: 套餐说明(报价单权益口径,可空;去首尾空白后 ≤512 字符,超长报 11103)。引用冻结后仍可改(与名称、随附成本项同档)
- plan_family:
- type: string
- description: 交付形态:link=跨境链路(份数恒 1);addon=附加项(份数≥1,不设带宽列)
- enum:
- - link
- - addon
- annual_price_cents:
- type: integer
- description: 年价(分)
- monthly_settle_cents:
- type: integer
- description: 月结算标准(分,可选,1~上限);可录入(2026-11-19 起由只读列改为可写)
- sub_account_quota:
- type: integer
- description: 分账号额度(非负,上限 9999):link 档必须 > 0;addon 档必须为 0(D-15)
- bandwidth_committed:
- type: boolean
- description: 是否承诺带宽:仅 link 档可传(缺省 true);addon 档一律不传(D-18)
- bandwidth_up_mbps:
- type: integer
- description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填。不再有单值 total_bandwidth_mbps(2026-11-05 D8 关闭=该列退役,「总带宽」只是显示列名)
- bandwidth_down_mbps:
- type: integer
- description: 下行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填;与上行同值时界面并显「上下行 N 兆」,不等显「下行 X 兆 / 上行 Y 兆」
- customer_id:
- type: string
- description: 自定义档所属客户 ID(custom 必填)
- required:
- - plan_kind
- - plan_name
- - plan_family
- - annual_price_cents
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /catalog/update@v1:
- post:
- summary: 编辑套餐档位
- description: 编辑档位;plan_kind/plan_family 建后不可改(K204);被订阅引用冻结后多数字段只读。
- operationId: catalog_update
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- plan_id:
- type: string
- description: 档位 ID
- plan_name:
- type: string
- description: 档位名称
- plan_desc:
- type: string
- description: 套餐说明(可空;传空串=清空成 null;≤512 字符)。引用冻结后仍可改
- annual_price_cents:
- type: integer
- description: 年价(分)
- monthly_settle_cents:
- type: integer
- description: 月结算标准(分,可选,1~上限);可录入(2026-11-19 起由只读列改为可写)
- sub_account_quota:
- type: integer
- description: 分账号额度(非负,上限 9999):link 档必须 > 0;addon 档必须为 0(D-15)
- bandwidth_committed:
- type: boolean
- description: 是否承诺带宽:true=承诺(缺省);false=该档「不承诺带宽」,上下行两字段一律不传
- bandwidth_up_mbps:
- type: integer
- description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填,关闭「是否承诺带宽」时必不传(档位被订阅引用后随整单只读,K204)
- bandwidth_down_mbps:
- type: integer
- description: 下行带宽(Mbps,整数 1~1000);必填规则同上,两值不折算为单值
- row_version:
- type: integer
- description: 乐观锁版本(若启用)
- required:
- - plan_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /catalog/get_list@v1:
- post:
- summary: 套餐档位列表
- description: 按 plan_kind/plan_family/created_by/created_team_id 等条件筛选档位列表。每行回 plan_family、use_purpose、created_by/created_team_id 及读侧名称 created_by_name/created_team_name(D-17);data.facets 回建档团队/建档人下拉项(服务端在 base 谓词 ∧ plan_kind=custom 上聚合,⛔ 用当前页行凑)。
- operationId: catalog_get_list
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- plan_kind:
- type: string
- description: 档位类型筛选:fixed/custom
- plan_family:
- type: string
- description: 交付形态筛选:link/addon(仅自定义档可筛,固定档带此参报错)
- enum:
- - link
- - addon
- customer_id:
- type: string
- description: 自定义档客户筛选
- created_by:
- type: string
- description: 建档人筛选(R-14 台账收敛;=catalog_plan.created_by 账号 ID)
- created_team_id:
- type: string
- description: 建档团队筛选(R-14 台账收敛;=建档时快照的 catalog_plan.created_team_id)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /catalog/get@v1:
- post:
- summary: 套餐档位详情
- description: 按档位 ID 查询详情。
- operationId: catalog_get
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- plan_id:
- type: string
- description: 档位 ID
- required:
- - plan_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /catalog/delete@v1:
- post:
- summary: 套餐档位条件删除
- description: 按档位 ID 条件删除(第3册§3.7):引用份数+两栏阻塞清单(subscriptions/items),在用⇒KLT-K205;固定档仅 Admin。
- operationId: catalog_delete
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- plan_id:
- type: string
- description: 档位 ID
- required:
- - plan_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /catalog/customer_options@v1:
- post:
- summary: 归属客户下拉
- description: 只列操作人可见客户(自定义档归属客户下拉,第3册§3.2);硬上限 500 行⇒truncated。
- operationId: catalog_customer_options
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.catalog
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- keyword:
- type: string
- description: 客户名称关键字(可选)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /plan_cost_item/get_list@v1:
- post:
- summary: 档位随附成本项列表
- description: 按档位读取随附成本项(第3册§3.5):名称是弱引用,不校验是否在全局清单;frozen 仅供前端提示。
- operationId: plan_cost_item_get_list
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.plan_cost_item
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- plan_id:
- type: string
- description: 档位 ID
- required:
- - plan_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /plan_cost_item/save@v1:
- post:
- summary: 档位随附成本项整段全量替换
- description: 一次提交该档位全部成本项(先按 plan_id 删净再逐条插,第3册§3.5);同档位名称重复⇒KLT-K206。
- operationId: plan_cost_item_save
- tags:
- - 套餐档位
- x-require-auth: true
- x-resource-type: bos.plan_cost_item
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- plan_id:
- type: string
- description: 档位 ID
- items:
- type: array
- description: 成本项整段(全量替换,上限 50 条)
- maxItems: 50
- items:
- type: object
- description: 成本项条目
- properties:
- item_name:
- type: string
- description: 成本项名称(弱引用,1~128 字)
- amount_cents:
- type: integer
- description: 金额(分,≥0)
- minimum: 0
- billing_unit:
- type: string
- description: 计费单位(可选)
- enum:
- - per_customer
- - per_account
- - per_copy
- category:
- type: string
- description: 成本项分类(可选)
- enum:
- - intl_resource
- - device_purchase
- - project_fee
- remark:
- type: string
- description: 备注(可选,上限 512 字)
- sort_no:
- type: integer
- description: 排序号(≥0)
- minimum: 0
- required:
- - item_name
- - amount_cents
- required:
- - plan_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /contract/create@v1:
- post:
- summary: 新建合同
- description: 客户段+合同段+服务构成条目一次提交(⚠️ 2026-11-17 起不再受理 IP 条目:`ip_entries`/`has_fixed_ip` 视为未知键 ⇒ 11103;境外 IP 由套餐档位所含 IP × 订阅份数表达)。客户未命中时用 data.customer_inline 随合同建档(先建档、后签合同,两个事务),成功时 data.inline_customer 回显客户号/主账号/激活码发放态/影像待补(激活码明文不在应答内,走客户列表「导出激活码」)。拒收 source(服务端定);created_by/created_by_name/created_by_org/created_by_mobile(录入经办人:机构/姓名/联系方式)由服务端从鉴权上下文写入、不取入参;agent_* 是运营商交接单上的经办人(姓名/电话/交接日期必填、机构选填)。2026-11-17 起服务构成条目可带 service_items[].succession(契约内逐条替换=升降配):合同、条目、派生档、IP、截原、新订阅、额度写入同一条 dml_batch(任一条 0 行即整批回滚),应答新增 data.replacements[](item_index/mode/subscription_id/replaces_subscription_id/ticket_type/ticket_no/note/audit_written)回执,供页面提示「已建订阅与工单类型」。2026-11-17 二轮:① 替换判据加入「期间相交」——原订阅在新订阅开始前已到期 ⇒ 不是替换而是到期续签,该条目的 succession 被忽略、按续签新开(mode=renewed、不截原、不出 updown);② 新增 data.renew_from_contract_id 显式续签(每个条目各生成一份不带替换边的订阅),与 succession 互斥;③ 新订阅开始日改取**合同生效日**(不再取业务当天);④ 合同新建页补跑 I6 最终行集复检。2026-11-17 四轮:续签(renew_from_contract_id)时逐条比对续签源合同的条目「服务内容」(形式/套餐式 plan_id/份数/自定义式分类+席位+上下行带宽/归一化线路出口;⛔ 比价格与 item_id/derived_plan_id)——逐条一致 ∧ 客户在用 ⇒ **不生成开通工单**(应答 replacements[].ticket_type=null、note 说明,顶层 renewal_service_unchanged=true),并把该新订阅的 actual_opened_at 写为**订阅开始日**(actual_opened_at 的第二写入方,第一仍是工单回填);客户停用/未开通仍按原判据出 open/service_open。有工单时 replacements[] 行内 ticket_type 取 updown/open/service_open。
- operationId: contract_create
- tags:
- - 合同
- x-require-auth: true
- x-resource-type: bos.contract
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 签约客户 ID。与 customer_inline **只可二选一**:命中已有客户填本项;未命中改用内联建档段
- customer_inline:
- type: object
- description: >-
- 客户未命中时的内联建档段(需求 §5.3 CU-13;业主 2026-11-16 定案关闭 CU-41)。
- 本段先按 `/customer/create@v1` 的同一套规则建档(两个事务:建档 → 合同,不合并),
- 再签本合同;建档含客户主账号(未设初始口令 ⇒ 待激活、发激活码,明文不在本响应内下发)。
- 注意:企业营业执照影像**选填**(业主 2026-11-19 定案,与页面建档同口径),
- 留空不影响建档,建档后到客户档案「登记材料」格补传/替换。主体类型非企业时不收 license。
- properties:
- customer_name:
- type: string
- description: 客户名称(必填;允许重名,查重靠识别号)
- subject_type:
- type: string
- description: 主体类型(必填):enterprise/individual/sole_proprietor
- enum:
- - enterprise
- - individual
- - sole_proprietor
- id_code:
- type: string
- description: 客户识别号(必填):既是安全存储载体,也是合同事务失败后重试的幂等键(不得省略)
- contact_name:
- type: string
- description: 客户经办联系人
- contact_mobile:
- type: string
- description: 联系电话
- tech_contact_name:
- type: string
- description: 技术联系人姓名(选填)
- tech_contact_mobile:
- type: string
- description: 技术联系人电话(选填)
- finance_contact_name:
- type: string
- description: 财务联系人姓名(选填)
- finance_contact_mobile:
- type: string
- description: 财务联系人电话(选填)
- remark:
- type: string
- description: 客户备注(选填,≤512 字)
- partner_id:
- type: string
- description: 归属合伙人(选填;反查所得,落 customer.partner_id)
- address:
- type: string
- description: 客户地址
- parent_node_id:
- type: string
- description: 挂载区域(必填;区域树节点 ID,与 /customer/create@v1 的 parent_node_id 同义)
- operator_id:
- type: string
- description: 归属运营商(必填;候选=所挂区域省份下可见的运营商档案,须同省)
- ops_team_ids:
- type: array
- description: 运维团队(必填且**恰好 1 支**,单支定案;不得为空数组/不得传多支)
- items:
- type: string
- description: 团队 ID
- license:
- type: object
- description: 营业执照影像(**选填**;非企业主体不收)。两键成对
- properties:
- object_key:
- type: string
- description: 平台对象存储对象键(浏览器直传后回报,须在客户影像前缀下)
- file_name:
- type: string
- description: 原始文件名(仅展示)
- required:
- - object_key
- - file_name
- primary_username:
- type: string
- description: 客户主账号登录名(选填;留空按主体号派生)
- primary_mobile:
- type: string
- description: 主账号绑定手机号(选填,11 位)
- required:
- - customer_name
- - subject_type
- - id_code
- - parent_node_id
- - operator_id
- - ops_team_ids
- contract_no:
- type: string
- description: 合同编号(空则服务端发号)
- external_no:
- type: string
- description: 外部合同号(可选)
- contract_amount_cents:
- type: integer
- description: 合同金额(分,可选)
- pay_cycle:
- type: string
- description: 付款周期:yearly/quarterly/monthly
- enum:
- - yearly
- - quarterly
- - monthly
- start_date:
- type: string
- description: 合同开始日期(YYYY-MM-DD)
- format: date
- end_date:
- type: string
- description: >-
- 合同结束日期(YYYY-MM-DD)。**可省略**(2026-11-17 定案):省略时服务端按
- 「生效日+付款周期」推算=年付 12/季付 3/月付 1 个月再减一天,该月无对应日先取月末
- (录入页面已把它锁成只读推算值)。显式给出则按显式值落库(运营商同步可表达跨多个付款周期的合同)。
- format: date
- agent_name:
- type: string
- description: 运营商经办人姓名(交接单三段之二,必填;不是录入账号 created_by)
- agent_mobile:
- type: string
- description: 运营商经办人联系方式(交接单三段之三,必填)
- agent_handover_on:
- type: string
- description: >-
- 经办交接日期(交接日期,**必填**;录入页面默认取录入当日=Asia/Shanghai 业务日,
- 接口须显式给出,服务端不代填)
- format: date
- agent_org:
- type: string
- description: 运营商经办人机构(交接单三段之一,选填)
- attachment_url:
- type: string
- maxLength: 512
- description: >-
- 合同附件(单值,可选):外部 http(s) 链接,或浏览器直传平台对象存储
- (seoh-unified-oss 两段式)成功后回报的对象键,前缀必须为
- klt/contract/attachment/。空串=清空。对象键不得当作可直接打开的链接,
- 详情读口另下发 attachment_view_url(短时效现签)。
- service_items:
- type: array
- description: 服务构成条目列表
- items:
- type: object
- description: 服务条目
- properties:
- plan_id:
- type: string
- description: 档位 ID(必填;2026-11-19 D-15 起条目只能引用目录档位)
- quantity:
- type: integer
- description: 份数:link 档恒 1;addon 档≥1
- item_family:
- type: string
- description: 交付形态(只读确认位,可缺省):只能与所引档位的 plan_family 相同,不同即 KLT-L216
- enum:
- - link
- - addon
- line_exits:
- type: array
- maxItems: 1
- description: >-
- 线路出口(2026-11-17 起**单选**:长度必须为 1)。新建/修改条目出现
- 2 个以上由服务端回 KLT-L222;存量多出口条目**不迁移**(编辑合同须原样回传,
- 否则该条目视为改动而触发上述校验)。
- items:
- type: string
- description: 出口标识
- succession:
- type: object
- description: >-
- 契约内逐条替换(升降配,2026-11-17):本条目的新订阅顶替哪份原订阅。
- **仅在新建合同受理**,编辑合同出现即 KLT-L222。只接受三键;
- 价格、状态、row_version 等只读派生列出现即 KLT-L222 点名。
- 校验:原订阅属本客户、status ∈ active/pending、双方均 plan_family=link、
- line_exit_key 相等、未被替换过(已被指向 ⇒ KLT-M226);
- 同一 replaces_subscription_id 在本请求内至多一次;link 条目 quantity 须为 1。
- **期间必须与原订阅相交**(2026-11-17 定案):原订阅在新订阅开始前已到期
- ⇒ 不是替换而是到期续签,服务端**忽略本键**、按续签新开(不截原、不挂替换边、
- 不出第七类工单),回执行 mode=renewed。
- 替换写入与合同写入同一条 dml_batch(任一条失败=整批回滚,含合同本身)。
- properties:
- replaces_subscription_id:
- type: string
- description: 被替换的原订阅号(必填)
- start_date:
- type: string
- format: date
- description: >-
- 新订阅起日,缺省=**合同生效日**(2026-11-17 定案:订阅跟着合同起算,
- 不再取业务当天);须 ≤ 合同止期,且不晚于原订阅结束日(否则按续签处理)。
- **结束日恒取合同止期**(2026-11-17 口径统一,登记总则 §18)。
- term:
- type: string
- description: 订阅方式(yearly/quarterly/monthly);缺省按档位与账期派生
- required:
- - replaces_subscription_id
- renew_from_contract_id:
- type: string
- description: >-
- 续签自哪份旧合同(2026-11-17 定案,可选)。给出时服务端校验它属**同一客户**,
- 并为本合同的**每个服务条目**各生成一份订阅:不带 replaces_subscription_id、
- 不截任何原订阅、不出第七类 updown 工单(订阅开始日=合同生效日、结束日=合同结束日)。
- 用于「到期续签」:旧订阅自然到期即止,新合同接着生效。
- 与 service_items[].succession **互斥**(同时出现即 KLT-L222)。
- 应答仍走 data.replacements[],其中 mode=renewed、replaces_subscription_id=null。
- required:
- - pay_cycle
- - start_date
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /contract/update@v1:
- post:
- summary: 编辑合同
- description: 编号与签约客户不可改;条目按 item_id 三向对比增删改。可改范围=bos-invariant::contract_edit_scope 的两条轴(billing:金额/付款周期/期间/服务构成;archive:外部单号/交接日期),两轴独立判定、source=operator_sync 全只读(KLT-L220)、已开通两轴全冻(KLT-L219)、录后 72 小时内两轴全开、未生效只放 billing、未到期只放 archive;经办人(created_by 与录入经办人机构/姓名/联系方式)建后恒只读(KLT-L221);agent_* 为运营商交接单上的经办人,受各自轴约束。⚠️ 2026-11-17:service_items[].succession 与 renew_from_contract_id 都只在新建合同时受理,编辑载荷出现任一 ⇒ KLT-L222(替换/续签是一次性动作,改合同不得反向动订阅);⛔ 静默忽略。保存形态=只提交变了的字段(键缺席=保持现值);审计 INSERT 与业务语句同批提交。⚠️ 2026-11-17:结束日锁定为「生效日+付款周期」推算值 ⇒ 生效日/付款周期确实被改而载荷未给出 `end_date` 时,服务端按同一式重算(⛔ 留一个与期间对不上的旧止期);三项都没动则沿用库里现值。
- operationId: contract_update
- tags:
- - 合同
- x-require-auth: true
- x-resource-type: bos.contract
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- contract_id:
- type: string
- description: 合同 ID
- row_version:
- type: integer
- description: 乐观锁版本
- external_no:
- type: string
- description: 外部合同号
- contract_amount_cents:
- type: integer
- description: 合同金额(分)
- pay_cycle:
- type: string
- description: 付款周期
- start_date:
- type: string
- description: 开始日期
- format: date
- end_date:
- type: string
- description: 结束日期
- format: date
- agent_name:
- type: string
- description: 运营商经办人姓名(交接单口径,不是录入账号 created_by);受 billing/archive 轴约束,冻结时提交改动值 ⇒ KLT-L219/L220
- agent_mobile:
- type: string
- description: 运营商经办人联系方式(交接单三段之三;archive 轴)
- agent_handover_on:
- type: string
- description: 交接日期(archive 轴)
- agent_org:
- type: string
- description: 运营商经办人机构(交接单三段之一;选填,archive 轴)
- attachment_url:
- type: string
- maxLength: 512
- description: >-
- 合同附件(单值,archive 轴):外部 http(s) 链接,或前缀为
- klt/contract/attachment/ 的对象键;空串=清空附件。
- source:
- type: string
- description: 合同来源枚举 manual|import|operator_sync(04 册§4.2:写入时由服务端定、之后只读,不取入参;一期只有 manual 真产生值)
- source_label:
- type: string
- description: 合同来源中文口径(界面录入/批量导入/运营商同步;04 册§4.7 列表与详情按来源标注)
- service_items:
- type: array
- description: >-
- 服务构成条目(含 item_id 的增删改)。⚠️ 编辑合同⛔ 受理 succession(替换只在新建
- 合同时发生,出现即 KLT-L222);条目 line_exits 为单选(长度 1),存量多出口条目须
- 原样回传,改成 1 个或其它值即按改动判定。
- items:
- type: object
- properties:
- item_id:
- type: string
- description: 既有条目主键(三向对比:带=UPDATE/不带=INSERT/库有载荷无=DELETE)
- plan_id:
- type: string
- description: 档位 ID
- quantity:
- type: integer
- description: 份数:link 档恒 1;addon 档≥1
- item_family:
- type: string
- description: 交付形态(只读确认位,可缺省):与档位 plan_family 不同即 KLT-L216
- enum:
- - link
- - addon
- line_exits:
- type: array
- maxItems: 1
- description: 线路出口(单选,长度 1)
- items:
- type: string
- required:
- - contract_id
- - row_version
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /contract/get_list@v1:
- post:
- summary: 合同列表
- description: >-
- 按客户/状态等筛选合同列表。每行随 `attachment_kind`(none/link/object/other)说明附件形态;
- `attachment_view_url` 在列表口恒 null(签名只在详情读口现签,不按行 N 次调平台)。
- operationId: contract_get_list
- tags:
- - 合同
- x-require-auth: true
- x-resource-type: bos.contract
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- customer_id:
- type: string
- description: 客户 ID 筛选
- status:
- type: string
- description: 状态筛选
- opened:
- type: boolean
- description: 是否已开通筛选(三态:true/false/缺省不筛)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /contract/get@v1:
- post:
- summary: 合同详情
- description: >-
- 按合同 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 掩码)。
- 附件(单值):`attachment_url` 原值照回(外部链接或 klt/contract/attachment/ 下的对象键),
- `attachment_kind` 说明形态,`attachment_view_url`/`attachment_view_url_expires_at`
- 为读口现签的短时效下载地址(`link` 形态=原链接);对象键不得当作可直接打开的链接。
- operationId: contract_get
- tags:
- - 合同
- x-require-auth: true
- x-resource-type: bos.contract
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- contract_id:
- type: string
- description: 合同 ID
- required:
- - contract_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /contract/change_log@v1:
- post:
- summary: 合同修改记录
- 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` 仅 2026-11-17 之前的存量行才有(固定 IP 条目已下线)。
- operationId: contract_change_log
- tags:
- - 合同
- x-require-auth: true
- x-resource-type: bos.contract
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- contract_id:
- type: string
- description: 合同 ID
- page_size:
- type: integer
- description: 每页条数(默认 20,夹在 1~50)
- minimum: 1
- maximum: 50
- default: 20
- cursor:
- type: string
- description: 游标,形态 occurred_at|id(与审计页同形态);由上一页响应的 next_cursor 原样带回
- required:
- - contract_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data(items/page_size/next_cursor/cursor_usable)
- /contract/customer_lookup@v1:
- post:
- summary: 合同客户身份解析
- description: 第3册§4.2 第 1 步:query_type=credit_code 主体号精确点查/identity 归一化精确点查/keyword 客户名称模糊联想;未命中=matched:false 成功响应(不报错),越权读单客户=11104。
- operationId: contract_customer_lookup
- tags:
- - 合同
- x-require-auth: true
- x-resource-type: bos.contract
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- query_type:
- type: string
- description: 查询通道
- enum:
- - credit_code
- - identity
- - keyword
- value:
- type: string
- description: 查询值(主体号/识别号/客户名称关键字)
- required:
- - query_type
- - value
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /contract/delete@v1:
- post:
- summary: 合同条件删除
- description: 第3册§4.8:两类阻塞分栏(subscriptions/tickets),有阻塞⇒KLT-L213;工单取数失败⇒KLT-S406(不得中途放行)。
- operationId: contract_delete
- tags:
- - 合同
- x-require-auth: true
- x-resource-type: bos.contract
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- contract_id:
- type: string
- description: 合同 ID
- required:
- - contract_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /contract/attachment_discard@v1:
- post:
- summary: 回收无人引用的上传附件(孤儿对象)
- description: >-
- 还原 2026-11-16 定案的孤儿附件回收:浏览器直传是「先上传、后落库」,用户换文件/移除/
- 取消编辑/保存被拦时会在桶里留下无引用对象。平台 unified-oss 明确「不做后台遍历删对象、
- 不按业务字段回收」,只有即时删除一条通道(object/delete@v1),故回收由本服务在引用面判定后发起。
- 三条安全线:object_key 必须是本服务前缀下无路径穿越的对象键;查库确认没有任何合同仍指向它;
- 角色限 Admin/OpsMain(与合同写口同一道闸)。referenced=true 与「对象已不在」都不算失败(幂等)。
- operationId: contract_attachment_discard
- tags:
- - 合同
- x-require-auth: true
- x-resource-type: bos.contract_attachment
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- object_key:
- type: string
- description: 直传回报的对象键(klt/contract/attachment/ 前缀下)
- required:
- - object_key
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/create@v1:
- post:
- summary: 新建订阅
- description: 拒收 line_exits、sub_mode、order_no、新建时的 end_date、opened_at。
- operationId: subscription_create
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID
- plan_id:
- type: string
- description: 档位 ID
- contract_id:
- type: string
- description: 合同 ID
- contract_item_id:
- type: string
- description: 合同服务条目 ID
- start_date:
- type: string
- description: 订阅开始日期
- format: date
- annual_price_cents:
- type: integer
- description: 年价(分)
- monthly_settle_cents:
- type: integer
- description: 月结算金额(分)
- plan_family:
- type: string
- description: 交付形态(只读确认位,可缺省):只能与所选档位的 plan_family 相同,不同即 11103
- enum:
- - link
- - addon
- term:
- type: string
- description: 账期(三态:yearly/quarterly/monthly)
- enum:
- - yearly
- - quarterly
- - monthly
- trial_months:
- type: integer
- description: 试用月数(默认 0,≥0)
- minimum: 0
- discount_monthly_cents:
- type: integer
- description: 每月优惠金额(分,默认 0,≥0)
- minimum: 0
- required:
- - customer_id
- - plan_id
- - contract_id
- - contract_item_id
- - start_date
- - annual_price_cents
- - monthly_settle_cents
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/change@v1:
- post:
- summary: 订阅升降配
- description: >-
- 升降配须填 replaces_subscription_id,且须使用新的 contract_id(不得沿用原合同)。
- 2026-11-17 起该入口保留为「单订阅快捷通道」;常规路径是在合同新建页逐条带
- service_items[].succession 一次性完成(见 /contract/create@v1)。两条路径共用
- succession.rs 的计划层与截原谓词(已被替换过的原订阅 ⇒ KLT-M226)。工单类型由交付态决定:
- 原订阅已交付且客户在用 ⇒ 一张 updown(新档交付+原档回收);未交付 ⇒ open/service_open。
- operationId: subscription_change
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- replaces_subscription_id:
- type: string
- description: 被替换的原订阅 ID
- customer_id:
- type: string
- description: 客户 ID
- plan_id:
- type: string
- description: 新档位 ID
- contract_id:
- type: string
- description: 新合同 ID(不得沿用原合同)
- contract_item_id:
- type: string
- description: 新合同服务条目 ID
- start_date:
- type: string
- description: 新订阅开始日期
- format: date
- annual_price_cents:
- type: integer
- description: 年价(分)
- monthly_settle_cents:
- type: integer
- description: 月结算金额(分)
- plan_family:
- type: string
- description: 交付形态(只读确认位,可缺省):只能与所选档位的 plan_family 相同,不同即 11103
- enum:
- - link
- - addon
- term:
- type: string
- description: 账期(三态:yearly/quarterly/monthly)
- enum:
- - yearly
- - quarterly
- - monthly
- trial_months:
- type: integer
- description: 试用月数(默认 0,≥0)
- minimum: 0
- discount_monthly_cents:
- type: integer
- description: 每月优惠金额(分,默认 0,≥0)
- minimum: 0
- row_version:
- type: integer
- description: 乐观锁版本号(可选,缺省不校验)
- required:
- - replaces_subscription_id
- - customer_id
- - plan_id
- - contract_id
- - contract_item_id
- - start_date
- - annual_price_cents
- - monthly_settle_cents
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/replacement_candidates@v1:
- post:
- summary: 替换候选探测(只读)
- description: >-
- 合同新建页逐条判定「是否已有可替换的原订阅」(契约内逐条替换=升降配,2026-11-17)。
- 交付形态唯一取档位 `plan_family`(D-15)、按「同客户 × 同出口 × 双方均 link × **期间相交**」过滤
- (status ∈ active/pending、排除 addon 档、排除已被指过的 replaces_subscription_id),
- 与 `/contract/create@v1` 的保存期校验是**同一份函数**(succession::candidate_filter),
- 前端⛔ 自造候选范围。index 与 service_items 的 0 基下标对齐。
- 2026-11-17 二轮:期间判据入候选——原订阅在新订阅开始前已到期(新合同 2027 起、旧订阅 2026-12-31 止)
- ⇒ 属**到期续签**,不进 candidates,单列进 skipped[] 供页面解释「按新订阅开通」。
- operationId: subscription_replacement_candidates
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: read
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 签约客户 ID(候选范围限本客户)
- start_date:
- type: string
- format: date
- description: 新合同生效日(缺省=业务当天)。与 candidates/skipped 的期间判据同源
- end_date:
- type: string
- format: date
- description: 新合同结束日(可空)。给了才能判「原订阅排在本合同之后才生效」
- probes:
- type: array
- description: 探测项(至少 1 项;每项对应一个服务构成条目)
- items:
- type: object
- properties:
- index:
- type: integer
- description: 0 基条目下标(缺省=数组位置)
- plan_id:
- type: string
- description: 档位 ID(交付形态由档位带出)
- line_exits:
- type: array
- maxItems: 1
- description: 线路出口(须恰 1 个;缺省时回落档位上的出口集合)
- items:
- type: string
- required:
- - line_exits
- required:
- - customer_id
- - probes
- required:
- - data
- responses:
- "200":
- description: >-
- 成功。data.probes[] 每项回 index/plan_id/plan_family(后端按档位解析)/
- line_exit_key/line_exits/start_date/end_date/candidates[]/skipped[];候选行含
- subscription_id/plan_id/plan_name/plan_kind/contract_id/contract_no/start_date/
- end_date/status/annual_price_cents/monthly_settle_cents/customized(true=定制档,
- 须用户显式勾选确认后才允许替换)。skipped[] 是同客户同出口但**期间不相交**的行
- (subscription_id/plan_name/contract_no/start_date/end_date/status/reason,
- reason=ended_before_start=到期续签、starts_after_contract_end=本合同结束后才生效),
- 只用于解释、⛔ 可被选为替换对象。
- 档位或出口判定不出 ⇒ KLT-L222 点名 probes[i]。
- /subscription/stack@v1:
- post:
- summary: 订阅叠加或白名单更新
- description: 叠加开通或更新白名单字段(两金额+end_date);其余只读键拒绝。
- operationId: subscription_stack
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: create
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- subscription_id:
- type: string
- description: 订阅 ID(更新场景)
- customer_id:
- type: string
- description: 客户 ID(叠加新建时)
- plan_id:
- type: string
- description: 档位 ID(叠加新建时)
- contract_id:
- type: string
- description: 合同 ID
- contract_item_id:
- type: string
- description: 合同服务条目 ID
- annual_price_cents:
- type: integer
- description: 年价(分,可改)
- monthly_settle_cents:
- type: integer
- description: 月结算金额(分,可改)
- end_date:
- type: string
- description: 结束日期(可改)
- format: date
- start_date:
- type: string
- description: 开始日期(叠加新建时)
- format: date
- row_version:
- type: integer
- description: 乐观锁版本号(可选,缺省不校验)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/get_list@v1:
- post:
- summary: 订阅列表
- description: 按客户等维度筛选订阅列表。
- operationId: subscription_get_list
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- customer_id:
- type: string
- description: 客户 ID(常必填)
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- status:
- type: string
- description: 状态筛选
- contract_id:
- type: string
- description: 合同 ID 筛选
- region_ids:
- type: array
- description: 区域 ID 集合(经客户挂载区域展开)
- items:
- type: string
- description: 区域 ID
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/get@v1:
- post:
- summary: 订阅详情
- description: 按订阅 ID 查询详情。
- operationId: subscription_get
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- subscription_id:
- type: string
- description: 订阅 ID
- required:
- - subscription_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/plan_options@v1:
- post:
- summary: 订阅档位候选
- description: 第3册§5.2 第 3 步:本客户自定义档(含合同条目派生档)+全部固定档,不含他客户自定义档;行内带只读 sub_mode 与 available/unavailable_reason。
- operationId: subscription_plan_options
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID(必填)
- keyword:
- type: string
- description: 套餐名称关键字(仅本口有)
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/contract_options@v1:
- post:
- summary: 未开通合同与服务条目候选
- description: 第3册§5.2 第 2 步:只出「未开通」合同及其尚未被订阅引用的条目;开通态取数失败⇒KLT-S406;无可选合同⇒KLT-M222。
- operationId: subscription_contract_options
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- customer_id:
- type: string
- description: 客户 ID(必填)
- keyword:
- type: string
- description: 合同名称关键字(仅本口有)
- required:
- - customer_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/update@v1:
- post:
- summary: 订阅修改(白名单)
- description: 第3册§5.6:可改字段只有 trial_months/discount_monthly_cents;row_version 必填,落空⇒KLT-S407;换套餐/换合同⇒KLT-M229。
- operationId: subscription_update
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: update
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- subscription_id:
- type: string
- description: 订阅 ID
- row_version:
- type: integer
- description: 乐观锁版本号(必填,落空⇒KLT-S407)
- trial_months:
- type: integer
- description: 试用月数(白名单可改)
- minimum: 0
- discount_monthly_cents:
- type: integer
- description: 每月优惠金额(分,白名单可改)
- minimum: 0
- required:
- - subscription_id
- - row_version
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/delete_check@v1:
- post:
- summary: 订阅删除前阻塞检查
- description: 第3册§5.6:两栏阻塞分列(账单明细⇒KLT-M227、升降配链原订阅⇒KLT-M230);账单只读口未接线⇒billing_state=unconfigured。
- operationId: subscription_delete_check
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- subscription_id:
- type: string
- description: 订阅 ID
- required:
- - subscription_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/delete@v1:
- post:
- summary: 删除订阅并回退额度
- description: 第3册§5.6:删除前复算阻塞;终态⇒11103;同事务回退 customer.quota_cents,档位 first_referred_at 打点不回滚。
- operationId: subscription_delete
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- subscription_id:
- type: string
- description: 订阅 ID
- required:
- - subscription_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /subscription/list_all@v1:
- post:
- summary: 全部订阅(跨客户)
- description: 第3册§5.8:跨客户订阅列表,customer_id 可选;region_ids 经客户挂载区域展开;不按客户名称/合同编号检索。
- operationId: subscription_list_all
- tags:
- - 订阅
- x-require-auth: true
- x-resource-type: bos.subscription
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- page:
- type: integer
- description: 页码
- minimum: 1
- page_size:
- type: integer
- description: 每页条数
- minimum: 1
- maximum: 500
- keyword:
- type: string
- description: 关键字筛选
- customer_id:
- type: string
- description: 客户 ID 筛选(跨客户列表下可选)
- contract_id:
- type: string
- description: 合同 ID 筛选
- status:
- type: string
- description: 状态筛选
- region_ids:
- type: array
- description: 区域 ID 集合(经客户挂载区域展开)
- items:
- type: string
- description: 区域 ID
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /cost_item/save@v1:
- post:
- summary: 保存成本项定义
- description: 仅 admin。增改成本项定义。拒收金额、客户、运营商、省份、cycle、is_system。
- operationId: cost_item_save
- tags:
- - 成本与分成
- x-require-auth: true
- x-resource-type: bos.cost_item
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- cost_item_id:
- type: string
- description: 成本项 ID(更新时必填)
- category:
- type: string
- description: 类别:intl_resource/device_purchase/project_fee
- enum:
- - intl_resource
- - device_purchase
- - project_fee
- item_name:
- type: string
- description: 成本项名称
- billing_unit:
- type: string
- description: 计费单位:per_customer/per_account/per_copy
- enum:
- - per_customer
- - per_account
- - per_copy
- is_amortized:
- type: boolean
- description: 是否摊销
- amortization_months:
- type: integer
- description: 摊销月数(勾选摊销时可空=每月摊销不结束)
- deduct_from_base:
- type: boolean
- description: 是否从基数扣除
- remark:
- type: string
- description: 备注
- row_version:
- type: integer
- description: 乐观锁版本(更新时)
- required:
- - category
- - item_name
- - billing_unit
- - is_amortized
- - deduct_from_base
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /cost_item/get_list@v1:
- post:
- summary: 成本项列表
- description: 全局成本项目录;可选类别/名称关键字;无客户过滤。
- operationId: cost_item_get_list
- tags:
- - 成本与分成
- x-require-auth: true
- x-resource-type: bos.cost_item
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- category:
- type: string
- description: 类别筛选
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /cost_amount/save@v1:
- post:
- summary: 保存成本金额
- description: 按「省份×运营商×成本项」只写差异金额;留空项表示删除该差异。
- operationId: cost_amount_save
- tags:
- - 成本与分成
- x-require-auth: true
- x-resource-type: bos.cost_amount
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- province_node_id:
- type: string
- description: 省份节点 ID
- operator_id:
- type: string
- description: 运营商 ID
- items:
- type: array
- description: 变更项列表;留空金额表示删除该差异行
- items:
- type: object
- properties:
- cost_item_id:
- type: string
- description: 成本项 ID
- amount_cents:
- type: integer
- description: 金额(分);空/省略表示删除
- row_version:
- type: integer
- description: 乐观锁版本
- required:
- - cost_item_id
- required:
- - province_node_id
- - operator_id
- - items
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /cost_amount/get_list@v1:
- post:
- summary: 成本金额一览
- description: 透视表;admin 全量,区域运营按可见省/运营商收窄。
- operationId: cost_amount_get_list
- tags:
- - 成本与分成
- x-require-auth: true
- x-resource-type: bos.cost_amount
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- province_node_id:
- type: string
- description: 省份筛选
- operator_id:
- type: string
- description: 运营商筛选
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /share_rule/save@v1:
- post:
- summary: 保存分成规则
- description: holder_type 仅 operator/ops_team(无 partner)。share_value 填 0/负表示删除该行。
- operationId: share_rule_save
- tags:
- - 成本与分成
- x-require-auth: true
- x-resource-type: bos.share_rule
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- holder_type:
- type: string
- description: 持有方类型:operator/ops_team
- enum:
- - operator
- - ops_team
- holder_id:
- type: string
- description: 持有方 ID
- rules:
- type: array
- description: 规则行列表
- items:
- type: object
- properties:
- rule_id:
- type: string
- description: 规则 ID(更新/删除时)
- customer_id:
- type: string
- description: 客户 ID
- rule_level:
- type: string
- description: 规则层级:contract_addon/region_regular
- enum:
- - contract_addon
- - region_regular
- share_mode:
- type: string
- description: 分成方式:ratio_total/per_account/fixed_amount
- enum:
- - ratio_total
- - per_account
- - fixed_amount
- share_value:
- type: number
- description: 分成值:比例 (0,1];金额/每账号>0 分;0/负=删除该行
- remark:
- type: string
- description: 备注
- required:
- - holder_type
- - holder_id
- - rules
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /share_rule/get_list@v1:
- post:
- summary: 分成规则列表
- description: 按持有方等条件列出分成规则。
- operationId: share_rule_get_list
- tags:
- - 成本与分成
- x-require-auth: true
- x-resource-type: bos.share_rule
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 列表筛选参数
- properties:
- holder_type:
- type: string
- description: 持有方类型
- holder_id:
- type: string
- description: 持有方 ID
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /share_rule/get@v1:
- post:
- summary: 分成规则详情
- description: 按持有方一次返回四卡摘要与规则表。
- operationId: share_rule_get
- tags:
- - 成本与分成
- x-require-auth: true
- x-resource-type: bos.share_rule
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- holder_type:
- type: string
- description: 持有方类型:operator/ops_team
- holder_id:
- type: string
- description: 持有方 ID
- required:
- - holder_type
- - holder_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /share_rule/delete@v1:
- post:
- summary: 删除分成规则
- description: 按 rule_id 删除单条分成规则(亦可在 save 内以 0/负值删除)。
- operationId: share_rule_delete
- tags:
- - 成本与分成
- x-require-auth: true
- x-resource-type: bos.share_rule
- x-action: delete
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- rule_id:
- type: string
- description: 规则 ID
- required:
- - rule_id
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /opsview/home@v1:
- get:
- summary: 运维只读首页
- description: 运维侧只读首页(U-60),返回工单/逾期等概览数据。
- operationId: opsview_home
- tags:
- - 运维视图
- x-require-auth: true
- x-resource-type: bos.opsview
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /jobs/get_list@v1:
- get:
- summary: 定时作业清单
- description: 返回第 10 册 13 行清单(注册位 11 +标注行 2)及运行态:启用态、可操作性位、最近执行、五格计数、累计轮次、KPI 五卡与待补跑轮次。运行态取数失败时仍返回 13 行,runtime_available=false。
- operationId: jobs_get_list
- tags:
- - 定时作业
- x-require-auth: true
- x-resource-type: bos.jobs
- x-action: list
- x-version: v1
- x-permission-visibility: catalog
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /jobs/toggle@v1:
- post:
- summary: 启停定时作业
- description: 仅 admin。按作业 key 启停并写 bos_audit_log(bos.job.toggle);重复点击幂等不写第二条。标注行/无页面开关的作业返回 KLT-R20902(detail.reason_code=no_switch);CAS 不匹配返回 KLT-S407;审计失败返回 KLT-S405(启停已生效)。
- operationId: jobs_toggle
- tags:
- - 定时作业
- x-require-auth: true
- x-resource-type: bos.jobs
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- key:
- type: string
- description: 作业键(兼容旧字段名;与 job_key 二选一)
- job_key:
- type: string
- description: 作业键(契约字段名)
- enabled:
- type: boolean
- description: 目标状态
- expect_enabled:
- type: boolean
- description: CAS 校验值=页面读到的当前状态;缺省不做并发校验
- request_id:
- type: string
- description: 幂等请求号(客户端生成)
- required:
- - enabled
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /jobs/runs@v1:
- post:
- summary: 作业执行记录
- description: 查询执行记录,支持任务、关键字(执行编号/任务/结果说明,不检索对象级明细)、触发方式、执行结果与日期区间筛选;分页 page 0 基、page_size 默认 50。标注行返回空流水并标记 annotation=true。
- operationId: jobs_runs
- tags:
- - 定时作业
- x-require-auth: true
- x-resource-type: bos.jobs
- x-action: view
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- key:
- type: string
- description: 作业键(可省略=全部任务)
- job_key:
- type: string
- description: 作业键(契约字段名,可省略)
- keyword:
- type: string
- description: 关键字(执行编号/任务/结果说明;不检索对象级明细)
- trigger:
- type: string
- description: 触发方式
- enum:
- - 定时
- - 事件
- - 人工
- result:
- type: string
- description: 执行结果
- enum:
- - 成功
- - 部分成功
- - 失败
- - 异常
- date_from:
- type: string
- description: 开始日期(YYYY-MM-DD,Asia/Shanghai 日界)
- pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
- date_to:
- type: string
- description: 结束日期(YYYY-MM-DD,含当日)
- pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
- page:
- type: integer
- description: 页码(0 基,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 50,上限 200)
- minimum: 1
- maximum: 200
- default: 50
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- /jobs/run_once@v1:
- post:
- summary: 补跑作业一次
- 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,返回本轮五格计数与对象级明细。
- operationId: jobs_run_once
- tags:
- - 定时作业
- x-require-auth: true
- x-resource-type: bos.jobs
- x-action: manage
- x-version: v1
- x-permission-visibility: catalog
- requestBody:
- required: true
- description: JSON 请求体,业务字段置于 data
- content:
- application/json:
- schema:
- type: object
- description: 统一信封请求体,业务字段放在 data 内
- properties:
- data:
- type: object
- description: 业务参数
- properties:
- key:
- type: string
- description: 作业键
- enum:
- - SUB-EFF
- - SNAPSHOT-FREEZE
- - DELEG-SYNC
- - STOP-GEN
- - OVERDUE
- - AUTO-CLOSE
- - RECON
- - ORPHAN-CLEAN
- - REGION-WARM
- - ONEDIR-CHECK
- - OSS-ORPHAN-CLEAN
- required:
- - key
- required:
- - data
- responses:
- "200":
- description: 成功。统一信封 code/message/data
- components:
- schemas:
- ApiEnvelope:
- type: object
- description: 统一响应信封
- properties:
- code:
- type: integer
- description: 业务/协议码,0 表示成功
- message:
- type: string
- description: 提示信息
- error_code:
- type: string
- description: 稳定错误码(失败时)
- data:
- description: 业务数据载荷
- required:
- - code
- - message
- PageQuery:
- type: object
- description: 分页查询(0 基)
- properties:
- page:
- type: integer
- description: 页码(0 基索引,默认 0)
- minimum: 0
- default: 0
- page_size:
- type: integer
- description: 每页条数(默认 20,上限 200)
- minimum: 1
- maximum: 200
- default: 20
- keyword:
- type: string
- description: 关键字筛选(可选)
|