openapi.yaml 283 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516
  1. openapi: 3.1.0
  2. info:
  3. title: klt-bos
  4. version: 0.1.0
  5. description: |
  6. 恪澜通运营支撑扩展微服务(klt-bos)。
  7. 统一请求信封:`{ "data": { … } }`;统一响应信封:`{ code, message, error_code?, data }`。
  8. 业务错误码段 60000–60999(⚠️ 2026-11-07 平台新口径:`60000` 以前平台已保留 ⇒
  9. 原 20000–20999 **整体 +40000 平移**,块结构与段内顺位⛔ 变;这是第二次对外契约破坏性平移)。
  10. 本服务**产出**的数字码落在该段内;✅ 唯一在册例外=**鉴权失败类透传平台原码**:
  11. 未认证 `11000`、无权限 `11001`(业主 2026-11-07 裁定=⛔ 收段,含平台 SDK 鉴权闸门
  12. 在本进程内产出的响应,业务侧⛔ 改写)。其余平台通用码(11100/11103/11104/10110)
  13. 仍由 `S` 段自造码承接,平台原码在 `message` 原文保留。
  14. 通用块 60000–60049(`S` 段):`KLT-S407`/60001 通用冲突、`KLT-S20002`/11000 未认证(透传)、
  15. `KLT-S20003`/11001 无权限(透传)、`KLT-S20004`/60004 参数缺失或格式错误、`KLT-S20005`/60005 对象不存在、
  16. `KLT-S20006`/60006 下游依赖失败、`KLT-S20007`/60007 内部错误、`KLT-S20008`/60008 功能未实现;
  17. ⚠️ `KLT-*` 字符串⛔ 随段位改名(对外稳定契约)⇒ 字符串内嵌数字与 `code` 已脱钩。
  18. 成功码沿用平台统一值 10000。调用方断言**只绑** `error_code`(`KLT-*`),⛔ 绑数字顺位。
  19. 经网关对外前缀:`/api/klt/klt-bos/{resource}/{action}@v1`(本文件路径不含 namespace 前缀;
  20. 前缀口径=注册中心 `services/registry.rs:707` `format!("/api/{namespace}/{service_name}{path}")`,
  21. ⇒ namespace=`klt` + service_name=`klt-bos`。⚠️ 此前写成的 `/api/klt/bos/` 系**前缀漂移**,
  22. 若本服务以 `prefix_mode=strip_prefix` 注册会被剥掉一段而全链路 404(平台 v1.5 件 §2.4)。)
  23. 分页约定:请求页码 0 基;呈现时再转为 1 基。
  24. x-error-code-range:
  25. start: 60000
  26. end: 60999
  27. servers:
  28. - url: /
  29. tags:
  30. - name: 系统健康
  31. description: 服务存活与状态探测,不含业务写操作。
  32. - name: 认证与激活
  33. description: 当前登录上下文查询;免登录的激活码校验与密码设置。
  34. - name: 区域管理
  35. description: 区域树节点新建、改名、删除与可见范围查询。
  36. - name: 账号管理
  37. description: 账号开通、状态、激活码、改密与客户分账号。
  38. - name: 运营商
  39. description: 运营商建档与对账账号。
  40. - name: 合伙人
  41. description: 合伙人建档、负责范围读写。
  42. - name: 运营团队
  43. description: 运营团队(ent_team)档案、成员与负责范围。
  44. - name: 运维团队与成员
  45. description: 运维团队建档、成员、分派方式、覆盖客户与成员范围。
  46. - name: 客户管理
  47. description: 客户建档、改挂区域、归属变更与变更历史。
  48. - name: 批量导入
  49. description: 客户批量导入模板、提交、批次、续传与导出。
  50. - name: 套餐档位
  51. description: 固定/自定义套餐档位维护。
  52. - name: 合同
  53. description: 合同新建、编辑与查询(含服务条目与 IP 条件)。
  54. - name: 订阅
  55. description: 订阅开通、升降配、叠加与查询。
  56. - name: 成本与分成
  57. description: 成本项定义、成本金额与分成规则。
  58. - name: 运维视图
  59. description: 运维侧只读首页概览。
  60. - name: 定时作业
  61. description: 已注册作业清单、启停、执行记录与补跑。
  62. - name: 工单与开停交付
  63. description: 工单列表/详情/分派/回填/终态/材料与闭环配置(第5册§6)
  64. - name: 竣工与回执
  65. description: 竣工回传文件生成与运营商回执确认(第5册§6.5)
  66. - name: 报文人工处置
  67. description: 运营商报文待处置队列、挂接并生效、作废、冲突确认与改挂(第5册§6.6)
  68. paths:
  69. /health:
  70. get:
  71. summary: 健康检查
  72. description: 服务存活探测,无需登录。
  73. operationId: health
  74. tags:
  75. - 系统健康
  76. x-require-auth: false
  77. x-resource-type:
  78. $ref: '#/components/x-resource-types/health/code'
  79. x-action:
  80. $ref: '#/components/x-actions/view/code'
  81. x-version: v1
  82. x-permission-visibility: catalog
  83. x-error-codes: []
  84. responses:
  85. "200":
  86. description: 成功。统一信封 code/message/data
  87. /health@v1:
  88. get:
  89. summary: 健康检查(v1)
  90. description: 服务存活探测,无需登录。
  91. operationId: health_v1
  92. tags:
  93. - 系统健康
  94. x-require-auth: false
  95. x-resource-type:
  96. $ref: '#/components/x-resource-types/health/code'
  97. x-action:
  98. $ref: '#/components/x-actions/view/code'
  99. x-version: v1
  100. x-permission-visibility: catalog
  101. x-error-codes: []
  102. responses:
  103. "200":
  104. description: 成功。统一信封 code/message/data
  105. /ping@v1:
  106. get:
  107. summary: 存活探测
  108. description: 需登录的轻量探测,返回服务状态与绑定信息。
  109. operationId: ping
  110. tags:
  111. - 系统健康
  112. x-require-auth: true
  113. x-resource-type:
  114. $ref: '#/components/x-resource-types/ping/code'
  115. x-action:
  116. $ref: '#/components/x-actions/view/code'
  117. x-version: v1
  118. x-permission-visibility: catalog
  119. x-error-codes: []
  120. responses:
  121. "200":
  122. description: 成功。统一信封 code/message/data
  123. /auth/context@v1:
  124. get:
  125. summary: 当前登录上下文
  126. description: 返回当前登录身份、业务角色、主体类型/ID、可见形态等;首次业务请求在此完成未激活/已过期拦截。
  127. operationId: auth_context
  128. tags:
  129. - 认证与激活
  130. x-require-auth: true
  131. x-resource-type:
  132. $ref: '#/components/x-resource-types/auth/code'
  133. x-action:
  134. $ref: '#/components/x-actions/view/code'
  135. x-version: v1
  136. x-permission-visibility: catalog
  137. x-error-codes: []
  138. responses:
  139. "200":
  140. description: 成功。统一信封 code/message/data
  141. /region/create@v1:
  142. post:
  143. summary: 新建区域节点
  144. description: 在区域树下新建省/市/区县节点。admin 任意层级;区域运营主/子账号仅限本团队负责范围内已有省份下建市/区县。
  145. operationId: region_create
  146. tags:
  147. - 区域管理
  148. x-require-auth: true
  149. x-resource-type:
  150. $ref: '#/components/x-resource-types/region/code'
  151. x-action:
  152. $ref: '#/components/x-actions/create/code'
  153. x-version: v1
  154. x-permission-visibility: catalog
  155. requestBody:
  156. required: true
  157. description: JSON 请求体,业务字段置于 data
  158. content:
  159. application/json:
  160. schema:
  161. type: object
  162. description: 统一信封请求体,业务字段放在 data 内
  163. properties:
  164. data:
  165. type: object
  166. description: 新建区域参数
  167. properties:
  168. parent_node_id:
  169. type: string
  170. description: 父节点 ID,必填;区域树根由平台建立,业务侧不自行挂根
  171. node_name:
  172. type: string
  173. description: 本级区域名称,同父唯一
  174. level:
  175. type: string
  176. enum: [省, 市, 区县]
  177. description: 业务侧自持层级,必填且不得按平台 depth 推导
  178. required:
  179. - parent_node_id
  180. - node_name
  181. - level
  182. required:
  183. - data
  184. x-error-codes: [60059, 60060, 60063, 60087]
  185. responses:
  186. "200":
  187. description: 成功。统一信封 code/message/data
  188. /region/rename@v1:
  189. post:
  190. summary: 重命名区域节点
  191. description: 仅修改节点名称 node_name,不改层级与父子关系。
  192. operationId: region_rename
  193. tags:
  194. - 区域管理
  195. x-require-auth: true
  196. x-resource-type:
  197. $ref: '#/components/x-resource-types/region/code'
  198. x-action:
  199. $ref: '#/components/x-actions/update/code'
  200. x-version: v1
  201. x-permission-visibility: catalog
  202. requestBody:
  203. required: true
  204. description: JSON 请求体,业务字段置于 data
  205. content:
  206. application/json:
  207. schema:
  208. type: object
  209. description: 统一信封请求体,业务字段放在 data 内
  210. properties:
  211. data:
  212. type: object
  213. description: 业务参数
  214. properties:
  215. node_id:
  216. type: string
  217. description: 区域节点 ID
  218. node_name:
  219. type: string
  220. description: 新名称
  221. required:
  222. - node_id
  223. - node_name
  224. required:
  225. - data
  226. x-error-codes: [60060, 60063]
  227. responses:
  228. "200":
  229. description: 成功。统一信封 code/message/data
  230. /region/delete@v1:
  231. post:
  232. summary: 删除区域节点
  233. description: 仅 admin。须提交 confirm_name(与当前区域名逐字一致)并通过三重守卫(无下级/无挂载客户/无引用)。
  234. operationId: region_delete
  235. tags:
  236. - 区域管理
  237. x-require-auth: true
  238. x-resource-type:
  239. $ref: '#/components/x-resource-types/region/code'
  240. x-action:
  241. $ref: '#/components/x-actions/delete/code'
  242. x-version: v1
  243. x-permission-visibility: catalog
  244. requestBody:
  245. required: true
  246. description: JSON 请求体,业务字段置于 data
  247. content:
  248. application/json:
  249. schema:
  250. type: object
  251. description: 统一信封请求体,业务字段放在 data 内
  252. properties:
  253. data:
  254. type: object
  255. description: 业务参数
  256. properties:
  257. node_id:
  258. type: string
  259. description: 待删除区域节点 ID
  260. confirm_name:
  261. type: string
  262. description: 确认名称,须与当前区域名逐字一致
  263. required:
  264. - node_id
  265. - confirm_name
  266. required:
  267. - data
  268. x-error-codes: [60063]
  269. responses:
  270. "200":
  271. description: 成功。统一信封 code/message/data
  272. /region/tree@v1:
  273. post:
  274. summary: 查询可见区域树
  275. description: 按操作人可见范围返回区域节点集合/树;运营主/子账号只见本范围及下级。⚠️ 2026-11-08 由 GET 改 POST(R-5:GET 无请求体,网关无法注入授权上界)。
  276. operationId: region_tree
  277. tags:
  278. - 区域管理
  279. x-require-auth: true
  280. x-resource-type:
  281. $ref: '#/components/x-resource-types/region/code'
  282. x-action:
  283. $ref: '#/components/x-actions/view/code'
  284. x-version: v1
  285. x-permission-visibility: catalog
  286. x-enumeration-kind: tree
  287. requestBody:
  288. required: true
  289. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  290. content:
  291. application/json:
  292. schema:
  293. type: object
  294. properties:
  295. data:
  296. type: object
  297. description: 无业务参数
  298. required:
  299. - data
  300. x-error-codes: [60063]
  301. responses:
  302. "200":
  303. description: 成功。统一信封 code/message/data
  304. /region/subtree@v1:
  305. post:
  306. summary: 查询区域子树
  307. description: 挂载弹窗左树、区域钻取共用;按可见范围裁剪。
  308. operationId: region_subtree
  309. tags:
  310. - 区域管理
  311. x-require-auth: true
  312. x-resource-type:
  313. $ref: '#/components/x-resource-types/region/code'
  314. x-action:
  315. $ref: '#/components/x-actions/view/code'
  316. x-version: v1
  317. x-permission-visibility: catalog
  318. # 工单回件 §5.2 B1(2026-11-08):operation 级 x-enumeration-kind 是作者侧唯一的真源列举标记,
  319. # 注册中心折叠为 scope_config.POST.source_enumeration 后 AC 才回传授权上界、网关才注入
  320. # (手写 x-scope.source_enumeration 会被注册中心拒,registry.rs:510-528)。
  321. # 标 tree 的依据:本路由可见集=区域资源树授权子集——handler 已消费通道②
  322. # (region.rs tree_inner → ScopedSelect::visible_region_node_ids,scoped_select.rs:120 优先取
  323. # 网关注入实例)。⚠️ 2026-11-08 R-5 裁决:同源 /region/tree@v1 已由 GET 改 POST 并同样标
  324. # tree(GET 无请求体,网关无法注入授权上界;改 POST 后 data 传空对象即可触发注入)。
  325. x-enumeration-kind: tree
  326. requestBody:
  327. required: true
  328. description: JSON 请求体,业务字段置于 data
  329. content:
  330. application/json:
  331. schema:
  332. type: object
  333. description: 统一信封请求体,业务字段放在 data 内
  334. properties:
  335. data:
  336. type: object
  337. description: 子树查询参数
  338. properties:
  339. node_id:
  340. type: string
  341. description: 根节点 ID(可选;空则按可见根展开)
  342. required:
  343. - data
  344. x-error-codes: [60063]
  345. responses:
  346. "200":
  347. description: 成功。统一信封 code/message/data
  348. /region/change_log@v1:
  349. get:
  350. summary: 区域变更流水
  351. description: 仅 admin 可见;运营子账号可见节点但不可见变更流水。
  352. operationId: region_change_log
  353. tags:
  354. - 区域管理
  355. x-require-auth: true
  356. x-resource-type:
  357. $ref: '#/components/x-resource-types/region/code'
  358. x-action:
  359. $ref: '#/components/x-actions/view/code'
  360. x-version: v1
  361. x-permission-visibility: catalog
  362. x-error-codes: [60063]
  363. responses:
  364. "200":
  365. description: 成功。统一信封 code/message/data
  366. /region/orphans@v1:
  367. post:
  368. summary: 悬空区域节点
  369. description: 查询悬空/孤儿节点;按节点所在区域分派可见性,admin 全量。⚠️ 2026-11-08 由 GET 改 POST(R-5)。
  370. operationId: region_orphans
  371. tags:
  372. - 区域管理
  373. x-require-auth: true
  374. x-resource-type:
  375. $ref: '#/components/x-resource-types/region/code'
  376. x-action:
  377. $ref: '#/components/x-actions/view/code'
  378. x-version: v1
  379. x-permission-visibility: catalog
  380. x-enumeration-kind: tree
  381. requestBody:
  382. required: true
  383. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  384. content:
  385. application/json:
  386. schema:
  387. type: object
  388. properties:
  389. data:
  390. type: object
  391. description: 无业务参数
  392. required:
  393. - data
  394. x-error-codes: [60063]
  395. responses:
  396. "200":
  397. description: 成功。统一信封 code/message/data
  398. /account/get_list@v1:
  399. post:
  400. summary: 成员账号列表
  401. description: 列登录名/手机号(掩码)/角色/主体/主-子账号标记/启停状态,并下发激活码生命周期(交付、激活、设密时间与有效截止日)。`status`=账号启停(`bos_user_binding.status`),`activation_status`=激活态(`bos_account_ext.status`),两者正交。运维侧全量,团队侧限本团队成员。⚠️「姓名」列⛔ 数源(`bos_user_binding` 无该列),见总则§18.3。
  402. operationId: account_get_list
  403. tags:
  404. - 账号管理
  405. x-require-auth: true
  406. x-resource-type:
  407. $ref: '#/components/x-resource-types/account/code'
  408. x-action:
  409. $ref: '#/components/x-actions/list/code'
  410. x-version: v1
  411. x-permission-visibility: catalog
  412. requestBody:
  413. required: false
  414. description: 分页与过滤(page/page_size/keyword/role_code/subject_type/subject_id/status/activation_status),业务字段置于 data
  415. content:
  416. application/json:
  417. schema:
  418. type: object
  419. x-error-codes: [60001, 60053, 60054, 60077, 60082]
  420. responses:
  421. "200":
  422. description: 成功。统一信封 code/message/data
  423. /ent_team/get_list@v1:
  424. post:
  425. summary: 运营团队列表
  426. description: 一条团队带负责人登录名与成员数;仅 admin/opsMain/opsSub。
  427. operationId: ent_team_get_list
  428. tags:
  429. - 运营团队
  430. x-require-auth: true
  431. x-resource-type:
  432. $ref: '#/components/x-resource-types/ent_team/code'
  433. x-action:
  434. $ref: '#/components/x-actions/list/code'
  435. x-version: v1
  436. x-permission-visibility: catalog
  437. requestBody:
  438. required: false
  439. description: 分页与过滤(page/page_size/keyword),业务字段置于 data
  440. content:
  441. application/json:
  442. schema:
  443. type: object
  444. x-error-codes: [60053, 60054, 60068]
  445. responses:
  446. "200":
  447. description: 成功。统一信封 code/message/data
  448. /ops_team/get_list@v1:
  449. post:
  450. summary: 运维团队列表
  451. description: 一页列出全部团队,带可分配工单类型、成员数与派单/结算口径。⚠️「未完成工单」「超期未完成」两列负载暂无数源(工单表属第 2 册),回 null+顶层 load_pending,见总则§18.3。
  452. operationId: ops_team_get_list
  453. tags:
  454. - 运维团队
  455. x-require-auth: true
  456. x-resource-type:
  457. $ref: '#/components/x-resource-types/ops_team/code'
  458. x-action:
  459. $ref: '#/components/x-actions/list/code'
  460. x-version: v1
  461. x-permission-visibility: catalog
  462. requestBody:
  463. required: false
  464. description: 分页与过滤(page/page_size/keyword/region_node_id),业务字段置于 data
  465. content:
  466. application/json:
  467. schema:
  468. type: object
  469. x-error-codes: [60053, 60054, 60068, 60082]
  470. responses:
  471. "200":
  472. description: 成功。统一信封 code/message/data
  473. /audit/get_list@v1:
  474. post:
  475. summary: 审计日志检索
  476. description: SC-04 六列(时间/操作人/操作类型/对象/变更前/变更后);时间倒序+(occurred_at,id) 游标,⛔ OFFSET。⚠️ bos_audit_log 暂无写入口,落地前恒空集(前端逐字空态「可见范围内暂无记录」),见总则§18.3。
  477. operationId: audit_get_list
  478. tags:
  479. - 审计日志
  480. x-require-auth: true
  481. x-resource-type:
  482. $ref: '#/components/x-resource-types/audit/code'
  483. x-action:
  484. $ref: '#/components/x-actions/list/code'
  485. x-version: v1
  486. x-permission-visibility: catalog
  487. requestBody:
  488. required: false
  489. description: 游标与检索条件(cursor/page_size/object_type/object_ref/actor_user_id/occurred_from/occurred_to/keyword),业务字段置于 data
  490. content:
  491. application/json:
  492. schema:
  493. type: object
  494. x-error-codes: [60053]
  495. responses:
  496. "200":
  497. description: 成功。统一信封 code/message/data
  498. /account/provision@v1:
  499. post:
  500. summary: 开通账号
  501. description: 四入口共用开通管线。唯一性守卫(登录名/手机号)先于平台调用;角色与主体须一致。
  502. operationId: account_provision
  503. tags:
  504. - 账号管理
  505. x-require-auth: true
  506. x-resource-type:
  507. $ref: '#/components/x-resource-types/account/code'
  508. x-action:
  509. $ref: '#/components/x-actions/create/code'
  510. x-version: v1
  511. x-permission-visibility: catalog
  512. requestBody:
  513. required: true
  514. description: JSON 请求体,业务字段置于 data
  515. content:
  516. application/json:
  517. schema:
  518. type: object
  519. description: 统一信封请求体,业务字段放在 data 内
  520. properties:
  521. data:
  522. type: object
  523. description: 业务参数
  524. properties:
  525. username:
  526. type: string
  527. description: 登录名(归一化后全站唯一)
  528. role_code:
  529. type: string
  530. description: 业务角色码
  531. subject_type:
  532. type: string
  533. description: 主体类型(operator/partner/ent_team/ops_team/customer 等)
  534. subject_id:
  535. type: string
  536. description: 主体 ID
  537. mobile:
  538. type: string
  539. description: 手机号(可选,唯一)
  540. required:
  541. - username
  542. - role_code
  543. - subject_type
  544. - subject_id
  545. required:
  546. - data
  547. x-error-codes: [60001, 60053, 60054, 60077, 60082]
  548. responses:
  549. "200":
  550. description: 成功。统一信封 code/message/data
  551. /account/update_status@v1:
  552. post:
  553. summary: 停用或恢复账号
  554. description: 停用/恢复账号状态;不可操作当前登录账号。
  555. operationId: account_update_status
  556. tags:
  557. - 账号管理
  558. x-require-auth: true
  559. x-resource-type:
  560. $ref: '#/components/x-resource-types/account/code'
  561. x-action:
  562. $ref: '#/components/x-actions/manage/code'
  563. x-version: v1
  564. x-permission-visibility: catalog
  565. requestBody:
  566. required: true
  567. description: JSON 请求体,业务字段置于 data
  568. content:
  569. application/json:
  570. schema:
  571. type: object
  572. description: 统一信封请求体,业务字段放在 data 内
  573. properties:
  574. data:
  575. type: object
  576. description: 业务参数
  577. properties:
  578. user_id:
  579. type: string
  580. description: 目标用户 ID
  581. status:
  582. type: string
  583. description: 目标状态(如 disabled/active)
  584. required:
  585. - user_id
  586. - status
  587. required:
  588. - data
  589. x-error-codes: [60001, 60053, 60054, 60077, 60082]
  590. responses:
  591. "200":
  592. description: 成功。统一信封 code/message/data
  593. /account/reset_code@v1:
  594. post:
  595. summary: 重置激活码
  596. description: 仅未激活账号可重置;已激活拒绝。新码仅当次返回。
  597. operationId: account_reset_code
  598. tags:
  599. - 账号管理
  600. x-require-auth: true
  601. x-resource-type:
  602. $ref: '#/components/x-resource-types/account/code'
  603. x-action:
  604. $ref: '#/components/x-actions/manage/code'
  605. x-version: v1
  606. x-permission-visibility: catalog
  607. requestBody:
  608. required: true
  609. description: JSON 请求体,业务字段置于 data
  610. content:
  611. application/json:
  612. schema:
  613. type: object
  614. description: 统一信封请求体,业务字段放在 data 内
  615. properties:
  616. data:
  617. type: object
  618. description: 业务参数
  619. properties:
  620. user_id:
  621. type: string
  622. description: 目标用户 ID
  623. required:
  624. - user_id
  625. required:
  626. - data
  627. x-error-codes: [60001, 60053, 60054, 60077, 60082]
  628. responses:
  629. "200":
  630. description: 成功。统一信封 code/message/data
  631. /account/export_codes@v1:
  632. post:
  633. summary: 导出激活码
  634. 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` 如实回布尔。
  635. operationId: account_export_codes
  636. tags:
  637. - 账号管理
  638. x-require-auth: true
  639. x-resource-type:
  640. $ref: '#/components/x-resource-types/account/code'
  641. x-action:
  642. $ref: '#/components/x-actions/export/code'
  643. x-version: v1
  644. x-permission-visibility: catalog
  645. requestBody:
  646. required: true
  647. description: JSON 请求体,业务字段置于 data
  648. content:
  649. application/json:
  650. schema:
  651. type: object
  652. description: 统一信封请求体,业务字段放在 data 内
  653. properties:
  654. data:
  655. type: object
  656. description: 业务参数
  657. properties:
  658. user_ids:
  659. type: array
  660. description: 按本人可见范围收窄后的用户 ID 列表(⛔ 空列表=平台侧项目内全量导出)
  661. minItems: 1
  662. items:
  663. type: string
  664. description: 用户 ID
  665. validity:
  666. type: string
  667. description: 导出口径(平台取值域):valid=仍有效(只读,缺省);expired=已过期(写);all=全部(写)。⛔ active——平台合法值是 valid,传 active 会被 11103 拒收
  668. default: valid
  669. enum:
  670. - valid
  671. - expired
  672. - all
  673. required:
  674. - user_ids
  675. required:
  676. - data
  677. x-error-codes: [60001, 60053, 60054, 60077, 60082]
  678. responses:
  679. "200":
  680. description: 成功。统一信封 code/message/data
  681. /account/change_password@v1:
  682. post:
  683. summary: 自助修改密码
  684. description: 已登录用户修改本人密码;新旧相同不保存。
  685. operationId: account_change_password
  686. tags:
  687. - 账号管理
  688. x-require-auth: true
  689. # AC-05 明定「任何已登录角色」:⛔ 业务权限键(`bos.account.manage` 只授给运营侧)。
  690. # 登录即可=复用所有人都在的 `bos.auth.view@v1`;「只改本人」由 handler 保证。
  691. x-resource-type:
  692. $ref: '#/components/x-resource-types/auth/code'
  693. x-action:
  694. $ref: '#/components/x-actions/view/code'
  695. x-version: v1
  696. x-permission-visibility: catalog
  697. requestBody:
  698. required: true
  699. description: JSON 请求体,业务字段置于 data
  700. content:
  701. application/json:
  702. schema:
  703. type: object
  704. description: 统一信封请求体,业务字段放在 data 内
  705. properties:
  706. data:
  707. type: object
  708. description: 业务参数
  709. properties:
  710. old_password:
  711. type: string
  712. description: 原密码
  713. new_password:
  714. type: string
  715. description: 新密码
  716. required:
  717. - old_password
  718. - new_password
  719. required:
  720. - data
  721. x-error-codes: [60001, 60053, 60054, 60055, 60077, 60082]
  722. responses:
  723. "200":
  724. description: 成功。统一信封 code/message/data
  725. /account/profile/update@v1:
  726. post:
  727. summary: 本人维护姓名
  728. description: AC-05 个人资料;仅限本人。只写账号级自填姓名(bos_account_ext.display_name),不用于主体档案(客户联系人/运营商名/团队名归运营侧维护)。空串或 null=清除自填、回落到档案派生名;超 64 字符或含控制字符 ⇒ 60004。
  729. operationId: account_profile_update
  730. tags:
  731. - 账号管理
  732. x-require-auth: true
  733. # AC-05:任何已登录角色且仅限本人 ⇒ 登录即可,⛔ 业务权限键(`bos.account.manage` 会把客户等角色挡在网关)。
  734. x-resource-type:
  735. $ref: '#/components/x-resource-types/auth/code'
  736. x-action:
  737. $ref: '#/components/x-actions/view/code'
  738. x-version: v1
  739. x-permission-visibility: catalog
  740. requestBody:
  741. required: true
  742. description: JSON 请求体,业务字段置于 data
  743. content:
  744. application/json:
  745. schema:
  746. type: object
  747. description: 统一信封请求体,业务字段放在 data 内
  748. properties:
  749. data:
  750. type: object
  751. description: 业务参数
  752. properties:
  753. display_name:
  754. type: string
  755. maxLength: 64
  756. description: 本人姓名;空串或 null=清除自填(回落到档案派生名)
  757. required:
  758. - data
  759. x-error-codes: [60004]
  760. responses:
  761. "200":
  762. description: 成功。统一信封 code/message/data
  763. /account/notify_pref@v1:
  764. get:
  765. summary: 读通知投递偏好
  766. description: AC-06;只读本人三通道(站内/邮箱/短信)的 enabled/available/address_hint。站内恒开不可关;地址摘要一律脱敏。任何已登录角色。
  767. operationId: account_notify_pref
  768. tags:
  769. - 账号管理
  770. x-require-auth: true
  771. # AC-06:任何已登录角色只读本人;⛔ 业务权限键(06-接口清单「登录即可」)。
  772. x-resource-type:
  773. $ref: '#/components/x-resource-types/auth/code'
  774. x-action:
  775. $ref: '#/components/x-actions/view/code'
  776. x-version: v1
  777. x-permission-visibility: catalog
  778. x-error-codes: []
  779. responses:
  780. "200":
  781. description: 成功。统一信封 code/message/data
  782. /account/notify_pref/save@v1:
  783. post:
  784. summary: 保存通知投递开关
  785. description: AC-06;仅限本人(user_id 取登录上下文)。站内投递不可关闭(KLT-A004/60092);未绑定手机号不能开启短信(KLT-A005/60093)。关闭是合法动作、不发码。
  786. operationId: account_notify_pref_save
  787. tags:
  788. - 账号管理
  789. x-require-auth: true
  790. # AC-06:任何已登录角色且仅限本人 ⇒ 登录即可,⛔ 业务权限键。
  791. x-resource-type:
  792. $ref: '#/components/x-resource-types/auth/code'
  793. x-action:
  794. $ref: '#/components/x-actions/view/code'
  795. x-version: v1
  796. x-permission-visibility: catalog
  797. requestBody:
  798. required: true
  799. description: JSON 请求体,业务字段置于 data
  800. content:
  801. application/json:
  802. schema:
  803. type: object
  804. description: 统一信封请求体,业务字段放在 data 内
  805. properties:
  806. data:
  807. type: object
  808. description: 业务参数
  809. properties:
  810. inapp_enabled:
  811. type: boolean
  812. description: 站内投递开关;只接受 true/缺省,false ⇒ KLT-A004
  813. mail_enabled:
  814. type: boolean
  815. description: 邮箱投递开关
  816. sms_enabled:
  817. type: boolean
  818. description: 短信投递开关;无绑定手机号时 true ⇒ KLT-A005
  819. required:
  820. - mail_enabled
  821. - sms_enabled
  822. required:
  823. - data
  824. x-error-codes: [60092, 60093]
  825. responses:
  826. "200":
  827. description: 成功。统一信封 code/message/data
  828. /account/notify_email@v1:
  829. post:
  830. summary: 本人维护通知投递邮箱
  831. description: AC-06;仅限本人。空串=清空登记(合法动作);格式或长度不符 ⇒ KLT-A006/60094。不要求全站唯一。
  832. operationId: account_notify_email
  833. tags:
  834. - 账号管理
  835. x-require-auth: true
  836. # AC-06:任何已登录角色且仅限本人 ⇒ 登录即可,⛔ 业务权限键。
  837. x-resource-type:
  838. $ref: '#/components/x-resource-types/auth/code'
  839. x-action:
  840. $ref: '#/components/x-actions/view/code'
  841. x-version: v1
  842. x-permission-visibility: catalog
  843. requestBody:
  844. required: true
  845. description: JSON 请求体,业务字段置于 data
  846. content:
  847. application/json:
  848. schema:
  849. type: object
  850. description: 统一信封请求体,业务字段放在 data 内
  851. properties:
  852. data:
  853. type: object
  854. description: 业务参数
  855. properties:
  856. email:
  857. type: string
  858. maxLength: 254
  859. description: 通知投递邮箱;空串或 null=清空登记
  860. required:
  861. - data
  862. x-error-codes: [60094]
  863. responses:
  864. "200":
  865. description: 成功。统一信封 code/message/data
  866. /account/notify_email/set@v1:
  867. post:
  868. summary: 运营代办维护通知投递邮箱
  869. description: AC-06;admin 全域、opsMain 负责范围内(opsSub 只读)。与本人自助口同一套格式校验(KLT-A006/60094),范围外按 11104 语义拒绝。
  870. operationId: account_notify_email_set
  871. tags:
  872. - 账号管理
  873. x-require-auth: true
  874. x-resource-type:
  875. $ref: '#/components/x-resource-types/account/code'
  876. x-action:
  877. $ref: '#/components/x-actions/manage/code'
  878. x-version: v1
  879. x-permission-visibility: catalog
  880. requestBody:
  881. required: true
  882. description: JSON 请求体,业务字段置于 data
  883. content:
  884. application/json:
  885. schema:
  886. type: object
  887. description: 统一信封请求体,业务字段放在 data 内
  888. properties:
  889. data:
  890. type: object
  891. description: 业务参数
  892. properties:
  893. user_id:
  894. type: string
  895. description: 目标账号 ID
  896. email:
  897. type: string
  898. maxLength: 254
  899. description: 通知投递邮箱;空串或 null=清空登记
  900. required:
  901. - user_id
  902. required:
  903. - data
  904. x-error-codes: [60094]
  905. responses:
  906. "200":
  907. description: 成功。统一信封 code/message/data
  908. /activation/verify@v1:
  909. post:
  910. summary: 激活并设置密码
  911. description: 免登录豁免接口。校验激活码后设置新密码;按来源 IP+码窗口限流,不设失败计数锁死。
  912. operationId: activation_verify
  913. tags:
  914. - 认证与激活
  915. x-require-auth: false
  916. x-resource-type:
  917. $ref: '#/components/x-resource-types/activation/code'
  918. x-action:
  919. $ref: '#/components/x-actions/manage/code'
  920. x-version: v1
  921. x-permission-visibility: catalog
  922. requestBody:
  923. required: true
  924. description: JSON 请求体,业务字段置于 data
  925. content:
  926. application/json:
  927. schema:
  928. type: object
  929. description: 统一信封请求体,业务字段放在 data 内
  930. properties:
  931. data:
  932. type: object
  933. description: 业务参数
  934. properties:
  935. code:
  936. type: string
  937. description: 激活码
  938. new_password:
  939. type: string
  940. description: 新密码(建议不少于 8 位)
  941. minLength: 8
  942. required:
  943. - code
  944. - new_password
  945. required:
  946. - data
  947. x-error-codes: [60006, 60076]
  948. responses:
  949. "200":
  950. description: 成功。统一信封 code/message/data
  951. /operator/create@v1:
  952. post:
  953. summary: 新建运营商
  954. description: 运营商建档。所属区域必须是省级节点;同省份×品牌唯一;可写结算口径。
  955. operationId: operator_create
  956. tags:
  957. - 运营商
  958. x-require-auth: true
  959. x-resource-type:
  960. $ref: '#/components/x-resource-types/operator/code'
  961. x-action:
  962. $ref: '#/components/x-actions/create/code'
  963. x-version: v1
  964. x-permission-visibility: catalog
  965. requestBody:
  966. required: true
  967. description: JSON 请求体,业务字段置于 data
  968. content:
  969. application/json:
  970. schema:
  971. type: object
  972. description: 统一信封请求体,业务字段放在 data 内
  973. properties:
  974. data:
  975. type: object
  976. description: 业务参数
  977. properties:
  978. name:
  979. type: string
  980. description: 运营商名称
  981. brand:
  982. type: string
  983. description: 品牌:移动/联通/电信
  984. region_node_id:
  985. type: string
  986. description: 建档区域节点 ID(必须省级)
  987. is_province_node:
  988. type: boolean
  989. description: 是否省级节点标记(服务端校验用,可选)
  990. settle_mode:
  991. type: string
  992. description: 结算方式:ratio=比例;amount=固定金额;per_account=每账号
  993. enum:
  994. - ratio
  995. - amount
  996. - per_account
  997. settle_value:
  998. type: number
  999. description: 结算值:比例时 0<x≤100;金额/每账号时为分且 >0
  1000. required:
  1001. - name
  1002. - brand
  1003. - region_node_id
  1004. required:
  1005. - data
  1006. x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090]
  1007. responses:
  1008. "200":
  1009. description: 成功。统一信封 code/message/data
  1010. /operator/update@v1:
  1011. post:
  1012. summary: 编辑运营商
  1013. description: 编辑运营商档案;改品牌/省份不得绕过省份×品牌唯一与省级节点校验。
  1014. operationId: operator_update
  1015. tags:
  1016. - 运营商
  1017. x-require-auth: true
  1018. x-resource-type:
  1019. $ref: '#/components/x-resource-types/operator/code'
  1020. x-action:
  1021. $ref: '#/components/x-actions/update/code'
  1022. x-version: v1
  1023. x-permission-visibility: catalog
  1024. requestBody:
  1025. required: true
  1026. description: JSON 请求体,业务字段置于 data
  1027. content:
  1028. application/json:
  1029. schema:
  1030. type: object
  1031. description: 统一信封请求体,业务字段放在 data 内
  1032. properties:
  1033. data:
  1034. type: object
  1035. description: 业务参数
  1036. properties:
  1037. operator_id:
  1038. type: string
  1039. description: 运营商 ID
  1040. name:
  1041. type: string
  1042. description: 运营商名称
  1043. brand:
  1044. type: string
  1045. description: 品牌:移动/联通/电信
  1046. region_node_id:
  1047. type: string
  1048. description: 建档区域节点 ID(必须省级)
  1049. is_province_node:
  1050. type: boolean
  1051. description: 是否省级节点标记(可选)
  1052. settle_mode:
  1053. type: string
  1054. description: 结算方式:ratio/amount/per_account
  1055. settle_value:
  1056. type: number
  1057. description: 结算值
  1058. row_version:
  1059. type: integer
  1060. description: 乐观锁版本(若启用)
  1061. required:
  1062. - operator_id
  1063. - name
  1064. - brand
  1065. - region_node_id
  1066. required:
  1067. - data
  1068. x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090]
  1069. responses:
  1070. "200":
  1071. description: 成功。统一信封 code/message/data
  1072. /operator/delete@v1:
  1073. post:
  1074. summary: 删除运营商
  1075. description: 删除前六项检查并级联注销对账账号。
  1076. operationId: operator_delete
  1077. tags:
  1078. - 运营商
  1079. x-require-auth: true
  1080. x-resource-type:
  1081. $ref: '#/components/x-resource-types/operator/code'
  1082. x-action:
  1083. $ref: '#/components/x-actions/delete/code'
  1084. x-version: v1
  1085. x-permission-visibility: catalog
  1086. requestBody:
  1087. required: true
  1088. description: JSON 请求体,业务字段置于 data
  1089. content:
  1090. application/json:
  1091. schema:
  1092. type: object
  1093. description: 统一信封请求体,业务字段放在 data 内
  1094. properties:
  1095. data:
  1096. type: object
  1097. description: 业务参数
  1098. properties:
  1099. operator_id:
  1100. type: string
  1101. description: 运营商 ID
  1102. required:
  1103. - operator_id
  1104. required:
  1105. - data
  1106. x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090]
  1107. responses:
  1108. "200":
  1109. description: 成功。统一信封 code/message/data
  1110. /operator/get_list@v1:
  1111. post:
  1112. summary: 运营商列表
  1113. description: 卡片口径:建档区域或下挂客户落在本可见范围。
  1114. operationId: operator_get_list
  1115. tags:
  1116. - 运营商
  1117. x-require-auth: true
  1118. x-resource-type:
  1119. $ref: '#/components/x-resource-types/operator/code'
  1120. x-action:
  1121. $ref: '#/components/x-actions/list/code'
  1122. x-version: v1
  1123. x-permission-visibility: catalog
  1124. requestBody:
  1125. required: true
  1126. description: JSON 请求体,业务字段置于 data
  1127. content:
  1128. application/json:
  1129. schema:
  1130. type: object
  1131. description: 统一信封请求体,业务字段放在 data 内
  1132. properties:
  1133. data:
  1134. type: object
  1135. description: 列表筛选参数
  1136. properties:
  1137. page:
  1138. type: integer
  1139. description: 页码(0 基索引,默认 0)
  1140. minimum: 0
  1141. default: 0
  1142. page_size:
  1143. type: integer
  1144. description: 每页条数(默认 20,上限 200)
  1145. minimum: 1
  1146. maximum: 200
  1147. default: 20
  1148. keyword:
  1149. type: string
  1150. description: 关键字筛选(可选)
  1151. brand:
  1152. type: string
  1153. description: 品牌筛选(可选)
  1154. required:
  1155. - data
  1156. x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090]
  1157. responses:
  1158. "200":
  1159. description: 成功。统一信封 code/message/data
  1160. /operator/recon_account/create@v1:
  1161. post:
  1162. summary: 创建对账账号
  1163. description: 一家运营商至多一个对账账号;初始密码仅当次显示。
  1164. operationId: operator_recon_account_create
  1165. tags:
  1166. - 运营商
  1167. x-require-auth: true
  1168. x-resource-type:
  1169. $ref: '#/components/x-resource-types/operator_recon_account/code'
  1170. x-action:
  1171. $ref: '#/components/x-actions/create/code'
  1172. x-version: v1
  1173. x-permission-visibility: catalog
  1174. requestBody:
  1175. required: true
  1176. description: JSON 请求体,业务字段置于 data
  1177. content:
  1178. application/json:
  1179. schema:
  1180. type: object
  1181. description: 统一信封请求体,业务字段放在 data 内
  1182. properties:
  1183. data:
  1184. type: object
  1185. description: 业务参数
  1186. properties:
  1187. operator_id:
  1188. type: string
  1189. description: 运营商 ID
  1190. username:
  1191. type: string
  1192. description: 对账账号登录名
  1193. mobile:
  1194. type: string
  1195. description: 手机号(可选)
  1196. required:
  1197. - operator_id
  1198. - username
  1199. required:
  1200. - data
  1201. x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090]
  1202. responses:
  1203. "200":
  1204. description: 成功。统一信封 code/message/data
  1205. /operator/recon_account/get@v1:
  1206. post:
  1207. summary: 查询对账账号
  1208. description: 只回状态提示(如「未发送,线下告知本人」),不回密码。
  1209. operationId: operator_recon_account_get
  1210. tags:
  1211. - 运营商
  1212. x-require-auth: true
  1213. x-resource-type:
  1214. $ref: '#/components/x-resource-types/operator_recon_account/code'
  1215. x-action:
  1216. $ref: '#/components/x-actions/view/code'
  1217. x-version: v1
  1218. x-permission-visibility: catalog
  1219. requestBody:
  1220. required: true
  1221. description: JSON 请求体,业务字段置于 data
  1222. content:
  1223. application/json:
  1224. schema:
  1225. type: object
  1226. description: 统一信封请求体,业务字段放在 data 内
  1227. properties:
  1228. data:
  1229. type: object
  1230. description: 业务参数
  1231. properties:
  1232. operator_id:
  1233. type: string
  1234. description: 运营商 ID
  1235. required:
  1236. - operator_id
  1237. required:
  1238. - data
  1239. x-error-codes: [60053, 60054, 60066, 60068, 60089, 60090]
  1240. responses:
  1241. "200":
  1242. description: 成功。统一信封 code/message/data
  1243. /partner/create@v1:
  1244. post:
  1245. summary: 新建合伙人
  1246. description: 合伙人建档并同步开通账号;名称全站唯一;结算字段仅 admin 可写。
  1247. operationId: partner_create
  1248. tags:
  1249. - 合伙人
  1250. x-require-auth: true
  1251. x-resource-type:
  1252. $ref: '#/components/x-resource-types/partner/code'
  1253. x-action:
  1254. $ref: '#/components/x-actions/create/code'
  1255. x-version: v1
  1256. x-permission-visibility: catalog
  1257. requestBody:
  1258. required: true
  1259. description: JSON 请求体,业务字段置于 data
  1260. content:
  1261. application/json:
  1262. schema:
  1263. type: object
  1264. description: 统一信封请求体,业务字段放在 data 内
  1265. properties:
  1266. data:
  1267. type: object
  1268. description: 业务参数
  1269. properties:
  1270. name:
  1271. type: string
  1272. description: 合伙人名称(全站唯一)
  1273. duty_desc:
  1274. type: string
  1275. description: 职务说明(可选)
  1276. region_node_id:
  1277. type: string
  1278. description: 建档区域节点 ID
  1279. mobile:
  1280. type: string
  1281. description: 手机号(可选)
  1282. username:
  1283. type: string
  1284. description: 登录名(开通账号用)
  1285. settle_mode:
  1286. type: string
  1287. description: 结算方式(仅 admin 可写,可选)
  1288. settle_value:
  1289. type: number
  1290. description: 结算值(仅 admin 可写,可选)
  1291. required:
  1292. - name
  1293. - region_node_id
  1294. - username
  1295. required:
  1296. - data
  1297. x-error-codes: [60053, 60054]
  1298. responses:
  1299. "200":
  1300. description: 成功。统一信封 code/message/data
  1301. /partner/update@v1:
  1302. post:
  1303. summary: 编辑合伙人
  1304. description: 编辑合伙人资料;登录名不可改。
  1305. operationId: partner_update
  1306. tags:
  1307. - 合伙人
  1308. x-require-auth: true
  1309. x-resource-type:
  1310. $ref: '#/components/x-resource-types/partner/code'
  1311. x-action:
  1312. $ref: '#/components/x-actions/update/code'
  1313. x-version: v1
  1314. x-permission-visibility: catalog
  1315. requestBody:
  1316. required: true
  1317. description: JSON 请求体,业务字段置于 data
  1318. content:
  1319. application/json:
  1320. schema:
  1321. type: object
  1322. description: 统一信封请求体,业务字段放在 data 内
  1323. properties:
  1324. data:
  1325. type: object
  1326. description: 业务参数
  1327. properties:
  1328. partner_id:
  1329. type: string
  1330. description: 合伙人 ID
  1331. name:
  1332. type: string
  1333. description: 合伙人名称(全站唯一)
  1334. duty_desc:
  1335. type: string
  1336. description: 职务说明(可选)
  1337. region_node_id:
  1338. type: string
  1339. description: 建档区域节点 ID
  1340. mobile:
  1341. type: string
  1342. description: 手机号(可选)
  1343. settle_mode:
  1344. type: string
  1345. description: 结算方式(仅 admin 可写,可选)
  1346. settle_value:
  1347. type: number
  1348. description: 结算值(仅 admin 可写,可选)
  1349. row_version:
  1350. type: integer
  1351. description: 乐观锁版本(若启用)
  1352. required:
  1353. - partner_id
  1354. - name
  1355. - region_node_id
  1356. required:
  1357. - data
  1358. x-error-codes: [60053, 60054]
  1359. responses:
  1360. "200":
  1361. description: 成功。统一信封 code/message/data
  1362. /partner/delete@v1:
  1363. post:
  1364. summary: 删除合伙人
  1365. description: 删除合伙人档案及相关授权。
  1366. operationId: partner_delete
  1367. tags:
  1368. - 合伙人
  1369. x-require-auth: true
  1370. x-resource-type:
  1371. $ref: '#/components/x-resource-types/partner/code'
  1372. x-action:
  1373. $ref: '#/components/x-actions/delete/code'
  1374. x-version: v1
  1375. x-permission-visibility: catalog
  1376. requestBody:
  1377. required: true
  1378. description: JSON 请求体,业务字段置于 data
  1379. content:
  1380. application/json:
  1381. schema:
  1382. type: object
  1383. description: 统一信封请求体,业务字段放在 data 内
  1384. properties:
  1385. data:
  1386. type: object
  1387. description: 业务参数
  1388. properties:
  1389. partner_id:
  1390. type: string
  1391. description: 合伙人 ID
  1392. required:
  1393. - partner_id
  1394. required:
  1395. - data
  1396. x-error-codes: [60053, 60054]
  1397. responses:
  1398. "200":
  1399. description: 成功。统一信封 code/message/data
  1400. /partner/get_list@v1:
  1401. post:
  1402. summary: 合伙人列表
  1403. description: 卡片口径:建档区域落在本范围(含下级)。
  1404. operationId: partner_get_list
  1405. tags:
  1406. - 合伙人
  1407. x-require-auth: true
  1408. x-resource-type:
  1409. $ref: '#/components/x-resource-types/partner/code'
  1410. x-action:
  1411. $ref: '#/components/x-actions/list/code'
  1412. x-version: v1
  1413. x-permission-visibility: catalog
  1414. requestBody:
  1415. required: true
  1416. description: JSON 请求体,业务字段置于 data
  1417. content:
  1418. application/json:
  1419. schema:
  1420. type: object
  1421. description: 统一信封请求体,业务字段放在 data 内
  1422. properties:
  1423. data:
  1424. type: object
  1425. description: 列表筛选参数
  1426. properties:
  1427. page:
  1428. type: integer
  1429. description: 页码(0 基索引,默认 0)
  1430. minimum: 0
  1431. default: 0
  1432. page_size:
  1433. type: integer
  1434. description: 每页条数(默认 20,上限 200)
  1435. minimum: 1
  1436. maximum: 200
  1437. default: 20
  1438. keyword:
  1439. type: string
  1440. description: 关键字筛选(可选)
  1441. required:
  1442. - data
  1443. x-error-codes: [60053, 60054]
  1444. responses:
  1445. "200":
  1446. description: 成功。统一信封 code/message/data
  1447. /partner/scope/get@v1:
  1448. post:
  1449. summary: 读取合伙人负责范围
  1450. description: 返回该合伙人的 region/customer 两类 bos_data_scope。⚠️ 2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。
  1451. operationId: partner_scope_get
  1452. tags:
  1453. - 合伙人
  1454. x-require-auth: true
  1455. x-resource-type:
  1456. $ref: '#/components/x-resource-types/partner_scope/code'
  1457. x-action:
  1458. $ref: '#/components/x-actions/view/code'
  1459. x-version: v1
  1460. x-permission-visibility: catalog
  1461. requestBody:
  1462. required: true
  1463. description: 统一信封请求体(无业务参数)
  1464. content:
  1465. application/json:
  1466. schema:
  1467. type: object
  1468. properties:
  1469. data:
  1470. type: object
  1471. description: 无业务参数
  1472. required:
  1473. - data
  1474. x-error-codes: [60053, 60054]
  1475. responses:
  1476. "200":
  1477. description: 成功。统一信封 code/message/data
  1478. /partner/scope/save@v1:
  1479. post:
  1480. summary: 保存合伙人负责范围
  1481. description: 写入 bos_data_scope(holder_type=partner);允许保存为空;保存即 bump epoch。
  1482. operationId: partner_scope_save
  1483. tags:
  1484. - 合伙人
  1485. x-require-auth: true
  1486. x-resource-type:
  1487. $ref: '#/components/x-resource-types/partner_scope/code'
  1488. x-action:
  1489. $ref: '#/components/x-actions/manage/code'
  1490. x-version: v1
  1491. x-permission-visibility: catalog
  1492. requestBody:
  1493. required: true
  1494. description: JSON 请求体,业务字段置于 data
  1495. content:
  1496. application/json:
  1497. schema:
  1498. type: object
  1499. description: 统一信封请求体,业务字段放在 data 内
  1500. properties:
  1501. data:
  1502. type: object
  1503. description: 业务参数
  1504. properties:
  1505. partner_id:
  1506. type: string
  1507. description: 合伙人 ID
  1508. region_node_ids:
  1509. type: array
  1510. description: 负责区域节点 ID 列表(可空)
  1511. items:
  1512. type: string
  1513. description: 区域节点 ID
  1514. customer_ids:
  1515. type: array
  1516. description: 负责客户 ID 列表(可空)
  1517. items:
  1518. type: string
  1519. description: 客户 ID
  1520. required:
  1521. - partner_id
  1522. required:
  1523. - data
  1524. x-error-codes: [60053, 60054]
  1525. responses:
  1526. "200":
  1527. description: 成功。统一信封 code/message/data
  1528. /ent_team/create@v1:
  1529. post:
  1530. summary: 新建运营团队
  1531. description: 仅 admin。新建运营团队,负责范围初始为空。
  1532. operationId: ent_team_create
  1533. tags:
  1534. - 运营团队
  1535. x-require-auth: true
  1536. x-resource-type:
  1537. $ref: '#/components/x-resource-types/ent_team/code'
  1538. x-action:
  1539. $ref: '#/components/x-actions/create/code'
  1540. x-version: v1
  1541. x-permission-visibility: catalog
  1542. requestBody:
  1543. required: true
  1544. description: JSON 请求体,业务字段置于 data
  1545. content:
  1546. application/json:
  1547. schema:
  1548. type: object
  1549. description: 统一信封请求体,业务字段放在 data 内
  1550. properties:
  1551. data:
  1552. type: object
  1553. description: 业务参数
  1554. properties:
  1555. team_name:
  1556. type: string
  1557. description: 团队名称
  1558. primary_username:
  1559. type: string
  1560. description: 主账号登录名(可选)
  1561. primary_mobile:
  1562. type: string
  1563. description: 主账号手机号(可选)
  1564. required:
  1565. - team_name
  1566. required:
  1567. - data
  1568. x-error-codes: [60053, 60054, 60068]
  1569. responses:
  1570. "200":
  1571. description: 成功。统一信封 code/message/data
  1572. /ent_team/update@v1:
  1573. post:
  1574. summary: 编辑运营团队
  1575. description: 仅 admin。编辑团队资料。
  1576. operationId: ent_team_update
  1577. tags:
  1578. - 运营团队
  1579. x-require-auth: true
  1580. x-resource-type:
  1581. $ref: '#/components/x-resource-types/ent_team/code'
  1582. x-action:
  1583. $ref: '#/components/x-actions/update/code'
  1584. x-version: v1
  1585. x-permission-visibility: catalog
  1586. requestBody:
  1587. required: true
  1588. description: JSON 请求体,业务字段置于 data
  1589. content:
  1590. application/json:
  1591. schema:
  1592. type: object
  1593. description: 统一信封请求体,业务字段放在 data 内
  1594. properties:
  1595. data:
  1596. type: object
  1597. description: 业务参数
  1598. properties:
  1599. team_id:
  1600. type: string
  1601. description: 团队 ID
  1602. team_name:
  1603. type: string
  1604. description: 团队名称
  1605. row_version:
  1606. type: integer
  1607. description: 乐观锁版本(若启用)
  1608. required:
  1609. - team_id
  1610. - team_name
  1611. required:
  1612. - data
  1613. x-error-codes: [60053, 60054, 60068]
  1614. responses:
  1615. "200":
  1616. description: 成功。统一信封 code/message/data
  1617. /ent_team/delete@v1:
  1618. post:
  1619. summary: 删除运营团队
  1620. description: 仅 admin。内置「总部·不限区域」团队不可删。
  1621. operationId: ent_team_delete
  1622. tags:
  1623. - 运营团队
  1624. x-require-auth: true
  1625. x-resource-type:
  1626. $ref: '#/components/x-resource-types/ent_team/code'
  1627. x-action:
  1628. $ref: '#/components/x-actions/delete/code'
  1629. x-version: v1
  1630. x-permission-visibility: catalog
  1631. requestBody:
  1632. required: true
  1633. description: JSON 请求体,业务字段置于 data
  1634. content:
  1635. application/json:
  1636. schema:
  1637. type: object
  1638. description: 统一信封请求体,业务字段放在 data 内
  1639. properties:
  1640. data:
  1641. type: object
  1642. description: 业务参数
  1643. properties:
  1644. team_id:
  1645. type: string
  1646. description: 团队 ID
  1647. required:
  1648. - team_id
  1649. required:
  1650. - data
  1651. x-error-codes: [60053, 60054, 60068]
  1652. responses:
  1653. "200":
  1654. description: 成功。统一信封 code/message/data
  1655. /ent_team/member_add@v1:
  1656. post:
  1657. summary: 添加运营团队成员
  1658. description: 每团队有且仅有一个主账号;不可删除当前登录账号。
  1659. operationId: ent_team_member_add
  1660. tags:
  1661. - 运营团队
  1662. x-require-auth: true
  1663. x-resource-type:
  1664. $ref: '#/components/x-resource-types/ent_team/code'
  1665. x-action:
  1666. $ref: '#/components/x-actions/manage/code'
  1667. x-version: v1
  1668. x-permission-visibility: catalog
  1669. requestBody:
  1670. required: true
  1671. description: JSON 请求体,业务字段置于 data
  1672. content:
  1673. application/json:
  1674. schema:
  1675. type: object
  1676. description: 统一信封请求体,业务字段放在 data 内
  1677. properties:
  1678. data:
  1679. type: object
  1680. description: 业务参数
  1681. properties:
  1682. team_id:
  1683. type: string
  1684. description: 团队 ID
  1685. username:
  1686. type: string
  1687. description: 成员登录名
  1688. mobile:
  1689. type: string
  1690. description: 手机号(可选)
  1691. is_primary:
  1692. type: boolean
  1693. description: 是否设为主账号(可选)
  1694. required:
  1695. - team_id
  1696. - username
  1697. required:
  1698. - data
  1699. x-error-codes: [60053, 60054, 60068]
  1700. responses:
  1701. "200":
  1702. description: 成功。统一信封 code/message/data
  1703. /ent_team/member_remove@v1:
  1704. post:
  1705. summary: 移除运营团队成员
  1706. description: 内置主账号不可删不可转交;不可删除当前登录账号。
  1707. operationId: ent_team_member_remove
  1708. tags:
  1709. - 运营团队
  1710. x-require-auth: true
  1711. x-resource-type:
  1712. $ref: '#/components/x-resource-types/ent_team/code'
  1713. x-action:
  1714. $ref: '#/components/x-actions/manage/code'
  1715. x-version: v1
  1716. x-permission-visibility: catalog
  1717. requestBody:
  1718. required: true
  1719. description: JSON 请求体,业务字段置于 data
  1720. content:
  1721. application/json:
  1722. schema:
  1723. type: object
  1724. description: 统一信封请求体,业务字段放在 data 内
  1725. properties:
  1726. data:
  1727. type: object
  1728. description: 业务参数
  1729. properties:
  1730. team_id:
  1731. type: string
  1732. description: 团队 ID
  1733. user_id:
  1734. type: string
  1735. description: 成员用户 ID
  1736. required:
  1737. - team_id
  1738. - user_id
  1739. required:
  1740. - data
  1741. x-error-codes: [60053, 60054, 60068]
  1742. responses:
  1743. "200":
  1744. description: 成功。统一信封 code/message/data
  1745. /ent_team/transfer_primary@v1:
  1746. post:
  1747. summary: 转交运营团队主账号
  1748. description: 仅 admin。同事务切换 is_primary 标记并同步 role_code(opsMain↔opsSub)。
  1749. operationId: ent_team_transfer_primary
  1750. tags:
  1751. - 运营团队
  1752. x-require-auth: true
  1753. x-resource-type:
  1754. $ref: '#/components/x-resource-types/ent_team/code'
  1755. x-action:
  1756. $ref: '#/components/x-actions/manage/code'
  1757. x-version: v1
  1758. x-permission-visibility: catalog
  1759. requestBody:
  1760. required: true
  1761. description: JSON 请求体,业务字段置于 data
  1762. content:
  1763. application/json:
  1764. schema:
  1765. type: object
  1766. description: 统一信封请求体,业务字段放在 data 内
  1767. properties:
  1768. data:
  1769. type: object
  1770. description: 业务参数
  1771. properties:
  1772. team_id:
  1773. type: string
  1774. description: 团队 ID
  1775. from_user_id:
  1776. type: string
  1777. description: 原主账号用户 ID
  1778. to_user_id:
  1779. type: string
  1780. description: 新主账号用户 ID
  1781. required:
  1782. - team_id
  1783. - from_user_id
  1784. - to_user_id
  1785. required:
  1786. - data
  1787. x-error-codes: [60053, 60054, 60068]
  1788. responses:
  1789. "200":
  1790. description: 成功。统一信封 code/message/data
  1791. /ent_team/scope/get@v1:
  1792. post:
  1793. summary: 读取运营团队负责范围
  1794. description: 仅 admin。返回团队区域负责范围。⚠️ 2026-11-08 由 GET 改 POST(R-5,统一方法;本接口读 scope 表本身,不消费授权上界,故不标 x-enumeration-kind)。
  1795. operationId: ent_team_scope_get
  1796. tags:
  1797. - 运营团队
  1798. x-require-auth: true
  1799. x-resource-type:
  1800. $ref: '#/components/x-resource-types/ent_team_scope/code'
  1801. x-action:
  1802. $ref: '#/components/x-actions/view/code'
  1803. x-version: v1
  1804. x-permission-visibility: catalog
  1805. requestBody:
  1806. required: true
  1807. description: 统一信封请求体(无业务参数)
  1808. content:
  1809. application/json:
  1810. schema:
  1811. type: object
  1812. properties:
  1813. data:
  1814. type: object
  1815. description: 无业务参数
  1816. required:
  1817. - data
  1818. x-error-codes: [60053, 60054, 60068]
  1819. responses:
  1820. "200":
  1821. description: 成功。统一信封 code/message/data
  1822. /ent_team/scope/save@v1:
  1823. post:
  1824. summary: 保存运营团队负责范围
  1825. description: 仅 admin。勾选区域写入 bos_data_scope(holder=ent_team),成为区域删除的引用来源。
  1826. operationId: ent_team_scope_save
  1827. tags:
  1828. - 运营团队
  1829. x-require-auth: true
  1830. x-resource-type:
  1831. $ref: '#/components/x-resource-types/ent_team_scope/code'
  1832. x-action:
  1833. $ref: '#/components/x-actions/manage/code'
  1834. x-version: v1
  1835. x-permission-visibility: catalog
  1836. requestBody:
  1837. required: true
  1838. description: JSON 请求体,业务字段置于 data
  1839. content:
  1840. application/json:
  1841. schema:
  1842. type: object
  1843. description: 统一信封请求体,业务字段放在 data 内
  1844. properties:
  1845. data:
  1846. type: object
  1847. description: 业务参数
  1848. properties:
  1849. team_id:
  1850. type: string
  1851. description: 团队 ID
  1852. region_node_ids:
  1853. type: array
  1854. description: 负责区域节点 ID 列表
  1855. items:
  1856. type: string
  1857. description: 区域节点 ID
  1858. required:
  1859. - team_id
  1860. - region_node_ids
  1861. required:
  1862. - data
  1863. x-error-codes: [60053, 60054, 60068]
  1864. responses:
  1865. "200":
  1866. description: 成功。统一信封 code/message/data
  1867. /ops_team/create@v1:
  1868. post:
  1869. summary: 新建运维团队
  1870. description: 须指定所属区域、可派工单类型≥1、分派方式与结算口径。⚠️ 2026-11-05 起团队不分类型(无 team_type 键)。
  1871. operationId: ops_team_create
  1872. tags:
  1873. - 运维团队与成员
  1874. x-require-auth: true
  1875. x-resource-type:
  1876. $ref: '#/components/x-resource-types/ops_team/code'
  1877. x-action:
  1878. $ref: '#/components/x-actions/create/code'
  1879. x-version: v1
  1880. x-permission-visibility: catalog
  1881. requestBody:
  1882. required: true
  1883. description: JSON 请求体,业务字段置于 data
  1884. content:
  1885. application/json:
  1886. schema:
  1887. type: object
  1888. description: 统一信封请求体,业务字段放在 data 内
  1889. properties:
  1890. data:
  1891. type: object
  1892. description: 业务参数
  1893. properties:
  1894. team_name:
  1895. type: string
  1896. description: 团队名称
  1897. region_node_id:
  1898. type: string
  1899. description: 所属区域节点 ID
  1900. ticket_types:
  1901. type: array
  1902. description: 可派工单类型列表(至少 1 项)
  1903. items:
  1904. type: string
  1905. description: 工单类型码
  1906. dispatch_mode:
  1907. type: string
  1908. description: 分派方式:manual=手工;auto_avg=自动均分
  1909. enum:
  1910. - manual
  1911. - auto_avg
  1912. settle_mode:
  1913. type: string
  1914. description: 结算方式
  1915. settle_value:
  1916. type: number
  1917. description: 结算值
  1918. primary_username:
  1919. type: string
  1920. description: 主账号登录名(空则默认「{团队名}主账号」)
  1921. primary_mobile:
  1922. type: string
  1923. description: 主账号手机号(可选)
  1924. required:
  1925. - team_name
  1926. - region_node_id
  1927. - ticket_types
  1928. - dispatch_mode
  1929. required:
  1930. - data
  1931. x-error-codes: [60053, 60054, 60068, 60082]
  1932. responses:
  1933. "200":
  1934. description: 成功。统一信封 code/message/data
  1935. /ops_team/update@v1:
  1936. post:
  1937. summary: 编辑运维团队
  1938. description: 编辑团队资料。⚠️ 2026-11-05 起团队不分类型,请求体无 team_type 键。
  1939. operationId: ops_team_update
  1940. tags:
  1941. - 运维团队与成员
  1942. x-require-auth: true
  1943. x-resource-type:
  1944. $ref: '#/components/x-resource-types/ops_team/code'
  1945. x-action:
  1946. $ref: '#/components/x-actions/update/code'
  1947. x-version: v1
  1948. x-permission-visibility: catalog
  1949. requestBody:
  1950. required: true
  1951. description: JSON 请求体,业务字段置于 data
  1952. content:
  1953. application/json:
  1954. schema:
  1955. type: object
  1956. description: 统一信封请求体,业务字段放在 data 内
  1957. properties:
  1958. data:
  1959. type: object
  1960. description: 业务参数
  1961. properties:
  1962. team_id:
  1963. type: string
  1964. description: 团队 ID
  1965. team_name:
  1966. type: string
  1967. description: 团队名称
  1968. region_node_id:
  1969. type: string
  1970. description: 所属区域节点 ID
  1971. ticket_types:
  1972. type: array
  1973. description: 可派工单类型列表
  1974. items:
  1975. type: string
  1976. description: 工单类型码
  1977. settle_mode:
  1978. type: string
  1979. description: 结算方式
  1980. settle_value:
  1981. type: number
  1982. description: 结算值
  1983. row_version:
  1984. type: integer
  1985. description: 乐观锁版本(若启用)
  1986. required:
  1987. - team_id
  1988. required:
  1989. - data
  1990. x-error-codes: [60053, 60054, 60068, 60082]
  1991. responses:
  1992. "200":
  1993. description: 成功。统一信封 code/message/data
  1994. /ops_team/delete@v1:
  1995. post:
  1996. summary: 删除运维团队
  1997. description: 删除前校验引用与未办完工单等守卫。
  1998. operationId: ops_team_delete
  1999. tags:
  2000. - 运维团队与成员
  2001. x-require-auth: true
  2002. x-resource-type:
  2003. $ref: '#/components/x-resource-types/ops_team/code'
  2004. x-action:
  2005. $ref: '#/components/x-actions/delete/code'
  2006. x-version: v1
  2007. x-permission-visibility: catalog
  2008. requestBody:
  2009. required: true
  2010. description: JSON 请求体,业务字段置于 data
  2011. content:
  2012. application/json:
  2013. schema:
  2014. type: object
  2015. description: 统一信封请求体,业务字段放在 data 内
  2016. properties:
  2017. data:
  2018. type: object
  2019. description: 业务参数
  2020. properties:
  2021. team_id:
  2022. type: string
  2023. description: 团队 ID
  2024. required:
  2025. - team_id
  2026. required:
  2027. - data
  2028. x-error-codes: [60053, 60054, 60068, 60082]
  2029. responses:
  2030. "200":
  2031. description: 成功。统一信封 code/message/data
  2032. /ops_team/scope/save@v1:
  2033. post:
  2034. summary: 保存运维团队负责范围
  2035. description: 三个范围写入口之一。同事务校验范围包含关系与未办完工单守卫;失败两侧都不落库。
  2036. operationId: ops_team_scope_save
  2037. tags:
  2038. - 运维团队与成员
  2039. x-require-auth: true
  2040. x-resource-type:
  2041. $ref: '#/components/x-resource-types/ops_team_scope/code'
  2042. x-action:
  2043. $ref: '#/components/x-actions/manage/code'
  2044. x-version: v1
  2045. x-permission-visibility: catalog
  2046. requestBody:
  2047. required: true
  2048. description: JSON 请求体,业务字段置于 data
  2049. content:
  2050. application/json:
  2051. schema:
  2052. type: object
  2053. description: 统一信封请求体,业务字段放在 data 内
  2054. properties:
  2055. data:
  2056. type: object
  2057. description: 业务参数
  2058. properties:
  2059. team_id:
  2060. type: string
  2061. description: 团队 ID
  2062. region_node_ids:
  2063. type: array
  2064. description: 负责区域节点 ID 列表
  2065. items:
  2066. type: string
  2067. description: 区域节点 ID
  2068. customer_ids:
  2069. type: array
  2070. description: 负责客户 ID 列表(可空)
  2071. items:
  2072. type: string
  2073. description: 客户 ID
  2074. required:
  2075. - team_id
  2076. required:
  2077. - data
  2078. x-error-codes: [60053, 60054, 60068, 60082]
  2079. responses:
  2080. "200":
  2081. description: 成功。统一信封 code/message/data
  2082. /ops_team/member_add@v1:
  2083. post:
  2084. summary: 添加运维成员
  2085. description: 新建成员档案并开通运维子账号(`role_code=ops`)。⚠️ 2026-11-05 起成员不分类型,服务侧只校验 `ticket_types` 是团队可分配类型的子集(`KLT-I105`,可为空=不接单)。
  2086. operationId: ops_team_member_add
  2087. tags:
  2088. - 运维团队与成员
  2089. x-require-auth: true
  2090. x-resource-type:
  2091. $ref: '#/components/x-resource-types/ops_team/code'
  2092. x-action:
  2093. $ref: '#/components/x-actions/manage/code'
  2094. x-version: v1
  2095. x-permission-visibility: catalog
  2096. requestBody:
  2097. required: true
  2098. description: JSON 请求体,业务字段置于 data
  2099. content:
  2100. application/json:
  2101. schema:
  2102. type: object
  2103. description: 统一信封请求体,业务字段放在 data 内
  2104. properties:
  2105. data:
  2106. type: object
  2107. description: 业务参数
  2108. properties:
  2109. team_id:
  2110. type: string
  2111. description: 团队 ID
  2112. ticket_types:
  2113. type: array
  2114. description: 该成员可处理的工单类型(须为团队可分配类型的子集;空数组=不接单,如录入人员)
  2115. items:
  2116. type: string
  2117. description: 工单类型码
  2118. username:
  2119. type: string
  2120. description: 登录名
  2121. mobile:
  2122. type: string
  2123. description: 手机号(可选)
  2124. required:
  2125. - team_id
  2126. - username
  2127. required:
  2128. - data
  2129. x-error-codes: [60053, 60054, 60068, 60082]
  2130. responses:
  2131. "200":
  2132. description: 成功。统一信封 code/message/data
  2133. /ops_team/member_update@v1:
  2134. post:
  2135. summary: 更新运维成员
  2136. description: 可改手机号与可处理工单类型。⚠️ 2026-11-05 起成员不分类型,⛔ 不因类型变更改写 role_code;可接类型落 ops_member_ticket_type。
  2137. operationId: ops_team_member_update
  2138. tags:
  2139. - 运维团队与成员
  2140. x-require-auth: true
  2141. x-resource-type:
  2142. $ref: '#/components/x-resource-types/ops_team/code'
  2143. x-action:
  2144. $ref: '#/components/x-actions/manage/code'
  2145. x-version: v1
  2146. x-permission-visibility: catalog
  2147. requestBody:
  2148. required: true
  2149. description: JSON 请求体,业务字段置于 data
  2150. content:
  2151. application/json:
  2152. schema:
  2153. type: object
  2154. description: 统一信封请求体,业务字段放在 data 内
  2155. properties:
  2156. data:
  2157. type: object
  2158. description: 业务参数
  2159. properties:
  2160. team_id:
  2161. type: string
  2162. description: 团队 ID
  2163. ticket_types:
  2164. type: array
  2165. description: 该成员可处理的工单类型(整体替换;须为团队可分配类型的子集;空数组=不接单)
  2166. items:
  2167. type: string
  2168. description: 工单类型码
  2169. member_id:
  2170. type: string
  2171. description: 成员 ID
  2172. mobile:
  2173. type: string
  2174. description: 手机号(可选)
  2175. required:
  2176. - team_id
  2177. - member_id
  2178. required:
  2179. - data
  2180. x-error-codes: [60053, 60054, 60068, 60082]
  2181. responses:
  2182. "200":
  2183. description: 成功。统一信封 code/message/data
  2184. /ops_team/member_remove@v1:
  2185. post:
  2186. summary: 移除运维成员
  2187. description: 删除前五项检查并注销账号。
  2188. operationId: ops_team_member_remove
  2189. tags:
  2190. - 运维团队与成员
  2191. x-require-auth: true
  2192. x-resource-type:
  2193. $ref: '#/components/x-resource-types/ops_team/code'
  2194. x-action:
  2195. $ref: '#/components/x-actions/manage/code'
  2196. x-version: v1
  2197. x-permission-visibility: catalog
  2198. requestBody:
  2199. required: true
  2200. description: JSON 请求体,业务字段置于 data
  2201. content:
  2202. application/json:
  2203. schema:
  2204. type: object
  2205. description: 统一信封请求体,业务字段放在 data 内
  2206. properties:
  2207. data:
  2208. type: object
  2209. description: 业务参数
  2210. properties:
  2211. team_id:
  2212. type: string
  2213. description: 团队 ID
  2214. member_id:
  2215. type: string
  2216. description: 成员 ID
  2217. required:
  2218. - team_id
  2219. - member_id
  2220. required:
  2221. - data
  2222. x-error-codes: [60053, 60054, 60068, 60082]
  2223. responses:
  2224. "200":
  2225. description: 成功。统一信封 code/message/data
  2226. /ops_member/scope/save@v1:
  2227. post:
  2228. summary: 保存运维成员负责范围
  2229. description: 三个范围写入口之二。scope_mode∈follow_team/region/customer;越界报错不保存。
  2230. operationId: ops_member_scope_save
  2231. tags:
  2232. - 运维团队与成员
  2233. x-require-auth: true
  2234. x-resource-type:
  2235. $ref: '#/components/x-resource-types/ops_member_scope/code'
  2236. x-action:
  2237. $ref: '#/components/x-actions/manage/code'
  2238. x-version: v1
  2239. x-permission-visibility: catalog
  2240. requestBody:
  2241. required: true
  2242. description: JSON 请求体,业务字段置于 data
  2243. content:
  2244. application/json:
  2245. schema:
  2246. type: object
  2247. description: 统一信封请求体,业务字段放在 data 内
  2248. properties:
  2249. data:
  2250. type: object
  2251. description: 业务参数
  2252. properties:
  2253. member_id:
  2254. type: string
  2255. description: 成员 ID
  2256. scope_mode:
  2257. type: string
  2258. description: 范围模式:follow_team=跟随团队;region=按区域;customer=按客户
  2259. enum:
  2260. - follow_team
  2261. - region
  2262. - customer
  2263. targets:
  2264. type: array
  2265. description: region/customer 模式下的目标 ID 列表
  2266. items:
  2267. type: string
  2268. description: 目标 ID
  2269. required:
  2270. - member_id
  2271. - scope_mode
  2272. required:
  2273. - data
  2274. x-error-codes: [60053, 60054, 60068, 60082]
  2275. responses:
  2276. "200":
  2277. description: 成功。统一信封 code/message/data
  2278. /ops_team/dispatch_mode/update@v1:
  2279. post:
  2280. summary: 更新分派方式
  2281. description: 与运营侧改同一字段,后写入者生效;默认补记审计。
  2282. operationId: ops_team_dispatch_mode_update
  2283. tags:
  2284. - 运维团队与成员
  2285. x-require-auth: true
  2286. x-resource-type:
  2287. $ref: '#/components/x-resource-types/ops_team_dispatch_mode/code'
  2288. x-action:
  2289. $ref: '#/components/x-actions/update/code'
  2290. x-version: v1
  2291. x-permission-visibility: catalog
  2292. requestBody:
  2293. required: true
  2294. description: JSON 请求体,业务字段置于 data
  2295. content:
  2296. application/json:
  2297. schema:
  2298. type: object
  2299. description: 统一信封请求体,业务字段放在 data 内
  2300. properties:
  2301. data:
  2302. type: object
  2303. description: 业务参数
  2304. properties:
  2305. team_id:
  2306. type: string
  2307. description: 团队 ID
  2308. dispatch_mode:
  2309. type: string
  2310. description: 分派方式:manual=手工;auto_avg=自动均分
  2311. enum:
  2312. - manual
  2313. - auto_avg
  2314. required:
  2315. - team_id
  2316. - dispatch_mode
  2317. required:
  2318. - data
  2319. x-error-codes: [60053, 60054, 60068, 60082]
  2320. responses:
  2321. "200":
  2322. description: 成功。统一信封 code/message/data
  2323. /ops_team/coverage/get@v1:
  2324. post:
  2325. summary: 运维团队覆盖客户
  2326. description: 覆盖客户=团队区域范围(Tree) ∩ 本类型归属(Owner),与列表分页同源。⚠️ 2026-11-08 由 GET 改 POST(R-5)。
  2327. operationId: ops_team_coverage_get
  2328. tags:
  2329. - 运维团队与成员
  2330. x-require-auth: true
  2331. x-resource-type:
  2332. $ref: '#/components/x-resource-types/ops_team_coverage/code'
  2333. x-action:
  2334. $ref: '#/components/x-actions/view/code'
  2335. x-version: v1
  2336. x-permission-visibility: catalog
  2337. x-enumeration-kind: list
  2338. requestBody:
  2339. required: true
  2340. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  2341. content:
  2342. application/json:
  2343. schema:
  2344. type: object
  2345. properties:
  2346. data:
  2347. type: object
  2348. description: 无业务参数
  2349. required:
  2350. - data
  2351. x-error-codes: [60053, 60054, 60068, 60082]
  2352. responses:
  2353. "200":
  2354. description: 成功。统一信封 code/message/data
  2355. /customer/create@v1:
  2356. post:
  2357. summary: 新建客户
  2358. description: 客户建档(Opt-11 先挂树后建档)。`mount_request_id` 与 `parent_node_id` 至少给一个:给 `parent_node_id` 时由本接口完成「发号 → 平台资源树注册客户实例 → 回填挂载事实」;给 `mount_request_id` 时就近认领已存在的挂载申请。同时按 组织§4.5 为客户开通主账号(`primary_username` 留空=按主体号自动派生)。完整弹窗字段还可含识别号、联系人、地址、运维团队等。
  2359. operationId: customer_create
  2360. tags:
  2361. - 客户管理
  2362. x-require-auth: true
  2363. x-resource-type:
  2364. $ref: '#/components/x-resource-types/customer/code'
  2365. x-action:
  2366. $ref: '#/components/x-actions/create/code'
  2367. x-version: v1
  2368. x-permission-visibility: catalog
  2369. requestBody:
  2370. required: true
  2371. description: JSON 请求体,业务字段置于 data
  2372. content:
  2373. application/json:
  2374. schema:
  2375. type: object
  2376. description: 统一信封请求体,业务字段放在 data 内
  2377. properties:
  2378. data:
  2379. type: object
  2380. description: 业务参数
  2381. properties:
  2382. customer_name:
  2383. type: string
  2384. description: 客户名称
  2385. subject_type:
  2386. type: string
  2387. description: 主体类型
  2388. operator_id:
  2389. type: string
  2390. description: 归属运营商 ID
  2391. partner_id:
  2392. type: string
  2393. description: 归属合伙人 ID(可选)
  2394. mount_request_id:
  2395. type: string
  2396. description: 挂载申请 ID(与 parent_node_id 二选一;有值=认领已有的挂载事实)
  2397. parent_node_id:
  2398. type: string
  2399. description: 所挂区域父节点 ID(与 mount_request_id 二选一;有值=由本接口完成平台挂树并回填挂载事实)
  2400. id_code:
  2401. type: string
  2402. description: 识别号(可选)
  2403. contact_name:
  2404. type: string
  2405. description: 联系人(可选)
  2406. contact_mobile:
  2407. type: string
  2408. description: 联系电话(可选)
  2409. address:
  2410. type: string
  2411. description: 地址(可选)
  2412. ops_team_ids:
  2413. type: array
  2414. description: 所挂运维团队 ID(**单支定案** 2026-11-12:建档必填**恰好 1 支**,数组形态仅兼容调用方;缺支/空数组/>1 支一律拒绝,且须在操作人负责范围内)
  2415. items:
  2416. type: string
  2417. description: 运维团队 ID
  2418. primary_username:
  2419. type: string
  2420. description: 客户主账号登录名(可选;留空=按主体号自动派生)。本接口自行调平台 iam-user/user/create@v1 建号
  2421. primary_mobile:
  2422. type: string
  2423. description: 客户主账号手机号(可选)
  2424. license:
  2425. type: object
  2426. description: 登记材料(营业执照影像,客户§2.1/§3.5;`U-97` 2026-11-03 定案)。影像本体由浏览器持自身账号票直传平台 `unified-oss`(本服务⛔ 收字节流、⛔ 开上传接口),建档只回报落库用的对象键+原始文件名。`object_key` 必须落在 `klt/customer/license/` 前缀下
  2427. properties:
  2428. object_key:
  2429. type: string
  2430. description: 平台 unified-oss 逻辑键(1–512 字符,须以 klt/customer/license/ 开头;⛔ URL/⛔ 签名链接)
  2431. file_name:
  2432. type: string
  2433. description: 原始文件名(1–128 字符,⛔ 含路径分隔符;仅供页面展示)
  2434. required:
  2435. - object_key
  2436. - file_name
  2437. required:
  2438. - customer_name
  2439. - subject_type
  2440. - operator_id
  2441. required:
  2442. - data
  2443. x-error-codes: [60056, 60064, 60066, 60117]
  2444. responses:
  2445. "200":
  2446. description: 成功。统一信封 code/message/data
  2447. /customer/get_list@v1:
  2448. post:
  2449. summary: 客户列表
  2450. description: 按可见范围返回客户列表,支持筛选与分页。
  2451. operationId: customer_get_list
  2452. tags:
  2453. - 客户管理
  2454. x-require-auth: true
  2455. x-resource-type:
  2456. $ref: '#/components/x-resource-types/customer/code'
  2457. x-action:
  2458. $ref: '#/components/x-actions/list/code'
  2459. x-version: v1
  2460. x-permission-visibility: catalog
  2461. # 工单回件 §5.2 B1 点名的「客户列表」:本路由列出的行=klt.customer 维度的资源实例
  2462. # (PG-3 的可见集口径即「授权上界 ∩ 资源树挂载」),故按 list 声明真源列举。
  2463. # ⚠️ 声明本身不改变本轮可见范围:handler 现按 customer_scope_pred 收窄
  2464. # (customer.rs:556 → partner.rs:1146),运维分支仍走本地 bos_data_scope,
  2465. # 通道②在运维分支的接入待业主确认口径(见影响清单 L-2)。
  2466. x-enumeration-kind: list
  2467. requestBody:
  2468. required: true
  2469. description: JSON 请求体,业务字段置于 data
  2470. content:
  2471. application/json:
  2472. schema:
  2473. type: object
  2474. description: 统一信封请求体,业务字段放在 data 内
  2475. properties:
  2476. data:
  2477. type: object
  2478. description: 列表筛选参数
  2479. properties:
  2480. page:
  2481. type: integer
  2482. description: 页码(0 基索引,默认 0)
  2483. minimum: 0
  2484. default: 0
  2485. page_size:
  2486. type: integer
  2487. description: 每页条数(默认 20,上限 200)
  2488. minimum: 1
  2489. maximum: 200
  2490. default: 20
  2491. keyword:
  2492. type: string
  2493. description: 关键字筛选(可选)
  2494. region_node_id:
  2495. type: string
  2496. description: 区域筛选(可选)
  2497. operator_id:
  2498. type: string
  2499. description: 运营商筛选(可选)
  2500. partner_id:
  2501. type: string
  2502. description: 合伙人筛选(可选)
  2503. status:
  2504. type: string
  2505. description: 状态筛选(可选)
  2506. required:
  2507. - data
  2508. x-error-codes: [60056, 60064, 60066, 60117]
  2509. responses:
  2510. "200":
  2511. description: 成功。统一信封 code/message/data
  2512. /customer/get@v1:
  2513. post:
  2514. summary: 客户详情
  2515. 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 天,起算点=建档日、重新上传不重置,`U-97`);② 平台对象锚点 `object/head@v1` 的 `lifecycle.expire_at`(无规则时 `last_modified + 留存期`)。②用于保证「页面说可看」时桶里一定有字节(桶侧按对象创建时刻到期,⛔ 按建档日);①用于防止换图把留存期重新起算。`expired` ⇒ 两格为 `null`。⚠️ 对象键⛔ 上响应体、签名⛔ 落库。
  2516. operationId: customer_get
  2517. tags:
  2518. - 客户管理
  2519. x-require-auth: true
  2520. x-resource-type:
  2521. $ref: '#/components/x-resource-types/customer/code'
  2522. x-action:
  2523. $ref: '#/components/x-actions/view/code'
  2524. x-version: v1
  2525. x-permission-visibility: catalog
  2526. requestBody:
  2527. required: true
  2528. description: JSON 请求体,业务字段置于 data
  2529. content:
  2530. application/json:
  2531. schema:
  2532. type: object
  2533. description: 统一信封请求体,业务字段放在 data 内
  2534. properties:
  2535. data:
  2536. type: object
  2537. description: 业务参数
  2538. properties:
  2539. customer_id:
  2540. type: string
  2541. description: 客户 ID
  2542. required:
  2543. - customer_id
  2544. required:
  2545. - data
  2546. x-error-codes: [60056, 60064, 60066, 60117]
  2547. responses:
  2548. "200":
  2549. description: 成功。统一信封 code/message/data
  2550. /customer/update@v1:
  2551. post:
  2552. summary: 编辑客户
  2553. description: >-
  2554. 编辑客户资料。拒收改写 customer_id/region_node_id/operator_id/partner_id;改识别号须带 change_basis。
  2555. 登记材料换图或随主体变更撤销时,**旧对象即时删除**(平台 `unified-oss/object/delete@v1`,KB-2 §2.6;
  2556. 生命周期回收只兜「到期」,不替代即时删除)。删除为 best-effort:主表此刻已指向新对象,
  2557. 删除失败不回退整笔,只告警并由运维补删。响应新增 `license_object_delete{status,reason,deleted?,failed_codes?,error?}`:
  2558. `not_applicable`(未动影像/键未变)/`deleted`/`partial`/`failed`。⚠️ 对象键⛔ 上响应体。
  2559. operationId: customer_update
  2560. tags:
  2561. - 客户管理
  2562. x-require-auth: true
  2563. x-resource-type:
  2564. $ref: '#/components/x-resource-types/customer/code'
  2565. x-action:
  2566. $ref: '#/components/x-actions/update/code'
  2567. x-version: v1
  2568. x-permission-visibility: catalog
  2569. requestBody:
  2570. required: true
  2571. description: JSON 请求体,业务字段置于 data
  2572. content:
  2573. application/json:
  2574. schema:
  2575. type: object
  2576. description: 统一信封请求体,业务字段放在 data 内
  2577. properties:
  2578. data:
  2579. type: object
  2580. description: 业务参数
  2581. properties:
  2582. customer_id:
  2583. type: string
  2584. description: 客户 ID
  2585. customer_name:
  2586. type: string
  2587. description: 客户名称
  2588. subject_type:
  2589. type: string
  2590. description: 主体类型
  2591. id_code:
  2592. type: string
  2593. description: 识别号
  2594. change_basis:
  2595. type: string
  2596. description: 改识别号时的变更依据
  2597. contact_name:
  2598. type: string
  2599. description: 联系人
  2600. contact_mobile:
  2601. type: string
  2602. description: 联系电话
  2603. address:
  2604. type: string
  2605. description: 地址
  2606. ops_team_ids:
  2607. type: array
  2608. description: 改派运维团队(整体替换当前归属;**单支定案**:最多 1 支——空数组=清空归属⇒拒绝,>1 支⇒拒绝;不提交=不改动)
  2609. items:
  2610. type: string
  2611. description: 运维团队 ID
  2612. row_version:
  2613. type: integer
  2614. description: 乐观锁版本(若启用)
  2615. license:
  2616. type: object
  2617. description: 登记材料(营业执照影像)**整对替换**(客户§3.5 补传/替换,写入口只在本分区)。不提交=本次不动影像(⛔ 清空);**唯一例外**:本次把 `subject_type` 改为非企业(`individual`/`sole_proprietor`)且库内有影像 ⇒ 影像随本笔**同批撤销**(两列置 `NULL`+`license_file_name` 变更留痕,见 2026-11-15 死锁修复);企业→企业不带 `license` 一律不动影像;企业客户库内无影像且本次也不提交 ⇒ 按企业条件必填拒绝(`11103` 口径)。`object_key` 须落在 `klt/customer/license/` 下
  2618. properties:
  2619. object_key:
  2620. type: string
  2621. description: 平台 unified-oss 逻辑键(1–512 字符,须以 klt/customer/license/ 开头)
  2622. file_name:
  2623. type: string
  2624. description: 原始文件名(1–128 字符,⛔ 含路径分隔符)
  2625. required:
  2626. - object_key
  2627. - file_name
  2628. required:
  2629. - customer_id
  2630. required:
  2631. - data
  2632. x-error-codes: [60056, 60064, 60066, 60117]
  2633. responses:
  2634. "200":
  2635. description: 成功。统一信封 code/message/data
  2636. /customer/delete_precheck@v1:
  2637. post:
  2638. summary: 客户删除前置检查
  2639. description: 返回 can_delete 与 reasons,供删除确认弹窗使用。
  2640. operationId: customer_delete_precheck
  2641. tags:
  2642. - 客户管理
  2643. x-require-auth: true
  2644. x-resource-type:
  2645. $ref: '#/components/x-resource-types/customer/code'
  2646. x-action:
  2647. $ref: '#/components/x-actions/view/code'
  2648. x-version: v1
  2649. x-permission-visibility: catalog
  2650. requestBody:
  2651. required: true
  2652. description: JSON 请求体,业务字段置于 data
  2653. content:
  2654. application/json:
  2655. schema:
  2656. type: object
  2657. description: 统一信封请求体,业务字段放在 data 内
  2658. properties:
  2659. data:
  2660. type: object
  2661. description: 业务参数
  2662. properties:
  2663. customer_id:
  2664. type: string
  2665. description: 客户 ID
  2666. required:
  2667. - customer_id
  2668. required:
  2669. - data
  2670. x-error-codes: [60056, 60064, 60066, 60117]
  2671. responses:
  2672. "200":
  2673. description: 成功。统一信封 code/message/data
  2674. /customer/delete@v1:
  2675. post:
  2676. summary: 删除客户
  2677. description: 删除客户;须携带删除前置检查时的阻塞快照版本。
  2678. operationId: customer_delete
  2679. tags:
  2680. - 客户管理
  2681. x-require-auth: true
  2682. x-resource-type:
  2683. $ref: '#/components/x-resource-types/customer/code'
  2684. x-action:
  2685. $ref: '#/components/x-actions/delete/code'
  2686. x-version: v1
  2687. x-permission-visibility: catalog
  2688. requestBody:
  2689. required: true
  2690. description: JSON 请求体,业务字段置于 data
  2691. content:
  2692. application/json:
  2693. schema:
  2694. type: object
  2695. description: 统一信封请求体,业务字段放在 data 内
  2696. properties:
  2697. data:
  2698. type: object
  2699. description: 业务参数
  2700. properties:
  2701. customer_id:
  2702. type: string
  2703. description: 客户 ID
  2704. precheck_version:
  2705. type: string
  2706. description: 删除前置检查快照版本
  2707. required:
  2708. - customer_id
  2709. required:
  2710. - data
  2711. x-error-codes: [60056, 60064, 60066, 60117]
  2712. responses:
  2713. "200":
  2714. description: 成功。统一信封 code/message/data
  2715. /customer/history@v1:
  2716. post:
  2717. summary: 客户变更历史
  2718. description: 查询客户档案变更流水。
  2719. operationId: customer_history
  2720. tags:
  2721. - 客户管理
  2722. x-require-auth: true
  2723. x-resource-type:
  2724. $ref: '#/components/x-resource-types/customer/code'
  2725. x-action:
  2726. $ref: '#/components/x-actions/view/code'
  2727. x-version: v1
  2728. x-permission-visibility: catalog
  2729. requestBody:
  2730. required: true
  2731. description: JSON 请求体,业务字段置于 data
  2732. content:
  2733. application/json:
  2734. schema:
  2735. type: object
  2736. description: 统一信封请求体,业务字段放在 data 内
  2737. properties:
  2738. data:
  2739. type: object
  2740. description: 业务参数
  2741. properties:
  2742. customer_id:
  2743. type: string
  2744. description: 客户 ID
  2745. page:
  2746. type: integer
  2747. description: 页码(0 基索引,默认 0)
  2748. minimum: 0
  2749. default: 0
  2750. page_size:
  2751. type: integer
  2752. description: 每页条数(默认 20,上限 200)
  2753. minimum: 1
  2754. maximum: 200
  2755. default: 20
  2756. keyword:
  2757. type: string
  2758. description: 关键字筛选(可选)
  2759. required:
  2760. - customer_id
  2761. required:
  2762. - data
  2763. x-error-codes: [60056, 60064, 60066, 60117]
  2764. responses:
  2765. "200":
  2766. description: 成功。统一信封 code/message/data
  2767. /customer/mount_candidates@v1:
  2768. post:
  2769. summary: 改挂候选客户
  2770. description: 返回操作人可见范围内可作为改挂目标的候选客户列表。⚠️ 2026-11-08 由 GET 改 POST(R-5)。
  2771. operationId: customer_mount_candidates
  2772. tags:
  2773. - 客户管理
  2774. x-require-auth: true
  2775. x-resource-type:
  2776. $ref: '#/components/x-resource-types/customer/code'
  2777. x-action:
  2778. $ref: '#/components/x-actions/view/code'
  2779. x-version: v1
  2780. x-permission-visibility: catalog
  2781. x-enumeration-kind: list
  2782. requestBody:
  2783. required: true
  2784. description: 统一信封请求体(无业务参数,data 传空对象以使网关注入授权上界)
  2785. content:
  2786. application/json:
  2787. schema:
  2788. type: object
  2789. properties:
  2790. data:
  2791. type: object
  2792. description: 无业务参数
  2793. required:
  2794. - data
  2795. x-error-codes: [60056, 60064, 60066, 60117]
  2796. responses:
  2797. "200":
  2798. description: 成功。统一信封 code/message/data
  2799. /customer/influence@v1:
  2800. post:
  2801. summary: 改挂影响面
  2802. description: 改挂前必做前置:未办完工单数、当前责任人与团队、当期是否已出账等。
  2803. operationId: customer_influence
  2804. tags:
  2805. - 客户管理
  2806. x-require-auth: true
  2807. x-resource-type:
  2808. $ref: '#/components/x-resource-types/customer/code'
  2809. x-action:
  2810. $ref: '#/components/x-actions/view/code'
  2811. x-version: v1
  2812. x-permission-visibility: catalog
  2813. requestBody:
  2814. required: true
  2815. description: JSON 请求体,业务字段置于 data
  2816. content:
  2817. application/json:
  2818. schema:
  2819. type: object
  2820. description: 统一信封请求体,业务字段放在 data 内
  2821. properties:
  2822. data:
  2823. type: object
  2824. description: 业务参数
  2825. properties:
  2826. customer_id:
  2827. type: string
  2828. description: 客户 ID
  2829. required:
  2830. - customer_id
  2831. required:
  2832. - data
  2833. x-error-codes: [60056, 60064, 60066, 60117]
  2834. responses:
  2835. "200":
  2836. description: 成功。统一信封 code/message/data
  2837. /customer/move_region@v1:
  2838. post:
  2839. summary: 客户改挂区域
  2840. description: 复合事务改挂区域;新区域省份须等于归属运营商档案省份。
  2841. operationId: customer_move_region
  2842. tags:
  2843. - 客户管理
  2844. x-require-auth: true
  2845. x-resource-type:
  2846. $ref: '#/components/x-resource-types/customer/code'
  2847. x-action:
  2848. $ref: '#/components/x-actions/update/code'
  2849. x-version: v1
  2850. x-permission-visibility: catalog
  2851. requestBody:
  2852. required: true
  2853. description: JSON 请求体,业务字段置于 data
  2854. content:
  2855. application/json:
  2856. schema:
  2857. type: object
  2858. description: 统一信封请求体,业务字段放在 data 内
  2859. properties:
  2860. data:
  2861. type: object
  2862. description: 业务参数
  2863. properties:
  2864. customer_id:
  2865. type: string
  2866. description: 客户 ID
  2867. new_region_node_id:
  2868. type: string
  2869. description: 新挂载区域节点 ID
  2870. ops_team_ids:
  2871. type: array
  2872. description: 随改挂重绑的运维团队(**单支定案**:最多 1 支;不提交=不改动)
  2873. items:
  2874. type: string
  2875. description: 运维团队 ID
  2876. required:
  2877. - customer_id
  2878. - new_region_node_id
  2879. required:
  2880. - data
  2881. x-error-codes: [60056, 60064, 60066, 60117]
  2882. responses:
  2883. "200":
  2884. description: 成功。统一信封 code/message/data
  2885. /customer/attribution/update@v1:
  2886. post:
  2887. summary: 更新客户归属
  2888. description: 改归属运营商/合伙人;改运营商时档案省份须等于客户所挂区域省份。
  2889. operationId: customer_attribution_update
  2890. tags:
  2891. - 客户管理
  2892. x-require-auth: true
  2893. x-resource-type:
  2894. $ref: '#/components/x-resource-types/customer_attribution/code'
  2895. x-action:
  2896. $ref: '#/components/x-actions/update/code'
  2897. x-version: v1
  2898. x-permission-visibility: catalog
  2899. requestBody:
  2900. required: true
  2901. description: JSON 请求体,业务字段置于 data
  2902. content:
  2903. application/json:
  2904. schema:
  2905. type: object
  2906. description: 统一信封请求体,业务字段放在 data 内
  2907. properties:
  2908. data:
  2909. type: object
  2910. description: 业务参数
  2911. properties:
  2912. customer_id:
  2913. type: string
  2914. description: 客户 ID
  2915. operator_id:
  2916. type: string
  2917. description: 新归属运营商 ID(可选)
  2918. partner_id:
  2919. type: string
  2920. description: 新归属合伙人 ID(可选,可清空)
  2921. required:
  2922. - customer_id
  2923. required:
  2924. - data
  2925. x-error-codes: [60056, 60064, 60066, 60117]
  2926. responses:
  2927. "200":
  2928. description: 成功。统一信封 code/message/data
  2929. /import_batch/template_download@v1:
  2930. get:
  2931. summary: 下载导入模板
  2932. description: 返回 14 列 xlsx 模板说明(format/columns/max_rows)。
  2933. operationId: import_batch_template_download
  2934. tags:
  2935. - 批量导入
  2936. x-require-auth: true
  2937. x-resource-type:
  2938. $ref: '#/components/x-resource-types/import_batch/code'
  2939. x-action:
  2940. $ref: '#/components/x-actions/export/code'
  2941. x-version: v1
  2942. x-permission-visibility: catalog
  2943. x-error-codes: [60111, 60112, 60113, 60114]
  2944. responses:
  2945. "200":
  2946. description: 成功。统一信封 code/message/data
  2947. /import_batch/submit@v1:
  2948. post:
  2949. summary: 提交客户批量导入
  2950. description: 提交导入行对象列表,单批上限 500 行。列含客户名称、识别号、主体类型、联系人、电话、地址、区域、运营商、合伙人、运维团队、主账号等。
  2951. operationId: import_batch_submit
  2952. tags:
  2953. - 批量导入
  2954. x-require-auth: true
  2955. x-resource-type:
  2956. $ref: '#/components/x-resource-types/import_batch/code'
  2957. x-action:
  2958. $ref: '#/components/x-actions/create/code'
  2959. x-version: v1
  2960. x-permission-visibility: catalog
  2961. requestBody:
  2962. required: true
  2963. description: JSON 请求体,业务字段置于 data
  2964. content:
  2965. application/json:
  2966. schema:
  2967. type: object
  2968. description: 统一信封请求体,业务字段放在 data 内
  2969. properties:
  2970. data:
  2971. type: object
  2972. description: 业务参数
  2973. properties:
  2974. rows:
  2975. type: array
  2976. description: 导入行对象列表(≤500)
  2977. maxItems: 500
  2978. items:
  2979. type: object
  2980. description: 单行导入字段(14 列)
  2981. properties:
  2982. row_no:
  2983. type: integer
  2984. description: 行编号
  2985. customer_name:
  2986. type: string
  2987. description: 客户名称
  2988. id_code:
  2989. type: string
  2990. description: 识别号
  2991. subject_type:
  2992. type: string
  2993. description: 主体类型
  2994. contact_name:
  2995. type: string
  2996. description: 联系人
  2997. contact_mobile:
  2998. type: string
  2999. description: 联系电话
  3000. address:
  3001. type: string
  3002. description: 地址
  3003. region_name:
  3004. type: string
  3005. description: 所挂区域
  3006. operator_name:
  3007. type: string
  3008. description: 运营商
  3009. partner_name:
  3010. type: string
  3011. description: 合伙人
  3012. ops_team_names:
  3013. type: array
  3014. description: 所挂运维团队名称(**单支定案** 2026-11-12:建档必填**恰好 1 支**——一格只填一支名称,⛔ 用「;」分隔多支;留空或多支=该行校验失败)
  3015. items:
  3016. type: string
  3017. description: 运维团队名称
  3018. primary_username:
  3019. type: string
  3020. description: 主账号登录名
  3021. primary_mobile:
  3022. type: string
  3023. description: 主账号手机号
  3024. required:
  3025. - rows
  3026. required:
  3027. - data
  3028. x-error-codes: [60111, 60112, 60113, 60114]
  3029. responses:
  3030. "200":
  3031. description: 成功。统一信封 code/message/data
  3032. /import_batch/get_list@v1:
  3033. post:
  3034. summary: 导入批次列表
  3035. description: 查询本人可见范围内的导入批次。
  3036. operationId: import_batch_get_list
  3037. tags:
  3038. - 批量导入
  3039. x-require-auth: true
  3040. x-resource-type:
  3041. $ref: '#/components/x-resource-types/import_batch/code'
  3042. x-action:
  3043. $ref: '#/components/x-actions/list/code'
  3044. x-version: v1
  3045. x-permission-visibility: catalog
  3046. requestBody:
  3047. required: true
  3048. description: JSON 请求体,业务字段置于 data
  3049. content:
  3050. application/json:
  3051. schema:
  3052. type: object
  3053. description: 统一信封请求体,业务字段放在 data 内
  3054. properties:
  3055. data:
  3056. type: object
  3057. description: 列表筛选参数
  3058. properties:
  3059. page:
  3060. type: integer
  3061. description: 页码(0 基索引,默认 0)
  3062. minimum: 0
  3063. default: 0
  3064. page_size:
  3065. type: integer
  3066. description: 每页条数(默认 20,上限 200)
  3067. minimum: 1
  3068. maximum: 200
  3069. default: 20
  3070. keyword:
  3071. type: string
  3072. description: 关键字筛选(可选)
  3073. required:
  3074. - data
  3075. x-error-codes: [60111, 60112, 60113, 60114]
  3076. responses:
  3077. "200":
  3078. description: 成功。统一信封 code/message/data
  3079. /import_batch/get@v1:
  3080. post:
  3081. summary: 导入批次详情
  3082. description: 按批次 ID/编号查询详情与行状态。
  3083. operationId: import_batch_get
  3084. tags:
  3085. - 批量导入
  3086. x-require-auth: true
  3087. x-resource-type:
  3088. $ref: '#/components/x-resource-types/import_batch/code'
  3089. x-action:
  3090. $ref: '#/components/x-actions/view/code'
  3091. x-version: v1
  3092. x-permission-visibility: catalog
  3093. requestBody:
  3094. required: true
  3095. description: JSON 请求体,业务字段置于 data
  3096. content:
  3097. application/json:
  3098. schema:
  3099. type: object
  3100. description: 统一信封请求体,业务字段放在 data 内
  3101. properties:
  3102. data:
  3103. type: object
  3104. description: 业务参数
  3105. properties:
  3106. batch_id:
  3107. type: string
  3108. description: 批次 ID(与 batch_no 二选一)
  3109. batch_no:
  3110. type: string
  3111. description: 批次编号(与 batch_id 二选一)
  3112. required:
  3113. - data
  3114. x-error-codes: [60111, 60112, 60113, 60114]
  3115. responses:
  3116. "200":
  3117. description: 成功。统一信封 code/message/data
  3118. /import_batch/resume@v1:
  3119. post:
  3120. summary: 失败行续传
  3121. description: 针对失败行提交续传数据,行号对应原 row_no。
  3122. operationId: import_batch_resume
  3123. tags:
  3124. - 批量导入
  3125. x-require-auth: true
  3126. x-resource-type:
  3127. $ref: '#/components/x-resource-types/import_batch/code'
  3128. x-action:
  3129. $ref: '#/components/x-actions/update/code'
  3130. x-version: v1
  3131. x-permission-visibility: catalog
  3132. requestBody:
  3133. required: true
  3134. description: JSON 请求体,业务字段置于 data
  3135. content:
  3136. application/json:
  3137. schema:
  3138. type: object
  3139. description: 统一信封请求体,业务字段放在 data 内
  3140. properties:
  3141. data:
  3142. type: object
  3143. description: 业务参数
  3144. properties:
  3145. batch_id:
  3146. type: string
  3147. description: 批次 ID
  3148. rows:
  3149. type: array
  3150. description: 续传行列表(含原 row_no)
  3151. items:
  3152. type: object
  3153. required:
  3154. - batch_id
  3155. - rows
  3156. required:
  3157. - data
  3158. x-error-codes: [60111, 60112, 60113, 60114]
  3159. responses:
  3160. "200":
  3161. description: 成功。统一信封 code/message/data
  3162. /import_batch/export_codes@v1:
  3163. post:
  3164. summary: 按批次导出激活码
  3165. description: 语义同账号导出(与 `/account/export_codes@v1` 共用分片/翻页/审计/出参);须传批次与按本人可见范围收窄后的 user_ids(⛔ 空列表=项目内全量);scope 服务端派生,⛔ 收 scope_type/scope_id;validity 默认 `valid`,⛔ `active`。出参含 `batch_id`/`batch_no` 与 `items[].plaintext`(只回显一次,逐次审计);批次可见性先过第一道收窄。
  3166. operationId: import_batch_export_codes
  3167. tags:
  3168. - 批量导入
  3169. x-require-auth: true
  3170. x-resource-type:
  3171. $ref: '#/components/x-resource-types/import_batch/code'
  3172. x-action:
  3173. $ref: '#/components/x-actions/export/code'
  3174. x-version: v1
  3175. x-permission-visibility: catalog
  3176. requestBody:
  3177. required: true
  3178. description: JSON 请求体,业务字段置于 data
  3179. content:
  3180. application/json:
  3181. schema:
  3182. type: object
  3183. description: 统一信封请求体,业务字段放在 data 内
  3184. properties:
  3185. data:
  3186. type: object
  3187. description: 业务参数
  3188. properties:
  3189. batch_id:
  3190. type: string
  3191. description: 批次 ID
  3192. user_ids:
  3193. type: array
  3194. description: 按本人可见范围收窄后的用户 ID 列表(⛔ 空列表=平台侧项目内全量导出)
  3195. minItems: 1
  3196. items:
  3197. type: string
  3198. description: 用户 ID
  3199. validity:
  3200. type: string
  3201. description: 导出口径(平台取值域):valid=仍有效(只读,缺省);expired=已过期(写);all=全部(写)。⛔ active
  3202. default: valid
  3203. enum:
  3204. - valid
  3205. - expired
  3206. - all
  3207. required:
  3208. - batch_id
  3209. - user_ids
  3210. required:
  3211. - data
  3212. x-error-codes: [60111, 60112, 60113, 60114]
  3213. responses:
  3214. "200":
  3215. description: 成功。统一信封 code/message/data
  3216. /import_batch/export_customers@v1:
  3217. post:
  3218. summary: 按批次导出客户
  3219. description: 按导入批次导出客户 15 列结果。
  3220. operationId: import_batch_export_customers
  3221. tags:
  3222. - 批量导入
  3223. x-require-auth: true
  3224. x-resource-type:
  3225. $ref: '#/components/x-resource-types/import_batch/code'
  3226. x-action:
  3227. $ref: '#/components/x-actions/export/code'
  3228. x-version: v1
  3229. x-permission-visibility: catalog
  3230. requestBody:
  3231. required: true
  3232. description: JSON 请求体,业务字段置于 data
  3233. content:
  3234. application/json:
  3235. schema:
  3236. type: object
  3237. description: 统一信封请求体,业务字段放在 data 内
  3238. properties:
  3239. data:
  3240. type: object
  3241. description: 业务参数
  3242. properties:
  3243. batch_id:
  3244. type: string
  3245. description: 批次 ID
  3246. required:
  3247. - batch_id
  3248. required:
  3249. - data
  3250. x-error-codes: [60111, 60112, 60113, 60114]
  3251. responses:
  3252. "200":
  3253. description: 成功。统一信封 code/message/data
  3254. /sub_account/get_list@v1:
  3255. post:
  3256. summary: 分账号列表
  3257. description: 查询客户下属分账号列表。
  3258. operationId: sub_account_get_list
  3259. tags:
  3260. - 账号管理
  3261. x-require-auth: true
  3262. x-resource-type:
  3263. $ref: '#/components/x-resource-types/sub_account/code'
  3264. x-action:
  3265. $ref: '#/components/x-actions/list/code'
  3266. x-version: v1
  3267. x-permission-visibility: catalog
  3268. # 工单回件 §5.2 B1 点名的「分账号列表」:列表按所属客户的可见集收窄
  3269. # (sub_account.rs:50 get_list → :57 customer_scope_pred),客户维度受授权上界约束
  3270. # ⇒ 按 list 声明真源列举。同 L-2:本轮仅打通声明,运维分支仍走本地口径。
  3271. x-enumeration-kind: list
  3272. requestBody:
  3273. required: true
  3274. description: JSON 请求体,业务字段置于 data
  3275. content:
  3276. application/json:
  3277. schema:
  3278. type: object
  3279. description: 统一信封请求体,业务字段放在 data 内
  3280. properties:
  3281. data:
  3282. type: object
  3283. description: 业务参数
  3284. properties:
  3285. customer_id:
  3286. type: string
  3287. description: 客户 ID
  3288. page:
  3289. type: integer
  3290. description: 页码(0 基索引,默认 0)
  3291. minimum: 0
  3292. default: 0
  3293. page_size:
  3294. type: integer
  3295. description: 每页条数(默认 20,上限 200)
  3296. minimum: 1
  3297. maximum: 200
  3298. default: 20
  3299. keyword:
  3300. type: string
  3301. description: 关键字筛选(可选)
  3302. required:
  3303. - customer_id
  3304. required:
  3305. - data
  3306. x-error-codes: []
  3307. responses:
  3308. "200":
  3309. description: 成功。统一信封 code/message/data
  3310. /sub_account/update@v1:
  3311. post:
  3312. summary: 更新分账号
  3313. description: 运营可改 display_name 与 network_account_name;客户主账号只许改 display_name。
  3314. operationId: sub_account_update
  3315. tags:
  3316. - 账号管理
  3317. x-require-auth: true
  3318. x-resource-type:
  3319. $ref: '#/components/x-resource-types/sub_account/code'
  3320. x-action:
  3321. $ref: '#/components/x-actions/update/code'
  3322. x-version: v1
  3323. x-permission-visibility: catalog
  3324. requestBody:
  3325. required: true
  3326. description: JSON 请求体,业务字段置于 data
  3327. content:
  3328. application/json:
  3329. schema:
  3330. type: object
  3331. description: 统一信封请求体,业务字段放在 data 内
  3332. properties:
  3333. data:
  3334. type: object
  3335. description: 业务参数
  3336. properties:
  3337. sub_account_id:
  3338. type: string
  3339. description: 分账号 ID
  3340. display_name:
  3341. type: string
  3342. description: 显示名称/用途说明
  3343. network_account_name:
  3344. type: string
  3345. description: 网络侧账号名(运营可改)
  3346. required:
  3347. - sub_account_id
  3348. required:
  3349. - data
  3350. x-error-codes: []
  3351. responses:
  3352. "200":
  3353. description: 成功。统一信封 code/message/data
  3354. /line_exit/get_list@v1:
  3355. post:
  3356. summary: 线路出口目录列表
  3357. description: 套餐配置统一维护的线路出口(去空白+小写去重)。合同条目、IP 条目等页面只从这里选择;任何登录角色可读。每条带 ref_count/ref_summary(被合同条目、IP 备案、派生档、订阅引用的合计与构成),>0 即目录侧不允许删除。
  3358. operationId: line_exit_get_list
  3359. tags:
  3360. - 套餐档位
  3361. x-require-auth: true
  3362. x-resource-type:
  3363. $ref: '#/components/x-resource-types/catalog/code'
  3364. x-action:
  3365. $ref: '#/components/x-actions/list/code'
  3366. x-version: v1
  3367. x-permission-visibility: catalog
  3368. responses:
  3369. "200":
  3370. description: 成功。统一信封 code/message/data(data.items[]=exit_name/exit_key/sort_no/ref_count/ref_summary)
  3371. /line_exit/save@v1:
  3372. post:
  3373. summary: 线路出口目录整段全量替换
  3374. description: 总运营/运营主账号可写;数组顺序即展示顺序。被合同条目、IP 备案、派生档或订阅引用的出口不可删除(整单拒绝并点名引用数)。
  3375. operationId: line_exit_save
  3376. tags:
  3377. - 套餐档位
  3378. x-require-auth: true
  3379. x-resource-type:
  3380. $ref: '#/components/x-resource-types/catalog/code'
  3381. x-action:
  3382. $ref: '#/components/x-actions/update/code'
  3383. x-version: v1
  3384. x-permission-visibility: catalog
  3385. requestBody:
  3386. required: true
  3387. description: JSON 请求体,业务字段置于 data
  3388. content:
  3389. application/json:
  3390. schema:
  3391. type: object
  3392. description: 统一信封请求体,业务字段放在 data 内
  3393. properties:
  3394. data:
  3395. type: object
  3396. description: 业务参数
  3397. properties:
  3398. items:
  3399. type: array
  3400. description: 线路出口整段(全量替换,上限 200 条)
  3401. maxItems: 200
  3402. items:
  3403. type: object
  3404. description: 单个出口
  3405. properties:
  3406. exit_name:
  3407. type: string
  3408. description: 国家/地区名称原文(1~64 字;去空白+小写后不可重复)
  3409. required:
  3410. - exit_name
  3411. required:
  3412. - items
  3413. required:
  3414. - data
  3415. x-error-codes: []
  3416. responses:
  3417. "200":
  3418. description: 成功。统一信封 code/message/data
  3419. /catalog/create@v1:
  3420. post:
  3421. summary: 新建套餐档位
  3422. description: 新建固定/自定义档位。拒收 monthly_settle_cents、sub_mode、first_referred_at。自定义档必填 customer_id。
  3423. operationId: catalog_create
  3424. tags:
  3425. - 套餐档位
  3426. x-require-auth: true
  3427. x-resource-type:
  3428. $ref: '#/components/x-resource-types/catalog/code'
  3429. x-action:
  3430. $ref: '#/components/x-actions/create/code'
  3431. x-version: v1
  3432. x-permission-visibility: catalog
  3433. requestBody:
  3434. required: true
  3435. description: JSON 请求体,业务字段置于 data
  3436. content:
  3437. application/json:
  3438. schema:
  3439. type: object
  3440. description: 统一信封请求体,业务字段放在 data 内
  3441. properties:
  3442. data:
  3443. type: object
  3444. description: 业务参数
  3445. properties:
  3446. plan_kind:
  3447. type: string
  3448. description: 档位类型:fixed=固定;custom=自定义
  3449. enum:
  3450. - fixed
  3451. - custom
  3452. plan_name:
  3453. type: string
  3454. description: 档位名称
  3455. plan_desc:
  3456. type: string
  3457. description: 套餐说明(报价单权益口径,可空;去首尾空白后 ≤512 字符,超长报 11103)。引用冻结后仍可改(与名称、随附成本项同档)
  3458. use_category:
  3459. type: string
  3460. description: 用途分类:office/live/ai/value_add/customized
  3461. annual_price_cents:
  3462. type: integer
  3463. description: 年价(分)
  3464. sub_account_quota:
  3465. type: integer
  3466. description: 分账号配额
  3467. bandwidth_committed:
  3468. type: boolean
  3469. description: 是否承诺带宽(界面「是否承诺带宽」开关):true=承诺(缺省,同列 DEFAULT TRUE);false=该档「不承诺带宽」,此时上行/下行两字段一律不传
  3470. bandwidth_up_mbps:
  3471. type: integer
  3472. description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填。⛔ 不再有单值 total_bandwidth_mbps(2026-11-05 D8 关闭=该列退役,「总带宽」只是显示列名)
  3473. bandwidth_down_mbps:
  3474. type: integer
  3475. description: 下行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填;与上行同值时界面并显「上下行 N 兆」,不等显「下行 X 兆 / 上行 Y 兆」
  3476. customer_id:
  3477. type: string
  3478. description: 自定义档所属客户 ID(custom 必填)
  3479. required:
  3480. - plan_kind
  3481. - plan_name
  3482. - use_category
  3483. - annual_price_cents
  3484. required:
  3485. - data
  3486. x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227]
  3487. responses:
  3488. "200":
  3489. description: 成功。统一信封 code/message/data
  3490. /catalog/update@v1:
  3491. post:
  3492. summary: 编辑套餐档位
  3493. description: 编辑档位;use_category 建后不可改;被订阅引用冻结后多数字段只读。
  3494. operationId: catalog_update
  3495. tags:
  3496. - 套餐档位
  3497. x-require-auth: true
  3498. x-resource-type:
  3499. $ref: '#/components/x-resource-types/catalog/code'
  3500. x-action:
  3501. $ref: '#/components/x-actions/update/code'
  3502. x-version: v1
  3503. x-permission-visibility: catalog
  3504. requestBody:
  3505. required: true
  3506. description: JSON 请求体,业务字段置于 data
  3507. content:
  3508. application/json:
  3509. schema:
  3510. type: object
  3511. description: 统一信封请求体,业务字段放在 data 内
  3512. properties:
  3513. data:
  3514. type: object
  3515. description: 业务参数
  3516. properties:
  3517. plan_id:
  3518. type: string
  3519. description: 档位 ID
  3520. plan_name:
  3521. type: string
  3522. description: 档位名称
  3523. plan_desc:
  3524. type: string
  3525. description: 套餐说明(可空;传空串=清空成 null;≤512 字符)。引用冻结后仍可改
  3526. annual_price_cents:
  3527. type: integer
  3528. description: 年价(分)
  3529. sub_account_quota:
  3530. type: integer
  3531. description: 分账号配额
  3532. bandwidth_committed:
  3533. type: boolean
  3534. description: 是否承诺带宽:true=承诺(缺省);false=该档「不承诺带宽」,上下行两字段一律不传
  3535. bandwidth_up_mbps:
  3536. type: integer
  3537. description: 上行带宽(Mbps,整数 1~1000);bandwidth_committed=true 时必填,关闭「是否承诺带宽」时必不传(档位被订阅引用后随整单只读,K204)
  3538. bandwidth_down_mbps:
  3539. type: integer
  3540. description: 下行带宽(Mbps,整数 1~1000);必填规则同上,两值⛔ 不折算为单值
  3541. row_version:
  3542. type: integer
  3543. description: 乐观锁版本(若启用)
  3544. required:
  3545. - plan_id
  3546. required:
  3547. - data
  3548. x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227]
  3549. responses:
  3550. "200":
  3551. description: 成功。统一信封 code/message/data
  3552. /catalog/get_list@v1:
  3553. post:
  3554. summary: 套餐档位列表
  3555. description: 按 plan_kind 等条件筛选档位列表。
  3556. operationId: catalog_get_list
  3557. tags:
  3558. - 套餐档位
  3559. x-require-auth: true
  3560. x-resource-type:
  3561. $ref: '#/components/x-resource-types/catalog/code'
  3562. x-action:
  3563. $ref: '#/components/x-actions/list/code'
  3564. x-version: v1
  3565. x-permission-visibility: catalog
  3566. requestBody:
  3567. required: true
  3568. description: JSON 请求体,业务字段置于 data
  3569. content:
  3570. application/json:
  3571. schema:
  3572. type: object
  3573. description: 统一信封请求体,业务字段放在 data 内
  3574. properties:
  3575. data:
  3576. type: object
  3577. description: 列表筛选参数
  3578. properties:
  3579. page:
  3580. type: integer
  3581. description: 页码(0 基索引,默认 0)
  3582. minimum: 0
  3583. default: 0
  3584. page_size:
  3585. type: integer
  3586. description: 每页条数(默认 20,上限 200)
  3587. minimum: 1
  3588. maximum: 200
  3589. default: 20
  3590. keyword:
  3591. type: string
  3592. description: 关键字筛选(可选)
  3593. plan_kind:
  3594. type: string
  3595. description: 档位类型筛选:fixed/custom
  3596. use_category:
  3597. type: string
  3598. description: 用途分类筛选
  3599. customer_id:
  3600. type: string
  3601. description: 自定义档客户筛选
  3602. required:
  3603. - data
  3604. x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227]
  3605. responses:
  3606. "200":
  3607. description: 成功。统一信封 code/message/data
  3608. /catalog/get@v1:
  3609. post:
  3610. summary: 套餐档位详情
  3611. description: 按档位 ID 查询详情。
  3612. operationId: catalog_get
  3613. tags:
  3614. - 套餐档位
  3615. x-require-auth: true
  3616. x-resource-type:
  3617. $ref: '#/components/x-resource-types/catalog/code'
  3618. x-action:
  3619. $ref: '#/components/x-actions/view/code'
  3620. x-version: v1
  3621. x-permission-visibility: catalog
  3622. requestBody:
  3623. required: true
  3624. description: JSON 请求体,业务字段置于 data
  3625. content:
  3626. application/json:
  3627. schema:
  3628. type: object
  3629. description: 统一信封请求体,业务字段放在 data 内
  3630. properties:
  3631. data:
  3632. type: object
  3633. description: 业务参数
  3634. properties:
  3635. plan_id:
  3636. type: string
  3637. description: 档位 ID
  3638. required:
  3639. - plan_id
  3640. required:
  3641. - data
  3642. x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227]
  3643. responses:
  3644. "200":
  3645. description: 成功。统一信封 code/message/data
  3646. /catalog/delete@v1:
  3647. post:
  3648. summary: 套餐档位条件删除
  3649. description: 按档位 ID 条件删除(第3册§3.7):引用份数+两栏阻塞清单(subscriptions/items),在用⇒KLT-K205;固定档仅 Admin。
  3650. operationId: catalog_delete
  3651. tags:
  3652. - 套餐档位
  3653. x-require-auth: true
  3654. x-resource-type:
  3655. $ref: '#/components/x-resource-types/catalog/code'
  3656. x-action:
  3657. $ref: '#/components/x-actions/delete/code'
  3658. x-version: v1
  3659. x-permission-visibility: catalog
  3660. requestBody:
  3661. required: true
  3662. description: JSON 请求体,业务字段置于 data
  3663. content:
  3664. application/json:
  3665. schema:
  3666. type: object
  3667. description: 统一信封请求体,业务字段放在 data 内
  3668. properties:
  3669. data:
  3670. type: object
  3671. description: 业务参数
  3672. properties:
  3673. plan_id:
  3674. type: string
  3675. description: 档位 ID
  3676. required:
  3677. - plan_id
  3678. required:
  3679. - data
  3680. x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227]
  3681. responses:
  3682. "200":
  3683. description: 成功。统一信封 code/message/data
  3684. /catalog/customer_options@v1:
  3685. post:
  3686. summary: 归属客户下拉
  3687. description: 只列操作人可见客户(自定义档归属客户下拉,第3册§3.2);硬上限 500 行⇒truncated。
  3688. operationId: catalog_customer_options
  3689. tags:
  3690. - 套餐档位
  3691. x-require-auth: true
  3692. x-resource-type:
  3693. $ref: '#/components/x-resource-types/catalog/code'
  3694. x-action:
  3695. $ref: '#/components/x-actions/list/code'
  3696. x-version: v1
  3697. x-permission-visibility: catalog
  3698. requestBody:
  3699. required: true
  3700. description: JSON 请求体,业务字段置于 data
  3701. content:
  3702. application/json:
  3703. schema:
  3704. type: object
  3705. description: 统一信封请求体,业务字段放在 data 内
  3706. properties:
  3707. data:
  3708. type: object
  3709. description: 列表筛选参数
  3710. properties:
  3711. keyword:
  3712. type: string
  3713. description: 客户名称关键字(可选)
  3714. required:
  3715. - data
  3716. x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227]
  3717. responses:
  3718. "200":
  3719. description: 成功。统一信封 code/message/data
  3720. /plan_cost_item/get_list@v1:
  3721. post:
  3722. summary: 档位随附成本项列表
  3723. description: 按档位读取随附成本项(第3册§3.5):名称是弱引用,⛔ 校验是否在全局清单;frozen 仅供前端提示。
  3724. operationId: plan_cost_item_get_list
  3725. tags:
  3726. - 套餐档位
  3727. x-require-auth: true
  3728. x-resource-type:
  3729. $ref: '#/components/x-resource-types/catalog/code'
  3730. x-action:
  3731. $ref: '#/components/x-actions/list/code'
  3732. x-version: v1
  3733. x-permission-visibility: catalog
  3734. requestBody:
  3735. required: true
  3736. description: JSON 请求体,业务字段置于 data
  3737. content:
  3738. application/json:
  3739. schema:
  3740. type: object
  3741. description: 统一信封请求体,业务字段放在 data 内
  3742. properties:
  3743. data:
  3744. type: object
  3745. description: 业务参数
  3746. properties:
  3747. plan_id:
  3748. type: string
  3749. description: 档位 ID
  3750. required:
  3751. - plan_id
  3752. required:
  3753. - data
  3754. x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227]
  3755. responses:
  3756. "200":
  3757. description: 成功。统一信封 code/message/data
  3758. /plan_cost_item/save@v1:
  3759. post:
  3760. summary: 档位随附成本项整段全量替换
  3761. description: 一次提交该档位全部成本项(先按 plan_id 删净再逐条插,第3册§3.5);同档位名称重复⇒KLT-K206。
  3762. operationId: plan_cost_item_save
  3763. tags:
  3764. - 套餐档位
  3765. x-require-auth: true
  3766. x-resource-type:
  3767. $ref: '#/components/x-resource-types/catalog/code'
  3768. x-action:
  3769. $ref: '#/components/x-actions/update/code'
  3770. x-version: v1
  3771. x-permission-visibility: catalog
  3772. requestBody:
  3773. required: true
  3774. description: JSON 请求体,业务字段置于 data
  3775. content:
  3776. application/json:
  3777. schema:
  3778. type: object
  3779. description: 统一信封请求体,业务字段放在 data 内
  3780. properties:
  3781. data:
  3782. type: object
  3783. description: 业务参数
  3784. properties:
  3785. plan_id:
  3786. type: string
  3787. description: 档位 ID
  3788. items:
  3789. type: array
  3790. description: 成本项整段(全量替换,上限 50 条)
  3791. maxItems: 50
  3792. items:
  3793. type: object
  3794. description: 成本项条目
  3795. properties:
  3796. item_name:
  3797. type: string
  3798. description: 成本项名称(弱引用,1~128 字)
  3799. amount_cents:
  3800. type: integer
  3801. description: 金额(分,≥0)
  3802. minimum: 0
  3803. billing_unit:
  3804. type: string
  3805. description: 计费单位(可选)
  3806. enum:
  3807. - per_customer
  3808. - per_account
  3809. - per_copy
  3810. category:
  3811. type: string
  3812. description: 成本项分类(可选)
  3813. enum:
  3814. - intl_resource
  3815. - device_purchase
  3816. - project_fee
  3817. remark:
  3818. type: string
  3819. description: 备注(可选,上限 512 字)
  3820. sort_no:
  3821. type: integer
  3822. description: 排序号(≥0)
  3823. minimum: 0
  3824. required:
  3825. - item_name
  3826. - amount_cents
  3827. required:
  3828. - plan_id
  3829. required:
  3830. - data
  3831. x-error-codes: [60001, 60202, 60203, 60204, 60205, 60206, 60227]
  3832. responses:
  3833. "200":
  3834. description: 成功。统一信封 code/message/data
  3835. /contract/create@v1:
  3836. post:
  3837. summary: 新建合同
  3838. description: 客户段+合同段+服务构成条目+IP 条件一次提交。拒收 source(服务端定)。
  3839. operationId: contract_create
  3840. tags:
  3841. - 合同
  3842. x-require-auth: true
  3843. x-resource-type:
  3844. $ref: '#/components/x-resource-types/contract/code'
  3845. x-action:
  3846. $ref: '#/components/x-actions/create/code'
  3847. x-version: v1
  3848. x-permission-visibility: catalog
  3849. requestBody:
  3850. required: true
  3851. description: JSON 请求体,业务字段置于 data
  3852. content:
  3853. application/json:
  3854. schema:
  3855. type: object
  3856. description: 统一信封请求体,业务字段放在 data 内
  3857. properties:
  3858. data:
  3859. type: object
  3860. description: 业务参数
  3861. properties:
  3862. customer_id:
  3863. type: string
  3864. description: 签约客户 ID(或改用内联建档字段)
  3865. contract_no:
  3866. type: string
  3867. description: 合同编号(空则服务端发号)
  3868. external_no:
  3869. type: string
  3870. description: 外部合同号(可选)
  3871. contract_amount_cents:
  3872. type: integer
  3873. description: 合同金额(分,可选)
  3874. pay_cycle:
  3875. type: string
  3876. description: 付款周期:yearly/quarterly/monthly
  3877. enum:
  3878. - yearly
  3879. - quarterly
  3880. - monthly
  3881. start_date:
  3882. type: string
  3883. description: 合同开始日期(YYYY-MM-DD)
  3884. format: date
  3885. end_date:
  3886. type: string
  3887. description: 合同结束日期(YYYY-MM-DD)
  3888. format: date
  3889. agent_name:
  3890. type: string
  3891. description: 经办人姓名
  3892. agent_mobile:
  3893. type: string
  3894. description: 经办人手机
  3895. agent_handover_on:
  3896. type: string
  3897. description: 经办交接日期(可选)
  3898. format: date
  3899. agent_org:
  3900. type: string
  3901. description: 经办组织(可选)
  3902. attachment_url:
  3903. type: string
  3904. description: 附件地址(可选)
  3905. service_items:
  3906. type: array
  3907. description: 服务构成条目列表
  3908. items:
  3909. type: object
  3910. description: 服务条目
  3911. properties:
  3912. item_kind:
  3913. type: string
  3914. description: 条目类型:plan_based/custom_spec
  3915. plan_id:
  3916. type: string
  3917. description: 档位 ID(plan_based)
  3918. quantity:
  3919. type: integer
  3920. description: 数量
  3921. account_count:
  3922. type: integer
  3923. description: 账号数(custom_spec)
  3924. bandwidth_up_mbps:
  3925. type: integer
  3926. description: 上行带宽(Mbps,整数 1~1000,custom_spec);与下行至少填一侧,只填一侧时按上下行对称填同一值
  3927. bandwidth_down_mbps:
  3928. type: integer
  3929. description: 下行带宽(Mbps,整数 1~1000,custom_spec);两值原样投影到派生自定义档,⛔ 不折算(2026-11-05 D8 关闭)
  3930. line_exits:
  3931. type: array
  3932. description: 线路出口列表
  3933. items:
  3934. type: string
  3935. description: 出口标识
  3936. ip_entries:
  3937. type: array
  3938. description: IP 条件条目(可选)
  3939. items:
  3940. type: object
  3941. description: IP 条目
  3942. required:
  3943. - pay_cycle
  3944. - start_date
  3945. - end_date
  3946. required:
  3947. - data
  3948. x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211]
  3949. responses:
  3950. "200":
  3951. description: 成功。统一信封 code/message/data
  3952. /contract/update@v1:
  3953. post:
  3954. summary: 编辑合同
  3955. description: 编号与签约客户不可改;条目按 item_id 三向对比增删改。
  3956. operationId: contract_update
  3957. tags:
  3958. - 合同
  3959. x-require-auth: true
  3960. x-resource-type:
  3961. $ref: '#/components/x-resource-types/contract/code'
  3962. x-action:
  3963. $ref: '#/components/x-actions/update/code'
  3964. x-version: v1
  3965. x-permission-visibility: catalog
  3966. requestBody:
  3967. required: true
  3968. description: JSON 请求体,业务字段置于 data
  3969. content:
  3970. application/json:
  3971. schema:
  3972. type: object
  3973. description: 统一信封请求体,业务字段放在 data 内
  3974. properties:
  3975. data:
  3976. type: object
  3977. description: 业务参数
  3978. properties:
  3979. contract_id:
  3980. type: string
  3981. description: 合同 ID
  3982. row_version:
  3983. type: integer
  3984. description: 乐观锁版本
  3985. external_no:
  3986. type: string
  3987. description: 外部合同号
  3988. contract_amount_cents:
  3989. type: integer
  3990. description: 合同金额(分)
  3991. pay_cycle:
  3992. type: string
  3993. description: 付款周期
  3994. start_date:
  3995. type: string
  3996. description: 开始日期
  3997. format: date
  3998. end_date:
  3999. type: string
  4000. description: 结束日期
  4001. format: date
  4002. agent_name:
  4003. type: string
  4004. description: 经办人姓名
  4005. agent_mobile:
  4006. type: string
  4007. description: 经办人手机
  4008. agent_handover_on:
  4009. type: string
  4010. description: 经办交接日期
  4011. agent_org:
  4012. type: string
  4013. description: 经办组织
  4014. attachment_url:
  4015. type: string
  4016. description: 附件地址
  4017. service_items:
  4018. type: array
  4019. description: 服务构成条目(含 item_id 的增删改)
  4020. items:
  4021. type: object
  4022. ip_entries:
  4023. type: array
  4024. description: IP 条件条目
  4025. items:
  4026. type: object
  4027. required:
  4028. - contract_id
  4029. - row_version
  4030. required:
  4031. - data
  4032. x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211]
  4033. responses:
  4034. "200":
  4035. description: 成功。统一信封 code/message/data
  4036. /contract/get_list@v1:
  4037. post:
  4038. summary: 合同列表
  4039. description: 按客户/状态等筛选合同列表。
  4040. operationId: contract_get_list
  4041. tags:
  4042. - 合同
  4043. x-require-auth: true
  4044. x-resource-type:
  4045. $ref: '#/components/x-resource-types/contract/code'
  4046. x-action:
  4047. $ref: '#/components/x-actions/list/code'
  4048. x-version: v1
  4049. x-permission-visibility: catalog
  4050. requestBody:
  4051. required: true
  4052. description: JSON 请求体,业务字段置于 data
  4053. content:
  4054. application/json:
  4055. schema:
  4056. type: object
  4057. description: 统一信封请求体,业务字段放在 data 内
  4058. properties:
  4059. data:
  4060. type: object
  4061. description: 列表筛选参数
  4062. properties:
  4063. page:
  4064. type: integer
  4065. description: 页码(0 基索引,默认 0)
  4066. minimum: 0
  4067. default: 0
  4068. page_size:
  4069. type: integer
  4070. description: 每页条数(默认 20,上限 200)
  4071. minimum: 1
  4072. maximum: 200
  4073. default: 20
  4074. keyword:
  4075. type: string
  4076. description: 关键字筛选(可选)
  4077. customer_id:
  4078. type: string
  4079. description: 客户 ID 筛选
  4080. status:
  4081. type: string
  4082. description: 状态筛选
  4083. opened:
  4084. type: boolean
  4085. description: 是否已开通筛选(三态:true/false/缺省不筛)
  4086. required:
  4087. - data
  4088. x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211]
  4089. responses:
  4090. "200":
  4091. description: 成功。统一信封 code/message/data
  4092. /contract/get@v1:
  4093. post:
  4094. summary: 合同详情
  4095. description: 按合同 ID 查询详情(含服务条目与 IP 条件)。
  4096. operationId: contract_get
  4097. tags:
  4098. - 合同
  4099. x-require-auth: true
  4100. x-resource-type:
  4101. $ref: '#/components/x-resource-types/contract/code'
  4102. x-action:
  4103. $ref: '#/components/x-actions/view/code'
  4104. x-version: v1
  4105. x-permission-visibility: catalog
  4106. requestBody:
  4107. required: true
  4108. description: JSON 请求体,业务字段置于 data
  4109. content:
  4110. application/json:
  4111. schema:
  4112. type: object
  4113. description: 统一信封请求体,业务字段放在 data 内
  4114. properties:
  4115. data:
  4116. type: object
  4117. description: 业务参数
  4118. properties:
  4119. contract_id:
  4120. type: string
  4121. description: 合同 ID
  4122. required:
  4123. - contract_id
  4124. required:
  4125. - data
  4126. x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211]
  4127. responses:
  4128. "200":
  4129. description: 成功。统一信封 code/message/data
  4130. /contract/customer_lookup@v1:
  4131. post:
  4132. summary: 合同客户身份解析
  4133. description: 第3册§4.2 第 1 步:query_type=credit_code 主体号精确点查/identity 归一化精确点查/keyword 客户名称模糊联想;未命中=matched:false 成功响应(⛔ 报错),越权读单客户=11104。
  4134. operationId: contract_customer_lookup
  4135. tags:
  4136. - 合同
  4137. x-require-auth: true
  4138. x-resource-type:
  4139. $ref: '#/components/x-resource-types/contract/code'
  4140. x-action:
  4141. $ref: '#/components/x-actions/list/code'
  4142. x-version: v1
  4143. x-permission-visibility: catalog
  4144. requestBody:
  4145. required: true
  4146. description: JSON 请求体,业务字段置于 data
  4147. content:
  4148. application/json:
  4149. schema:
  4150. type: object
  4151. description: 统一信封请求体,业务字段放在 data 内
  4152. properties:
  4153. data:
  4154. type: object
  4155. description: 业务参数
  4156. properties:
  4157. query_type:
  4158. type: string
  4159. description: 查询通道
  4160. enum:
  4161. - credit_code
  4162. - identity
  4163. - keyword
  4164. value:
  4165. type: string
  4166. description: 查询值(主体号/识别号/客户名称关键字)
  4167. required:
  4168. - query_type
  4169. - value
  4170. required:
  4171. - data
  4172. x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211]
  4173. responses:
  4174. "200":
  4175. description: 成功。统一信封 code/message/data
  4176. /contract/delete@v1:
  4177. post:
  4178. summary: 合同条件删除
  4179. description: 第3册§4.8:两类阻塞分栏(subscriptions/tickets),有阻塞⇒KLT-L213;工单取数失败⇒KLT-S406(⛔ 中途放行)。
  4180. operationId: contract_delete
  4181. tags:
  4182. - 合同
  4183. x-require-auth: true
  4184. x-resource-type:
  4185. $ref: '#/components/x-resource-types/contract/code'
  4186. x-action:
  4187. $ref: '#/components/x-actions/delete/code'
  4188. x-version: v1
  4189. x-permission-visibility: catalog
  4190. requestBody:
  4191. required: true
  4192. description: JSON 请求体,业务字段置于 data
  4193. content:
  4194. application/json:
  4195. schema:
  4196. type: object
  4197. description: 统一信封请求体,业务字段放在 data 内
  4198. properties:
  4199. data:
  4200. type: object
  4201. description: 业务参数
  4202. properties:
  4203. contract_id:
  4204. type: string
  4205. description: 合同 ID
  4206. required:
  4207. - contract_id
  4208. required:
  4209. - data
  4210. x-error-codes: [60001, 60201, 60207, 60209, 60210, 60211]
  4211. responses:
  4212. "200":
  4213. description: 成功。统一信封 code/message/data
  4214. /subscription/create@v1:
  4215. post:
  4216. summary: 新建订阅
  4217. description: 拒收 line_exits、sub_mode、order_no、新建时的 end_date、opened_at。
  4218. 响应 data 附 delivery_ticket=交付侧建单结论(工单册§3.2.3):kind=open/service_open/
  4219. merged(并入既有未完成开户工单,工单册§7.5)/failed/skipped,另有 ticket_id、ticket_no、
  4220. items=本次落地服务清单项数、note=面向运营的说明。工单侧失败⛔ 回滚订阅(订阅仍已保存),
  4221. 此时 failed=true,运营须按 note 人工补发工单。
  4222. operationId: subscription_create
  4223. tags:
  4224. - 订阅
  4225. x-require-auth: true
  4226. x-resource-type:
  4227. $ref: '#/components/x-resource-types/subscription/code'
  4228. x-action:
  4229. $ref: '#/components/x-actions/create/code'
  4230. x-version: v1
  4231. x-permission-visibility: catalog
  4232. requestBody:
  4233. required: true
  4234. description: JSON 请求体,业务字段置于 data
  4235. content:
  4236. application/json:
  4237. schema:
  4238. type: object
  4239. description: 统一信封请求体,业务字段放在 data 内
  4240. properties:
  4241. data:
  4242. type: object
  4243. description: 业务参数
  4244. properties:
  4245. customer_id:
  4246. type: string
  4247. description: 客户 ID
  4248. plan_id:
  4249. type: string
  4250. description: 档位 ID
  4251. contract_id:
  4252. type: string
  4253. description: 合同 ID
  4254. contract_item_id:
  4255. type: string
  4256. description: 合同服务条目 ID
  4257. start_date:
  4258. type: string
  4259. description: 订阅开始日期
  4260. format: date
  4261. annual_price_cents:
  4262. type: integer
  4263. description: 年价(分)
  4264. monthly_settle_cents:
  4265. type: integer
  4266. description: 月结算金额(分)
  4267. use_category:
  4268. type: string
  4269. description: 派生档用途分类(需要时填写)
  4270. term:
  4271. type: string
  4272. description: 账期(三态:yearly/quarterly/monthly)
  4273. enum:
  4274. - yearly
  4275. - quarterly
  4276. - monthly
  4277. trial_months:
  4278. type: integer
  4279. description: 试用月数(默认 0,≥0)
  4280. minimum: 0
  4281. discount_monthly_cents:
  4282. type: integer
  4283. description: 每月优惠金额(分,默认 0,≥0)
  4284. minimum: 0
  4285. required:
  4286. - customer_id
  4287. - plan_id
  4288. - contract_id
  4289. - contract_item_id
  4290. - start_date
  4291. - annual_price_cents
  4292. - monthly_settle_cents
  4293. required:
  4294. - data
  4295. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4296. responses:
  4297. "200":
  4298. description: 成功。统一信封 code/message/data
  4299. /subscription/change@v1:
  4300. post:
  4301. summary: 订阅升降配
  4302. description: 升降配须填 replaces_subscription_id,且须使用新的 contract_id(不得沿用原合同)。
  4303. operationId: subscription_change
  4304. tags:
  4305. - 订阅
  4306. x-require-auth: true
  4307. x-resource-type:
  4308. $ref: '#/components/x-resource-types/subscription/code'
  4309. x-action:
  4310. $ref: '#/components/x-actions/update/code'
  4311. x-version: v1
  4312. x-permission-visibility: catalog
  4313. requestBody:
  4314. required: true
  4315. description: JSON 请求体,业务字段置于 data
  4316. content:
  4317. application/json:
  4318. schema:
  4319. type: object
  4320. description: 统一信封请求体,业务字段放在 data 内
  4321. properties:
  4322. data:
  4323. type: object
  4324. description: 业务参数
  4325. properties:
  4326. replaces_subscription_id:
  4327. type: string
  4328. description: 被替换的原订阅 ID
  4329. customer_id:
  4330. type: string
  4331. description: 客户 ID
  4332. plan_id:
  4333. type: string
  4334. description: 新档位 ID
  4335. contract_id:
  4336. type: string
  4337. description: 新合同 ID(不得沿用原合同)
  4338. contract_item_id:
  4339. type: string
  4340. description: 新合同服务条目 ID
  4341. start_date:
  4342. type: string
  4343. description: 新订阅开始日期
  4344. format: date
  4345. annual_price_cents:
  4346. type: integer
  4347. description: 年价(分)
  4348. monthly_settle_cents:
  4349. type: integer
  4350. description: 月结算金额(分)
  4351. use_category:
  4352. type: string
  4353. description: 派生档用途分类(需要时填写)
  4354. term:
  4355. type: string
  4356. description: 账期(三态:yearly/quarterly/monthly)
  4357. enum:
  4358. - yearly
  4359. - quarterly
  4360. - monthly
  4361. trial_months:
  4362. type: integer
  4363. description: 试用月数(默认 0,≥0)
  4364. minimum: 0
  4365. discount_monthly_cents:
  4366. type: integer
  4367. description: 每月优惠金额(分,默认 0,≥0)
  4368. minimum: 0
  4369. row_version:
  4370. type: integer
  4371. description: 乐观锁版本号(可选,缺省不校验)
  4372. required:
  4373. - replaces_subscription_id
  4374. - customer_id
  4375. - plan_id
  4376. - contract_id
  4377. - contract_item_id
  4378. - start_date
  4379. - annual_price_cents
  4380. - monthly_settle_cents
  4381. required:
  4382. - data
  4383. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4384. responses:
  4385. "200":
  4386. description: 成功。统一信封 code/message/data
  4387. /subscription/stack@v1:
  4388. post:
  4389. summary: 订阅叠加或白名单更新
  4390. description: 叠加开通或更新白名单字段(两金额+end_date);其余只读键拒绝。
  4391. operationId: subscription_stack
  4392. tags:
  4393. - 订阅
  4394. x-require-auth: true
  4395. x-resource-type:
  4396. $ref: '#/components/x-resource-types/subscription/code'
  4397. x-action:
  4398. $ref: '#/components/x-actions/create/code'
  4399. x-version: v1
  4400. x-permission-visibility: catalog
  4401. requestBody:
  4402. required: true
  4403. description: JSON 请求体,业务字段置于 data
  4404. content:
  4405. application/json:
  4406. schema:
  4407. type: object
  4408. description: 统一信封请求体,业务字段放在 data 内
  4409. properties:
  4410. data:
  4411. type: object
  4412. description: 业务参数
  4413. properties:
  4414. subscription_id:
  4415. type: string
  4416. description: 订阅 ID(更新场景)
  4417. customer_id:
  4418. type: string
  4419. description: 客户 ID(叠加新建时)
  4420. plan_id:
  4421. type: string
  4422. description: 档位 ID(叠加新建时)
  4423. contract_id:
  4424. type: string
  4425. description: 合同 ID
  4426. contract_item_id:
  4427. type: string
  4428. description: 合同服务条目 ID
  4429. annual_price_cents:
  4430. type: integer
  4431. description: 年价(分,可改)
  4432. monthly_settle_cents:
  4433. type: integer
  4434. description: 月结算金额(分,可改)
  4435. end_date:
  4436. type: string
  4437. description: 结束日期(可改)
  4438. format: date
  4439. start_date:
  4440. type: string
  4441. description: 开始日期(叠加新建时)
  4442. format: date
  4443. row_version:
  4444. type: integer
  4445. description: 乐观锁版本号(可选,缺省不校验)
  4446. required:
  4447. - data
  4448. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4449. responses:
  4450. "200":
  4451. description: 成功。统一信封 code/message/data
  4452. /subscription/get_list@v1:
  4453. post:
  4454. summary: 订阅列表
  4455. description: 按客户等维度筛选订阅列表。
  4456. operationId: subscription_get_list
  4457. tags:
  4458. - 订阅
  4459. x-require-auth: true
  4460. x-resource-type:
  4461. $ref: '#/components/x-resource-types/subscription/code'
  4462. x-action:
  4463. $ref: '#/components/x-actions/list/code'
  4464. x-version: v1
  4465. x-permission-visibility: catalog
  4466. # 工单回件 §5.2 B1 点名的「订阅列表」(PG-4 空列表那条):列表行经客户维度收窄
  4467. # (subscription.rs:680 get_list → :687 customer_scope_pred),订阅在平台侧登记为
  4468. # klt.subscription 树叶 ⇒ 其可见集应由授权上界决定,故按 list 声明真源列举。
  4469. # ⚠️ 同 L-2:本轮只打通「声明+上界落到 AuthContext」,运维分支仍走本地口径,
  4470. # 且注入 id 与我方 subscription_id 对齐的前提=订阅已登记为资源树叶(待平台确认)。
  4471. x-enumeration-kind: list
  4472. requestBody:
  4473. required: true
  4474. description: JSON 请求体,业务字段置于 data
  4475. content:
  4476. application/json:
  4477. schema:
  4478. type: object
  4479. description: 统一信封请求体,业务字段放在 data 内
  4480. properties:
  4481. data:
  4482. type: object
  4483. description: 列表筛选参数
  4484. properties:
  4485. customer_id:
  4486. type: string
  4487. description: 客户 ID(常必填)
  4488. page:
  4489. type: integer
  4490. description: 页码(0 基索引,默认 0)
  4491. minimum: 0
  4492. default: 0
  4493. page_size:
  4494. type: integer
  4495. description: 每页条数(默认 20,上限 200)
  4496. minimum: 1
  4497. maximum: 200
  4498. default: 20
  4499. keyword:
  4500. type: string
  4501. description: 关键字筛选(可选)
  4502. status:
  4503. type: string
  4504. description: 状态筛选
  4505. contract_id:
  4506. type: string
  4507. description: 合同 ID 筛选
  4508. region_ids:
  4509. type: array
  4510. description: 区域 ID 集合(经客户挂载区域展开)
  4511. items:
  4512. type: string
  4513. description: 区域 ID
  4514. required:
  4515. - data
  4516. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4517. responses:
  4518. "200":
  4519. description: 成功。统一信封 code/message/data
  4520. /subscription/get@v1:
  4521. post:
  4522. summary: 订阅详情
  4523. description: 按订阅 ID 查询详情。
  4524. operationId: subscription_get
  4525. tags:
  4526. - 订阅
  4527. x-require-auth: true
  4528. x-resource-type:
  4529. $ref: '#/components/x-resource-types/subscription/code'
  4530. x-action:
  4531. $ref: '#/components/x-actions/view/code'
  4532. x-version: v1
  4533. x-permission-visibility: catalog
  4534. requestBody:
  4535. required: true
  4536. description: JSON 请求体,业务字段置于 data
  4537. content:
  4538. application/json:
  4539. schema:
  4540. type: object
  4541. description: 统一信封请求体,业务字段放在 data 内
  4542. properties:
  4543. data:
  4544. type: object
  4545. description: 业务参数
  4546. properties:
  4547. subscription_id:
  4548. type: string
  4549. description: 订阅 ID
  4550. required:
  4551. - subscription_id
  4552. required:
  4553. - data
  4554. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4555. responses:
  4556. "200":
  4557. description: 成功。统一信封 code/message/data
  4558. /subscription/plan_options@v1:
  4559. post:
  4560. summary: 订阅档位候选
  4561. description: 第3册§5.2 第 3 步:本客户自定义档(含合同条目派生档)+全部固定档,⛔ 他客户自定义档;行内带只读 sub_mode 与 available/unavailable_reason。
  4562. operationId: subscription_plan_options
  4563. tags:
  4564. - 订阅
  4565. x-require-auth: true
  4566. x-resource-type:
  4567. $ref: '#/components/x-resource-types/subscription/code'
  4568. x-action:
  4569. $ref: '#/components/x-actions/list/code'
  4570. x-version: v1
  4571. x-permission-visibility: catalog
  4572. requestBody:
  4573. required: true
  4574. description: JSON 请求体,业务字段置于 data
  4575. content:
  4576. application/json:
  4577. schema:
  4578. type: object
  4579. description: 统一信封请求体,业务字段放在 data 内
  4580. properties:
  4581. data:
  4582. type: object
  4583. description: 业务参数
  4584. properties:
  4585. customer_id:
  4586. type: string
  4587. description: 客户 ID(必填)
  4588. keyword:
  4589. type: string
  4590. description: 套餐名称关键字(仅本口有)
  4591. required:
  4592. - customer_id
  4593. required:
  4594. - data
  4595. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4596. responses:
  4597. "200":
  4598. description: 成功。统一信封 code/message/data
  4599. /subscription/contract_options@v1:
  4600. post:
  4601. summary: 未开通合同与服务条目候选
  4602. description: 第3册§5.2 第 2 步:只出「未开通」合同及其尚未被订阅引用的条目;开通态取数失败⇒KLT-S406;无可选合同⇒KLT-M222。
  4603. operationId: subscription_contract_options
  4604. tags:
  4605. - 订阅
  4606. x-require-auth: true
  4607. x-resource-type:
  4608. $ref: '#/components/x-resource-types/subscription/code'
  4609. x-action:
  4610. $ref: '#/components/x-actions/list/code'
  4611. x-version: v1
  4612. x-permission-visibility: catalog
  4613. requestBody:
  4614. required: true
  4615. description: JSON 请求体,业务字段置于 data
  4616. content:
  4617. application/json:
  4618. schema:
  4619. type: object
  4620. description: 统一信封请求体,业务字段放在 data 内
  4621. properties:
  4622. data:
  4623. type: object
  4624. description: 业务参数
  4625. properties:
  4626. customer_id:
  4627. type: string
  4628. description: 客户 ID(必填)
  4629. keyword:
  4630. type: string
  4631. description: 合同名称关键字(仅本口有)
  4632. required:
  4633. - customer_id
  4634. required:
  4635. - data
  4636. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4637. responses:
  4638. "200":
  4639. description: 成功。统一信封 code/message/data
  4640. /subscription/update@v1:
  4641. post:
  4642. summary: 订阅修改(白名单)
  4643. description: 第3册§5.6:可改字段只有 trial_months/discount_monthly_cents;row_version 必填,落空⇒KLT-S407;换套餐/换合同⇒KLT-M229。
  4644. operationId: subscription_update
  4645. tags:
  4646. - 订阅
  4647. x-require-auth: true
  4648. x-resource-type:
  4649. $ref: '#/components/x-resource-types/subscription/code'
  4650. x-action:
  4651. $ref: '#/components/x-actions/update/code'
  4652. x-version: v1
  4653. x-permission-visibility: catalog
  4654. requestBody:
  4655. required: true
  4656. description: JSON 请求体,业务字段置于 data
  4657. content:
  4658. application/json:
  4659. schema:
  4660. type: object
  4661. description: 统一信封请求体,业务字段放在 data 内
  4662. properties:
  4663. data:
  4664. type: object
  4665. description: 业务参数
  4666. properties:
  4667. subscription_id:
  4668. type: string
  4669. description: 订阅 ID
  4670. row_version:
  4671. type: integer
  4672. description: 乐观锁版本号(必填,落空⇒KLT-S407)
  4673. trial_months:
  4674. type: integer
  4675. description: 试用月数(白名单可改)
  4676. minimum: 0
  4677. discount_monthly_cents:
  4678. type: integer
  4679. description: 每月优惠金额(分,白名单可改)
  4680. minimum: 0
  4681. required:
  4682. - subscription_id
  4683. - row_version
  4684. required:
  4685. - data
  4686. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4687. responses:
  4688. "200":
  4689. description: 成功。统一信封 code/message/data
  4690. /subscription/delete_check@v1:
  4691. post:
  4692. summary: 订阅删除前阻塞检查
  4693. description: 第3册§5.6:两栏阻塞分列(账单明细⇒KLT-M227、升降配链原订阅⇒KLT-M230);账单只读口未接线⇒billing_state=unconfigured。
  4694. operationId: subscription_delete_check
  4695. tags:
  4696. - 订阅
  4697. x-require-auth: true
  4698. x-resource-type:
  4699. $ref: '#/components/x-resource-types/subscription/code'
  4700. x-action:
  4701. $ref: '#/components/x-actions/view/code'
  4702. x-version: v1
  4703. x-permission-visibility: catalog
  4704. requestBody:
  4705. required: true
  4706. description: JSON 请求体,业务字段置于 data
  4707. content:
  4708. application/json:
  4709. schema:
  4710. type: object
  4711. description: 统一信封请求体,业务字段放在 data 内
  4712. properties:
  4713. data:
  4714. type: object
  4715. description: 业务参数
  4716. properties:
  4717. subscription_id:
  4718. type: string
  4719. description: 订阅 ID
  4720. required:
  4721. - subscription_id
  4722. required:
  4723. - data
  4724. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4725. responses:
  4726. "200":
  4727. description: 成功。统一信封 code/message/data
  4728. /subscription/delete@v1:
  4729. post:
  4730. summary: 删除订阅并回退额度
  4731. description: 第3册§5.6:删除前复算阻塞;终态⇒11103;同事务回退 customer.quota_cents,档位 first_referred_at 打点⛔ 回滚。
  4732. operationId: subscription_delete
  4733. tags:
  4734. - 订阅
  4735. x-require-auth: true
  4736. x-resource-type:
  4737. $ref: '#/components/x-resource-types/subscription/code'
  4738. x-action:
  4739. $ref: '#/components/x-actions/delete/code'
  4740. x-version: v1
  4741. x-permission-visibility: catalog
  4742. requestBody:
  4743. required: true
  4744. description: JSON 请求体,业务字段置于 data
  4745. content:
  4746. application/json:
  4747. schema:
  4748. type: object
  4749. description: 统一信封请求体,业务字段放在 data 内
  4750. properties:
  4751. data:
  4752. type: object
  4753. description: 业务参数
  4754. properties:
  4755. subscription_id:
  4756. type: string
  4757. description: 订阅 ID
  4758. required:
  4759. - subscription_id
  4760. required:
  4761. - data
  4762. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4763. responses:
  4764. "200":
  4765. description: 成功。统一信封 code/message/data
  4766. /subscription/list_all@v1:
  4767. post:
  4768. summary: 全部订阅(跨客户)
  4769. description: 第3册§5.8:跨客户订阅列表,customer_id 可选;region_ids 经客户挂载区域展开;⛔ 客户名称/合同编号检索。
  4770. operationId: subscription_list_all
  4771. tags:
  4772. - 订阅
  4773. x-require-auth: true
  4774. x-resource-type:
  4775. $ref: '#/components/x-resource-types/subscription/code'
  4776. x-action:
  4777. $ref: '#/components/x-actions/list/code'
  4778. x-version: v1
  4779. x-permission-visibility: catalog
  4780. requestBody:
  4781. required: true
  4782. description: JSON 请求体,业务字段置于 data
  4783. content:
  4784. application/json:
  4785. schema:
  4786. type: object
  4787. description: 统一信封请求体,业务字段放在 data 内
  4788. properties:
  4789. data:
  4790. type: object
  4791. description: 列表筛选参数
  4792. properties:
  4793. page:
  4794. type: integer
  4795. description: 页码
  4796. minimum: 1
  4797. page_size:
  4798. type: integer
  4799. description: 每页条数
  4800. minimum: 1
  4801. maximum: 500
  4802. keyword:
  4803. type: string
  4804. description: 关键字筛选
  4805. customer_id:
  4806. type: string
  4807. description: 客户 ID 筛选(跨客户列表下可选)
  4808. contract_id:
  4809. type: string
  4810. description: 合同 ID 筛选
  4811. status:
  4812. type: string
  4813. description: 状态筛选
  4814. region_ids:
  4815. type: array
  4816. description: 区域 ID 集合(经客户挂载区域展开)
  4817. items:
  4818. type: string
  4819. description: 区域 ID
  4820. required:
  4821. - data
  4822. x-error-codes: [60001, 60201, 60212, 60214, 60215, 60216, 60218, 60219, 60221, 60222]
  4823. responses:
  4824. "200":
  4825. description: 成功。统一信封 code/message/data
  4826. /cost_item/save@v1:
  4827. post:
  4828. summary: 保存成本项定义
  4829. description: 仅 admin。增改成本项定义。拒收金额、客户、运营商、省份、cycle、is_system。
  4830. operationId: cost_item_save
  4831. tags:
  4832. - 成本与分成
  4833. x-require-auth: true
  4834. x-resource-type:
  4835. $ref: '#/components/x-resource-types/cost_item/code'
  4836. x-action:
  4837. $ref: '#/components/x-actions/manage/code'
  4838. x-version: v1
  4839. x-permission-visibility: catalog
  4840. requestBody:
  4841. required: true
  4842. description: JSON 请求体,业务字段置于 data
  4843. content:
  4844. application/json:
  4845. schema:
  4846. type: object
  4847. description: 统一信封请求体,业务字段放在 data 内
  4848. properties:
  4849. data:
  4850. type: object
  4851. description: 业务参数
  4852. properties:
  4853. cost_item_id:
  4854. type: string
  4855. description: 成本项 ID(更新时必填)
  4856. category:
  4857. type: string
  4858. description: 类别:intl_resource/device_purchase/project_fee
  4859. enum:
  4860. - intl_resource
  4861. - device_purchase
  4862. - project_fee
  4863. item_name:
  4864. type: string
  4865. description: 成本项名称
  4866. billing_unit:
  4867. type: string
  4868. description: 计费单位:per_customer/per_account/per_copy
  4869. enum:
  4870. - per_customer
  4871. - per_account
  4872. - per_copy
  4873. is_amortized:
  4874. type: boolean
  4875. description: 是否摊销
  4876. amortization_months:
  4877. type: integer
  4878. description: 摊销月数(勾选摊销时可空=每月摊销不结束)
  4879. deduct_from_base:
  4880. type: boolean
  4881. description: 是否从基数扣除
  4882. remark:
  4883. type: string
  4884. description: 备注
  4885. row_version:
  4886. type: integer
  4887. description: 乐观锁版本(更新时)
  4888. required:
  4889. - category
  4890. - item_name
  4891. - billing_unit
  4892. - is_amortized
  4893. - deduct_from_base
  4894. required:
  4895. - data
  4896. x-error-codes: [60001]
  4897. responses:
  4898. "200":
  4899. description: 成功。统一信封 code/message/data
  4900. /cost_item/get_list@v1:
  4901. post:
  4902. summary: 成本项列表
  4903. description: 全局成本项目录;可选类别/名称关键字;无客户过滤。
  4904. operationId: cost_item_get_list
  4905. tags:
  4906. - 成本与分成
  4907. x-require-auth: true
  4908. x-resource-type:
  4909. $ref: '#/components/x-resource-types/cost_item/code'
  4910. x-action:
  4911. $ref: '#/components/x-actions/list/code'
  4912. x-version: v1
  4913. x-permission-visibility: catalog
  4914. requestBody:
  4915. required: true
  4916. description: JSON 请求体,业务字段置于 data
  4917. content:
  4918. application/json:
  4919. schema:
  4920. type: object
  4921. description: 统一信封请求体,业务字段放在 data 内
  4922. properties:
  4923. data:
  4924. type: object
  4925. description: 列表筛选参数
  4926. properties:
  4927. page:
  4928. type: integer
  4929. description: 页码(0 基索引,默认 0)
  4930. minimum: 0
  4931. default: 0
  4932. page_size:
  4933. type: integer
  4934. description: 每页条数(默认 20,上限 200)
  4935. minimum: 1
  4936. maximum: 200
  4937. default: 20
  4938. keyword:
  4939. type: string
  4940. description: 关键字筛选(可选)
  4941. category:
  4942. type: string
  4943. description: 类别筛选
  4944. required:
  4945. - data
  4946. x-error-codes: [60001]
  4947. responses:
  4948. "200":
  4949. description: 成功。统一信封 code/message/data
  4950. /cost_amount/save@v1:
  4951. post:
  4952. summary: 保存成本金额
  4953. description: 按「省份×运营商×成本项」只写差异金额;留空项表示删除该差异。
  4954. operationId: cost_amount_save
  4955. tags:
  4956. - 成本与分成
  4957. x-require-auth: true
  4958. x-resource-type:
  4959. $ref: '#/components/x-resource-types/cost_amount/code'
  4960. x-action:
  4961. $ref: '#/components/x-actions/manage/code'
  4962. x-version: v1
  4963. x-permission-visibility: catalog
  4964. requestBody:
  4965. required: true
  4966. description: JSON 请求体,业务字段置于 data
  4967. content:
  4968. application/json:
  4969. schema:
  4970. type: object
  4971. description: 统一信封请求体,业务字段放在 data 内
  4972. properties:
  4973. data:
  4974. type: object
  4975. description: 业务参数
  4976. properties:
  4977. province_node_id:
  4978. type: string
  4979. description: 省份节点 ID
  4980. operator_id:
  4981. type: string
  4982. description: 运营商 ID
  4983. items:
  4984. type: array
  4985. description: 变更项列表;留空金额表示删除该差异行
  4986. items:
  4987. type: object
  4988. properties:
  4989. cost_item_id:
  4990. type: string
  4991. description: 成本项 ID
  4992. amount_cents:
  4993. type: integer
  4994. description: 金额(分);空/省略表示删除
  4995. row_version:
  4996. type: integer
  4997. description: 乐观锁版本
  4998. required:
  4999. - cost_item_id
  5000. required:
  5001. - province_node_id
  5002. - operator_id
  5003. - items
  5004. required:
  5005. - data
  5006. x-error-codes: [60001]
  5007. responses:
  5008. "200":
  5009. description: 成功。统一信封 code/message/data
  5010. /cost_amount/get_list@v1:
  5011. post:
  5012. summary: 成本金额一览
  5013. description: 透视表;admin 全量,区域运营按可见省/运营商收窄。
  5014. operationId: cost_amount_get_list
  5015. tags:
  5016. - 成本与分成
  5017. x-require-auth: true
  5018. x-resource-type:
  5019. $ref: '#/components/x-resource-types/cost_amount/code'
  5020. x-action:
  5021. $ref: '#/components/x-actions/list/code'
  5022. x-version: v1
  5023. x-permission-visibility: catalog
  5024. requestBody:
  5025. required: true
  5026. description: JSON 请求体,业务字段置于 data
  5027. content:
  5028. application/json:
  5029. schema:
  5030. type: object
  5031. description: 统一信封请求体,业务字段放在 data 内
  5032. properties:
  5033. data:
  5034. type: object
  5035. description: 列表筛选参数
  5036. properties:
  5037. province_node_id:
  5038. type: string
  5039. description: 省份筛选
  5040. operator_id:
  5041. type: string
  5042. description: 运营商筛选
  5043. page:
  5044. type: integer
  5045. description: 页码(0 基索引,默认 0)
  5046. minimum: 0
  5047. default: 0
  5048. page_size:
  5049. type: integer
  5050. description: 每页条数(默认 20,上限 200)
  5051. minimum: 1
  5052. maximum: 200
  5053. default: 20
  5054. keyword:
  5055. type: string
  5056. description: 关键字筛选(可选)
  5057. required:
  5058. - data
  5059. x-error-codes: [60001]
  5060. responses:
  5061. "200":
  5062. description: 成功。统一信封 code/message/data
  5063. /share_rule/save@v1:
  5064. post:
  5065. summary: 保存分成规则
  5066. description: holder_type 仅 operator/ops_team(无 partner)。share_value 填 0/负表示删除该行。
  5067. operationId: share_rule_save
  5068. tags:
  5069. - 成本与分成
  5070. x-require-auth: true
  5071. x-resource-type:
  5072. $ref: '#/components/x-resource-types/share_rule/code'
  5073. x-action:
  5074. $ref: '#/components/x-actions/manage/code'
  5075. x-version: v1
  5076. x-permission-visibility: catalog
  5077. requestBody:
  5078. required: true
  5079. description: JSON 请求体,业务字段置于 data
  5080. content:
  5081. application/json:
  5082. schema:
  5083. type: object
  5084. description: 统一信封请求体,业务字段放在 data 内
  5085. properties:
  5086. data:
  5087. type: object
  5088. description: 业务参数
  5089. properties:
  5090. holder_type:
  5091. type: string
  5092. description: 持有方类型:operator/ops_team
  5093. enum:
  5094. - operator
  5095. - ops_team
  5096. holder_id:
  5097. type: string
  5098. description: 持有方 ID
  5099. rules:
  5100. type: array
  5101. description: 规则行列表
  5102. items:
  5103. type: object
  5104. properties:
  5105. rule_id:
  5106. type: string
  5107. description: 规则 ID(更新/删除时)
  5108. customer_id:
  5109. type: string
  5110. description: 客户 ID
  5111. rule_level:
  5112. type: string
  5113. description: 规则层级:contract_addon/region_regular
  5114. enum:
  5115. - contract_addon
  5116. - region_regular
  5117. share_mode:
  5118. type: string
  5119. description: 分成方式:ratio_total/per_account/fixed_amount
  5120. enum:
  5121. - ratio_total
  5122. - per_account
  5123. - fixed_amount
  5124. share_value:
  5125. type: number
  5126. description: 分成值:比例 (0,1];金额/每账号>0 分;0/负=删除该行
  5127. remark:
  5128. type: string
  5129. description: 备注
  5130. required:
  5131. - holder_type
  5132. - holder_id
  5133. - rules
  5134. required:
  5135. - data
  5136. x-error-codes: []
  5137. responses:
  5138. "200":
  5139. description: 成功。统一信封 code/message/data
  5140. /share_rule/get_list@v1:
  5141. post:
  5142. summary: 分成规则列表
  5143. description: 按持有方等条件列出分成规则。
  5144. operationId: share_rule_get_list
  5145. tags:
  5146. - 成本与分成
  5147. x-require-auth: true
  5148. x-resource-type:
  5149. $ref: '#/components/x-resource-types/share_rule/code'
  5150. x-action:
  5151. $ref: '#/components/x-actions/list/code'
  5152. x-version: v1
  5153. x-permission-visibility: catalog
  5154. requestBody:
  5155. required: true
  5156. description: JSON 请求体,业务字段置于 data
  5157. content:
  5158. application/json:
  5159. schema:
  5160. type: object
  5161. description: 统一信封请求体,业务字段放在 data 内
  5162. properties:
  5163. data:
  5164. type: object
  5165. description: 列表筛选参数
  5166. properties:
  5167. holder_type:
  5168. type: string
  5169. description: 持有方类型
  5170. holder_id:
  5171. type: string
  5172. description: 持有方 ID
  5173. page:
  5174. type: integer
  5175. description: 页码(0 基索引,默认 0)
  5176. minimum: 0
  5177. default: 0
  5178. page_size:
  5179. type: integer
  5180. description: 每页条数(默认 20,上限 200)
  5181. minimum: 1
  5182. maximum: 200
  5183. default: 20
  5184. keyword:
  5185. type: string
  5186. description: 关键字筛选(可选)
  5187. required:
  5188. - data
  5189. x-error-codes: []
  5190. responses:
  5191. "200":
  5192. description: 成功。统一信封 code/message/data
  5193. /share_rule/get@v1:
  5194. post:
  5195. summary: 分成规则详情
  5196. description: 按持有方一次返回四卡摘要与规则表。
  5197. operationId: share_rule_get
  5198. tags:
  5199. - 成本与分成
  5200. x-require-auth: true
  5201. x-resource-type:
  5202. $ref: '#/components/x-resource-types/share_rule/code'
  5203. x-action:
  5204. $ref: '#/components/x-actions/view/code'
  5205. x-version: v1
  5206. x-permission-visibility: catalog
  5207. requestBody:
  5208. required: true
  5209. description: JSON 请求体,业务字段置于 data
  5210. content:
  5211. application/json:
  5212. schema:
  5213. type: object
  5214. description: 统一信封请求体,业务字段放在 data 内
  5215. properties:
  5216. data:
  5217. type: object
  5218. description: 业务参数
  5219. properties:
  5220. holder_type:
  5221. type: string
  5222. description: 持有方类型:operator/ops_team
  5223. holder_id:
  5224. type: string
  5225. description: 持有方 ID
  5226. required:
  5227. - holder_type
  5228. - holder_id
  5229. required:
  5230. - data
  5231. x-error-codes: []
  5232. responses:
  5233. "200":
  5234. description: 成功。统一信封 code/message/data
  5235. /share_rule/delete@v1:
  5236. post:
  5237. summary: 删除分成规则
  5238. description: 按 rule_id 删除单条分成规则(亦可在 save 内以 0/负值删除)。
  5239. operationId: share_rule_delete
  5240. tags:
  5241. - 成本与分成
  5242. x-require-auth: true
  5243. x-resource-type:
  5244. $ref: '#/components/x-resource-types/share_rule/code'
  5245. x-action:
  5246. $ref: '#/components/x-actions/delete/code'
  5247. x-version: v1
  5248. x-permission-visibility: catalog
  5249. requestBody:
  5250. required: true
  5251. description: JSON 请求体,业务字段置于 data
  5252. content:
  5253. application/json:
  5254. schema:
  5255. type: object
  5256. description: 统一信封请求体,业务字段放在 data 内
  5257. properties:
  5258. data:
  5259. type: object
  5260. description: 业务参数
  5261. properties:
  5262. rule_id:
  5263. type: string
  5264. description: 规则 ID
  5265. required:
  5266. - rule_id
  5267. required:
  5268. - data
  5269. x-error-codes: []
  5270. responses:
  5271. "200":
  5272. description: 成功。统一信封 code/message/data
  5273. /opsview/home@v1:
  5274. get:
  5275. summary: 运维只读首页
  5276. description: 运维侧只读首页(U-60),返回工单/逾期等概览数据。
  5277. operationId: opsview_home
  5278. tags:
  5279. - 运维视图
  5280. x-require-auth: true
  5281. x-resource-type:
  5282. $ref: '#/components/x-resource-types/opsview/code'
  5283. x-action:
  5284. $ref: '#/components/x-actions/view/code'
  5285. x-version: v1
  5286. x-permission-visibility: catalog
  5287. x-error-codes: []
  5288. responses:
  5289. "200":
  5290. description: 成功。统一信封 code/message/data
  5291. /jobs/get_list@v1:
  5292. get:
  5293. summary: 定时作业清单
  5294. description: 返回第 10 册 12 行清单(注册位 10 +标注行 2)及运行态:启用态、可操作性位、最近执行、五格计数、累计轮次、KPI 五卡与待补跑轮次。运行态取数失败时仍返回 12 行,runtime_available=false。
  5295. operationId: jobs_get_list
  5296. tags:
  5297. - 定时作业
  5298. x-require-auth: true
  5299. x-resource-type:
  5300. $ref: '#/components/x-resource-types/jobs/code'
  5301. x-action:
  5302. $ref: '#/components/x-actions/list/code'
  5303. x-version: v1
  5304. x-permission-visibility: catalog
  5305. x-error-codes: []
  5306. responses:
  5307. "200":
  5308. description: 成功。统一信封 code/message/data
  5309. /jobs/toggle@v1:
  5310. post:
  5311. summary: 启停定时作业
  5312. description: 仅 admin。按作业 key 启停。
  5313. operationId: jobs_toggle
  5314. tags:
  5315. - 定时作业
  5316. x-require-auth: true
  5317. x-resource-type:
  5318. $ref: '#/components/x-resource-types/jobs/code'
  5319. x-action:
  5320. $ref: '#/components/x-actions/manage/code'
  5321. x-version: v1
  5322. x-permission-visibility: catalog
  5323. requestBody:
  5324. required: true
  5325. description: JSON 请求体,业务字段置于 data
  5326. content:
  5327. application/json:
  5328. schema:
  5329. type: object
  5330. description: 统一信封请求体,业务字段放在 data 内
  5331. properties:
  5332. data:
  5333. type: object
  5334. description: 业务参数
  5335. properties:
  5336. key:
  5337. type: string
  5338. description: 作业键
  5339. enabled:
  5340. type: boolean
  5341. description: 是否启用
  5342. required:
  5343. - key
  5344. - enabled
  5345. required:
  5346. - data
  5347. x-error-codes: []
  5348. responses:
  5349. "200":
  5350. description: 成功。统一信封 code/message/data
  5351. /jobs/runs@v1:
  5352. post:
  5353. summary: 作业执行记录
  5354. description: 查询执行记录,支持任务、关键字(执行编号/任务/结果说明,不检索对象级明细)、触发方式、执行结果与日期区间筛选;分页 page 0 基、page_size 默认 50。标注行返回空流水并标记 annotation=true。
  5355. operationId: jobs_runs
  5356. tags:
  5357. - 定时作业
  5358. x-require-auth: true
  5359. x-resource-type:
  5360. $ref: '#/components/x-resource-types/jobs/code'
  5361. x-action:
  5362. $ref: '#/components/x-actions/view/code'
  5363. x-version: v1
  5364. x-permission-visibility: catalog
  5365. requestBody:
  5366. required: true
  5367. description: JSON 请求体,业务字段置于 data
  5368. content:
  5369. application/json:
  5370. schema:
  5371. type: object
  5372. description: 统一信封请求体,业务字段放在 data 内
  5373. properties:
  5374. data:
  5375. type: object
  5376. description: 业务参数
  5377. properties:
  5378. key:
  5379. type: string
  5380. description: 作业键(可省略=全部任务)
  5381. job_key:
  5382. type: string
  5383. description: 作业键(契约字段名,可省略)
  5384. keyword:
  5385. type: string
  5386. description: 关键字(执行编号/任务/结果说明;不检索对象级明细)
  5387. trigger:
  5388. type: string
  5389. description: 触发方式
  5390. enum:
  5391. - 定时
  5392. - 事件
  5393. - 人工
  5394. result:
  5395. type: string
  5396. description: 执行结果
  5397. enum:
  5398. - 成功
  5399. - 部分成功
  5400. - 失败
  5401. - 异常
  5402. date_from:
  5403. type: string
  5404. description: 开始日期(YYYY-MM-DD,Asia/Shanghai 日界)
  5405. pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
  5406. date_to:
  5407. type: string
  5408. description: 结束日期(YYYY-MM-DD,含当日)
  5409. pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
  5410. page:
  5411. type: integer
  5412. description: 页码(0 基,默认 0)
  5413. minimum: 0
  5414. default: 0
  5415. page_size:
  5416. type: integer
  5417. description: 每页条数(默认 50,上限 200)
  5418. minimum: 1
  5419. maximum: 200
  5420. default: 50
  5421. required:
  5422. - data
  5423. x-error-codes: []
  5424. responses:
  5425. "200":
  5426. description: 成功。统一信封 code/message/data
  5427. /jobs/run_once@v1:
  5428. post:
  5429. summary: 补跑作业一次
  5430. description: 触发一次指定作业。prod 环境仅总运营可补跑。可选 key:SUB-EFF/SNAPSHOT-FREEZE/DELEG-SYNC/STOP-GEN/OVERDUE/AUTO-CLOSE/RECON/ORPHAN-CLEAN/REGION-WARM/ONEDIR-CHECK。执行轮次落 bos_job_run,返回本轮五格计数与对象级明细。`AUTO-CLOSE`=手册 P7「客户 7 天未确认则系统自动关闭」:扫停在 completed 的故障/售后**客户自报**单,完成日早于「业务日 − 7 天」的逐张置 settled(动作键 confirm_close、主体 AUTO-CLOSE);运维代建/系统生成单⛔ 进本作业(标记完成即结束)。`STOP-GEN`/`AUTO-CLOSE` 可选传 biz_date(YYYY-MM-DD,缺省=今天)补跑历史某日。
  5431. operationId: jobs_run_once
  5432. tags:
  5433. - 定时作业
  5434. x-require-auth: true
  5435. x-resource-type:
  5436. $ref: '#/components/x-resource-types/jobs/code'
  5437. x-action:
  5438. $ref: '#/components/x-actions/manage/code'
  5439. x-version: v1
  5440. x-permission-visibility: catalog
  5441. requestBody:
  5442. required: true
  5443. description: JSON 请求体,业务字段置于 data
  5444. content:
  5445. application/json:
  5446. schema:
  5447. type: object
  5448. description: 统一信封请求体,业务字段放在 data 内
  5449. properties:
  5450. data:
  5451. type: object
  5452. description: 业务参数
  5453. properties:
  5454. key:
  5455. type: string
  5456. description: 作业键
  5457. enum:
  5458. - SUB-EFF
  5459. - SNAPSHOT-FREEZE
  5460. - DELEG-SYNC
  5461. - STOP-GEN
  5462. - OVERDUE
  5463. - AUTO-CLOSE
  5464. - RECON
  5465. - ORPHAN-CLEAN
  5466. - REGION-WARM
  5467. - ONEDIR-CHECK
  5468. period:
  5469. type: string
  5470. description: 仅 RECON 用;指定已结束自然月(YYYY-MM)回填,前端传 1 基以外的月份格式即 11103
  5471. pattern: '^[0-9]{4}-[0-9]{2}$'
  5472. biz_date:
  5473. type: string
  5474. description: 仅 STOP-GEN 用;业务日(YYYY-MM-DD),缺省=当天。到期停机按「订阅结束日早于该业务日」扫描,幂等键含业务日,同业务日重复跑不重复出单
  5475. pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}$'
  5476. required:
  5477. - key
  5478. required:
  5479. - data
  5480. x-error-codes: []
  5481. responses:
  5482. "200":
  5483. description: 成功。统一信封 code/message/data
  5484. /share_rule/param_summary@v1:
  5485. post:
  5486. summary: 分成参数摘要
  5487. description: 批量取分成方的分成方式/数值与覆盖客户数(分成管理页徽标);最多 500 项。
  5488. operationId: share_rule_param_summary
  5489. tags:
  5490. - 成本与分成
  5491. x-require-auth: true
  5492. x-resource-type:
  5493. $ref: '#/components/x-resource-types/share_rule/code'
  5494. x-action:
  5495. $ref: '#/components/x-actions/list/code'
  5496. x-version: v1
  5497. x-permission-visibility: catalog
  5498. x-error-codes: [11103, 11104]
  5499. responses:
  5500. "200":
  5501. description: 成功。统一信封 code/message/data
  5502. /billing/config_get@v1:
  5503. get:
  5504. summary: 出账配置读
  5505. description: 默认对账日、成本生效口径、行版本与运营商对账账号列表(仅总运营)。
  5506. operationId: billing_config_get
  5507. tags:
  5508. - 计费与对账
  5509. x-require-auth: true
  5510. x-resource-type:
  5511. $ref: '#/components/x-resource-types/billing_config/code'
  5512. x-action:
  5513. $ref: '#/components/x-actions/view/code'
  5514. x-version: v1
  5515. x-permission-visibility: catalog
  5516. x-error-codes: []
  5517. responses:
  5518. "200":
  5519. description: 成功。统一信封 code/message/data
  5520. /billing/config_update@v1:
  5521. post:
  5522. summary: 出账配置写
  5523. description: 乐观锁 row_version;提交同值 ⇒ changed=0 不写审计;运营商对账日只读(写口在 operator/update)。
  5524. operationId: billing_config_update
  5525. tags:
  5526. - 计费与对账
  5527. x-require-auth: true
  5528. x-resource-type:
  5529. $ref: '#/components/x-resource-types/billing_config/code'
  5530. x-action:
  5531. $ref: '#/components/x-actions/update/code'
  5532. x-version: v1
  5533. x-permission-visibility: catalog
  5534. x-error-codes: [11103, 60001]
  5535. responses:
  5536. "200":
  5537. description: 成功。统一信封 code/message/data
  5538. /recon/periods@v1:
  5539. get:
  5540. summary: 对账期次下拉
  5541. description: 有数据的自然月(倒序),⛔ 并入 get_list。
  5542. operationId: recon_periods
  5543. tags:
  5544. - 计费与对账
  5545. x-require-auth: true
  5546. x-resource-type:
  5547. $ref: '#/components/x-resource-types/recon/code'
  5548. x-action:
  5549. $ref: '#/components/x-actions/list/code'
  5550. x-version: v1
  5551. x-permission-visibility: catalog
  5552. x-error-codes: []
  5553. responses:
  5554. "200":
  5555. description: 成功。统一信封 code/message/data
  5556. /recon/get_list@v1:
  5557. post:
  5558. summary: 对账批次清单
  5559. description: 三统计卡与期次出账进度随同一响应下发;出账状态为派生筛选(settled/abnormal/unsettled)。
  5560. operationId: recon_get_list
  5561. tags:
  5562. - 计费与对账
  5563. x-require-auth: true
  5564. x-resource-type:
  5565. $ref: '#/components/x-resource-types/recon/code'
  5566. x-action:
  5567. $ref: '#/components/x-actions/list/code'
  5568. x-version: v1
  5569. x-permission-visibility: catalog
  5570. x-error-codes: [11103]
  5571. responses:
  5572. "200":
  5573. description: 成功。统一信封 code/message/data
  5574. /recon/detail@v1:
  5575. get:
  5576. summary: 对账批次详情
  5577. description: 批次头+活跃明细行+动作可用性布尔位(服务端算)。
  5578. operationId: recon_detail
  5579. tags:
  5580. - 计费与对账
  5581. x-require-auth: true
  5582. x-resource-type:
  5583. $ref: '#/components/x-resource-types/recon/code'
  5584. x-action:
  5585. $ref: '#/components/x-actions/view/code'
  5586. x-version: v1
  5587. x-permission-visibility: catalog
  5588. x-error-codes: [11103, 11104]
  5589. responses:
  5590. "200":
  5591. description: 成功。统一信封 code/message/data
  5592. /recon/rerun@v1:
  5593. post:
  5594. summary: 人工补跑出账
  5595. description: 仅总运营。四道前置依次返回 KLT-H20502/60503/60504/60506;作废旧 failed 批并回填 replaced_by_batch_no。
  5596. operationId: recon_rerun
  5597. tags:
  5598. - 计费与对账
  5599. x-require-auth: true
  5600. x-resource-type:
  5601. $ref: '#/components/x-resource-types/recon/code'
  5602. x-action:
  5603. $ref: '#/components/x-actions/update/code'
  5604. x-version: v1
  5605. x-permission-visibility: catalog
  5606. x-error-codes: [11103, 60502, 60503, 60504, 60506, 60001]
  5607. responses:
  5608. "200":
  5609. description: 成功。统一信封 code/message/data
  5610. /recon/export_list@v1:
  5611. post:
  5612. summary: 导出对账清单(B 表)
  5613. description: 按当前筛选结果导出批次清单一行一批次,末行合计;行集与 /recon/get_list 同源;未加筛选=导出全部批次;每次导出写操作日志(记筛选条件与导出批数)。
  5614. operationId: recon_export_list
  5615. tags:
  5616. - 计费与对账
  5617. x-require-auth: true
  5618. x-resource-type:
  5619. $ref: '#/components/x-resource-types/recon/code'
  5620. x-action:
  5621. $ref: '#/components/x-actions/export/code'
  5622. x-version: v1
  5623. x-permission-visibility: catalog
  5624. x-error-codes: [11103]
  5625. responses:
  5626. "200":
  5627. description: 成功。统一信封 code/message/data
  5628. /recon/export_detail@v1:
  5629. post:
  5630. summary: 导出账单明细(A 表)
  5631. description: 导出本批交给分成方核对的账单明细,一行一条末行本批合计;本批未执行或无明细返回 KLT-H20505(不产文件不写审计)。
  5632. operationId: recon_export_detail
  5633. tags:
  5634. - 计费与对账
  5635. x-require-auth: true
  5636. x-resource-type:
  5637. $ref: '#/components/x-resource-types/recon/code'
  5638. x-action:
  5639. $ref: '#/components/x-actions/export/code'
  5640. x-version: v1
  5641. x-permission-visibility: catalog
  5642. x-error-codes: [11103, 11104, 60505]
  5643. responses:
  5644. "200":
  5645. description: 成功。统一信封 code/message/data
  5646. /bill/get_list@v1:
  5647. post:
  5648. summary: 账单明细清单
  5649. description: 只含进入 executed 批次的 active 行。
  5650. operationId: bill_get_list
  5651. tags:
  5652. - 计费与对账
  5653. x-require-auth: true
  5654. x-resource-type:
  5655. $ref: '#/components/x-resource-types/bill/code'
  5656. x-action:
  5657. $ref: '#/components/x-actions/list/code'
  5658. x-version: v1
  5659. x-permission-visibility: catalog
  5660. x-error-codes: [11103]
  5661. responses:
  5662. "200":
  5663. description: 成功。统一信封 code/message/data
  5664. /bill/detail@v1:
  5665. get:
  5666. summary: 账单明细详情
  5667. description: 头+成本明细+在期分账号+同订阅其他分成方,七段同源一个接口。
  5668. operationId: bill_detail
  5669. tags:
  5670. - 计费与对账
  5671. x-require-auth: true
  5672. x-resource-type:
  5673. $ref: '#/components/x-resource-types/bill/code'
  5674. x-action:
  5675. $ref: '#/components/x-actions/view/code'
  5676. x-version: v1
  5677. x-permission-visibility: catalog
  5678. x-error-codes: [11103, 11104]
  5679. responses:
  5680. "200":
  5681. description: 成功。统一信封 code/message/data
  5682. /correction/create@v1:
  5683. post:
  5684. summary: 登记出账更正
  5685. description: 表单仅两字段(关联账单+错误内容);KLT-H20501 识别不到归属、KLT-H20507 候选未出账。⛔ 入参 `scope`/`severity`/`region_node_id`(三者皆为系统推导值),出现即 11103 且 `data.fields[]` 逐键给出原因。
  5686. operationId: correction_create
  5687. tags:
  5688. - 计费与对账
  5689. x-require-auth: true
  5690. x-resource-type:
  5691. $ref: '#/components/x-resource-types/correction/code'
  5692. x-action:
  5693. $ref: '#/components/x-actions/create/code'
  5694. x-version: v1
  5695. x-permission-visibility: catalog
  5696. x-error-codes: [11103, 11104, 60501, 60507, 60056]
  5697. responses:
  5698. "200":
  5699. description: 成功。统一信封 code/message/data
  5700. /correction/get_list@v1:
  5701. post:
  5702. summary: 出账更正列表
  5703. description: 自然月筛选不预选;⛔ 编辑/删除/导出入口。
  5704. operationId: correction_get_list
  5705. tags:
  5706. - 计费与对账
  5707. x-require-auth: true
  5708. x-resource-type:
  5709. $ref: '#/components/x-resource-types/correction/code'
  5710. x-action:
  5711. $ref: '#/components/x-actions/list/code'
  5712. x-version: v1
  5713. x-permission-visibility: catalog
  5714. x-error-codes: [11103]
  5715. responses:
  5716. "200":
  5717. description: 成功。统一信封 code/message/data
  5718. /correction/detail@v1:
  5719. get:
  5720. summary: 出账更正详情
  5721. description: 命中/未命中两种展示同源;越权与查无同码(11104)。
  5722. operationId: correction_detail
  5723. tags:
  5724. - 计费与对账
  5725. x-require-auth: true
  5726. x-resource-type:
  5727. $ref: '#/components/x-resource-types/correction/code'
  5728. x-action:
  5729. $ref: '#/components/x-actions/view/code'
  5730. x-version: v1
  5731. x-permission-visibility: catalog
  5732. x-error-codes: [11103, 11104]
  5733. responses:
  5734. "200":
  5735. description: 成功。统一信封 code/message/data
  5736. /correction/draft_save@v1:
  5737. post:
  5738. summary: 保存更正草稿
  5739. description: 按「admin × 本机」至多一份;表单整体 ≤64KB;⛔ 接受 user_id。
  5740. operationId: correction_draft_save
  5741. tags:
  5742. - 计费与对账
  5743. x-require-auth: true
  5744. x-resource-type:
  5745. $ref: '#/components/x-resource-types/correction/code'
  5746. x-action:
  5747. $ref: '#/components/x-actions/update/code'
  5748. x-version: v1
  5749. x-permission-visibility: catalog
  5750. x-error-codes: [11103]
  5751. responses:
  5752. "200":
  5753. description: 成功。统一信封 code/message/data
  5754. /correction/draft_get@v1:
  5755. get:
  5756. summary: 读取更正草稿
  5757. description: 无草稿 ⇒ 成功+空对象(⛔ 404/⛔ 业务码)。
  5758. operationId: correction_draft_get
  5759. tags:
  5760. - 计费与对账
  5761. x-require-auth: true
  5762. x-resource-type:
  5763. $ref: '#/components/x-resource-types/correction/code'
  5764. x-action:
  5765. $ref: '#/components/x-actions/view/code'
  5766. x-version: v1
  5767. x-permission-visibility: catalog
  5768. x-error-codes: []
  5769. responses:
  5770. "200":
  5771. description: 成功。统一信封 code/message/data
  5772. /ticket/list@v1:
  5773. post:
  5774. summary: 工单列表查询
  5775. description: 跨 6 类工单统一分页;行集=判权谓词+可见范围五档+数据权限;排序=是否已超期→优先级→提醒时限(TK-1)。出参每行带 row_version 与可执行动作集合(服务端计算,前端⛔ 自拼)。主要失败:网关 11104(缺权限)。
  5776. operationId: ticket_list
  5777. tags:
  5778. - 工单与开停交付
  5779. x-require-auth: true
  5780. x-resource-type:
  5781. $ref: '#/components/x-resource-types/ticket/code'
  5782. x-action:
  5783. $ref: '#/components/x-actions/list/code'
  5784. x-version: v1
  5785. x-permission-visibility: catalog
  5786. requestBody:
  5787. required: true
  5788. description: JSON 请求体,业务字段置于 data
  5789. content:
  5790. application/json:
  5791. schema:
  5792. type: object
  5793. description: 统一信封请求体,业务字段放在 data 内
  5794. properties:
  5795. data:
  5796. type: object
  5797. description: 业务参数
  5798. properties:
  5799. ticket_types:
  5800. type: array
  5801. description: 工单类型(英文码):开户、服务开通、到期停机、服务停用、故障处理、售后处理;缺省=全部。兼容单数写法 `ticket_type`(传单字符串或逗号分隔串同样生效)
  5802. items:
  5803. type: string
  5804. statuses:
  5805. type: array
  5806. description: 工单状态(未分派/待处理/处理中/已满足闭环/待回执/已闭环);缺省=全部。兼容单数写法 `status`(传单字符串或逗号分隔串同样生效)
  5807. items:
  5808. type: string
  5809. sources:
  5810. type: array
  5811. description: 来源:self/cust_svc/ops/system;缺省=全部。兼容单数写法 `source`(传单字符串或逗号分隔串同样生效)
  5812. items:
  5813. type: string
  5814. date_from:
  5815. type: string
  5816. description: 建单日期起(YYYY-MM-DD)
  5817. date_to:
  5818. type: string
  5819. description: 建单日期止(YYYY-MM-DD)
  5820. keyword:
  5821. type: string
  5822. description: 关键字:标题/客户名/工单号/关联单号/网络账号(不含报文原文)
  5823. page:
  5824. type: integer
  5825. description: 页码,从 1 起(越界收敛,不报错)
  5826. page_size:
  5827. type: integer
  5828. description: 每页条数,1–100,缺省 10
  5829. required:
  5830. - data
  5831. x-error-codes: [11104]
  5832. responses:
  5833. "200":
  5834. description: 成功。统一信封 code/message/data
  5835. /ticket/detail@v1:
  5836. get:
  5837. summary: 工单详情查询
  5838. description: 出参骨架+时间线+按类型子域块(回填、分账号、开停记录、竣工、报文、故障、交接单、材料)。读事件:read_event 为真且当前人是责任人且态为待处理 ⇒ 同事务推进处理中并写首条处理记录。⚠️ read_event 走 POST 待裁定(18册 U-39)。主要失败:60056(不可见)、KLT-G20401。
  5839. operationId: ticket_detail
  5840. tags:
  5841. - 工单与开停交付
  5842. x-require-auth: true
  5843. x-resource-type:
  5844. $ref: '#/components/x-resource-types/ticket/code'
  5845. x-action:
  5846. $ref: '#/components/x-actions/detail/code'
  5847. x-version: v1
  5848. x-permission-visibility: catalog
  5849. parameters:
  5850. - name: ticket_id
  5851. in: query
  5852. required: false
  5853. description: 工单标识(内部主键)。⚠️ 与 ticket_no 二者至少给一个,都给以本参数为准
  5854. schema:
  5855. type: string
  5856. - name: ticket_no
  5857. in: query
  5858. required: false
  5859. description: 业务工单号(形如 T-20261114-5968)。客户门户⛔ 暴露内部主键,列表只回 ticket_no,
  5860. 故详情口按本参数定位;反查**在可见性谓词之内**执行,查无与越权同回 60005
  5861. (与按主键查无同一口径,⛔ 说破「存在但你不能看」)
  5862. schema:
  5863. type: string
  5864. - name: read_event
  5865. in: query
  5866. required: false
  5867. description: 阅读推进开关:true 时才尝试待处理→处理中
  5868. schema:
  5869. type: string
  5870. x-error-codes: [11103, 60005]
  5871. responses:
  5872. "200":
  5873. description: 成功。统一信封 code/message/data
  5874. /ticket/pending_queue@v1:
  5875. post:
  5876. summary: 待分派队列查询
  5877. description: 运维主管/运维组负责人的分派工作台数据源;权限键与工单列表分列,⛔ 复用(TK-13)。行集=可见范围内未分派+待处理(⚠️ 待处理入列理由待裁定,18册 U-13)。
  5878. operationId: ticket_pending_queue
  5879. tags:
  5880. - 工单与开停交付
  5881. x-require-auth: true
  5882. x-resource-type:
  5883. $ref: '#/components/x-resource-types/ticket/code'
  5884. x-action:
  5885. $ref: '#/components/x-actions/pending_queue/code'
  5886. x-version: v1
  5887. x-permission-visibility: catalog
  5888. requestBody:
  5889. required: true
  5890. description: JSON 请求体,业务字段置于 data
  5891. content:
  5892. application/json:
  5893. schema:
  5894. type: object
  5895. description: 统一信封请求体,业务字段放在 data 内
  5896. properties:
  5897. data:
  5898. type: object
  5899. description: 业务参数
  5900. properties:
  5901. ticket_types:
  5902. type: array
  5903. description: 工单类型;缺省=本人团队可受理全部类型(授权范围是上限)
  5904. items:
  5905. type: string
  5906. assign_team_id:
  5907. type: string
  5908. description: 目标运维团队;缺省=本人所辖团队;指定时必须是本人所辖团队
  5909. keyword:
  5910. type: string
  5911. description: 关键字,含义同工单列表
  5912. page:
  5913. type: integer
  5914. description: 页码,从 1 起(越界收敛,不报错)
  5915. page_size:
  5916. type: integer
  5917. description: 每页条数,1–100,缺省 10
  5918. required:
  5919. - data
  5920. x-error-codes: [11104]
  5921. responses:
  5922. "200":
  5923. description: 成功。统一信封 code/message/data
  5924. /ticket/backfill_todo@v1:
  5925. get:
  5926. summary: 待回填清单查询
  5927. description: 跨工单聚合待回填的分账号行,是回填弹窗的入口(TK-3)。行集范围同工单列表;⛔ 返回报文原文。
  5928. operationId: ticket_backfill_todo
  5929. tags:
  5930. - 工单与开停交付
  5931. x-require-auth: true
  5932. x-resource-type:
  5933. $ref: '#/components/x-resource-types/ticket/code'
  5934. x-action:
  5935. $ref: '#/components/x-actions/backfill_todo/code'
  5936. x-version: v1
  5937. x-permission-visibility: catalog
  5938. x-error-codes: [11104]
  5939. responses:
  5940. "200":
  5941. description: 成功。统一信封 code/message/data
  5942. /ticket/todo_counts@v1:
  5943. get:
  5944. summary: 待办计数查询
  5945. description: 一次返回四个角标:未分派、超期、待回填、报文待处置。⛔ 做超期明细列表(超期明细走工单列表的已超期筛选)。
  5946. operationId: ticket_todo_counts
  5947. tags:
  5948. - 工单与开停交付
  5949. x-require-auth: true
  5950. x-resource-type:
  5951. $ref: '#/components/x-resource-types/ticket/code'
  5952. x-action:
  5953. $ref: '#/components/x-actions/todo_counts/code'
  5954. x-version: v1
  5955. x-permission-visibility: catalog
  5956. x-error-codes: [11104, 60201]
  5957. responses:
  5958. "200":
  5959. description: 成功。统一信封 code/message/data
  5960. /ticket/trace@v1:
  5961. get:
  5962. summary: 跨主体追溯查询
  5963. description: 按工单号/报文单号/竣工号任一单值精确定位,返回工单+开停记录+报文+竣工回传+回执的关联链。⛔ 关键字模糊(U-16)。主要失败:KLT-G20415(无法定位)。
  5964. operationId: ticket_trace
  5965. tags:
  5966. - 工单与开停交付
  5967. x-require-auth: true
  5968. x-resource-type:
  5969. $ref: '#/components/x-resource-types/ticket/code'
  5970. x-action:
  5971. $ref: '#/components/x-actions/trace/code'
  5972. x-version: v1
  5973. x-permission-visibility: catalog
  5974. parameters:
  5975. - name: ticket_no
  5976. in: query
  5977. required: false
  5978. description: 恪澜通工单号
  5979. schema:
  5980. type: string
  5981. - name: unicom_order_no
  5982. in: query
  5983. required: false
  5984. description: 运营商单号
  5985. schema:
  5986. type: string
  5987. - name: completion_no
  5988. in: query
  5989. required: false
  5990. description: 竣工单号
  5991. schema:
  5992. type: string
  5993. - name: ticket_id
  5994. in: query
  5995. required: false
  5996. description: 工单标识
  5997. schema:
  5998. type: string
  5999. x-error-codes: [11104]
  6000. responses:
  6001. "200":
  6002. description: 成功。统一信封 code/message/data
  6003. /message/pending@v1:
  6004. post:
  6005. summary: 报文待处置队列查询
  6006. description: 运维主管/运维组负责人的报文处置工作台数据源;⛔ 返回 raw_payload 正文(D7、U-51),只回动作/单号/归属态+归属失败原因码等已脱敏列。
  6007. operationId: message_pending
  6008. tags:
  6009. - 报文人工处置
  6010. x-require-auth: true
  6011. x-resource-type:
  6012. $ref: '#/components/x-resource-types/message/code'
  6013. x-action:
  6014. $ref: '#/components/x-actions/pending/code'
  6015. x-version: v1
  6016. x-permission-visibility: catalog
  6017. requestBody:
  6018. required: true
  6019. description: JSON 请求体,业务字段置于 data
  6020. content:
  6021. application/json:
  6022. schema:
  6023. type: object
  6024. description: 统一信封请求体,业务字段放在 data 内
  6025. properties:
  6026. data:
  6027. type: object
  6028. description: 业务参数
  6029. properties:
  6030. page:
  6031. type: integer
  6032. description: 页码,从 1 起(越界收敛,不报错)
  6033. page_size:
  6034. type: integer
  6035. description: 每页条数,1–100,缺省 10
  6036. required:
  6037. - data
  6038. x-error-codes: [11104]
  6039. responses:
  6040. "200":
  6041. description: 成功。统一信封 code/message/data
  6042. /ticket/create@v1:
  6043. post:
  6044. summary: 新建工单
  6045. description: 6 类共用;一次原子提交:客户当前在办唯一性(KLT-G20405)→ 雪花发号 → 建单+状态历史+建单动作+首条处理记录+初始材料。⛔ 入参出现金额/资费/带宽购买/对账字段;⛔ 传 status/assign_*(传入报 11103)。主要失败:11103、60056、KLT-G20405、11112、KLT-G20416。角色闸门按类型选档(手册 P7「客户通过企业微信联系/客服转交后运维代建」):`fault`/`after_sale` 放行七档=admin、opsMain、opsSub、teamLead、enterprise、sub + **运维成员 ops(代客建单,落 submitter_type='ops'⛔ 冒充客户自建)**;`service_open`/`expiry_stop`/`open` 三类仍走六档,ops 建主线单报 11104。<br>**`service_stop`(运营人工发起,工单§3.2.1「运营人工发起(客户详情页/订阅详情页)」+手册 P6)=本入口受理的第 3 类**:档位从六档**收紧到运营三类**=admin、opsMain、opsSub(客户两档/团队主/运维成员发起报 11104,代客建单页⛔ 开放本类型选项),并须同时满足三条——① 带 `subscription_id` 且该订阅属于 `customer_id`;② 服务**未到期**(订阅落库态非 expired/replaced/cancelled,且到期日不早于当日;到期停机由 STOP-GEN 作业出 `expiry_stop`,⛔ 人工补单);③ `confirm=true` 显式二次确认。三条任一不成立即⛔ 建单(分别报 11103/60001/11103);受理成功后 `submitter_type` 记 `ops`,并按工单§3.2.3 随单落一条 `exec_status='pending'` 的待执行开停记录(形态与 STOP-GEN 建的到期停机单一致,生效日期/回填号两栏留空,后续由 `ticket/handle@v1` 回填时写)。
  6046. operationId: ticket_create
  6047. tags:
  6048. - 工单与开停交付
  6049. x-require-auth: true
  6050. x-resource-type:
  6051. $ref: '#/components/x-resource-types/ticket/code'
  6052. x-action:
  6053. $ref: '#/components/x-actions/create/code'
  6054. x-version: v1
  6055. x-permission-visibility: catalog
  6056. requestBody:
  6057. required: true
  6058. description: JSON 请求体,业务字段置于 data
  6059. content:
  6060. application/json:
  6061. schema:
  6062. type: object
  6063. description: 统一信封请求体,业务字段放在 data 内
  6064. properties:
  6065. data:
  6066. type: object
  6067. description: 业务参数
  6068. properties:
  6069. ticket_type:
  6070. type: string
  6071. description: 工单类型(6 个英文码之一:开户、服务开通、到期停机、服务停用、故障处理、售后处理)
  6072. customer_id:
  6073. type: string
  6074. description: 客户标识
  6075. title:
  6076. type: string
  6077. description: 工单标题
  6078. detail:
  6079. type: string
  6080. description: 工单详情(工单描述)
  6081. subscription_id:
  6082. type: string
  6083. description: 关联订阅标识;服务开通类可不关联。**`ticket_type=service_stop` 时必填**,且该订阅必须属于 `customer_id` 那个客户、服务未到期(工单§3.2.1)
  6084. confirm:
  6085. type: boolean
  6086. description: 提交时二次确认。客户两档发起 `fault`/`after_sale` 必须 `true`;运营发起 `service_stop` 必须 `true`(缺省或非 `true` 报 11103,工单§3.2.1/手册 P6)
  6087. materials:
  6088. type: array
  6089. description: 初始材料(建单即随附),最多 5 个;超限报 11103
  6090. items:
  6091. type: object
  6092. properties:
  6093. oss_key:
  6094. type: string
  6095. description: OSS 对象键
  6096. file_name:
  6097. type: string
  6098. description: 原始文件名
  6099. size_bytes:
  6100. type: integer
  6101. description: 文件字节数
  6102. required:
  6103. - ticket_type
  6104. - customer_id
  6105. - title
  6106. required:
  6107. - data
  6108. x-error-codes: [11103, 11104, 60001, 60108, 60804]
  6109. responses:
  6110. "200":
  6111. description: 成功。统一信封 code/message/data
  6112. /ticket/assign@v1:
  6113. post:
  6114. summary: 手动分派工单
  6115. description: 运维主管/组负责人在待分派队列指定处理人(TK-14)。目标处理人必须是在职人员∧本人团队∧持有该单类型;⛔ 改已完成/已闭环单;⛔ 分给自己(自接单走创建即自assign 路径)。主要失败:11104、KLT-G20401、KLT-G20416、KLT-G20417。
  6116. operationId: ticket_assign
  6117. tags:
  6118. - 工单与开停交付
  6119. x-require-auth: true
  6120. x-resource-type:
  6121. $ref: '#/components/x-resource-types/ticket/code'
  6122. x-action:
  6123. $ref: '#/components/x-actions/assign/code'
  6124. x-version: v1
  6125. x-permission-visibility: catalog
  6126. requestBody:
  6127. required: true
  6128. description: JSON 请求体,业务字段置于 data
  6129. content:
  6130. application/json:
  6131. schema:
  6132. type: object
  6133. description: 统一信封请求体,业务字段放在 data 内
  6134. properties:
  6135. data:
  6136. type: object
  6137. description: 业务参数
  6138. properties:
  6139. ticket_id:
  6140. type: string
  6141. description: 工单标识(字符串下发,服务侧转 bigint)
  6142. assignee_user_id:
  6143. type: string
  6144. description: 目标责任人标识
  6145. required:
  6146. - ticket_id
  6147. - assignee_user_id
  6148. required:
  6149. - data
  6150. x-error-codes: [11103, 60401, 60402]
  6151. responses:
  6152. "200":
  6153. description: 成功。统一信封 code/message/data
  6154. /ticket/dispatch_auto@v1:
  6155. post:
  6156. summary: 自动分派(整批)
  6157. description: 对目标团队队列内可见的未分派单逐单按负载量最少判定:唯一最少⇒分派到人(assign_type=auto);并列最少/目标团队零人持有该类型⇒⛔ 分派,该单留队列并在结果里给出原因。⛔ 队列筛选条件入参。
  6158. operationId: ticket_dispatch_auto
  6159. tags:
  6160. - 工单与开停交付
  6161. x-require-auth: true
  6162. x-resource-type:
  6163. $ref: '#/components/x-resource-types/ticket/code'
  6164. x-action:
  6165. $ref: '#/components/x-actions/dispatch_auto/code'
  6166. x-version: v1
  6167. x-permission-visibility: catalog
  6168. requestBody:
  6169. required: true
  6170. description: JSON 请求体,业务字段置于 data
  6171. content:
  6172. application/json:
  6173. schema:
  6174. type: object
  6175. description: 统一信封请求体,业务字段放在 data 内
  6176. properties:
  6177. data:
  6178. type: object
  6179. description: 业务参数
  6180. properties:
  6181. team_id:
  6182. type: string
  6183. description: 目标运维团队;缺省=本人所辖团队
  6184. required:
  6185. - team_id
  6186. required:
  6187. - data
  6188. x-error-codes: [11103, 60402]
  6189. responses:
  6190. "200":
  6191. description: 成功。统一信封 code/message/data
  6192. /ticket/delegate@v1:
  6193. post:
  6194. summary: 交接转派
  6195. description: 人员交接时把名下未闭环工单批量改派给承接人;⛔ 接已完成(TK-10)。承接人必须在职∧同团队∧持有对应工单类型;出参逐单结果,未成功单保持未分派并给原因。
  6196. operationId: ticket_delegate
  6197. tags:
  6198. - 工单与开停交付
  6199. x-require-auth: true
  6200. x-resource-type:
  6201. $ref: '#/components/x-resource-types/ticket/code'
  6202. x-action:
  6203. $ref: '#/components/x-actions/delegate/code'
  6204. x-version: v1
  6205. x-permission-visibility: catalog
  6206. requestBody:
  6207. required: true
  6208. description: JSON 请求体,业务字段置于 data
  6209. content:
  6210. application/json:
  6211. schema:
  6212. type: object
  6213. description: 统一信封请求体,业务字段放在 data 内
  6214. properties:
  6215. data:
  6216. type: object
  6217. description: 业务参数
  6218. properties:
  6219. ticket_id:
  6220. type: string
  6221. description: 被转派的工单标识
  6222. trustee_user_id:
  6223. type: string
  6224. description: 承接人标识
  6225. required:
  6226. - ticket_id
  6227. - trustee_user_id
  6228. required:
  6229. - data
  6230. x-error-codes: [60401, 60402, 60416]
  6231. responses:
  6232. "200":
  6233. description: 成功。统一信封 code/message/data
  6234. /ticket/start@v1:
  6235. post:
  6236. summary: 进入处理中(阅读推进)
  6237. description: 落库入口是工单详情读事件,⛔ 人工按钮(U-39)。分支:待处理→处理中;处理中幂等成功;未分派不推进回成功;已完成/已闭环报 KLT-G20401。
  6238. operationId: ticket_start
  6239. tags:
  6240. - 工单与开停交付
  6241. x-require-auth: true
  6242. x-resource-type:
  6243. $ref: '#/components/x-resource-types/ticket/code'
  6244. x-action:
  6245. $ref: '#/components/x-actions/start/code'
  6246. x-version: v1
  6247. x-permission-visibility: catalog
  6248. requestBody:
  6249. required: true
  6250. description: JSON 请求体,业务字段置于 data
  6251. content:
  6252. application/json:
  6253. schema:
  6254. type: object
  6255. description: 统一信封请求体,业务字段放在 data 内
  6256. properties:
  6257. data:
  6258. type: object
  6259. description: 业务参数
  6260. properties:
  6261. ticket_id:
  6262. type: string
  6263. description: 工单标识(字符串下发,服务侧转 bigint)
  6264. required:
  6265. - ticket_id
  6266. required:
  6267. - data
  6268. x-error-codes: [60401]
  6269. responses:
  6270. "200":
  6271. description: 成功。统一信封 code/message/data
  6272. /ticket/backfill@v1:
  6273. post:
  6274. summary: 回填竣工信息
  6275. description: 开户/到期停机/服务停用共用,按类型分叉必填矩阵(工单§5.1.1)。一次原子提交:回填头→明细→开停记录→分账号事实→客户状态+变更历史→订阅实际开通日→处理记录(TK-3、TK-11)。⚠️ 待处理态同样放行(阅读推进⛔ 是回填前置)。境外 IP 的 PIN/CPID 经 Keybox 加密入库,出参⛔ 出现明文。条数比对不通过⇒⛔ 调 Keybox、⛔ 写库并返回缺口明细;执行结论非成功⇒整批不写跨册三写。主要失败:11103、KLT-G20404、KLT-G20417、11112。
  6276. operationId: ticket_backfill
  6277. tags:
  6278. - 工单与开停交付
  6279. x-require-auth: true
  6280. x-resource-type:
  6281. $ref: '#/components/x-resource-types/ticket/code'
  6282. x-action:
  6283. $ref: '#/components/x-actions/backfill/code'
  6284. x-version: v1
  6285. x-permission-visibility: catalog
  6286. requestBody:
  6287. required: true
  6288. description: JSON 请求体,业务字段置于 data
  6289. content:
  6290. application/json:
  6291. schema:
  6292. type: object
  6293. description: 统一信封请求体,业务字段放在 data 内
  6294. properties:
  6295. data:
  6296. type: object
  6297. description: 业务参数
  6298. properties:
  6299. ticket_id:
  6300. type: string
  6301. description: 工单标识(字符串下发,服务侧转 bigint)
  6302. exec_conclusion:
  6303. type: string
  6304. description: 执行结论:success/partial/fail;partial 存行不生效(工单§5.1.4)
  6305. conclusion_note:
  6306. type: string
  6307. description: 结论说明;非成功时必填(KLT-G20404)
  6308. actual_opened_date:
  6309. type: string
  6310. description: 实际开通日(YYYY-MM-DD,开户类三件套之一)
  6311. stop_done_date:
  6312. type: string
  6313. description: 停机完成日(YYYY-MM-DD,停机类三件套之一)
  6314. builder_user_id:
  6315. type: string
  6316. description: 施工人(可选)
  6317. evidence_text:
  6318. type: string
  6319. description: 凭证说明
  6320. route_rows:
  6321. type: array
  6322. description: 组一+组二回填行(按分账号一行;条数比对基准=勾选开账号数)
  6323. items:
  6324. type: object
  6325. properties:
  6326. sub_account_id:
  6327. type: string
  6328. description: 分账号标识;未传⇒视为漏填
  6329. network_account_name:
  6330. type: string
  6331. description: 网络账号名
  6332. intranet_ip:
  6333. type: string
  6334. description: 内网 IP
  6335. subnet_mask:
  6336. type: string
  6337. description: 子网掩码
  6338. gateway:
  6339. type: string
  6340. description: 网关
  6341. vlan:
  6342. type: string
  6343. description: VLAN
  6344. vni:
  6345. type: string
  6346. description: VNI
  6347. src_endpoint:
  6348. type: string
  6349. description: 源端
  6350. dst_endpoint:
  6351. type: string
  6352. description: 目的端
  6353. egress_pop:
  6354. type: string
  6355. description: 出口 POP
  6356. down_mbps:
  6357. type: number
  6358. description: 下行带宽 Mbps(信息项,⛔ 参与计价)
  6359. up_mbps:
  6360. type: number
  6361. description: 上行带宽 Mbps(信息项)
  6362. open_this_time:
  6363. type: boolean
  6364. description: 「随本次开通」勾选位,缺省=已勾选
  6365. ip_rows:
  6366. type: array
  6367. description: 组三境外 IP 回填行(条数比对基准=95 符号数)
  6368. items:
  6369. type: object
  6370. properties:
  6371. egress:
  6372. type: string
  6373. description: 出口
  6374. overseas_ip:
  6375. type: string
  6376. description: 境外 IP 地址
  6377. ip_type:
  6378. type: string
  6379. description: IP 类型(95/195 符号)
  6380. bandwidth_mbps:
  6381. type: integer
  6382. description: 带宽档位 Mbps(信息项)
  6383. pin:
  6384. type: string
  6385. description: PIN(明文入参,服务端经 Keybox 加密入库,⛔ 明文落库)
  6386. cpid:
  6387. type: string
  6388. description: CPID(同上)
  6389. expected_version:
  6390. type: integer
  6391. description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验
  6392. required:
  6393. - ticket_id
  6394. required:
  6395. - data
  6396. x-error-codes: [11103, 60401, 60403, 60404, 60405, 60406, 60417]
  6397. responses:
  6398. "200":
  6399. description: 成功。统一信封 code/message/data
  6400. /ticket/check_done@v1:
  6401. post:
  6402. summary: 服务项完成直接闭环
  6403. description: 服务开通/故障处理/售后处理勾选服务项并直接闭环;不关联客户/订阅、⛔ 回填、⛔ 生成回传。首次保存时固化完成项快照(U-30);全部完成⇒已满足闭环→已闭环+AUTO-CLOSE。主要失败:KLT-G20404、KLT-G20417。
  6404. operationId: ticket_check_done
  6405. tags:
  6406. - 工单与开停交付
  6407. x-require-auth: true
  6408. x-resource-type:
  6409. $ref: '#/components/x-resource-types/ticket/code'
  6410. x-action:
  6411. $ref: '#/components/x-actions/check_done/code'
  6412. x-version: v1
  6413. x-permission-visibility: catalog
  6414. requestBody:
  6415. required: true
  6416. description: JSON 请求体,业务字段置于 data
  6417. content:
  6418. application/json:
  6419. schema:
  6420. type: object
  6421. description: 统一信封请求体,业务字段放在 data 内
  6422. properties:
  6423. data:
  6424. type: object
  6425. description: 业务参数
  6426. properties:
  6427. ticket_id:
  6428. type: string
  6429. description: 工单标识(字符串下发,服务侧转 bigint)
  6430. item_ids:
  6431. type: array
  6432. description: 本次勾选完成的服务项标识;⛔ 服务端可推导(U-15)
  6433. items:
  6434. type: string
  6435. note:
  6436. type: string
  6437. description: 说明(故障/售后必填;服务开通可不填)
  6438. expected_version:
  6439. type: integer
  6440. description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验
  6441. required:
  6442. - ticket_id
  6443. required:
  6444. - data
  6445. x-error-codes: [60401, 60404, 60417]
  6446. responses:
  6447. "200":
  6448. description: 成功。统一信封 code/message/data
  6449. /ticket/mark_done@v1:
  6450. post:
  6451. summary: 标记已处理(仅服务开通)
  6452. description: ⛔ 手选工单类型(U-04):只有未关联客户/订阅的服务开通工单可走通路 5。必填:未关联原因+说明+处理人(缺项报 KLT-G20404)。前置:服务开通∧客户为空∧订阅为空⇒已闭环。⚠️ 2026-11-14 校正代码口径+收口分岔(手册 P7):本口当前只受理 `fault`/`after_sale`(其余类型报 11103),推到 completed 后若该单是**运维代建/系统生成**(submitter_type != 'customer')⇒ 同批直达 settled 并补一条 confirm_close 处理记录,出参 `status='settled'`、`auto_settled=true`、`settled_at`;客户自报的故障/售后行为不变(停在 completed 等 `/ticket/confirm_close@v1`,客户 7 天未确认改由作业 `AUTO-CLOSE` 自动关闭)。
  6453. operationId: ticket_mark_done
  6454. tags:
  6455. - 工单与开停交付
  6456. x-require-auth: true
  6457. x-resource-type:
  6458. $ref: '#/components/x-resource-types/ticket/code'
  6459. x-action:
  6460. $ref: '#/components/x-actions/mark_done/code'
  6461. x-version: v1
  6462. x-permission-visibility: catalog
  6463. requestBody:
  6464. required: true
  6465. description: JSON 请求体,业务字段置于 data
  6466. content:
  6467. application/json:
  6468. schema:
  6469. type: object
  6470. description: 统一信封请求体,业务字段放在 data 内
  6471. properties:
  6472. data:
  6473. type: object
  6474. description: 业务参数
  6475. properties:
  6476. ticket_id:
  6477. type: string
  6478. description: 工单标识(字符串下发,服务侧转 bigint)
  6479. note:
  6480. type: string
  6481. description: 说明(必填,含未关联原因)
  6482. expected_version:
  6483. type: integer
  6484. description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验
  6485. required:
  6486. - ticket_id
  6487. - note
  6488. required:
  6489. - data
  6490. x-error-codes: [11103, 60401, 60417]
  6491. responses:
  6492. "200":
  6493. description: 成功。统一信封 code/message/data
  6494. /ticket/handover_save@v1:
  6495. post:
  6496. summary: 保存交接单内容
  6497. description: 保存申报主体+应用清单+境外 IP 清单,每次保存生成版本快照。⛔ 手填境外 IP 个数与应用个数(由回填的境外 IP 行与应用行自动汇总)。主要失败:KLT-G20417。
  6498. operationId: ticket_handover_save
  6499. tags:
  6500. - 工单与开停交付
  6501. x-require-auth: true
  6502. x-resource-type:
  6503. $ref: '#/components/x-resource-types/ticket/code'
  6504. x-action:
  6505. $ref: '#/components/x-actions/handover_save/code'
  6506. x-version: v1
  6507. x-permission-visibility: catalog
  6508. requestBody:
  6509. required: true
  6510. description: JSON 请求体,业务字段置于 data
  6511. content:
  6512. application/json:
  6513. schema:
  6514. type: object
  6515. description: 统一信封请求体,业务字段放在 data 内
  6516. properties:
  6517. data:
  6518. type: object
  6519. description: 业务参数
  6520. properties:
  6521. ticket_id:
  6522. type: string
  6523. description: 工单标识(字符串下发,服务侧转 bigint)
  6524. handover:
  6525. type: object
  6526. description: 交接单内容
  6527. properties:
  6528. declarant_name:
  6529. type: string
  6530. description: 申报主体名称
  6531. declarant_org:
  6532. type: string
  6533. description: 申报单位
  6534. declarant_contact:
  6535. type: string
  6536. description: 联系方式
  6537. declaration_text:
  6538. type: string
  6539. description: 申报说明
  6540. apps:
  6541. type: array
  6542. description: 应用清单(个数由服务侧汇总)
  6543. items:
  6544. type: object
  6545. properties:
  6546. app_category:
  6547. type: string
  6548. description: 应用类别
  6549. qty:
  6550. type: integer
  6551. description: 数量
  6552. ips:
  6553. type: array
  6554. description: 境外 IP 清单
  6555. items:
  6556. type: object
  6557. properties:
  6558. country:
  6559. type: string
  6560. description: 国别
  6561. bandwidth_mbps:
  6562. type: integer
  6563. description: 带宽 Mbps
  6564. ip_count:
  6565. type: integer
  6566. description: IP 个数
  6567. expected_version:
  6568. type: integer
  6569. description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验
  6570. required:
  6571. - ticket_id
  6572. - handover
  6573. required:
  6574. - data
  6575. x-error-codes: [11103, 60408, 60417]
  6576. responses:
  6577. "200":
  6578. description: 成功。统一信封 code/message/data
  6579. /ticket/close@v1:
  6580. post:
  6581. summary: 关闭工单
  6582. description: 仅未分派/待处理可关闭。⛔ 处理中的单直接关闭(必须先撤回)。主要失败:KLT-G20401、KLT-G20417。
  6583. operationId: ticket_close
  6584. tags:
  6585. - 工单与开停交付
  6586. x-require-auth: true
  6587. x-resource-type:
  6588. $ref: '#/components/x-resource-types/ticket/code'
  6589. x-action:
  6590. $ref: '#/components/x-actions/close/code'
  6591. x-version: v1
  6592. x-permission-visibility: catalog
  6593. requestBody:
  6594. required: true
  6595. description: JSON 请求体,业务字段置于 data
  6596. content:
  6597. application/json:
  6598. schema:
  6599. type: object
  6600. description: 统一信封请求体,业务字段放在 data 内
  6601. properties:
  6602. data:
  6603. type: object
  6604. description: 业务参数
  6605. properties:
  6606. ticket_id:
  6607. type: string
  6608. description: 工单标识(字符串下发,服务侧转 bigint)
  6609. reason:
  6610. type: string
  6611. description: 关闭原因(必填)
  6612. expected_version:
  6613. type: integer
  6614. description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验
  6615. required:
  6616. - ticket_id
  6617. - reason
  6618. required:
  6619. - data
  6620. x-error-codes: [60401, 60409, 60413, 60417]
  6621. responses:
  6622. "200":
  6623. description: 成功。统一信封 code/message/data
  6624. /ticket/withdraw@v1:
  6625. post:
  6626. summary: 撤回工单
  6627. description: 撤回后状态回未分派、清空 assign_*、责任人写处理记录。⛔ 撤回已完成/已闭环单。主要失败:KLT-G20401。
  6628. operationId: ticket_withdraw
  6629. tags:
  6630. - 工单与开停交付
  6631. x-require-auth: true
  6632. x-resource-type:
  6633. $ref: '#/components/x-resource-types/ticket/code'
  6634. x-action:
  6635. $ref: '#/components/x-actions/withdraw/code'
  6636. x-version: v1
  6637. x-permission-visibility: catalog
  6638. requestBody:
  6639. required: true
  6640. description: JSON 请求体,业务字段置于 data
  6641. content:
  6642. application/json:
  6643. schema:
  6644. type: object
  6645. description: 统一信封请求体,业务字段放在 data 内
  6646. properties:
  6647. data:
  6648. type: object
  6649. description: 业务参数
  6650. properties:
  6651. ticket_id:
  6652. type: string
  6653. description: 工单标识(字符串下发,服务侧转 bigint)
  6654. reason:
  6655. type: string
  6656. description: 撤回原因(必填)
  6657. required:
  6658. - ticket_id
  6659. - reason
  6660. required:
  6661. - data
  6662. x-error-codes: [60401, 60409, 60414]
  6663. responses:
  6664. "200":
  6665. description: 成功。统一信封 code/message/data
  6666. /ticket/confirm_close@v1:
  6667. post:
  6668. summary: 确认闭环
  6669. description: 闭环方式=回执类且已回传未回执时的人工兜底:待回执→已闭环。⛔ 在闭环方式=完成后即闭环下调用(KLT-G20415)。
  6670. operationId: ticket_confirm_close
  6671. tags:
  6672. - 工单与开停交付
  6673. x-require-auth: true
  6674. x-resource-type:
  6675. $ref: '#/components/x-resource-types/ticket/code'
  6676. x-action:
  6677. $ref: '#/components/x-actions/confirm_close/code'
  6678. x-version: v1
  6679. x-permission-visibility: catalog
  6680. requestBody:
  6681. required: true
  6682. description: JSON 请求体,业务字段置于 data
  6683. content:
  6684. application/json:
  6685. schema:
  6686. type: object
  6687. description: 统一信封请求体,业务字段放在 data 内
  6688. properties:
  6689. data:
  6690. type: object
  6691. description: 业务参数
  6692. properties:
  6693. ticket_id:
  6694. type: string
  6695. description: 工单标识(字符串下发,服务侧转 bigint)
  6696. expected_version:
  6697. type: integer
  6698. description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验
  6699. required:
  6700. - ticket_id
  6701. required:
  6702. - data
  6703. x-error-codes: [60401, 60414, 60417]
  6704. responses:
  6705. "200":
  6706. description: 成功。统一信封 code/message/data
  6707. /ticket/defer@v1:
  6708. post:
  6709. summary: 临时延期(延后提醒)
  6710. description: 两条分支:开停记录提醒(执行结论待处理)与在办未回填提醒(服务开通且未回填)。延期目标日由服务端固定为「今天+超期提醒天数」,⛔ 入参传天数。⚠️ 设计正文的「天数非法 11103」在本实现不存在(无天数入参)。主要失败:KLT-G20415。
  6711. operationId: ticket_defer
  6712. tags:
  6713. - 工单与开停交付
  6714. x-require-auth: true
  6715. x-resource-type:
  6716. $ref: '#/components/x-resource-types/ticket/code'
  6717. x-action:
  6718. $ref: '#/components/x-actions/defer/code'
  6719. x-version: v1
  6720. x-permission-visibility: catalog
  6721. requestBody:
  6722. required: true
  6723. description: JSON 请求体,业务字段置于 data
  6724. content:
  6725. application/json:
  6726. schema:
  6727. type: object
  6728. description: 统一信封请求体,业务字段放在 data 内
  6729. properties:
  6730. data:
  6731. type: object
  6732. description: 业务参数
  6733. properties:
  6734. ticket_id:
  6735. type: string
  6736. description: 工单标识(字符串下发,服务侧转 bigint)
  6737. defer_scope:
  6738. type: string
  6739. description: 延期对象:open_stop(开停记录提醒)/ticket(在办未回填提醒)
  6740. required:
  6741. - ticket_id
  6742. required:
  6743. - data
  6744. x-error-codes: [11103, 60401, 60415]
  6745. responses:
  6746. "200":
  6747. description: 成功。统一信封 code/message/data
  6748. /ticket/revert@v1:
  6749. post:
  6750. summary: 回退
  6751. description: 已满足闭环/待回执→处理中,原因必填;⛔ 从已闭环回退(TK-7)。主要失败:KLT-G20401、KLT-G20404、KLT-G20417。
  6752. operationId: ticket_revert
  6753. tags:
  6754. - 工单与开停交付
  6755. x-require-auth: true
  6756. x-resource-type:
  6757. $ref: '#/components/x-resource-types/ticket/code'
  6758. x-action:
  6759. $ref: '#/components/x-actions/revert/code'
  6760. x-version: v1
  6761. x-permission-visibility: catalog
  6762. requestBody:
  6763. required: true
  6764. description: JSON 请求体,业务字段置于 data
  6765. content:
  6766. application/json:
  6767. schema:
  6768. type: object
  6769. description: 统一信封请求体,业务字段放在 data 内
  6770. properties:
  6771. data:
  6772. type: object
  6773. description: 业务参数
  6774. properties:
  6775. ticket_id:
  6776. type: string
  6777. description: 工单标识(字符串下发,服务侧转 bigint)
  6778. reason:
  6779. type: string
  6780. description: 回退原因(必填)
  6781. expected_version:
  6782. type: integer
  6783. description: 乐观并发基线(读详情时的 row_version);缺省=不做并发校验
  6784. required:
  6785. - ticket_id
  6786. - reason
  6787. required:
  6788. - data
  6789. x-error-codes: [60409, 60417, 60418]
  6790. responses:
  6791. "200":
  6792. description: 成功。统一信封 code/message/data
  6793. /completion/generate@v1:
  6794. post:
  6795. summary: 生成竣工回传文件
  6796. description: 生成出参=文件元信息+可下载凭证;⛔ 同步返回文件字节流。⛔ 在回填未通过闸门(结论=成功∧明细齐∧比对通过)时生成(KLT-G20401)。重复生成⇒作废旧版本、留最新并写处理记录。
  6797. operationId: completion_generate
  6798. tags:
  6799. - 竣工与回执
  6800. x-require-auth: true
  6801. x-resource-type:
  6802. $ref: '#/components/x-resource-types/completion/code'
  6803. x-action:
  6804. $ref: '#/components/x-actions/generate/code'
  6805. x-version: v1
  6806. x-permission-visibility: catalog
  6807. requestBody:
  6808. required: true
  6809. description: JSON 请求体,业务字段置于 data
  6810. content:
  6811. application/json:
  6812. schema:
  6813. type: object
  6814. description: 统一信封请求体,业务字段放在 data 内
  6815. properties:
  6816. data:
  6817. type: object
  6818. description: 业务参数
  6819. properties:
  6820. ticket_id:
  6821. type: string
  6822. description: 工单标识(字符串下发,服务侧转 bigint)
  6823. required:
  6824. - ticket_id
  6825. required:
  6826. - data
  6827. x-error-codes: [60401, 60404, 60410, 60417]
  6828. responses:
  6829. "200":
  6830. description: 成功。统一信封 code/message/data
  6831. /completion/receipt@v1:
  6832. post:
  6833. summary: 录入运营商回执
  6834. description: 先判定完成日(TK-11):回填三件套齐全⇒取回填日期值;缺失⇒⛔ 取回执录入当日(KLT-G20418),须先补录。录入⇒待回执→已闭环+AUTO-CLOSE;同事务写完成日与闭环方式来源=回执。主要失败:KLT-G20418、KLT-G20417。⚠️ 该单已被 `completion/reject@v1` 登记驳回时本接口默认 ⛔(KLT-G20423 互斥);唯一出口=总运营提交 `override_state_conflict=true`(设计方案§3.3 纠正窗口,以回执为准;非 admin 提交该参数同样落 KLT-G20423)。
  6835. operationId: completion_receipt
  6836. tags:
  6837. - 竣工与回执
  6838. x-require-auth: true
  6839. x-resource-type:
  6840. $ref: '#/components/x-resource-types/completion/code'
  6841. x-action:
  6842. $ref: '#/components/x-actions/receipt/code'
  6843. x-version: v1
  6844. x-permission-visibility: catalog
  6845. requestBody:
  6846. required: true
  6847. description: JSON 请求体,业务字段置于 data
  6848. content:
  6849. application/json:
  6850. schema:
  6851. type: object
  6852. description: 统一信封请求体,业务字段放在 data 内
  6853. properties:
  6854. data:
  6855. type: object
  6856. description: 业务参数
  6857. properties:
  6858. ticket_id:
  6859. type: string
  6860. description: 工单标识(字符串下发,服务侧转 bigint)
  6861. completion_no:
  6862. type: string
  6863. description: 竣工单号;缺省取该单当前有效回传版本
  6864. external_order_no:
  6865. type: string
  6866. description: 运营商单号
  6867. receipt_remark:
  6868. type: string
  6869. description: 回执说明
  6870. expect_version:
  6871. type: integer
  6872. description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验
  6873. override_state_conflict:
  6874. type: boolean
  6875. description: 纠正窗口(设计方案§3.3):仅 admin、仅当该单处于竣工驳回态有效;以回执为准闭环,审计记「驳回态冲突纠正」并引用被推翻的驳回序号,⛔ 改写原驳回行。非驳回态提交本参数不产生任何效果。
  6876. required:
  6877. - ticket_id
  6878. required:
  6879. - data
  6880. x-error-codes: [60401, 60410, 60411, 60417, 60423]
  6881. responses:
  6882. "200":
  6883. description: 成功。统一信封 code/message/data
  6884. /completion/reject@v1:
  6885. post:
  6886. summary: 登记竣工驳回
  6887. description: 待回执→竣工驳回(U-115 方案 (d));理由必填(枚举 1~3 个,归一化后首位=主原因;`其他` ⛔ 与其它项混选)+补充说明 5~500 字;只可驳回该单**当前最新一次**回传,且工单须停在待回执态;⛔ 从已闭环驳回(TK-7 同闸,落 KLT-G20423)。同事务写 ticket_completion_reject + 处理记录 `completion_reject` + 审计;⛔ 接受调用方传入驳回时刻(一律服务端时间)、⛔ 新发驳回号段(对外引用=ticket_id+reject_seq)。主要失败:KLT-G20421、KLT-G20422、KLT-G20423、KLT-G20417。
  6888. operationId: completion_reject
  6889. tags:
  6890. - 竣工与回执
  6891. x-require-auth: true
  6892. x-resource-type:
  6893. $ref: '#/components/x-resource-types/completion/code'
  6894. x-action:
  6895. $ref: '#/components/x-actions/reject/code'
  6896. x-version: v1
  6897. x-permission-visibility: catalog
  6898. requestBody:
  6899. required: true
  6900. description: JSON 请求体,业务字段置于 data
  6901. content:
  6902. application/json:
  6903. schema:
  6904. type: object
  6905. description: 统一信封请求体,业务字段放在 data 内
  6906. properties:
  6907. data:
  6908. type: object
  6909. description: 业务参数
  6910. properties:
  6911. ticket_id:
  6912. type: string
  6913. description: 工单标识(字符串下发,服务侧转 bigint)
  6914. reason_codes:
  6915. type: array
  6916. description: 驳回原因码,1~3 个;「其他」⛔ 与其它项混选;服务端按枚举定义序归一化后落库
  6917. items:
  6918. type: string
  6919. enum:
  6920. - doc_mismatch
  6921. - resource_unavailable
  6922. - duplicate
  6923. - out_of_scope
  6924. - doc_missing
  6925. - site_not_ready
  6926. - other
  6927. minItems: 1
  6928. maxItems: 3
  6929. reason_text:
  6930. type: string
  6931. description: 补充说明,5~500 字(按字符计)
  6932. completion_no:
  6933. type: string
  6934. description: 期望驳回的竣工单号;与当前最新一次回传不一致 ⇒ KLT-G20421(兜住拿旧快照点按钮)
  6935. external_reject_no:
  6936. type: string
  6937. description: 运营商内部编号;⛔ 门户/合伙人回显
  6938. expect_version:
  6939. type: integer
  6940. description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验
  6941. required:
  6942. - ticket_id
  6943. - reason_codes
  6944. - reason_text
  6945. required:
  6946. - data
  6947. x-error-codes: [60401, 60410, 60421, 60422, 60423, 60417]
  6948. responses:
  6949. "200":
  6950. description: 成功。统一信封 code/message/data
  6951. /message/attach@v1:
  6952. post:
  6953. summary: 挂接并生效
  6954. description: 人工侧只有「挂接并生效」一个动作(§5.6.4,A14 已关闭):一次原子提交⇒报文置已生效+工单侧生效链(与人工回填同一个函数)+回填头改写为报文内容+明细清空+处理记录【运营商反馈】前缀。⛔ 人工指定生效日期(取报文实际日期)。报文动作与工单类型不符报 KLT-G20407(提示语逐字照抄§5.6.3)。主要失败:KLT-G20401、KLT-G20407、KLT-G20419、KLT-G20417。
  6955. operationId: message_attach
  6956. tags:
  6957. - 报文人工处置
  6958. x-require-auth: true
  6959. x-resource-type:
  6960. $ref: '#/components/x-resource-types/message/code'
  6961. x-action:
  6962. $ref: '#/components/x-actions/attach/code'
  6963. x-version: v1
  6964. x-permission-visibility: catalog
  6965. requestBody:
  6966. required: true
  6967. description: JSON 请求体,业务字段置于 data
  6968. content:
  6969. application/json:
  6970. schema:
  6971. type: object
  6972. description: 统一信封请求体,业务字段放在 data 内
  6973. properties:
  6974. data:
  6975. type: object
  6976. description: 业务参数
  6977. properties:
  6978. message_id:
  6979. type: string
  6980. description: 报文标识
  6981. ticket_id:
  6982. type: string
  6983. description: 拟挂接的工单标识
  6984. expect_version:
  6985. type: integer
  6986. description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验
  6987. required:
  6988. - message_id
  6989. - ticket_id
  6990. required:
  6991. - data
  6992. x-error-codes: [11104, 60401, 60407, 60419]
  6993. responses:
  6994. "200":
  6995. description: 成功。统一信封 code/message/data
  6996. /message/void@v1:
  6997. post:
  6998. summary: 作废报文
  6999. description: 置已作废+原因必填(缺原因报 11103)。⛔ 删除 raw_payload(§5.6.5:作废后仍可读)。主要失败:KLT-G20419。
  7000. operationId: message_void
  7001. tags:
  7002. - 报文人工处置
  7003. x-require-auth: true
  7004. x-resource-type:
  7005. $ref: '#/components/x-resource-types/message/code'
  7006. x-action:
  7007. $ref: '#/components/x-actions/void/code'
  7008. x-version: v1
  7009. x-permission-visibility: catalog
  7010. requestBody:
  7011. required: true
  7012. description: JSON 请求体,业务字段置于 data
  7013. content:
  7014. application/json:
  7015. schema:
  7016. type: object
  7017. description: 统一信封请求体,业务字段放在 data 内
  7018. properties:
  7019. data:
  7020. type: object
  7021. description: 业务参数
  7022. properties:
  7023. message_id:
  7024. type: string
  7025. description: 报文标识
  7026. void_reason:
  7027. type: string
  7028. description: 作废原因(必填)
  7029. expect_version:
  7030. type: integer
  7031. description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验
  7032. required:
  7033. - message_id
  7034. - void_reason
  7035. required:
  7036. - data
  7037. x-error-codes: [60412, 60419]
  7038. responses:
  7039. "200":
  7040. description: 成功。统一信封 code/message/data
  7041. /message/confirm_conflict@v1:
  7042. post:
  7043. summary: 冲突确认
  7044. description: 处置方式二选一:维持当前值(仅记录不生效)/采用外部值(触发与挂接相同的生效逻辑)。主要失败:KLT-G20419。
  7045. operationId: message_confirm_conflict
  7046. tags:
  7047. - 报文人工处置
  7048. x-require-auth: true
  7049. x-resource-type:
  7050. $ref: '#/components/x-resource-types/message/code'
  7051. x-action:
  7052. $ref: '#/components/x-actions/confirm_conflict/code'
  7053. x-version: v1
  7054. x-permission-visibility: catalog
  7055. requestBody:
  7056. required: true
  7057. description: JSON 请求体,业务字段置于 data
  7058. content:
  7059. application/json:
  7060. schema:
  7061. type: object
  7062. description: 统一信封请求体,业务字段放在 data 内
  7063. properties:
  7064. data:
  7065. type: object
  7066. description: 业务参数
  7067. properties:
  7068. message_id:
  7069. type: string
  7070. description: 报文标识
  7071. disposition:
  7072. type: string
  7073. description: 处置方式:as_is(维持当前值)/apply_external(采用外部值并生效);缺省 as_is
  7074. note:
  7075. type: string
  7076. description: 处置说明
  7077. expect_version:
  7078. type: integer
  7079. description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验
  7080. required:
  7081. - message_id
  7082. required:
  7083. - data
  7084. x-error-codes: [60401, 60419]
  7085. responses:
  7086. "200":
  7087. description: 成功。统一信封 code/message/data
  7088. /message/rematch@v1:
  7089. post:
  7090. summary: 改挂归属工单
  7091. description: 改挂到另一张工单+写改挂审计;⛔ 触发生效(§5.6.4:生效仍走挂接口)。主要失败:KLT-G20407、KLT-G20419。
  7092. operationId: message_rematch
  7093. tags:
  7094. - 报文人工处置
  7095. x-require-auth: true
  7096. x-resource-type:
  7097. $ref: '#/components/x-resource-types/message/code'
  7098. x-action:
  7099. $ref: '#/components/x-actions/rematch/code'
  7100. x-version: v1
  7101. x-permission-visibility: catalog
  7102. requestBody:
  7103. required: true
  7104. description: JSON 请求体,业务字段置于 data
  7105. content:
  7106. application/json:
  7107. schema:
  7108. type: object
  7109. description: 统一信封请求体,业务字段放在 data 内
  7110. properties:
  7111. data:
  7112. type: object
  7113. description: 业务参数
  7114. properties:
  7115. message_id:
  7116. type: string
  7117. description: 报文标识
  7118. ticket_id:
  7119. type: string
  7120. description: 改挂目标工单标识
  7121. expect_version:
  7122. type: integer
  7123. description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验
  7124. required:
  7125. - message_id
  7126. - ticket_id
  7127. required:
  7128. - data
  7129. x-error-codes: [60407, 60419]
  7130. responses:
  7131. "200":
  7132. description: 成功。统一信封 code/message/data
  7133. /ticket/material_grant@v1:
  7134. post:
  7135. summary: 材料上传/下载凭证
  7136. description: 一次一凭证、短时效、绑定对象键;⛔ 批量凭证、⛔ 通用上传口。purpose=upload 需 file_name,purpose=download 需 oss_key。⛔ 在对象键上接受任意路径。主要失败:11103、60056、KLT-G20420。
  7137. operationId: ticket_material_grant
  7138. tags:
  7139. - 工单与开停交付
  7140. x-require-auth: true
  7141. x-resource-type:
  7142. $ref: '#/components/x-resource-types/ticket/code'
  7143. x-action:
  7144. $ref: '#/components/x-actions/material_grant/code'
  7145. x-version: v1
  7146. x-permission-visibility: catalog
  7147. requestBody:
  7148. required: true
  7149. description: JSON 请求体,业务字段置于 data
  7150. content:
  7151. application/json:
  7152. schema:
  7153. type: object
  7154. description: 统一信封请求体,业务字段放在 data 内
  7155. properties:
  7156. data:
  7157. type: object
  7158. description: 业务参数
  7159. properties:
  7160. ticket_id:
  7161. type: string
  7162. description: 工单标识(字符串下发,服务侧转 bigint)
  7163. kind:
  7164. type: string
  7165. description: 材料类别前缀:attachment/opening/alteration/return/other
  7166. file_name:
  7167. type: string
  7168. description: 原始文件名(purpose=upload 时必填)
  7169. purpose:
  7170. type: string
  7171. description: 用途:upload(上传,缺省)/download(下载)
  7172. oss_key:
  7173. type: string
  7174. description: OSS 对象键(purpose=download 时必填)
  7175. required:
  7176. - ticket_id
  7177. - kind
  7178. required:
  7179. - data
  7180. x-error-codes: [11103, 11104, 60401, 60804]
  7181. responses:
  7182. "200":
  7183. description: 成功。统一信封 code/message/data
  7184. /ticket/material_attach@v1:
  7185. post:
  7186. summary: 登记材料元信息
  7187. description: 登记文件名+大小+上传人+时间+可下载凭证。⛔ 把上传动作记进 ticket_process_log(D2)。数量上限:工单材料 5 份、故障处理材料 5 份(超限报 KLT-G20420)。主要失败:KLT-G20420、60056。
  7188. operationId: ticket_material_attach
  7189. tags:
  7190. - 工单与开停交付
  7191. x-require-auth: true
  7192. x-resource-type:
  7193. $ref: '#/components/x-resource-types/ticket/code'
  7194. x-action:
  7195. $ref: '#/components/x-actions/material_attach/code'
  7196. x-version: v1
  7197. x-permission-visibility: catalog
  7198. requestBody:
  7199. required: true
  7200. description: JSON 请求体,业务字段置于 data
  7201. content:
  7202. application/json:
  7203. schema:
  7204. type: object
  7205. description: 统一信封请求体,业务字段放在 data 内
  7206. properties:
  7207. data:
  7208. type: object
  7209. description: 业务参数
  7210. properties:
  7211. ticket_id:
  7212. type: string
  7213. description: 工单标识(字符串下发,服务侧转 bigint)
  7214. kind:
  7215. type: string
  7216. description: 材料类别前缀:attachment/opening/alteration/return/other
  7217. oss_key:
  7218. type: string
  7219. description: OSS 对象键
  7220. file_name:
  7221. type: string
  7222. description: 原始文件名
  7223. size_bytes:
  7224. type: integer
  7225. description: 文件字节数
  7226. required:
  7227. - ticket_id
  7228. - kind
  7229. - oss_key
  7230. required:
  7231. - data
  7232. x-error-codes: [11103, 11104, 60401]
  7233. responses:
  7234. "200":
  7235. description: 成功。统一信封 code/message/data
  7236. /ticket/config_get@v1:
  7237. get:
  7238. summary: 域配置查询(闭环方式)
  7239. description: 出参=闭环方式当前值+版本+更新人/更新时间+生效说明;⛔ 暴露超期天数等系统参数(U-19)。
  7240. operationId: ticket_config_get
  7241. tags:
  7242. - 工单与开停交付
  7243. x-require-auth: true
  7244. x-resource-type:
  7245. $ref: '#/components/x-resource-types/ticket/code'
  7246. x-action:
  7247. $ref: '#/components/x-actions/config_get/code'
  7248. x-version: v1
  7249. x-permission-visibility: catalog
  7250. x-error-codes: [11104]
  7251. responses:
  7252. "200":
  7253. description: 成功。统一信封 code/message/data
  7254. /ticket/config_update@v1:
  7255. post:
  7256. summary: 域配置修改(闭环方式)
  7257. description: 仅 admin;一次原子提交⇒配置更新+历史追加+审计;⛔ 改既有工单的闭环方式(工单§5.5.3)。主要失败:KLT-G20417。
  7258. operationId: ticket_config_update
  7259. tags:
  7260. - 工单与开停交付
  7261. x-require-auth: true
  7262. x-resource-type:
  7263. $ref: '#/components/x-resource-types/ticket/code'
  7264. x-action:
  7265. $ref: '#/components/x-actions/config_update/code'
  7266. x-version: v1
  7267. x-permission-visibility: catalog
  7268. requestBody:
  7269. required: true
  7270. description: JSON 请求体,业务字段置于 data
  7271. content:
  7272. application/json:
  7273. schema:
  7274. type: object
  7275. description: 统一信封请求体,业务字段放在 data 内
  7276. properties:
  7277. data:
  7278. type: object
  7279. description: 业务参数
  7280. properties:
  7281. closure_mode:
  7282. type: string
  7283. description: 闭环方式:receipt(回执闭环)/on_complete(完成后即闭环)
  7284. expect_version:
  7285. type: integer
  7286. description: 乐观并发基线(读取口回传的 row_version);缺省=不做并发校验
  7287. reason:
  7288. type: string
  7289. description: 变更原因
  7290. required:
  7291. - closure_mode
  7292. required:
  7293. - data
  7294. x-error-codes: [11103, 11104, 60001]
  7295. responses:
  7296. "200":
  7297. description: 成功。统一信封 code/message/data
  7298. components:
  7299. x-resource-types:
  7300. health:
  7301. code: 'bos.health'
  7302. ping:
  7303. code: 'bos.ping'
  7304. auth:
  7305. code: 'bos.auth'
  7306. region:
  7307. code: 'bos.region'
  7308. account:
  7309. code: 'bos.account'
  7310. ent_team:
  7311. code: 'bos.ent_team'
  7312. ops_team:
  7313. code: 'bos.ops_team'
  7314. audit:
  7315. code: 'bos.audit'
  7316. activation:
  7317. code: 'bos.activation'
  7318. operator:
  7319. code: 'bos.operator'
  7320. operator_recon_account:
  7321. code: 'bos.operator.recon_account'
  7322. partner:
  7323. code: 'bos.partner'
  7324. partner_scope:
  7325. code: 'bos.partner.scope'
  7326. ent_team_scope:
  7327. code: 'bos.ent_team.scope'
  7328. ops_team_scope:
  7329. code: 'bos.ops_team.scope'
  7330. ops_member_scope:
  7331. code: 'bos.ops_member.scope'
  7332. ops_team_dispatch_mode:
  7333. code: 'bos.ops_team.dispatch_mode'
  7334. ops_team_coverage:
  7335. code: 'bos.ops_team.coverage'
  7336. customer:
  7337. code: 'bos.customer'
  7338. customer_attribution:
  7339. code: 'bos.customer.attribution'
  7340. import_batch:
  7341. code: 'bos.import_batch'
  7342. sub_account:
  7343. code: 'bos.sub_account'
  7344. catalog:
  7345. code: 'bos.catalog'
  7346. contract:
  7347. code: 'bos.contract'
  7348. subscription:
  7349. code: 'bos.subscription'
  7350. cost_item:
  7351. code: 'bos.cost_item'
  7352. cost_amount:
  7353. code: 'bos.cost_amount'
  7354. share_rule:
  7355. code: 'bos.share_rule'
  7356. opsview:
  7357. code: 'bos.opsview'
  7358. jobs:
  7359. code: 'bos.jobs'
  7360. billing_config:
  7361. code: 'bos.billing_config'
  7362. recon:
  7363. code: 'bos.recon'
  7364. bill:
  7365. code: 'bos.bill'
  7366. correction:
  7367. code: 'bos.correction'
  7368. ticket:
  7369. code: 'bos.ticket'
  7370. completion:
  7371. code: 'bos.completion'
  7372. message:
  7373. code: 'bos.message'
  7374. x-actions:
  7375. view:
  7376. code: 'view'
  7377. create:
  7378. code: 'create'
  7379. update:
  7380. code: 'update'
  7381. delete:
  7382. code: 'delete'
  7383. list:
  7384. code: 'list'
  7385. manage:
  7386. code: 'manage'
  7387. export:
  7388. code: 'export'
  7389. detail:
  7390. code: 'detail'
  7391. pending_queue:
  7392. code: 'pending_queue'
  7393. backfill_todo:
  7394. code: 'backfill_todo'
  7395. todo_counts:
  7396. code: 'todo_counts'
  7397. trace:
  7398. code: 'trace'
  7399. pending:
  7400. code: 'pending'
  7401. assign:
  7402. code: 'assign'
  7403. dispatch_auto:
  7404. code: 'dispatch_auto'
  7405. delegate:
  7406. code: 'delegate'
  7407. start:
  7408. code: 'start'
  7409. backfill:
  7410. code: 'backfill'
  7411. check_done:
  7412. code: 'check_done'
  7413. mark_done:
  7414. code: 'mark_done'
  7415. handover_save:
  7416. code: 'handover_save'
  7417. close:
  7418. code: 'close'
  7419. withdraw:
  7420. code: 'withdraw'
  7421. confirm_close:
  7422. code: 'confirm_close'
  7423. defer:
  7424. code: 'defer'
  7425. revert:
  7426. code: 'revert'
  7427. generate:
  7428. code: 'generate'
  7429. receipt:
  7430. code: 'receipt'
  7431. reject:
  7432. code: 'reject'
  7433. attach:
  7434. code: 'attach'
  7435. void:
  7436. code: 'void'
  7437. confirm_conflict:
  7438. code: 'confirm_conflict'
  7439. rematch:
  7440. code: 'rematch'
  7441. material_grant:
  7442. code: 'material_grant'
  7443. material_attach:
  7444. code: 'material_attach'
  7445. config_get:
  7446. code: 'config_get'
  7447. config_update:
  7448. code: 'config_update'
  7449. schemas:
  7450. ApiEnvelope:
  7451. type: object
  7452. description: 统一响应信封
  7453. properties:
  7454. code:
  7455. type: integer
  7456. description: 业务/协议码,0 表示成功
  7457. message:
  7458. type: string
  7459. description: 提示信息
  7460. error_code:
  7461. type: string
  7462. description: 稳定错误码(失败时)
  7463. data:
  7464. description: 业务数据载荷
  7465. required:
  7466. - code
  7467. - message
  7468. PageQuery:
  7469. type: object
  7470. description: 分页查询(0 基)
  7471. properties:
  7472. page:
  7473. type: integer
  7474. description: 页码(0 基索引,默认 0)
  7475. minimum: 0
  7476. default: 0
  7477. page_size:
  7478. type: integer
  7479. description: 每页条数(默认 20,上限 200)
  7480. minimum: 1
  7481. maximum: 200
  7482. default: 20
  7483. keyword:
  7484. type: string
  7485. description: 关键字筛选(可选)