openapi.json 265 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534
  1. {
  2. "openapi": "3.0.3",
  3. "info": {
  4. "title": "云泉智配小程序 API",
  5. "version": "1.0.0",
  6. "description": "按实际 /api/mini/v1 路由整理。金额为人民币整数分,时间为Asia/Shanghai的YYYY-MM-DD HH:mm:ss(非RFC3339)。POST JSON;未知业务字段拒绝。普通请求≤65536字节,照片≤3000000。GET/POST成功统一code/message/data/request_id,照片和HEAD除外。业务身份必须后台绑定,后台JWT不能用于本API。所有资源权限由服务器复核。购水订单仅给客户成交时直接归属代理按后台当前比例计提佣金,默认一级10%、二级5%、三级2%,当前待结算;微信支付、佣金结算与提现、奖励与设备绑定尚未开放,以capabilities为准。OPTIONS由边界中间件返回204(浏览器Origin须在白名单);health/session的POST/PUT/PATCH/DELETE返回40501,不作为业务操作列入。"
  7. },
  8. "servers": [
  9. {
  10. "url": "http://127.0.0.1:8787/api/mini/v1",
  11. "description": "本机调试;真机替换为已配置的HTTPS合法域名"
  12. }
  13. ],
  14. "security": [
  15. {
  16. "MiniBearer": []
  17. }
  18. ],
  19. "tags": [
  20. {
  21. "name": "公共与登录"
  22. },
  23. {
  24. "name": "套餐"
  25. },
  26. {
  27. "name": "企业"
  28. },
  29. {
  30. "name": "司机"
  31. },
  32. {
  33. "name": "代理"
  34. },
  35. {
  36. "name": "照片"
  37. }
  38. ],
  39. "paths": {
  40. "/health": {
  41. "get": {
  42. "tags": [
  43. "公共与登录"
  44. ],
  45. "summary": "服务状态",
  46. "operationId": "get_health",
  47. "description": "仅表示 API 服务可响应,不代表支付、微信凭据或全部基础设施可用。",
  48. "parameters": [],
  49. "responses": {
  50. "200": {
  51. "description": "成功;JSON 业务码 code=0",
  52. "content": {
  53. "application/json": {
  54. "schema": {
  55. "type": "object",
  56. "properties": {
  57. "code": {
  58. "type": "integer",
  59. "enum": [
  60. 0
  61. ]
  62. },
  63. "message": {
  64. "type": "string",
  65. "example": "ok"
  66. },
  67. "data": {
  68. "$ref": "#/components/schemas/Health"
  69. },
  70. "request_id": {
  71. "type": "string",
  72. "pattern": "^[a-f0-9]{32}$"
  73. }
  74. },
  75. "required": [
  76. "code",
  77. "message",
  78. "data",
  79. "request_id"
  80. ]
  81. }
  82. }
  83. }
  84. },
  85. "400": {
  86. "$ref": "#/components/responses/Error"
  87. },
  88. "403": {
  89. "$ref": "#/components/responses/Error"
  90. },
  91. "404": {
  92. "$ref": "#/components/responses/Error"
  93. },
  94. "413": {
  95. "$ref": "#/components/responses/Error"
  96. },
  97. "415": {
  98. "$ref": "#/components/responses/Error"
  99. },
  100. "422": {
  101. "$ref": "#/components/responses/Error"
  102. },
  103. "429": {
  104. "$ref": "#/components/responses/Error"
  105. },
  106. "500": {
  107. "$ref": "#/components/responses/Error"
  108. },
  109. "503": {
  110. "$ref": "#/components/responses/Error"
  111. }
  112. },
  113. "security": []
  114. },
  115. "head": {
  116. "tags": [
  117. "公共与登录"
  118. ],
  119. "summary": "服务状态(无响应体)",
  120. "operationId": "head_health",
  121. "description": "服务状态(无响应体)",
  122. "parameters": [],
  123. "responses": {
  124. "200": {
  125. "description": "成功,无响应体"
  126. },
  127. "400": {
  128. "$ref": "#/components/responses/Error"
  129. },
  130. "403": {
  131. "$ref": "#/components/responses/Error"
  132. },
  133. "404": {
  134. "$ref": "#/components/responses/Error"
  135. },
  136. "413": {
  137. "$ref": "#/components/responses/Error"
  138. },
  139. "415": {
  140. "$ref": "#/components/responses/Error"
  141. },
  142. "422": {
  143. "$ref": "#/components/responses/Error"
  144. },
  145. "429": {
  146. "$ref": "#/components/responses/Error"
  147. },
  148. "500": {
  149. "$ref": "#/components/responses/Error"
  150. },
  151. "503": {
  152. "$ref": "#/components/responses/Error"
  153. }
  154. },
  155. "security": []
  156. }
  157. },
  158. "/config": {
  159. "get": {
  160. "tags": [
  161. "公共与登录"
  162. ],
  163. "summary": "前端配置与能力开关",
  164. "operationId": "get_config",
  165. "description": "前端配置与能力开关",
  166. "parameters": [],
  167. "responses": {
  168. "200": {
  169. "description": "成功;JSON 业务码 code=0",
  170. "content": {
  171. "application/json": {
  172. "schema": {
  173. "type": "object",
  174. "properties": {
  175. "code": {
  176. "type": "integer",
  177. "enum": [
  178. 0
  179. ]
  180. },
  181. "message": {
  182. "type": "string",
  183. "example": "ok"
  184. },
  185. "data": {
  186. "$ref": "#/components/schemas/Config"
  187. },
  188. "request_id": {
  189. "type": "string",
  190. "pattern": "^[a-f0-9]{32}$"
  191. }
  192. },
  193. "required": [
  194. "code",
  195. "message",
  196. "data",
  197. "request_id"
  198. ]
  199. }
  200. }
  201. }
  202. },
  203. "400": {
  204. "$ref": "#/components/responses/Error"
  205. },
  206. "403": {
  207. "$ref": "#/components/responses/Error"
  208. },
  209. "404": {
  210. "$ref": "#/components/responses/Error"
  211. },
  212. "413": {
  213. "$ref": "#/components/responses/Error"
  214. },
  215. "415": {
  216. "$ref": "#/components/responses/Error"
  217. },
  218. "422": {
  219. "$ref": "#/components/responses/Error"
  220. },
  221. "429": {
  222. "$ref": "#/components/responses/Error"
  223. },
  224. "500": {
  225. "$ref": "#/components/responses/Error"
  226. },
  227. "503": {
  228. "$ref": "#/components/responses/Error"
  229. }
  230. },
  231. "security": []
  232. }
  233. },
  234. "/auth/wechat": {
  235. "post": {
  236. "tags": [
  237. "公共与登录"
  238. ],
  239. "summary": "微信 code 登录",
  240. "operationId": "post_auth_wechat",
  241. "description": "wx.login 获取 code 后提交。未绑定业务身份时 identities=[];需后台明确授权。未配置微信凭据返回50301,不能伪造用户登录。",
  242. "parameters": [],
  243. "responses": {
  244. "200": {
  245. "description": "成功;JSON 业务码 code=0",
  246. "content": {
  247. "application/json": {
  248. "schema": {
  249. "type": "object",
  250. "properties": {
  251. "code": {
  252. "type": "integer",
  253. "enum": [
  254. 0
  255. ]
  256. },
  257. "message": {
  258. "type": "string",
  259. "example": "ok"
  260. },
  261. "data": {
  262. "$ref": "#/components/schemas/Login"
  263. },
  264. "request_id": {
  265. "type": "string",
  266. "pattern": "^[a-f0-9]{32}$"
  267. }
  268. },
  269. "required": [
  270. "code",
  271. "message",
  272. "data",
  273. "request_id"
  274. ]
  275. }
  276. }
  277. }
  278. },
  279. "400": {
  280. "$ref": "#/components/responses/Error"
  281. },
  282. "401": {
  283. "$ref": "#/components/responses/Error"
  284. },
  285. "403": {
  286. "$ref": "#/components/responses/Error"
  287. },
  288. "404": {
  289. "$ref": "#/components/responses/Error"
  290. },
  291. "413": {
  292. "$ref": "#/components/responses/Error"
  293. },
  294. "415": {
  295. "$ref": "#/components/responses/Error"
  296. },
  297. "422": {
  298. "$ref": "#/components/responses/Error"
  299. },
  300. "429": {
  301. "$ref": "#/components/responses/Error"
  302. },
  303. "500": {
  304. "$ref": "#/components/responses/Error"
  305. },
  306. "503": {
  307. "$ref": "#/components/responses/Error"
  308. }
  309. },
  310. "security": [],
  311. "requestBody": {
  312. "required": true,
  313. "content": {
  314. "application/json": {
  315. "schema": {
  316. "$ref": "#/components/schemas/LoginRequest"
  317. },
  318. "example": {
  319. "code": "replace-with-wx-login-code"
  320. }
  321. }
  322. }
  323. }
  324. }
  325. },
  326. "/auth/logout": {
  327. "post": {
  328. "tags": [
  329. "公共与登录"
  330. ],
  331. "summary": "退出登录",
  332. "operationId": "post_auth_logout",
  333. "description": "撤销当前令牌;无必填请求体,可发送 {}。",
  334. "parameters": [],
  335. "responses": {
  336. "200": {
  337. "description": "成功;JSON 业务码 code=0",
  338. "content": {
  339. "application/json": {
  340. "schema": {
  341. "type": "object",
  342. "properties": {
  343. "code": {
  344. "type": "integer",
  345. "enum": [
  346. 0
  347. ]
  348. },
  349. "message": {
  350. "type": "string",
  351. "example": "ok"
  352. },
  353. "data": {
  354. "type": "object",
  355. "properties": {
  356. "logged_out": {
  357. "type": "boolean"
  358. }
  359. },
  360. "required": [
  361. "logged_out"
  362. ]
  363. },
  364. "request_id": {
  365. "type": "string",
  366. "pattern": "^[a-f0-9]{32}$"
  367. }
  368. },
  369. "required": [
  370. "code",
  371. "message",
  372. "data",
  373. "request_id"
  374. ]
  375. }
  376. }
  377. }
  378. },
  379. "400": {
  380. "$ref": "#/components/responses/Error"
  381. },
  382. "401": {
  383. "$ref": "#/components/responses/Error"
  384. },
  385. "403": {
  386. "$ref": "#/components/responses/Error"
  387. },
  388. "404": {
  389. "$ref": "#/components/responses/Error"
  390. },
  391. "409": {
  392. "$ref": "#/components/responses/Error"
  393. },
  394. "413": {
  395. "$ref": "#/components/responses/Error"
  396. },
  397. "415": {
  398. "$ref": "#/components/responses/Error"
  399. },
  400. "422": {
  401. "$ref": "#/components/responses/Error"
  402. },
  403. "500": {
  404. "$ref": "#/components/responses/Error"
  405. },
  406. "503": {
  407. "$ref": "#/components/responses/Error"
  408. }
  409. }
  410. }
  411. },
  412. "/session": {
  413. "get": {
  414. "tags": [
  415. "公共与登录"
  416. ],
  417. "summary": "会话主体",
  418. "operationId": "get_session",
  419. "description": "会话主体",
  420. "parameters": [],
  421. "responses": {
  422. "200": {
  423. "description": "成功;JSON 业务码 code=0",
  424. "content": {
  425. "application/json": {
  426. "schema": {
  427. "type": "object",
  428. "properties": {
  429. "code": {
  430. "type": "integer",
  431. "enum": [
  432. 0
  433. ]
  434. },
  435. "message": {
  436. "type": "string",
  437. "example": "ok"
  438. },
  439. "data": {
  440. "type": "object",
  441. "properties": {
  442. "user_id": {
  443. "type": "string"
  444. }
  445. },
  446. "required": [
  447. "user_id"
  448. ]
  449. },
  450. "request_id": {
  451. "type": "string",
  452. "pattern": "^[a-f0-9]{32}$"
  453. }
  454. },
  455. "required": [
  456. "code",
  457. "message",
  458. "data",
  459. "request_id"
  460. ]
  461. }
  462. }
  463. }
  464. },
  465. "400": {
  466. "$ref": "#/components/responses/Error"
  467. },
  468. "401": {
  469. "$ref": "#/components/responses/Error"
  470. },
  471. "403": {
  472. "$ref": "#/components/responses/Error"
  473. },
  474. "404": {
  475. "$ref": "#/components/responses/Error"
  476. },
  477. "409": {
  478. "$ref": "#/components/responses/Error"
  479. },
  480. "413": {
  481. "$ref": "#/components/responses/Error"
  482. },
  483. "415": {
  484. "$ref": "#/components/responses/Error"
  485. },
  486. "422": {
  487. "$ref": "#/components/responses/Error"
  488. },
  489. "500": {
  490. "$ref": "#/components/responses/Error"
  491. },
  492. "503": {
  493. "$ref": "#/components/responses/Error"
  494. }
  495. }
  496. },
  497. "head": {
  498. "tags": [
  499. "公共与登录"
  500. ],
  501. "summary": "检查会话(无响应体)",
  502. "operationId": "head_session",
  503. "description": "检查会话(无响应体)",
  504. "parameters": [],
  505. "responses": {
  506. "200": {
  507. "description": "令牌有效,无响应体"
  508. },
  509. "400": {
  510. "$ref": "#/components/responses/Error"
  511. },
  512. "401": {
  513. "$ref": "#/components/responses/Error"
  514. },
  515. "403": {
  516. "$ref": "#/components/responses/Error"
  517. },
  518. "404": {
  519. "$ref": "#/components/responses/Error"
  520. },
  521. "409": {
  522. "$ref": "#/components/responses/Error"
  523. },
  524. "413": {
  525. "$ref": "#/components/responses/Error"
  526. },
  527. "415": {
  528. "$ref": "#/components/responses/Error"
  529. },
  530. "422": {
  531. "$ref": "#/components/responses/Error"
  532. },
  533. "500": {
  534. "$ref": "#/components/responses/Error"
  535. },
  536. "503": {
  537. "$ref": "#/components/responses/Error"
  538. }
  539. }
  540. }
  541. },
  542. "/packages": {
  543. "get": {
  544. "tags": [
  545. "套餐"
  546. ],
  547. "summary": "套餐列表",
  548. "operationId": "get_packages",
  549. "description": "套餐列表",
  550. "parameters": [
  551. {
  552. "name": "page",
  553. "in": "query",
  554. "required": false,
  555. "schema": {
  556. "type": "integer",
  557. "format": "int64",
  558. "minimum": 1,
  559. "maximum": 1000000,
  560. "default": 1
  561. }
  562. },
  563. {
  564. "name": "page_size",
  565. "in": "query",
  566. "required": false,
  567. "schema": {
  568. "type": "integer",
  569. "format": "int64",
  570. "minimum": 1,
  571. "maximum": 100,
  572. "default": 20
  573. }
  574. },
  575. {
  576. "name": "keyword",
  577. "in": "query",
  578. "required": false,
  579. "schema": {
  580. "type": "string",
  581. "maxLength": 120
  582. }
  583. },
  584. {
  585. "name": "category",
  586. "in": "query",
  587. "required": false,
  588. "schema": {
  589. "type": "string",
  590. "enum": [
  591. "all"
  592. ]
  593. }
  594. }
  595. ],
  596. "responses": {
  597. "200": {
  598. "description": "成功;JSON 业务码 code=0",
  599. "content": {
  600. "application/json": {
  601. "schema": {
  602. "type": "object",
  603. "properties": {
  604. "code": {
  605. "type": "integer",
  606. "enum": [
  607. 0
  608. ]
  609. },
  610. "message": {
  611. "type": "string",
  612. "example": "ok"
  613. },
  614. "data": {
  615. "$ref": "#/components/schemas/PackagePage"
  616. },
  617. "request_id": {
  618. "type": "string",
  619. "pattern": "^[a-f0-9]{32}$"
  620. }
  621. },
  622. "required": [
  623. "code",
  624. "message",
  625. "data",
  626. "request_id"
  627. ]
  628. }
  629. }
  630. }
  631. },
  632. "400": {
  633. "$ref": "#/components/responses/Error"
  634. },
  635. "403": {
  636. "$ref": "#/components/responses/Error"
  637. },
  638. "404": {
  639. "$ref": "#/components/responses/Error"
  640. },
  641. "413": {
  642. "$ref": "#/components/responses/Error"
  643. },
  644. "415": {
  645. "$ref": "#/components/responses/Error"
  646. },
  647. "422": {
  648. "$ref": "#/components/responses/Error"
  649. },
  650. "429": {
  651. "$ref": "#/components/responses/Error"
  652. },
  653. "500": {
  654. "$ref": "#/components/responses/Error"
  655. },
  656. "503": {
  657. "$ref": "#/components/responses/Error"
  658. }
  659. },
  660. "security": []
  661. }
  662. },
  663. "/packages/{id}": {
  664. "get": {
  665. "tags": [
  666. "套餐"
  667. ],
  668. "summary": "套餐详情",
  669. "operationId": "get_packages_id",
  670. "description": "套餐详情",
  671. "parameters": [
  672. {
  673. "name": "id",
  674. "in": "path",
  675. "required": true,
  676. "schema": {
  677. "type": "integer",
  678. "format": "int64",
  679. "description": "正整数资源 ID",
  680. "minimum": 1,
  681. "maximum": 2147483647
  682. }
  683. }
  684. ],
  685. "responses": {
  686. "200": {
  687. "description": "成功;JSON 业务码 code=0",
  688. "content": {
  689. "application/json": {
  690. "schema": {
  691. "type": "object",
  692. "properties": {
  693. "code": {
  694. "type": "integer",
  695. "enum": [
  696. 0
  697. ]
  698. },
  699. "message": {
  700. "type": "string",
  701. "example": "ok"
  702. },
  703. "data": {
  704. "$ref": "#/components/schemas/Package"
  705. },
  706. "request_id": {
  707. "type": "string",
  708. "pattern": "^[a-f0-9]{32}$"
  709. }
  710. },
  711. "required": [
  712. "code",
  713. "message",
  714. "data",
  715. "request_id"
  716. ]
  717. }
  718. }
  719. }
  720. },
  721. "400": {
  722. "$ref": "#/components/responses/Error"
  723. },
  724. "403": {
  725. "$ref": "#/components/responses/Error"
  726. },
  727. "404": {
  728. "$ref": "#/components/responses/Error"
  729. },
  730. "413": {
  731. "$ref": "#/components/responses/Error"
  732. },
  733. "415": {
  734. "$ref": "#/components/responses/Error"
  735. },
  736. "422": {
  737. "$ref": "#/components/responses/Error"
  738. },
  739. "429": {
  740. "$ref": "#/components/responses/Error"
  741. },
  742. "500": {
  743. "$ref": "#/components/responses/Error"
  744. },
  745. "503": {
  746. "$ref": "#/components/responses/Error"
  747. }
  748. },
  749. "security": []
  750. }
  751. },
  752. "/me": {
  753. "get": {
  754. "tags": [
  755. "公共与登录"
  756. ],
  757. "summary": "当前用户与业务身份",
  758. "operationId": "get_me",
  759. "description": "当前用户与业务身份",
  760. "parameters": [
  761. {
  762. "name": "enterprise_id",
  763. "in": "query",
  764. "required": false,
  765. "schema": {
  766. "type": "integer",
  767. "format": "int64",
  768. "description": "正整数资源 ID",
  769. "minimum": 1,
  770. "maximum": 2147483647
  771. },
  772. "description": "选填;传入时返回该企业信息和权益汇总并校验权限"
  773. }
  774. ],
  775. "responses": {
  776. "200": {
  777. "description": "成功;JSON 业务码 code=0",
  778. "content": {
  779. "application/json": {
  780. "schema": {
  781. "type": "object",
  782. "properties": {
  783. "code": {
  784. "type": "integer",
  785. "enum": [
  786. 0
  787. ]
  788. },
  789. "message": {
  790. "type": "string",
  791. "example": "ok"
  792. },
  793. "data": {
  794. "$ref": "#/components/schemas/Profile"
  795. },
  796. "request_id": {
  797. "type": "string",
  798. "pattern": "^[a-f0-9]{32}$"
  799. }
  800. },
  801. "required": [
  802. "code",
  803. "message",
  804. "data",
  805. "request_id"
  806. ]
  807. }
  808. }
  809. }
  810. },
  811. "400": {
  812. "$ref": "#/components/responses/Error"
  813. },
  814. "401": {
  815. "$ref": "#/components/responses/Error"
  816. },
  817. "403": {
  818. "$ref": "#/components/responses/Error"
  819. },
  820. "404": {
  821. "$ref": "#/components/responses/Error"
  822. },
  823. "409": {
  824. "$ref": "#/components/responses/Error"
  825. },
  826. "413": {
  827. "$ref": "#/components/responses/Error"
  828. },
  829. "415": {
  830. "$ref": "#/components/responses/Error"
  831. },
  832. "422": {
  833. "$ref": "#/components/responses/Error"
  834. },
  835. "500": {
  836. "$ref": "#/components/responses/Error"
  837. },
  838. "503": {
  839. "$ref": "#/components/responses/Error"
  840. }
  841. }
  842. }
  843. },
  844. "/addresses": {
  845. "get": {
  846. "tags": [
  847. "公共与登录"
  848. ],
  849. "summary": "可访问的企业地址列表",
  850. "operationId": "get_addresses",
  851. "description": "可访问的企业地址列表",
  852. "parameters": [],
  853. "responses": {
  854. "200": {
  855. "description": "成功;JSON 业务码 code=0",
  856. "content": {
  857. "application/json": {
  858. "schema": {
  859. "type": "object",
  860. "properties": {
  861. "code": {
  862. "type": "integer",
  863. "enum": [
  864. 0
  865. ]
  866. },
  867. "message": {
  868. "type": "string",
  869. "example": "ok"
  870. },
  871. "data": {
  872. "$ref": "#/components/schemas/Addresses"
  873. },
  874. "request_id": {
  875. "type": "string",
  876. "pattern": "^[a-f0-9]{32}$"
  877. }
  878. },
  879. "required": [
  880. "code",
  881. "message",
  882. "data",
  883. "request_id"
  884. ]
  885. }
  886. }
  887. }
  888. },
  889. "400": {
  890. "$ref": "#/components/responses/Error"
  891. },
  892. "401": {
  893. "$ref": "#/components/responses/Error"
  894. },
  895. "403": {
  896. "$ref": "#/components/responses/Error"
  897. },
  898. "404": {
  899. "$ref": "#/components/responses/Error"
  900. },
  901. "409": {
  902. "$ref": "#/components/responses/Error"
  903. },
  904. "413": {
  905. "$ref": "#/components/responses/Error"
  906. },
  907. "415": {
  908. "$ref": "#/components/responses/Error"
  909. },
  910. "422": {
  911. "$ref": "#/components/responses/Error"
  912. },
  913. "500": {
  914. "$ref": "#/components/responses/Error"
  915. },
  916. "503": {
  917. "$ref": "#/components/responses/Error"
  918. }
  919. }
  920. }
  921. },
  922. "/enterprises/{enterprise}/home": {
  923. "get": {
  924. "tags": [
  925. "企业"
  926. ],
  927. "summary": "企业首页",
  928. "operationId": "get_enterprises_enterprise_home",
  929. "description": "企业管理员或成员可读。权益按企业+SKU汇总;没有消息数据时 unread_messages=null。",
  930. "parameters": [
  931. {
  932. "name": "enterprise",
  933. "in": "path",
  934. "required": true,
  935. "schema": {
  936. "type": "integer",
  937. "format": "int64",
  938. "description": "正整数资源 ID",
  939. "minimum": 1,
  940. "maximum": 2147483647
  941. }
  942. }
  943. ],
  944. "responses": {
  945. "200": {
  946. "description": "成功;JSON 业务码 code=0",
  947. "content": {
  948. "application/json": {
  949. "schema": {
  950. "type": "object",
  951. "properties": {
  952. "code": {
  953. "type": "integer",
  954. "enum": [
  955. 0
  956. ]
  957. },
  958. "message": {
  959. "type": "string",
  960. "example": "ok"
  961. },
  962. "data": {
  963. "$ref": "#/components/schemas/Home"
  964. },
  965. "request_id": {
  966. "type": "string",
  967. "pattern": "^[a-f0-9]{32}$"
  968. }
  969. },
  970. "required": [
  971. "code",
  972. "message",
  973. "data",
  974. "request_id"
  975. ]
  976. }
  977. }
  978. }
  979. },
  980. "400": {
  981. "$ref": "#/components/responses/Error"
  982. },
  983. "401": {
  984. "$ref": "#/components/responses/Error"
  985. },
  986. "403": {
  987. "$ref": "#/components/responses/Error"
  988. },
  989. "404": {
  990. "$ref": "#/components/responses/Error"
  991. },
  992. "409": {
  993. "$ref": "#/components/responses/Error"
  994. },
  995. "413": {
  996. "$ref": "#/components/responses/Error"
  997. },
  998. "415": {
  999. "$ref": "#/components/responses/Error"
  1000. },
  1001. "422": {
  1002. "$ref": "#/components/responses/Error"
  1003. },
  1004. "500": {
  1005. "$ref": "#/components/responses/Error"
  1006. },
  1007. "503": {
  1008. "$ref": "#/components/responses/Error"
  1009. }
  1010. }
  1011. }
  1012. },
  1013. "/enterprises/{enterprise}/rights": {
  1014. "get": {
  1015. "tags": [
  1016. "企业"
  1017. ],
  1018. "summary": "权益与现场库存",
  1019. "operationId": "get_enterprises_enterprise_rights",
  1020. "description": "企业管理员或成员可读。不是按购买订单拆分的水卡,不提供虚构的有效期。",
  1021. "parameters": [
  1022. {
  1023. "name": "enterprise",
  1024. "in": "path",
  1025. "required": true,
  1026. "schema": {
  1027. "type": "integer",
  1028. "format": "int64",
  1029. "description": "正整数资源 ID",
  1030. "minimum": 1,
  1031. "maximum": 2147483647
  1032. }
  1033. }
  1034. ],
  1035. "responses": {
  1036. "200": {
  1037. "description": "成功;JSON 业务码 code=0",
  1038. "content": {
  1039. "application/json": {
  1040. "schema": {
  1041. "type": "object",
  1042. "properties": {
  1043. "code": {
  1044. "type": "integer",
  1045. "enum": [
  1046. 0
  1047. ]
  1048. },
  1049. "message": {
  1050. "type": "string",
  1051. "example": "ok"
  1052. },
  1053. "data": {
  1054. "$ref": "#/components/schemas/Rights"
  1055. },
  1056. "request_id": {
  1057. "type": "string",
  1058. "pattern": "^[a-f0-9]{32}$"
  1059. }
  1060. },
  1061. "required": [
  1062. "code",
  1063. "message",
  1064. "data",
  1065. "request_id"
  1066. ]
  1067. }
  1068. }
  1069. }
  1070. },
  1071. "400": {
  1072. "$ref": "#/components/responses/Error"
  1073. },
  1074. "401": {
  1075. "$ref": "#/components/responses/Error"
  1076. },
  1077. "403": {
  1078. "$ref": "#/components/responses/Error"
  1079. },
  1080. "404": {
  1081. "$ref": "#/components/responses/Error"
  1082. },
  1083. "409": {
  1084. "$ref": "#/components/responses/Error"
  1085. },
  1086. "413": {
  1087. "$ref": "#/components/responses/Error"
  1088. },
  1089. "415": {
  1090. "$ref": "#/components/responses/Error"
  1091. },
  1092. "422": {
  1093. "$ref": "#/components/responses/Error"
  1094. },
  1095. "500": {
  1096. "$ref": "#/components/responses/Error"
  1097. },
  1098. "503": {
  1099. "$ref": "#/components/responses/Error"
  1100. }
  1101. }
  1102. }
  1103. },
  1104. "/enterprises/{enterprise}/ledger": {
  1105. "get": {
  1106. "tags": [
  1107. "企业"
  1108. ],
  1109. "summary": "权益相关流水",
  1110. "operationId": "get_enterprises_enterprise_ledger",
  1111. "description": "企业管理员或成员可读。quantity 是操作桶数;预约是冻结、取消是释放,不能直接将流水数量全部求和作为余额。",
  1112. "parameters": [
  1113. {
  1114. "name": "enterprise",
  1115. "in": "path",
  1116. "required": true,
  1117. "schema": {
  1118. "type": "integer",
  1119. "format": "int64",
  1120. "description": "正整数资源 ID",
  1121. "minimum": 1,
  1122. "maximum": 2147483647
  1123. }
  1124. },
  1125. {
  1126. "name": "page",
  1127. "in": "query",
  1128. "required": false,
  1129. "schema": {
  1130. "type": "integer",
  1131. "format": "int64",
  1132. "minimum": 1,
  1133. "maximum": 1000000,
  1134. "default": 1
  1135. }
  1136. },
  1137. {
  1138. "name": "page_size",
  1139. "in": "query",
  1140. "required": false,
  1141. "schema": {
  1142. "type": "integer",
  1143. "format": "int64",
  1144. "minimum": 1,
  1145. "maximum": 100,
  1146. "default": 20
  1147. }
  1148. }
  1149. ],
  1150. "responses": {
  1151. "200": {
  1152. "description": "成功;JSON 业务码 code=0",
  1153. "content": {
  1154. "application/json": {
  1155. "schema": {
  1156. "type": "object",
  1157. "properties": {
  1158. "code": {
  1159. "type": "integer",
  1160. "enum": [
  1161. 0
  1162. ]
  1163. },
  1164. "message": {
  1165. "type": "string",
  1166. "example": "ok"
  1167. },
  1168. "data": {
  1169. "$ref": "#/components/schemas/LedgerPage"
  1170. },
  1171. "request_id": {
  1172. "type": "string",
  1173. "pattern": "^[a-f0-9]{32}$"
  1174. }
  1175. },
  1176. "required": [
  1177. "code",
  1178. "message",
  1179. "data",
  1180. "request_id"
  1181. ]
  1182. }
  1183. }
  1184. }
  1185. },
  1186. "400": {
  1187. "$ref": "#/components/responses/Error"
  1188. },
  1189. "401": {
  1190. "$ref": "#/components/responses/Error"
  1191. },
  1192. "403": {
  1193. "$ref": "#/components/responses/Error"
  1194. },
  1195. "404": {
  1196. "$ref": "#/components/responses/Error"
  1197. },
  1198. "409": {
  1199. "$ref": "#/components/responses/Error"
  1200. },
  1201. "413": {
  1202. "$ref": "#/components/responses/Error"
  1203. },
  1204. "415": {
  1205. "$ref": "#/components/responses/Error"
  1206. },
  1207. "422": {
  1208. "$ref": "#/components/responses/Error"
  1209. },
  1210. "500": {
  1211. "$ref": "#/components/responses/Error"
  1212. },
  1213. "503": {
  1214. "$ref": "#/components/responses/Error"
  1215. }
  1216. }
  1217. }
  1218. },
  1219. "/enterprises/{enterprise}/orders": {
  1220. "get": {
  1221. "tags": [
  1222. "企业"
  1223. ],
  1224. "summary": "企业订单列表",
  1225. "operationId": "get_enterprises_enterprise_orders",
  1226. "description": "企业管理员或成员可读。按 kind 选择三种独立数据结构;这些订单 ID 不通用。",
  1227. "parameters": [
  1228. {
  1229. "name": "enterprise",
  1230. "in": "path",
  1231. "required": true,
  1232. "schema": {
  1233. "type": "integer",
  1234. "format": "int64",
  1235. "description": "正整数资源 ID",
  1236. "minimum": 1,
  1237. "maximum": 2147483647
  1238. }
  1239. },
  1240. {
  1241. "name": "page",
  1242. "in": "query",
  1243. "required": false,
  1244. "schema": {
  1245. "type": "integer",
  1246. "format": "int64",
  1247. "minimum": 1,
  1248. "maximum": 1000000,
  1249. "default": 1
  1250. }
  1251. },
  1252. {
  1253. "name": "page_size",
  1254. "in": "query",
  1255. "required": false,
  1256. "schema": {
  1257. "type": "integer",
  1258. "format": "int64",
  1259. "minimum": 1,
  1260. "maximum": 100,
  1261. "default": 20
  1262. }
  1263. },
  1264. {
  1265. "name": "kind",
  1266. "in": "query",
  1267. "required": false,
  1268. "schema": {
  1269. "type": "string",
  1270. "enum": [
  1271. "purchases",
  1272. "deliveries",
  1273. "checkouts"
  1274. ],
  1275. "default": "deliveries"
  1276. }
  1277. },
  1278. {
  1279. "name": "status",
  1280. "in": "query",
  1281. "required": false,
  1282. "schema": {
  1283. "type": "string",
  1284. "enum": [
  1285. "all",
  1286. "pending",
  1287. "transit",
  1288. "completed",
  1289. "cancelled",
  1290. "exception"
  1291. ],
  1292. "default": "all"
  1293. },
  1294. "description": "仅 kind=deliveries 生效;pending 包含 pending/assigned;exception 对应 returning/returned"
  1295. }
  1296. ],
  1297. "responses": {
  1298. "200": {
  1299. "description": "成功;JSON 业务码 code=0",
  1300. "content": {
  1301. "application/json": {
  1302. "schema": {
  1303. "type": "object",
  1304. "properties": {
  1305. "code": {
  1306. "type": "integer",
  1307. "enum": [
  1308. 0
  1309. ]
  1310. },
  1311. "message": {
  1312. "type": "string",
  1313. "example": "ok"
  1314. },
  1315. "data": {
  1316. "$ref": "#/components/schemas/EnterpriseOrderPage"
  1317. },
  1318. "request_id": {
  1319. "type": "string",
  1320. "pattern": "^[a-f0-9]{32}$"
  1321. }
  1322. },
  1323. "required": [
  1324. "code",
  1325. "message",
  1326. "data",
  1327. "request_id"
  1328. ]
  1329. }
  1330. }
  1331. }
  1332. },
  1333. "400": {
  1334. "$ref": "#/components/responses/Error"
  1335. },
  1336. "401": {
  1337. "$ref": "#/components/responses/Error"
  1338. },
  1339. "403": {
  1340. "$ref": "#/components/responses/Error"
  1341. },
  1342. "404": {
  1343. "$ref": "#/components/responses/Error"
  1344. },
  1345. "409": {
  1346. "$ref": "#/components/responses/Error"
  1347. },
  1348. "413": {
  1349. "$ref": "#/components/responses/Error"
  1350. },
  1351. "415": {
  1352. "$ref": "#/components/responses/Error"
  1353. },
  1354. "422": {
  1355. "$ref": "#/components/responses/Error"
  1356. },
  1357. "500": {
  1358. "$ref": "#/components/responses/Error"
  1359. },
  1360. "503": {
  1361. "$ref": "#/components/responses/Error"
  1362. }
  1363. }
  1364. }
  1365. },
  1366. "/enterprises/{enterprise}/devices": {
  1367. "get": {
  1368. "tags": [
  1369. "企业"
  1370. ],
  1371. "summary": "企业设备列表",
  1372. "operationId": "get_enterprises_enterprise_devices",
  1373. "description": "企业设备列表",
  1374. "parameters": [
  1375. {
  1376. "name": "enterprise",
  1377. "in": "path",
  1378. "required": true,
  1379. "schema": {
  1380. "type": "integer",
  1381. "format": "int64",
  1382. "description": "正整数资源 ID",
  1383. "minimum": 1,
  1384. "maximum": 2147483647
  1385. }
  1386. },
  1387. {
  1388. "name": "page",
  1389. "in": "query",
  1390. "required": false,
  1391. "schema": {
  1392. "type": "integer",
  1393. "format": "int64",
  1394. "minimum": 1,
  1395. "maximum": 1000000,
  1396. "default": 1
  1397. }
  1398. },
  1399. {
  1400. "name": "page_size",
  1401. "in": "query",
  1402. "required": false,
  1403. "schema": {
  1404. "type": "integer",
  1405. "format": "int64",
  1406. "minimum": 1,
  1407. "maximum": 100,
  1408. "default": 20
  1409. }
  1410. }
  1411. ],
  1412. "responses": {
  1413. "200": {
  1414. "description": "成功;JSON 业务码 code=0",
  1415. "content": {
  1416. "application/json": {
  1417. "schema": {
  1418. "type": "object",
  1419. "properties": {
  1420. "code": {
  1421. "type": "integer",
  1422. "enum": [
  1423. 0
  1424. ]
  1425. },
  1426. "message": {
  1427. "type": "string",
  1428. "example": "ok"
  1429. },
  1430. "data": {
  1431. "$ref": "#/components/schemas/DevicePage"
  1432. },
  1433. "request_id": {
  1434. "type": "string",
  1435. "pattern": "^[a-f0-9]{32}$"
  1436. }
  1437. },
  1438. "required": [
  1439. "code",
  1440. "message",
  1441. "data",
  1442. "request_id"
  1443. ]
  1444. }
  1445. }
  1446. }
  1447. },
  1448. "400": {
  1449. "$ref": "#/components/responses/Error"
  1450. },
  1451. "401": {
  1452. "$ref": "#/components/responses/Error"
  1453. },
  1454. "403": {
  1455. "$ref": "#/components/responses/Error"
  1456. },
  1457. "404": {
  1458. "$ref": "#/components/responses/Error"
  1459. },
  1460. "409": {
  1461. "$ref": "#/components/responses/Error"
  1462. },
  1463. "413": {
  1464. "$ref": "#/components/responses/Error"
  1465. },
  1466. "415": {
  1467. "$ref": "#/components/responses/Error"
  1468. },
  1469. "422": {
  1470. "$ref": "#/components/responses/Error"
  1471. },
  1472. "500": {
  1473. "$ref": "#/components/responses/Error"
  1474. },
  1475. "503": {
  1476. "$ref": "#/components/responses/Error"
  1477. }
  1478. }
  1479. }
  1480. },
  1481. "/enterprises/{enterprise}/devices/{id}": {
  1482. "get": {
  1483. "tags": [
  1484. "企业"
  1485. ],
  1486. "summary": "设备详情与七日用量",
  1487. "operationId": "get_enterprises_enterprise_devices_id",
  1488. "description": "设备详情与七日用量",
  1489. "parameters": [
  1490. {
  1491. "name": "enterprise",
  1492. "in": "path",
  1493. "required": true,
  1494. "schema": {
  1495. "type": "integer",
  1496. "format": "int64",
  1497. "description": "正整数资源 ID",
  1498. "minimum": 1,
  1499. "maximum": 2147483647
  1500. }
  1501. },
  1502. {
  1503. "name": "id",
  1504. "in": "path",
  1505. "required": true,
  1506. "schema": {
  1507. "type": "integer",
  1508. "format": "int64",
  1509. "description": "正整数资源 ID",
  1510. "minimum": 1,
  1511. "maximum": 2147483647
  1512. }
  1513. }
  1514. ],
  1515. "responses": {
  1516. "200": {
  1517. "description": "成功;JSON 业务码 code=0",
  1518. "content": {
  1519. "application/json": {
  1520. "schema": {
  1521. "type": "object",
  1522. "properties": {
  1523. "code": {
  1524. "type": "integer",
  1525. "enum": [
  1526. 0
  1527. ]
  1528. },
  1529. "message": {
  1530. "type": "string",
  1531. "example": "ok"
  1532. },
  1533. "data": {
  1534. "$ref": "#/components/schemas/DeviceDetail"
  1535. },
  1536. "request_id": {
  1537. "type": "string",
  1538. "pattern": "^[a-f0-9]{32}$"
  1539. }
  1540. },
  1541. "required": [
  1542. "code",
  1543. "message",
  1544. "data",
  1545. "request_id"
  1546. ]
  1547. }
  1548. }
  1549. }
  1550. },
  1551. "400": {
  1552. "$ref": "#/components/responses/Error"
  1553. },
  1554. "401": {
  1555. "$ref": "#/components/responses/Error"
  1556. },
  1557. "403": {
  1558. "$ref": "#/components/responses/Error"
  1559. },
  1560. "404": {
  1561. "$ref": "#/components/responses/Error"
  1562. },
  1563. "409": {
  1564. "$ref": "#/components/responses/Error"
  1565. },
  1566. "413": {
  1567. "$ref": "#/components/responses/Error"
  1568. },
  1569. "415": {
  1570. "$ref": "#/components/responses/Error"
  1571. },
  1572. "422": {
  1573. "$ref": "#/components/responses/Error"
  1574. },
  1575. "500": {
  1576. "$ref": "#/components/responses/Error"
  1577. },
  1578. "503": {
  1579. "$ref": "#/components/responses/Error"
  1580. }
  1581. }
  1582. }
  1583. },
  1584. "/enterprises/{enterprise}/rewards": {
  1585. "get": {
  1586. "tags": [
  1587. "企业"
  1588. ],
  1589. "summary": "推广奖励能力",
  1590. "operationId": "get_enterprises_enterprise_rewards",
  1591. "description": "企业管理员或成员读取真实邀请及赠水记录。现金字段恒为null;每页20条,total为邀请总数。活动关闭仍可读取历史;测试展示数据不再作为奖励返回。付款凭据、金额、配送ID及内部核实说明不向邀请企业公开。",
  1592. "parameters": [
  1593. {
  1594. "name": "enterprise",
  1595. "in": "path",
  1596. "required": true,
  1597. "schema": {
  1598. "type": "integer",
  1599. "format": "int64",
  1600. "description": "正整数资源 ID",
  1601. "minimum": 1,
  1602. "maximum": 2147483647
  1603. }
  1604. },
  1605. {
  1606. "name": "page",
  1607. "in": "query",
  1608. "required": false,
  1609. "schema": {
  1610. "type": "integer",
  1611. "minimum": 1,
  1612. "default": 1
  1613. }
  1614. }
  1615. ],
  1616. "responses": {
  1617. "200": {
  1618. "description": "成功;JSON 业务码 code=0",
  1619. "content": {
  1620. "application/json": {
  1621. "schema": {
  1622. "type": "object",
  1623. "properties": {
  1624. "code": {
  1625. "type": "integer",
  1626. "enum": [
  1627. 0
  1628. ]
  1629. },
  1630. "message": {
  1631. "type": "string",
  1632. "example": "ok"
  1633. },
  1634. "data": {
  1635. "$ref": "#/components/schemas/Rewards"
  1636. },
  1637. "request_id": {
  1638. "type": "string",
  1639. "pattern": "^[a-f0-9]{32}$"
  1640. }
  1641. },
  1642. "required": [
  1643. "code",
  1644. "message",
  1645. "data",
  1646. "request_id"
  1647. ]
  1648. }
  1649. }
  1650. }
  1651. },
  1652. "400": {
  1653. "$ref": "#/components/responses/Error"
  1654. },
  1655. "401": {
  1656. "$ref": "#/components/responses/Error"
  1657. },
  1658. "403": {
  1659. "$ref": "#/components/responses/Error"
  1660. },
  1661. "404": {
  1662. "$ref": "#/components/responses/Error"
  1663. },
  1664. "409": {
  1665. "$ref": "#/components/responses/Error"
  1666. },
  1667. "413": {
  1668. "$ref": "#/components/responses/Error"
  1669. },
  1670. "415": {
  1671. "$ref": "#/components/responses/Error"
  1672. },
  1673. "422": {
  1674. "$ref": "#/components/responses/Error"
  1675. },
  1676. "500": {
  1677. "$ref": "#/components/responses/Error"
  1678. },
  1679. "503": {
  1680. "$ref": "#/components/responses/Error"
  1681. }
  1682. }
  1683. }
  1684. },
  1685. "/enterprises/{enterprise}/deliveries/{id}": {
  1686. "get": {
  1687. "tags": [
  1688. "企业"
  1689. ],
  1690. "summary": "配送跟踪",
  1691. "operationId": "get_enterprises_enterprise_deliveries_id",
  1692. "description": "企业管理员或成员可读。无实时司机GPS或承诺到达时间。",
  1693. "parameters": [
  1694. {
  1695. "name": "enterprise",
  1696. "in": "path",
  1697. "required": true,
  1698. "schema": {
  1699. "type": "integer",
  1700. "format": "int64",
  1701. "description": "正整数资源 ID",
  1702. "minimum": 1,
  1703. "maximum": 2147483647
  1704. }
  1705. },
  1706. {
  1707. "name": "id",
  1708. "in": "path",
  1709. "required": true,
  1710. "schema": {
  1711. "type": "integer",
  1712. "format": "int64",
  1713. "description": "正整数资源 ID",
  1714. "minimum": 1,
  1715. "maximum": 2147483647
  1716. }
  1717. }
  1718. ],
  1719. "responses": {
  1720. "200": {
  1721. "description": "成功;JSON 业务码 code=0",
  1722. "content": {
  1723. "application/json": {
  1724. "schema": {
  1725. "type": "object",
  1726. "properties": {
  1727. "code": {
  1728. "type": "integer",
  1729. "enum": [
  1730. 0
  1731. ]
  1732. },
  1733. "message": {
  1734. "type": "string",
  1735. "example": "ok"
  1736. },
  1737. "data": {
  1738. "$ref": "#/components/schemas/Tracking"
  1739. },
  1740. "request_id": {
  1741. "type": "string",
  1742. "pattern": "^[a-f0-9]{32}$"
  1743. }
  1744. },
  1745. "required": [
  1746. "code",
  1747. "message",
  1748. "data",
  1749. "request_id"
  1750. ]
  1751. }
  1752. }
  1753. }
  1754. },
  1755. "400": {
  1756. "$ref": "#/components/responses/Error"
  1757. },
  1758. "401": {
  1759. "$ref": "#/components/responses/Error"
  1760. },
  1761. "403": {
  1762. "$ref": "#/components/responses/Error"
  1763. },
  1764. "404": {
  1765. "$ref": "#/components/responses/Error"
  1766. },
  1767. "409": {
  1768. "$ref": "#/components/responses/Error"
  1769. },
  1770. "413": {
  1771. "$ref": "#/components/responses/Error"
  1772. },
  1773. "415": {
  1774. "$ref": "#/components/responses/Error"
  1775. },
  1776. "422": {
  1777. "$ref": "#/components/responses/Error"
  1778. },
  1779. "500": {
  1780. "$ref": "#/components/responses/Error"
  1781. },
  1782. "503": {
  1783. "$ref": "#/components/responses/Error"
  1784. }
  1785. }
  1786. }
  1787. },
  1788. "/enterprises/{enterprise}/address": {
  1789. "get": {
  1790. "tags": [
  1791. "企业"
  1792. ],
  1793. "summary": "编辑用地址详情",
  1794. "operationId": "get_enterprises_enterprise_address",
  1795. "description": "仅企业管理员,返回完整联系电话和 revision。",
  1796. "parameters": [
  1797. {
  1798. "name": "enterprise",
  1799. "in": "path",
  1800. "required": true,
  1801. "schema": {
  1802. "type": "integer",
  1803. "format": "int64",
  1804. "description": "正整数资源 ID",
  1805. "minimum": 1,
  1806. "maximum": 2147483647
  1807. }
  1808. }
  1809. ],
  1810. "responses": {
  1811. "200": {
  1812. "description": "成功;JSON 业务码 code=0",
  1813. "content": {
  1814. "application/json": {
  1815. "schema": {
  1816. "type": "object",
  1817. "properties": {
  1818. "code": {
  1819. "type": "integer",
  1820. "enum": [
  1821. 0
  1822. ]
  1823. },
  1824. "message": {
  1825. "type": "string",
  1826. "example": "ok"
  1827. },
  1828. "data": {
  1829. "$ref": "#/components/schemas/EditableAddress"
  1830. },
  1831. "request_id": {
  1832. "type": "string",
  1833. "pattern": "^[a-f0-9]{32}$"
  1834. }
  1835. },
  1836. "required": [
  1837. "code",
  1838. "message",
  1839. "data",
  1840. "request_id"
  1841. ]
  1842. }
  1843. }
  1844. }
  1845. },
  1846. "400": {
  1847. "$ref": "#/components/responses/Error"
  1848. },
  1849. "401": {
  1850. "$ref": "#/components/responses/Error"
  1851. },
  1852. "403": {
  1853. "$ref": "#/components/responses/Error"
  1854. },
  1855. "404": {
  1856. "$ref": "#/components/responses/Error"
  1857. },
  1858. "409": {
  1859. "$ref": "#/components/responses/Error"
  1860. },
  1861. "413": {
  1862. "$ref": "#/components/responses/Error"
  1863. },
  1864. "415": {
  1865. "$ref": "#/components/responses/Error"
  1866. },
  1867. "422": {
  1868. "$ref": "#/components/responses/Error"
  1869. },
  1870. "500": {
  1871. "$ref": "#/components/responses/Error"
  1872. },
  1873. "503": {
  1874. "$ref": "#/components/responses/Error"
  1875. }
  1876. }
  1877. },
  1878. "post": {
  1879. "tags": [
  1880. "企业"
  1881. ],
  1882. "summary": "修改供水地址",
  1883. "operationId": "post_enterprises_enterprise_address",
  1884. "description": "仅企业管理员。版本变化40901;存在未结束配送40902(含并发创建的任务)。地址变化会清空坐标,需要后台重新定位。",
  1885. "parameters": [
  1886. {
  1887. "name": "enterprise",
  1888. "in": "path",
  1889. "required": true,
  1890. "schema": {
  1891. "type": "integer",
  1892. "format": "int64",
  1893. "description": "正整数资源 ID",
  1894. "minimum": 1,
  1895. "maximum": 2147483647
  1896. }
  1897. }
  1898. ],
  1899. "responses": {
  1900. "200": {
  1901. "description": "成功;JSON 业务码 code=0",
  1902. "content": {
  1903. "application/json": {
  1904. "schema": {
  1905. "type": "object",
  1906. "properties": {
  1907. "code": {
  1908. "type": "integer",
  1909. "enum": [
  1910. 0
  1911. ]
  1912. },
  1913. "message": {
  1914. "type": "string",
  1915. "example": "ok"
  1916. },
  1917. "data": {
  1918. "$ref": "#/components/schemas/AddressResult"
  1919. },
  1920. "request_id": {
  1921. "type": "string",
  1922. "pattern": "^[a-f0-9]{32}$"
  1923. }
  1924. },
  1925. "required": [
  1926. "code",
  1927. "message",
  1928. "data",
  1929. "request_id"
  1930. ]
  1931. }
  1932. }
  1933. }
  1934. },
  1935. "400": {
  1936. "$ref": "#/components/responses/Error"
  1937. },
  1938. "401": {
  1939. "$ref": "#/components/responses/Error"
  1940. },
  1941. "403": {
  1942. "$ref": "#/components/responses/Error"
  1943. },
  1944. "404": {
  1945. "$ref": "#/components/responses/Error"
  1946. },
  1947. "409": {
  1948. "$ref": "#/components/responses/Error"
  1949. },
  1950. "413": {
  1951. "$ref": "#/components/responses/Error"
  1952. },
  1953. "415": {
  1954. "$ref": "#/components/responses/Error"
  1955. },
  1956. "422": {
  1957. "$ref": "#/components/responses/Error"
  1958. },
  1959. "500": {
  1960. "$ref": "#/components/responses/Error"
  1961. },
  1962. "503": {
  1963. "$ref": "#/components/responses/Error"
  1964. }
  1965. },
  1966. "requestBody": {
  1967. "required": true,
  1968. "content": {
  1969. "application/json": {
  1970. "schema": {
  1971. "$ref": "#/components/schemas/AddressRequest"
  1972. },
  1973. "example": {
  1974. "request_key": "address-20260918-0001",
  1975. "revision": "replace-with-current-revision",
  1976. "address": "深圳市示例配送地址",
  1977. "contact": "张先生",
  1978. "phone": "138-1234-5678"
  1979. }
  1980. }
  1981. }
  1982. }
  1983. }
  1984. },
  1985. "/enterprises/{enterprise}/deliveries": {
  1986. "post": {
  1987. "tags": [
  1988. "企业"
  1989. ],
  1990. "summary": "预约配送",
  1991. "operationId": "post_enterprises_enterprise_deliveries",
  1992. "description": "仅企业管理员。使用已购权益和库存并冻结数量;不接受客户端预约时段或调度日期。",
  1993. "parameters": [
  1994. {
  1995. "name": "enterprise",
  1996. "in": "path",
  1997. "required": true,
  1998. "schema": {
  1999. "type": "integer",
  2000. "format": "int64",
  2001. "description": "正整数资源 ID",
  2002. "minimum": 1,
  2003. "maximum": 2147483647
  2004. }
  2005. }
  2006. ],
  2007. "responses": {
  2008. "200": {
  2009. "description": "成功;JSON 业务码 code=0",
  2010. "content": {
  2011. "application/json": {
  2012. "schema": {
  2013. "type": "object",
  2014. "properties": {
  2015. "code": {
  2016. "type": "integer",
  2017. "enum": [
  2018. 0
  2019. ]
  2020. },
  2021. "message": {
  2022. "type": "string",
  2023. "example": "ok"
  2024. },
  2025. "data": {
  2026. "$ref": "#/components/schemas/CommandResult"
  2027. },
  2028. "request_id": {
  2029. "type": "string",
  2030. "pattern": "^[a-f0-9]{32}$"
  2031. }
  2032. },
  2033. "required": [
  2034. "code",
  2035. "message",
  2036. "data",
  2037. "request_id"
  2038. ]
  2039. }
  2040. }
  2041. }
  2042. },
  2043. "400": {
  2044. "$ref": "#/components/responses/Error"
  2045. },
  2046. "401": {
  2047. "$ref": "#/components/responses/Error"
  2048. },
  2049. "403": {
  2050. "$ref": "#/components/responses/Error"
  2051. },
  2052. "404": {
  2053. "$ref": "#/components/responses/Error"
  2054. },
  2055. "409": {
  2056. "$ref": "#/components/responses/Error"
  2057. },
  2058. "413": {
  2059. "$ref": "#/components/responses/Error"
  2060. },
  2061. "415": {
  2062. "$ref": "#/components/responses/Error"
  2063. },
  2064. "422": {
  2065. "$ref": "#/components/responses/Error"
  2066. },
  2067. "500": {
  2068. "$ref": "#/components/responses/Error"
  2069. },
  2070. "503": {
  2071. "$ref": "#/components/responses/Error"
  2072. }
  2073. },
  2074. "requestBody": {
  2075. "required": true,
  2076. "content": {
  2077. "application/json": {
  2078. "schema": {
  2079. "$ref": "#/components/schemas/BookingRequest"
  2080. },
  2081. "example": {
  2082. "request_key": "booking-20260918-0001",
  2083. "sku_id": 2,
  2084. "quantity": 8
  2085. }
  2086. }
  2087. }
  2088. }
  2089. }
  2090. },
  2091. "/enterprises/{enterprise}/deliveries/{id}/cancel": {
  2092. "post": {
  2093. "tags": [
  2094. "企业"
  2095. ],
  2096. "summary": "取消未派单配送",
  2097. "operationId": "post_enterprises_enterprise_deliveries_id_cancel",
  2098. "description": "仅企业管理员;只允许 pending/cancelled,已派单由后台处理。",
  2099. "parameters": [
  2100. {
  2101. "name": "enterprise",
  2102. "in": "path",
  2103. "required": true,
  2104. "schema": {
  2105. "type": "integer",
  2106. "format": "int64",
  2107. "description": "正整数资源 ID",
  2108. "minimum": 1,
  2109. "maximum": 2147483647
  2110. }
  2111. },
  2112. {
  2113. "name": "id",
  2114. "in": "path",
  2115. "required": true,
  2116. "schema": {
  2117. "type": "integer",
  2118. "format": "int64",
  2119. "description": "正整数资源 ID",
  2120. "minimum": 1,
  2121. "maximum": 2147483647
  2122. }
  2123. }
  2124. ],
  2125. "responses": {
  2126. "200": {
  2127. "description": "成功;JSON 业务码 code=0",
  2128. "content": {
  2129. "application/json": {
  2130. "schema": {
  2131. "type": "object",
  2132. "properties": {
  2133. "code": {
  2134. "type": "integer",
  2135. "enum": [
  2136. 0
  2137. ]
  2138. },
  2139. "message": {
  2140. "type": "string",
  2141. "example": "ok"
  2142. },
  2143. "data": {
  2144. "$ref": "#/components/schemas/CommandResult"
  2145. },
  2146. "request_id": {
  2147. "type": "string",
  2148. "pattern": "^[a-f0-9]{32}$"
  2149. }
  2150. },
  2151. "required": [
  2152. "code",
  2153. "message",
  2154. "data",
  2155. "request_id"
  2156. ]
  2157. }
  2158. }
  2159. }
  2160. },
  2161. "400": {
  2162. "$ref": "#/components/responses/Error"
  2163. },
  2164. "401": {
  2165. "$ref": "#/components/responses/Error"
  2166. },
  2167. "403": {
  2168. "$ref": "#/components/responses/Error"
  2169. },
  2170. "404": {
  2171. "$ref": "#/components/responses/Error"
  2172. },
  2173. "409": {
  2174. "$ref": "#/components/responses/Error"
  2175. },
  2176. "413": {
  2177. "$ref": "#/components/responses/Error"
  2178. },
  2179. "415": {
  2180. "$ref": "#/components/responses/Error"
  2181. },
  2182. "422": {
  2183. "$ref": "#/components/responses/Error"
  2184. },
  2185. "500": {
  2186. "$ref": "#/components/responses/Error"
  2187. },
  2188. "503": {
  2189. "$ref": "#/components/responses/Error"
  2190. }
  2191. },
  2192. "requestBody": {
  2193. "required": true,
  2194. "content": {
  2195. "application/json": {
  2196. "schema": {
  2197. "$ref": "#/components/schemas/CommandRequest"
  2198. }
  2199. }
  2200. }
  2201. }
  2202. }
  2203. },
  2204. "/enterprises/{enterprise}/checkout/quote": {
  2205. "post": {
  2206. "tags": [
  2207. "企业"
  2208. ],
  2209. "summary": "计算套餐报价",
  2210. "operationId": "post_enterprises_enterprise_checkout_quote",
  2211. "description": "仅企业管理员;服务器计算价格,不扣款、不产生订单或权益。",
  2212. "parameters": [
  2213. {
  2214. "name": "enterprise",
  2215. "in": "path",
  2216. "required": true,
  2217. "schema": {
  2218. "type": "integer",
  2219. "format": "int64",
  2220. "description": "正整数资源 ID",
  2221. "minimum": 1,
  2222. "maximum": 2147483647
  2223. }
  2224. }
  2225. ],
  2226. "responses": {
  2227. "200": {
  2228. "description": "成功;JSON 业务码 code=0",
  2229. "content": {
  2230. "application/json": {
  2231. "schema": {
  2232. "type": "object",
  2233. "properties": {
  2234. "code": {
  2235. "type": "integer",
  2236. "enum": [
  2237. 0
  2238. ]
  2239. },
  2240. "message": {
  2241. "type": "string",
  2242. "example": "ok"
  2243. },
  2244. "data": {
  2245. "$ref": "#/components/schemas/Quote"
  2246. },
  2247. "request_id": {
  2248. "type": "string",
  2249. "pattern": "^[a-f0-9]{32}$"
  2250. }
  2251. },
  2252. "required": [
  2253. "code",
  2254. "message",
  2255. "data",
  2256. "request_id"
  2257. ]
  2258. }
  2259. }
  2260. }
  2261. },
  2262. "400": {
  2263. "$ref": "#/components/responses/Error"
  2264. },
  2265. "401": {
  2266. "$ref": "#/components/responses/Error"
  2267. },
  2268. "403": {
  2269. "$ref": "#/components/responses/Error"
  2270. },
  2271. "404": {
  2272. "$ref": "#/components/responses/Error"
  2273. },
  2274. "409": {
  2275. "$ref": "#/components/responses/Error"
  2276. },
  2277. "413": {
  2278. "$ref": "#/components/responses/Error"
  2279. },
  2280. "415": {
  2281. "$ref": "#/components/responses/Error"
  2282. },
  2283. "422": {
  2284. "$ref": "#/components/responses/Error"
  2285. },
  2286. "500": {
  2287. "$ref": "#/components/responses/Error"
  2288. },
  2289. "503": {
  2290. "$ref": "#/components/responses/Error"
  2291. }
  2292. },
  2293. "requestBody": {
  2294. "required": true,
  2295. "content": {
  2296. "application/json": {
  2297. "schema": {
  2298. "$ref": "#/components/schemas/QuoteRequest"
  2299. },
  2300. "example": {
  2301. "items": [
  2302. {
  2303. "package_id": 3,
  2304. "quantity": 2
  2305. }
  2306. ]
  2307. }
  2308. }
  2309. }
  2310. }
  2311. }
  2312. },
  2313. "/enterprises/{enterprise}/checkouts": {
  2314. "post": {
  2315. "tags": [
  2316. "企业"
  2317. ],
  2318. "summary": "创建待支付意向",
  2319. "operationId": "post_enterprises_enterprise_checkouts",
  2320. "description": "仅企业管理员;expected_amount_cents 必须等于报价,变化返回40904。意向30分钟有效;不扣款、不发权益、不代表真实收款或开票。",
  2321. "parameters": [
  2322. {
  2323. "name": "enterprise",
  2324. "in": "path",
  2325. "required": true,
  2326. "schema": {
  2327. "type": "integer",
  2328. "format": "int64",
  2329. "description": "正整数资源 ID",
  2330. "minimum": 1,
  2331. "maximum": 2147483647
  2332. }
  2333. }
  2334. ],
  2335. "responses": {
  2336. "200": {
  2337. "description": "成功;JSON 业务码 code=0",
  2338. "content": {
  2339. "application/json": {
  2340. "schema": {
  2341. "type": "object",
  2342. "properties": {
  2343. "code": {
  2344. "type": "integer",
  2345. "enum": [
  2346. 0
  2347. ]
  2348. },
  2349. "message": {
  2350. "type": "string",
  2351. "example": "ok"
  2352. },
  2353. "data": {
  2354. "$ref": "#/components/schemas/Checkout"
  2355. },
  2356. "request_id": {
  2357. "type": "string",
  2358. "pattern": "^[a-f0-9]{32}$"
  2359. }
  2360. },
  2361. "required": [
  2362. "code",
  2363. "message",
  2364. "data",
  2365. "request_id"
  2366. ]
  2367. }
  2368. }
  2369. }
  2370. },
  2371. "400": {
  2372. "$ref": "#/components/responses/Error"
  2373. },
  2374. "401": {
  2375. "$ref": "#/components/responses/Error"
  2376. },
  2377. "403": {
  2378. "$ref": "#/components/responses/Error"
  2379. },
  2380. "404": {
  2381. "$ref": "#/components/responses/Error"
  2382. },
  2383. "409": {
  2384. "$ref": "#/components/responses/Error"
  2385. },
  2386. "413": {
  2387. "$ref": "#/components/responses/Error"
  2388. },
  2389. "415": {
  2390. "$ref": "#/components/responses/Error"
  2391. },
  2392. "422": {
  2393. "$ref": "#/components/responses/Error"
  2394. },
  2395. "500": {
  2396. "$ref": "#/components/responses/Error"
  2397. },
  2398. "503": {
  2399. "$ref": "#/components/responses/Error"
  2400. }
  2401. },
  2402. "requestBody": {
  2403. "required": true,
  2404. "content": {
  2405. "application/json": {
  2406. "schema": {
  2407. "$ref": "#/components/schemas/CheckoutRequest"
  2408. },
  2409. "example": {
  2410. "request_key": "checkout-20260918-0001",
  2411. "items": [
  2412. {
  2413. "package_id": 3,
  2414. "quantity": 2
  2415. }
  2416. ],
  2417. "expected_amount_cents": 139800,
  2418. "agreement_accepted": true
  2419. }
  2420. }
  2421. }
  2422. }
  2423. }
  2424. },
  2425. "/enterprises/{enterprise}/checkouts/{id}": {
  2426. "get": {
  2427. "tags": [
  2428. "企业"
  2429. ],
  2430. "summary": "待支付意向详情",
  2431. "operationId": "get_enterprises_enterprise_checkouts_id",
  2432. "description": "待支付意向详情",
  2433. "parameters": [
  2434. {
  2435. "name": "enterprise",
  2436. "in": "path",
  2437. "required": true,
  2438. "schema": {
  2439. "type": "integer",
  2440. "format": "int64",
  2441. "description": "正整数资源 ID",
  2442. "minimum": 1,
  2443. "maximum": 2147483647
  2444. }
  2445. },
  2446. {
  2447. "name": "id",
  2448. "in": "path",
  2449. "required": true,
  2450. "schema": {
  2451. "type": "integer",
  2452. "format": "int64",
  2453. "description": "正整数资源 ID",
  2454. "minimum": 1,
  2455. "maximum": 2147483647
  2456. }
  2457. }
  2458. ],
  2459. "responses": {
  2460. "200": {
  2461. "description": "成功;JSON 业务码 code=0",
  2462. "content": {
  2463. "application/json": {
  2464. "schema": {
  2465. "type": "object",
  2466. "properties": {
  2467. "code": {
  2468. "type": "integer",
  2469. "enum": [
  2470. 0
  2471. ]
  2472. },
  2473. "message": {
  2474. "type": "string",
  2475. "example": "ok"
  2476. },
  2477. "data": {
  2478. "$ref": "#/components/schemas/CheckoutDetail"
  2479. },
  2480. "request_id": {
  2481. "type": "string",
  2482. "pattern": "^[a-f0-9]{32}$"
  2483. }
  2484. },
  2485. "required": [
  2486. "code",
  2487. "message",
  2488. "data",
  2489. "request_id"
  2490. ]
  2491. }
  2492. }
  2493. }
  2494. },
  2495. "400": {
  2496. "$ref": "#/components/responses/Error"
  2497. },
  2498. "401": {
  2499. "$ref": "#/components/responses/Error"
  2500. },
  2501. "403": {
  2502. "$ref": "#/components/responses/Error"
  2503. },
  2504. "404": {
  2505. "$ref": "#/components/responses/Error"
  2506. },
  2507. "409": {
  2508. "$ref": "#/components/responses/Error"
  2509. },
  2510. "413": {
  2511. "$ref": "#/components/responses/Error"
  2512. },
  2513. "415": {
  2514. "$ref": "#/components/responses/Error"
  2515. },
  2516. "422": {
  2517. "$ref": "#/components/responses/Error"
  2518. },
  2519. "500": {
  2520. "$ref": "#/components/responses/Error"
  2521. },
  2522. "503": {
  2523. "$ref": "#/components/responses/Error"
  2524. }
  2525. }
  2526. }
  2527. },
  2528. "/enterprises/{enterprise}/checkouts/{id}/cancel": {
  2529. "post": {
  2530. "tags": [
  2531. "企业"
  2532. ],
  2533. "summary": "取消待支付意向",
  2534. "operationId": "post_enterprises_enterprise_checkouts_id_cancel",
  2535. "description": "仅企业管理员;取消pending或已取消的意向,不处理真实收款退款。",
  2536. "parameters": [
  2537. {
  2538. "name": "enterprise",
  2539. "in": "path",
  2540. "required": true,
  2541. "schema": {
  2542. "type": "integer",
  2543. "format": "int64",
  2544. "description": "正整数资源 ID",
  2545. "minimum": 1,
  2546. "maximum": 2147483647
  2547. }
  2548. },
  2549. {
  2550. "name": "id",
  2551. "in": "path",
  2552. "required": true,
  2553. "schema": {
  2554. "type": "integer",
  2555. "format": "int64",
  2556. "description": "正整数资源 ID",
  2557. "minimum": 1,
  2558. "maximum": 2147483647
  2559. }
  2560. }
  2561. ],
  2562. "responses": {
  2563. "200": {
  2564. "description": "成功;JSON 业务码 code=0",
  2565. "content": {
  2566. "application/json": {
  2567. "schema": {
  2568. "type": "object",
  2569. "properties": {
  2570. "code": {
  2571. "type": "integer",
  2572. "enum": [
  2573. 0
  2574. ]
  2575. },
  2576. "message": {
  2577. "type": "string",
  2578. "example": "ok"
  2579. },
  2580. "data": {
  2581. "$ref": "#/components/schemas/Checkout"
  2582. },
  2583. "request_id": {
  2584. "type": "string",
  2585. "pattern": "^[a-f0-9]{32}$"
  2586. }
  2587. },
  2588. "required": [
  2589. "code",
  2590. "message",
  2591. "data",
  2592. "request_id"
  2593. ]
  2594. }
  2595. }
  2596. }
  2597. },
  2598. "400": {
  2599. "$ref": "#/components/responses/Error"
  2600. },
  2601. "401": {
  2602. "$ref": "#/components/responses/Error"
  2603. },
  2604. "403": {
  2605. "$ref": "#/components/responses/Error"
  2606. },
  2607. "404": {
  2608. "$ref": "#/components/responses/Error"
  2609. },
  2610. "409": {
  2611. "$ref": "#/components/responses/Error"
  2612. },
  2613. "413": {
  2614. "$ref": "#/components/responses/Error"
  2615. },
  2616. "415": {
  2617. "$ref": "#/components/responses/Error"
  2618. },
  2619. "422": {
  2620. "$ref": "#/components/responses/Error"
  2621. },
  2622. "500": {
  2623. "$ref": "#/components/responses/Error"
  2624. },
  2625. "503": {
  2626. "$ref": "#/components/responses/Error"
  2627. }
  2628. },
  2629. "requestBody": {
  2630. "required": true,
  2631. "content": {
  2632. "application/json": {
  2633. "schema": {
  2634. "$ref": "#/components/schemas/CommandRequest"
  2635. }
  2636. }
  2637. }
  2638. }
  2639. }
  2640. },
  2641. "/enterprises/{enterprise}/checkouts/{id}/pay": {
  2642. "post": {
  2643. "tags": [
  2644. "企业"
  2645. ],
  2646. "summary": "支付订单",
  2647. "operationId": "post_enterprises_enterprise_checkouts_id_pay",
  2648. "description": "企业余额支付按创建订单时保存的价格、SKU、桶数快照扣款并发放权益,30分钟内有效。套餐修改、下架、删除不影响已有有效订单;原商品规格或企业停用时拒绝支付。扣款、收款记录和权益同事务提交。微信支付尚未接入,返回50303。",
  2649. "parameters": [
  2650. {
  2651. "name": "enterprise",
  2652. "in": "path",
  2653. "required": true,
  2654. "schema": {
  2655. "type": "integer",
  2656. "format": "int64",
  2657. "description": "正整数资源 ID",
  2658. "minimum": 1,
  2659. "maximum": 2147483647
  2660. }
  2661. },
  2662. {
  2663. "name": "id",
  2664. "in": "path",
  2665. "required": true,
  2666. "schema": {
  2667. "type": "integer",
  2668. "format": "int64",
  2669. "description": "正整数资源 ID",
  2670. "minimum": 1,
  2671. "maximum": 2147483647
  2672. }
  2673. }
  2674. ],
  2675. "responses": {
  2676. "200": {
  2677. "description": "余额支付成功;JSON 业务码 code=0",
  2678. "content": {
  2679. "application/json": {
  2680. "schema": {
  2681. "type": "object",
  2682. "properties": {
  2683. "code": {
  2684. "type": "integer",
  2685. "enum": [
  2686. 0
  2687. ]
  2688. },
  2689. "message": {
  2690. "type": "string",
  2691. "example": "ok"
  2692. },
  2693. "data": {
  2694. "$ref": "#/components/schemas/Checkout"
  2695. },
  2696. "request_id": {
  2697. "type": "string",
  2698. "pattern": "^[a-f0-9]{32}$"
  2699. }
  2700. },
  2701. "required": [
  2702. "code",
  2703. "message",
  2704. "data",
  2705. "request_id"
  2706. ]
  2707. }
  2708. }
  2709. }
  2710. },
  2711. "400": {
  2712. "$ref": "#/components/responses/Error"
  2713. },
  2714. "401": {
  2715. "$ref": "#/components/responses/Error"
  2716. },
  2717. "403": {
  2718. "$ref": "#/components/responses/Error"
  2719. },
  2720. "404": {
  2721. "$ref": "#/components/responses/Error"
  2722. },
  2723. "409": {
  2724. "$ref": "#/components/responses/Error"
  2725. },
  2726. "413": {
  2727. "$ref": "#/components/responses/Error"
  2728. },
  2729. "415": {
  2730. "$ref": "#/components/responses/Error"
  2731. },
  2732. "422": {
  2733. "$ref": "#/components/responses/Error"
  2734. },
  2735. "500": {
  2736. "$ref": "#/components/responses/Error"
  2737. },
  2738. "503": {
  2739. "$ref": "#/components/responses/Error"
  2740. }
  2741. },
  2742. "requestBody": {
  2743. "required": true,
  2744. "content": {
  2745. "application/json": {
  2746. "schema": {
  2747. "$ref": "#/components/schemas/PayRequest"
  2748. },
  2749. "example": {
  2750. "request_key": "pay-20260924-0001",
  2751. "payment_method": "balance"
  2752. }
  2753. }
  2754. }
  2755. }
  2756. }
  2757. },
  2758. "/drivers/{driver}/dashboard": {
  2759. "get": {
  2760. "tags": [
  2761. "司机"
  2762. ],
  2763. "summary": "司机工作台",
  2764. "operationId": "get_drivers_driver_dashboard",
  2765. "description": "必须有该司机身份;今日班次、任务和未结算路线。",
  2766. "parameters": [
  2767. {
  2768. "name": "driver",
  2769. "in": "path",
  2770. "required": true,
  2771. "schema": {
  2772. "type": "integer",
  2773. "format": "int64",
  2774. "description": "正整数资源 ID",
  2775. "minimum": 1,
  2776. "maximum": 2147483647
  2777. }
  2778. }
  2779. ],
  2780. "responses": {
  2781. "200": {
  2782. "description": "成功;JSON 业务码 code=0",
  2783. "content": {
  2784. "application/json": {
  2785. "schema": {
  2786. "type": "object",
  2787. "properties": {
  2788. "code": {
  2789. "type": "integer",
  2790. "enum": [
  2791. 0
  2792. ]
  2793. },
  2794. "message": {
  2795. "type": "string",
  2796. "example": "ok"
  2797. },
  2798. "data": {
  2799. "$ref": "#/components/schemas/DriverDashboard"
  2800. },
  2801. "request_id": {
  2802. "type": "string",
  2803. "pattern": "^[a-f0-9]{32}$"
  2804. }
  2805. },
  2806. "required": [
  2807. "code",
  2808. "message",
  2809. "data",
  2810. "request_id"
  2811. ]
  2812. }
  2813. }
  2814. }
  2815. },
  2816. "400": {
  2817. "$ref": "#/components/responses/Error"
  2818. },
  2819. "401": {
  2820. "$ref": "#/components/responses/Error"
  2821. },
  2822. "403": {
  2823. "$ref": "#/components/responses/Error"
  2824. },
  2825. "404": {
  2826. "$ref": "#/components/responses/Error"
  2827. },
  2828. "409": {
  2829. "$ref": "#/components/responses/Error"
  2830. },
  2831. "413": {
  2832. "$ref": "#/components/responses/Error"
  2833. },
  2834. "415": {
  2835. "$ref": "#/components/responses/Error"
  2836. },
  2837. "422": {
  2838. "$ref": "#/components/responses/Error"
  2839. },
  2840. "500": {
  2841. "$ref": "#/components/responses/Error"
  2842. },
  2843. "503": {
  2844. "$ref": "#/components/responses/Error"
  2845. }
  2846. }
  2847. }
  2848. },
  2849. "/drivers/{driver}/tasks": {
  2850. "get": {
  2851. "tags": [
  2852. "司机"
  2853. ],
  2854. "summary": "司机任务列表",
  2855. "operationId": "get_drivers_driver_tasks",
  2856. "description": "司机任务列表",
  2857. "parameters": [
  2858. {
  2859. "name": "driver",
  2860. "in": "path",
  2861. "required": true,
  2862. "schema": {
  2863. "type": "integer",
  2864. "format": "int64",
  2865. "description": "正整数资源 ID",
  2866. "minimum": 1,
  2867. "maximum": 2147483647
  2868. }
  2869. },
  2870. {
  2871. "name": "page",
  2872. "in": "query",
  2873. "required": false,
  2874. "schema": {
  2875. "type": "integer",
  2876. "format": "int64",
  2877. "minimum": 1,
  2878. "maximum": 1000000,
  2879. "default": 1
  2880. }
  2881. },
  2882. {
  2883. "name": "page_size",
  2884. "in": "query",
  2885. "required": false,
  2886. "schema": {
  2887. "type": "integer",
  2888. "format": "int64",
  2889. "minimum": 1,
  2890. "maximum": 100,
  2891. "default": 20
  2892. }
  2893. },
  2894. {
  2895. "name": "status",
  2896. "in": "query",
  2897. "required": false,
  2898. "schema": {
  2899. "type": "string",
  2900. "enum": [
  2901. "all",
  2902. "pending",
  2903. "transit",
  2904. "completed",
  2905. "exception"
  2906. ],
  2907. "default": "all"
  2908. },
  2909. "description": "pending=assigned;exception=returning/returned;全部状态只限分配给本司机的任务"
  2910. }
  2911. ],
  2912. "responses": {
  2913. "200": {
  2914. "description": "成功;JSON 业务码 code=0",
  2915. "content": {
  2916. "application/json": {
  2917. "schema": {
  2918. "type": "object",
  2919. "properties": {
  2920. "code": {
  2921. "type": "integer",
  2922. "enum": [
  2923. 0
  2924. ]
  2925. },
  2926. "message": {
  2927. "type": "string",
  2928. "example": "ok"
  2929. },
  2930. "data": {
  2931. "$ref": "#/components/schemas/TaskPage"
  2932. },
  2933. "request_id": {
  2934. "type": "string",
  2935. "pattern": "^[a-f0-9]{32}$"
  2936. }
  2937. },
  2938. "required": [
  2939. "code",
  2940. "message",
  2941. "data",
  2942. "request_id"
  2943. ]
  2944. }
  2945. }
  2946. }
  2947. },
  2948. "400": {
  2949. "$ref": "#/components/responses/Error"
  2950. },
  2951. "401": {
  2952. "$ref": "#/components/responses/Error"
  2953. },
  2954. "403": {
  2955. "$ref": "#/components/responses/Error"
  2956. },
  2957. "404": {
  2958. "$ref": "#/components/responses/Error"
  2959. },
  2960. "409": {
  2961. "$ref": "#/components/responses/Error"
  2962. },
  2963. "413": {
  2964. "$ref": "#/components/responses/Error"
  2965. },
  2966. "415": {
  2967. "$ref": "#/components/responses/Error"
  2968. },
  2969. "422": {
  2970. "$ref": "#/components/responses/Error"
  2971. },
  2972. "500": {
  2973. "$ref": "#/components/responses/Error"
  2974. },
  2975. "503": {
  2976. "$ref": "#/components/responses/Error"
  2977. }
  2978. }
  2979. }
  2980. },
  2981. "/drivers/{driver}/routes": {
  2982. "get": {
  2983. "tags": [
  2984. "司机"
  2985. ],
  2986. "summary": "司机未结算路线",
  2987. "operationId": "get_drivers_driver_routes",
  2988. "description": "最多50条,返回 data 数组,不分页;每条 stops 按 stop_order/id 排序。",
  2989. "parameters": [
  2990. {
  2991. "name": "driver",
  2992. "in": "path",
  2993. "required": true,
  2994. "schema": {
  2995. "type": "integer",
  2996. "format": "int64",
  2997. "description": "正整数资源 ID",
  2998. "minimum": 1,
  2999. "maximum": 2147483647
  3000. }
  3001. }
  3002. ],
  3003. "responses": {
  3004. "200": {
  3005. "description": "成功;JSON 业务码 code=0",
  3006. "content": {
  3007. "application/json": {
  3008. "schema": {
  3009. "type": "object",
  3010. "properties": {
  3011. "code": {
  3012. "type": "integer",
  3013. "enum": [
  3014. 0
  3015. ]
  3016. },
  3017. "message": {
  3018. "type": "string",
  3019. "example": "ok"
  3020. },
  3021. "data": {
  3022. "type": "array",
  3023. "items": {
  3024. "$ref": "#/components/schemas/Route"
  3025. }
  3026. },
  3027. "request_id": {
  3028. "type": "string",
  3029. "pattern": "^[a-f0-9]{32}$"
  3030. }
  3031. },
  3032. "required": [
  3033. "code",
  3034. "message",
  3035. "data",
  3036. "request_id"
  3037. ]
  3038. }
  3039. }
  3040. }
  3041. },
  3042. "400": {
  3043. "$ref": "#/components/responses/Error"
  3044. },
  3045. "401": {
  3046. "$ref": "#/components/responses/Error"
  3047. },
  3048. "403": {
  3049. "$ref": "#/components/responses/Error"
  3050. },
  3051. "404": {
  3052. "$ref": "#/components/responses/Error"
  3053. },
  3054. "409": {
  3055. "$ref": "#/components/responses/Error"
  3056. },
  3057. "413": {
  3058. "$ref": "#/components/responses/Error"
  3059. },
  3060. "415": {
  3061. "$ref": "#/components/responses/Error"
  3062. },
  3063. "422": {
  3064. "$ref": "#/components/responses/Error"
  3065. },
  3066. "500": {
  3067. "$ref": "#/components/responses/Error"
  3068. },
  3069. "503": {
  3070. "$ref": "#/components/responses/Error"
  3071. }
  3072. }
  3073. }
  3074. },
  3075. "/drivers/{driver}/tasks/{id}": {
  3076. "get": {
  3077. "tags": [
  3078. "司机"
  3079. ],
  3080. "summary": "司机任务详情",
  3081. "operationId": "get_drivers_driver_tasks_id",
  3082. "description": "司机任务详情",
  3083. "parameters": [
  3084. {
  3085. "name": "driver",
  3086. "in": "path",
  3087. "required": true,
  3088. "schema": {
  3089. "type": "integer",
  3090. "format": "int64",
  3091. "description": "正整数资源 ID",
  3092. "minimum": 1,
  3093. "maximum": 2147483647
  3094. }
  3095. },
  3096. {
  3097. "name": "id",
  3098. "in": "path",
  3099. "required": true,
  3100. "schema": {
  3101. "type": "integer",
  3102. "format": "int64",
  3103. "description": "正整数资源 ID",
  3104. "minimum": 1,
  3105. "maximum": 2147483647
  3106. }
  3107. }
  3108. ],
  3109. "responses": {
  3110. "200": {
  3111. "description": "成功;JSON 业务码 code=0",
  3112. "content": {
  3113. "application/json": {
  3114. "schema": {
  3115. "type": "object",
  3116. "properties": {
  3117. "code": {
  3118. "type": "integer",
  3119. "enum": [
  3120. 0
  3121. ]
  3122. },
  3123. "message": {
  3124. "type": "string",
  3125. "example": "ok"
  3126. },
  3127. "data": {
  3128. "$ref": "#/components/schemas/TaskDetail"
  3129. },
  3130. "request_id": {
  3131. "type": "string",
  3132. "pattern": "^[a-f0-9]{32}$"
  3133. }
  3134. },
  3135. "required": [
  3136. "code",
  3137. "message",
  3138. "data",
  3139. "request_id"
  3140. ]
  3141. }
  3142. }
  3143. }
  3144. },
  3145. "400": {
  3146. "$ref": "#/components/responses/Error"
  3147. },
  3148. "401": {
  3149. "$ref": "#/components/responses/Error"
  3150. },
  3151. "403": {
  3152. "$ref": "#/components/responses/Error"
  3153. },
  3154. "404": {
  3155. "$ref": "#/components/responses/Error"
  3156. },
  3157. "409": {
  3158. "$ref": "#/components/responses/Error"
  3159. },
  3160. "413": {
  3161. "$ref": "#/components/responses/Error"
  3162. },
  3163. "415": {
  3164. "$ref": "#/components/responses/Error"
  3165. },
  3166. "422": {
  3167. "$ref": "#/components/responses/Error"
  3168. },
  3169. "500": {
  3170. "$ref": "#/components/responses/Error"
  3171. },
  3172. "503": {
  3173. "$ref": "#/components/responses/Error"
  3174. }
  3175. }
  3176. }
  3177. },
  3178. "/drivers/{driver}/tasks/{id}/start": {
  3179. "post": {
  3180. "tags": [
  3181. "司机"
  3182. ],
  3183. "summary": "出发配送",
  3184. "operationId": "post_drivers_driver_tasks_id_start",
  3185. "description": "本人任务从 assigned 出发进入 transit;使用既有库存出库事务。",
  3186. "parameters": [
  3187. {
  3188. "name": "driver",
  3189. "in": "path",
  3190. "required": true,
  3191. "schema": {
  3192. "type": "integer",
  3193. "format": "int64",
  3194. "description": "正整数资源 ID",
  3195. "minimum": 1,
  3196. "maximum": 2147483647
  3197. }
  3198. },
  3199. {
  3200. "name": "id",
  3201. "in": "path",
  3202. "required": true,
  3203. "schema": {
  3204. "type": "integer",
  3205. "format": "int64",
  3206. "description": "正整数资源 ID",
  3207. "minimum": 1,
  3208. "maximum": 2147483647
  3209. }
  3210. }
  3211. ],
  3212. "responses": {
  3213. "200": {
  3214. "description": "成功;JSON 业务码 code=0",
  3215. "content": {
  3216. "application/json": {
  3217. "schema": {
  3218. "type": "object",
  3219. "properties": {
  3220. "code": {
  3221. "type": "integer",
  3222. "enum": [
  3223. 0
  3224. ]
  3225. },
  3226. "message": {
  3227. "type": "string",
  3228. "example": "ok"
  3229. },
  3230. "data": {
  3231. "$ref": "#/components/schemas/CommandResult"
  3232. },
  3233. "request_id": {
  3234. "type": "string",
  3235. "pattern": "^[a-f0-9]{32}$"
  3236. }
  3237. },
  3238. "required": [
  3239. "code",
  3240. "message",
  3241. "data",
  3242. "request_id"
  3243. ]
  3244. }
  3245. }
  3246. }
  3247. },
  3248. "400": {
  3249. "$ref": "#/components/responses/Error"
  3250. },
  3251. "401": {
  3252. "$ref": "#/components/responses/Error"
  3253. },
  3254. "403": {
  3255. "$ref": "#/components/responses/Error"
  3256. },
  3257. "404": {
  3258. "$ref": "#/components/responses/Error"
  3259. },
  3260. "409": {
  3261. "$ref": "#/components/responses/Error"
  3262. },
  3263. "413": {
  3264. "$ref": "#/components/responses/Error"
  3265. },
  3266. "415": {
  3267. "$ref": "#/components/responses/Error"
  3268. },
  3269. "422": {
  3270. "$ref": "#/components/responses/Error"
  3271. },
  3272. "500": {
  3273. "$ref": "#/components/responses/Error"
  3274. },
  3275. "503": {
  3276. "$ref": "#/components/responses/Error"
  3277. }
  3278. },
  3279. "requestBody": {
  3280. "required": true,
  3281. "content": {
  3282. "application/json": {
  3283. "schema": {
  3284. "$ref": "#/components/schemas/CommandRequest"
  3285. }
  3286. }
  3287. }
  3288. }
  3289. }
  3290. },
  3291. "/drivers/{driver}/tasks/{id}/checkin": {
  3292. "post": {
  3293. "tags": [
  3294. "司机"
  3295. ],
  3296. "summary": "到达打卡",
  3297. "operationId": "post_drivers_driver_tasks_id_checkin",
  3298. "description": "仅 transit;wx.getLocation({type:\"gcj02\"}) 上报数值坐标。只记录客户端坐标,location_verified=false。",
  3299. "parameters": [
  3300. {
  3301. "name": "driver",
  3302. "in": "path",
  3303. "required": true,
  3304. "schema": {
  3305. "type": "integer",
  3306. "format": "int64",
  3307. "description": "正整数资源 ID",
  3308. "minimum": 1,
  3309. "maximum": 2147483647
  3310. }
  3311. },
  3312. {
  3313. "name": "id",
  3314. "in": "path",
  3315. "required": true,
  3316. "schema": {
  3317. "type": "integer",
  3318. "format": "int64",
  3319. "description": "正整数资源 ID",
  3320. "minimum": 1,
  3321. "maximum": 2147483647
  3322. }
  3323. }
  3324. ],
  3325. "responses": {
  3326. "200": {
  3327. "description": "成功;JSON 业务码 code=0",
  3328. "content": {
  3329. "application/json": {
  3330. "schema": {
  3331. "type": "object",
  3332. "properties": {
  3333. "code": {
  3334. "type": "integer",
  3335. "enum": [
  3336. 0
  3337. ]
  3338. },
  3339. "message": {
  3340. "type": "string",
  3341. "example": "ok"
  3342. },
  3343. "data": {
  3344. "$ref": "#/components/schemas/CheckinResult"
  3345. },
  3346. "request_id": {
  3347. "type": "string",
  3348. "pattern": "^[a-f0-9]{32}$"
  3349. }
  3350. },
  3351. "required": [
  3352. "code",
  3353. "message",
  3354. "data",
  3355. "request_id"
  3356. ]
  3357. }
  3358. }
  3359. }
  3360. },
  3361. "400": {
  3362. "$ref": "#/components/responses/Error"
  3363. },
  3364. "401": {
  3365. "$ref": "#/components/responses/Error"
  3366. },
  3367. "403": {
  3368. "$ref": "#/components/responses/Error"
  3369. },
  3370. "404": {
  3371. "$ref": "#/components/responses/Error"
  3372. },
  3373. "409": {
  3374. "$ref": "#/components/responses/Error"
  3375. },
  3376. "413": {
  3377. "$ref": "#/components/responses/Error"
  3378. },
  3379. "415": {
  3380. "$ref": "#/components/responses/Error"
  3381. },
  3382. "422": {
  3383. "$ref": "#/components/responses/Error"
  3384. },
  3385. "500": {
  3386. "$ref": "#/components/responses/Error"
  3387. },
  3388. "503": {
  3389. "$ref": "#/components/responses/Error"
  3390. }
  3391. },
  3392. "requestBody": {
  3393. "required": true,
  3394. "content": {
  3395. "application/json": {
  3396. "schema": {
  3397. "$ref": "#/components/schemas/CheckinRequest"
  3398. },
  3399. "example": {
  3400. "request_key": "checkin-20260918-0001",
  3401. "latitude": 22.522806,
  3402. "longitude": 113.92414
  3403. }
  3404. }
  3405. }
  3406. }
  3407. }
  3408. },
  3409. "/drivers/{driver}/tasks/{id}/draft": {
  3410. "post": {
  3411. "tags": [
  3412. "司机"
  3413. ],
  3414. "summary": "暂存履约记录",
  3415. "operationId": "post_drivers_driver_tasks_id_draft",
  3416. "description": "仅 transit;保存草稿,不扣权益、不完成配送。可不传照片或 confirmed。",
  3417. "parameters": [
  3418. {
  3419. "name": "driver",
  3420. "in": "path",
  3421. "required": true,
  3422. "schema": {
  3423. "type": "integer",
  3424. "format": "int64",
  3425. "description": "正整数资源 ID",
  3426. "minimum": 1,
  3427. "maximum": 2147483647
  3428. }
  3429. },
  3430. {
  3431. "name": "id",
  3432. "in": "path",
  3433. "required": true,
  3434. "schema": {
  3435. "type": "integer",
  3436. "format": "int64",
  3437. "description": "正整数资源 ID",
  3438. "minimum": 1,
  3439. "maximum": 2147483647
  3440. }
  3441. }
  3442. ],
  3443. "responses": {
  3444. "200": {
  3445. "description": "成功;JSON 业务码 code=0",
  3446. "content": {
  3447. "application/json": {
  3448. "schema": {
  3449. "type": "object",
  3450. "properties": {
  3451. "code": {
  3452. "type": "integer",
  3453. "enum": [
  3454. 0
  3455. ]
  3456. },
  3457. "message": {
  3458. "type": "string",
  3459. "example": "ok"
  3460. },
  3461. "data": {
  3462. "$ref": "#/components/schemas/DraftResult"
  3463. },
  3464. "request_id": {
  3465. "type": "string",
  3466. "pattern": "^[a-f0-9]{32}$"
  3467. }
  3468. },
  3469. "required": [
  3470. "code",
  3471. "message",
  3472. "data",
  3473. "request_id"
  3474. ]
  3475. }
  3476. }
  3477. }
  3478. },
  3479. "400": {
  3480. "$ref": "#/components/responses/Error"
  3481. },
  3482. "401": {
  3483. "$ref": "#/components/responses/Error"
  3484. },
  3485. "403": {
  3486. "$ref": "#/components/responses/Error"
  3487. },
  3488. "404": {
  3489. "$ref": "#/components/responses/Error"
  3490. },
  3491. "409": {
  3492. "$ref": "#/components/responses/Error"
  3493. },
  3494. "413": {
  3495. "$ref": "#/components/responses/Error"
  3496. },
  3497. "415": {
  3498. "$ref": "#/components/responses/Error"
  3499. },
  3500. "422": {
  3501. "$ref": "#/components/responses/Error"
  3502. },
  3503. "500": {
  3504. "$ref": "#/components/responses/Error"
  3505. },
  3506. "503": {
  3507. "$ref": "#/components/responses/Error"
  3508. }
  3509. },
  3510. "requestBody": {
  3511. "required": true,
  3512. "content": {
  3513. "application/json": {
  3514. "schema": {
  3515. "$ref": "#/components/schemas/DraftRequest"
  3516. }
  3517. }
  3518. }
  3519. }
  3520. }
  3521. },
  3522. "/drivers/{driver}/tasks/{id}/complete": {
  3523. "post": {
  3524. "tags": [
  3525. "司机"
  3526. ],
  3527. "summary": "确认实际签收",
  3528. "operationId": "post_drivers_driver_tasks_id_complete",
  3529. "description": "仅 transit;当前用户必须先打卡。照片须属于本任务,1–4张,不重复。accepted_qty不能超过计划数;部分/全部拒收须reason。按实际签收扣权益;有余货进入returning,交后台退货结算。",
  3530. "parameters": [
  3531. {
  3532. "name": "driver",
  3533. "in": "path",
  3534. "required": true,
  3535. "schema": {
  3536. "type": "integer",
  3537. "format": "int64",
  3538. "description": "正整数资源 ID",
  3539. "minimum": 1,
  3540. "maximum": 2147483647
  3541. }
  3542. },
  3543. {
  3544. "name": "id",
  3545. "in": "path",
  3546. "required": true,
  3547. "schema": {
  3548. "type": "integer",
  3549. "format": "int64",
  3550. "description": "正整数资源 ID",
  3551. "minimum": 1,
  3552. "maximum": 2147483647
  3553. }
  3554. }
  3555. ],
  3556. "responses": {
  3557. "200": {
  3558. "description": "成功;JSON 业务码 code=0",
  3559. "content": {
  3560. "application/json": {
  3561. "schema": {
  3562. "type": "object",
  3563. "properties": {
  3564. "code": {
  3565. "type": "integer",
  3566. "enum": [
  3567. 0
  3568. ]
  3569. },
  3570. "message": {
  3571. "type": "string",
  3572. "example": "ok"
  3573. },
  3574. "data": {
  3575. "$ref": "#/components/schemas/CommandResult"
  3576. },
  3577. "request_id": {
  3578. "type": "string",
  3579. "pattern": "^[a-f0-9]{32}$"
  3580. }
  3581. },
  3582. "required": [
  3583. "code",
  3584. "message",
  3585. "data",
  3586. "request_id"
  3587. ]
  3588. }
  3589. }
  3590. }
  3591. },
  3592. "400": {
  3593. "$ref": "#/components/responses/Error"
  3594. },
  3595. "401": {
  3596. "$ref": "#/components/responses/Error"
  3597. },
  3598. "403": {
  3599. "$ref": "#/components/responses/Error"
  3600. },
  3601. "404": {
  3602. "$ref": "#/components/responses/Error"
  3603. },
  3604. "409": {
  3605. "$ref": "#/components/responses/Error"
  3606. },
  3607. "413": {
  3608. "$ref": "#/components/responses/Error"
  3609. },
  3610. "415": {
  3611. "$ref": "#/components/responses/Error"
  3612. },
  3613. "422": {
  3614. "$ref": "#/components/responses/Error"
  3615. },
  3616. "500": {
  3617. "$ref": "#/components/responses/Error"
  3618. },
  3619. "503": {
  3620. "$ref": "#/components/responses/Error"
  3621. }
  3622. },
  3623. "requestBody": {
  3624. "required": true,
  3625. "content": {
  3626. "application/json": {
  3627. "schema": {
  3628. "$ref": "#/components/schemas/CompleteRequest"
  3629. },
  3630. "example": {
  3631. "request_key": "complete-20260918-0001",
  3632. "accepted_qty": 8,
  3633. "empty_returned": 0,
  3634. "receiver": "张先生",
  3635. "reason": "",
  3636. "photo_ids": [
  3637. 12
  3638. ],
  3639. "confirmed": true
  3640. }
  3641. }
  3642. }
  3643. }
  3644. }
  3645. },
  3646. "/drivers/{driver}/tasks/{id}/exception": {
  3647. "post": {
  3648. "tags": [
  3649. "司机"
  3650. ],
  3651. "summary": "上报配送异常",
  3652. "operationId": "post_drivers_driver_tasks_id_exception",
  3653. "description": "仅 transit;仅记录异常,不自动取消或完成任务,不改变库存权益。",
  3654. "parameters": [
  3655. {
  3656. "name": "driver",
  3657. "in": "path",
  3658. "required": true,
  3659. "schema": {
  3660. "type": "integer",
  3661. "format": "int64",
  3662. "description": "正整数资源 ID",
  3663. "minimum": 1,
  3664. "maximum": 2147483647
  3665. }
  3666. },
  3667. {
  3668. "name": "id",
  3669. "in": "path",
  3670. "required": true,
  3671. "schema": {
  3672. "type": "integer",
  3673. "format": "int64",
  3674. "description": "正整数资源 ID",
  3675. "minimum": 1,
  3676. "maximum": 2147483647
  3677. }
  3678. }
  3679. ],
  3680. "responses": {
  3681. "200": {
  3682. "description": "成功;JSON 业务码 code=0",
  3683. "content": {
  3684. "application/json": {
  3685. "schema": {
  3686. "type": "object",
  3687. "properties": {
  3688. "code": {
  3689. "type": "integer",
  3690. "enum": [
  3691. 0
  3692. ]
  3693. },
  3694. "message": {
  3695. "type": "string",
  3696. "example": "ok"
  3697. },
  3698. "data": {
  3699. "$ref": "#/components/schemas/ExceptionResult"
  3700. },
  3701. "request_id": {
  3702. "type": "string",
  3703. "pattern": "^[a-f0-9]{32}$"
  3704. }
  3705. },
  3706. "required": [
  3707. "code",
  3708. "message",
  3709. "data",
  3710. "request_id"
  3711. ]
  3712. }
  3713. }
  3714. }
  3715. },
  3716. "400": {
  3717. "$ref": "#/components/responses/Error"
  3718. },
  3719. "401": {
  3720. "$ref": "#/components/responses/Error"
  3721. },
  3722. "403": {
  3723. "$ref": "#/components/responses/Error"
  3724. },
  3725. "404": {
  3726. "$ref": "#/components/responses/Error"
  3727. },
  3728. "409": {
  3729. "$ref": "#/components/responses/Error"
  3730. },
  3731. "413": {
  3732. "$ref": "#/components/responses/Error"
  3733. },
  3734. "415": {
  3735. "$ref": "#/components/responses/Error"
  3736. },
  3737. "422": {
  3738. "$ref": "#/components/responses/Error"
  3739. },
  3740. "500": {
  3741. "$ref": "#/components/responses/Error"
  3742. },
  3743. "503": {
  3744. "$ref": "#/components/responses/Error"
  3745. }
  3746. },
  3747. "requestBody": {
  3748. "required": true,
  3749. "content": {
  3750. "application/json": {
  3751. "schema": {
  3752. "$ref": "#/components/schemas/ExceptionRequest"
  3753. }
  3754. }
  3755. }
  3756. }
  3757. }
  3758. },
  3759. "/drivers/{driver}/tasks/{id}/photos": {
  3760. "post": {
  3761. "tags": [
  3762. "司机"
  3763. ],
  3764. "summary": "上传履约照片",
  3765. "operationId": "post_drivers_driver_tasks_id_photos",
  3766. "description": "仅 transit;最多20张/任务。JSON请求≤3,000,000字节;原图≤2MiB,JPEG/PNG。服务端重编码JPEG并叠加服务器时间及上报坐标。",
  3767. "parameters": [
  3768. {
  3769. "name": "driver",
  3770. "in": "path",
  3771. "required": true,
  3772. "schema": {
  3773. "type": "integer",
  3774. "format": "int64",
  3775. "description": "正整数资源 ID",
  3776. "minimum": 1,
  3777. "maximum": 2147483647
  3778. }
  3779. },
  3780. {
  3781. "name": "id",
  3782. "in": "path",
  3783. "required": true,
  3784. "schema": {
  3785. "type": "integer",
  3786. "format": "int64",
  3787. "description": "正整数资源 ID",
  3788. "minimum": 1,
  3789. "maximum": 2147483647
  3790. }
  3791. }
  3792. ],
  3793. "responses": {
  3794. "200": {
  3795. "description": "成功;JSON 业务码 code=0",
  3796. "content": {
  3797. "application/json": {
  3798. "schema": {
  3799. "type": "object",
  3800. "properties": {
  3801. "code": {
  3802. "type": "integer",
  3803. "enum": [
  3804. 0
  3805. ]
  3806. },
  3807. "message": {
  3808. "type": "string",
  3809. "example": "ok"
  3810. },
  3811. "data": {
  3812. "$ref": "#/components/schemas/PhotoResult"
  3813. },
  3814. "request_id": {
  3815. "type": "string",
  3816. "pattern": "^[a-f0-9]{32}$"
  3817. }
  3818. },
  3819. "required": [
  3820. "code",
  3821. "message",
  3822. "data",
  3823. "request_id"
  3824. ]
  3825. }
  3826. }
  3827. }
  3828. },
  3829. "400": {
  3830. "$ref": "#/components/responses/Error"
  3831. },
  3832. "401": {
  3833. "$ref": "#/components/responses/Error"
  3834. },
  3835. "403": {
  3836. "$ref": "#/components/responses/Error"
  3837. },
  3838. "404": {
  3839. "$ref": "#/components/responses/Error"
  3840. },
  3841. "409": {
  3842. "$ref": "#/components/responses/Error"
  3843. },
  3844. "413": {
  3845. "$ref": "#/components/responses/Error"
  3846. },
  3847. "415": {
  3848. "$ref": "#/components/responses/Error"
  3849. },
  3850. "422": {
  3851. "$ref": "#/components/responses/Error"
  3852. },
  3853. "500": {
  3854. "$ref": "#/components/responses/Error"
  3855. },
  3856. "503": {
  3857. "$ref": "#/components/responses/Error"
  3858. }
  3859. },
  3860. "requestBody": {
  3861. "required": true,
  3862. "content": {
  3863. "application/json": {
  3864. "schema": {
  3865. "$ref": "#/components/schemas/PhotoRequest"
  3866. }
  3867. }
  3868. }
  3869. }
  3870. }
  3871. },
  3872. "/drivers/{driver}/tasks/{id}/device-check": {
  3873. "get": {
  3874. "tags": [
  3875. "司机"
  3876. ],
  3877. "summary": "查询当前企业设备登记状态",
  3878. "operationId": "get_drivers_driver_tasks_id_device_check",
  3879. "description": "仅查已绑定该任务企业的设备;不执行绑定,不把登记当成联网测试成功。",
  3880. "parameters": [
  3881. {
  3882. "name": "driver",
  3883. "in": "path",
  3884. "required": true,
  3885. "schema": {
  3886. "type": "integer",
  3887. "format": "int64",
  3888. "description": "正整数资源 ID",
  3889. "minimum": 1,
  3890. "maximum": 2147483647
  3891. }
  3892. },
  3893. {
  3894. "name": "id",
  3895. "in": "path",
  3896. "required": true,
  3897. "schema": {
  3898. "type": "integer",
  3899. "format": "int64",
  3900. "description": "正整数资源 ID",
  3901. "minimum": 1,
  3902. "maximum": 2147483647
  3903. }
  3904. },
  3905. {
  3906. "name": "sn",
  3907. "in": "query",
  3908. "required": true,
  3909. "schema": {
  3910. "type": "string",
  3911. "minLength": 1,
  3912. "maxLength": 80
  3913. },
  3914. "description": "设备序列号"
  3915. }
  3916. ],
  3917. "responses": {
  3918. "200": {
  3919. "description": "成功;JSON 业务码 code=0",
  3920. "content": {
  3921. "application/json": {
  3922. "schema": {
  3923. "type": "object",
  3924. "properties": {
  3925. "code": {
  3926. "type": "integer",
  3927. "enum": [
  3928. 0
  3929. ]
  3930. },
  3931. "message": {
  3932. "type": "string",
  3933. "example": "ok"
  3934. },
  3935. "data": {
  3936. "$ref": "#/components/schemas/DeviceCheck"
  3937. },
  3938. "request_id": {
  3939. "type": "string",
  3940. "pattern": "^[a-f0-9]{32}$"
  3941. }
  3942. },
  3943. "required": [
  3944. "code",
  3945. "message",
  3946. "data",
  3947. "request_id"
  3948. ]
  3949. }
  3950. }
  3951. }
  3952. },
  3953. "400": {
  3954. "$ref": "#/components/responses/Error"
  3955. },
  3956. "401": {
  3957. "$ref": "#/components/responses/Error"
  3958. },
  3959. "403": {
  3960. "$ref": "#/components/responses/Error"
  3961. },
  3962. "404": {
  3963. "$ref": "#/components/responses/Error"
  3964. },
  3965. "409": {
  3966. "$ref": "#/components/responses/Error"
  3967. },
  3968. "413": {
  3969. "$ref": "#/components/responses/Error"
  3970. },
  3971. "415": {
  3972. "$ref": "#/components/responses/Error"
  3973. },
  3974. "422": {
  3975. "$ref": "#/components/responses/Error"
  3976. },
  3977. "500": {
  3978. "$ref": "#/components/responses/Error"
  3979. },
  3980. "503": {
  3981. "$ref": "#/components/responses/Error"
  3982. }
  3983. }
  3984. }
  3985. },
  3986. "/photos/{id}": {
  3987. "get": {
  3988. "tags": [
  3989. "照片"
  3990. ],
  3991. "summary": "读取私有履约照片",
  3992. "operationId": "get_photos_id",
  3993. "description": "携带Bearer并校验该照片对应任务归属;成功直接返回JPEG字节,无JSON包装。微信端使用wx.downloadFile的header传令牌,获得临时路径后展示。",
  3994. "parameters": [
  3995. {
  3996. "name": "id",
  3997. "in": "path",
  3998. "required": true,
  3999. "schema": {
  4000. "type": "integer",
  4001. "format": "int64",
  4002. "description": "正整数资源 ID",
  4003. "minimum": 1,
  4004. "maximum": 2147483647
  4005. }
  4006. },
  4007. {
  4008. "name": "scope",
  4009. "in": "query",
  4010. "required": true,
  4011. "schema": {
  4012. "type": "string",
  4013. "enum": [
  4014. "enterprise",
  4015. "driver"
  4016. ]
  4017. },
  4018. "description": "访问业务身份"
  4019. },
  4020. {
  4021. "name": "resource_id",
  4022. "in": "query",
  4023. "required": true,
  4024. "schema": {
  4025. "type": "integer",
  4026. "format": "int64",
  4027. "description": "正整数资源 ID",
  4028. "minimum": 1,
  4029. "maximum": 2147483647
  4030. },
  4031. "description": "企业或司机ID,与scope对应"
  4032. }
  4033. ],
  4034. "responses": {
  4035. "200": {
  4036. "description": "JPEG照片;Cache-Control:no-store",
  4037. "content": {
  4038. "image/jpeg": {
  4039. "schema": {
  4040. "type": "string",
  4041. "format": "binary"
  4042. }
  4043. }
  4044. }
  4045. },
  4046. "400": {
  4047. "$ref": "#/components/responses/Error"
  4048. },
  4049. "401": {
  4050. "$ref": "#/components/responses/Error"
  4051. },
  4052. "403": {
  4053. "$ref": "#/components/responses/Error"
  4054. },
  4055. "404": {
  4056. "$ref": "#/components/responses/Error"
  4057. },
  4058. "409": {
  4059. "$ref": "#/components/responses/Error"
  4060. },
  4061. "413": {
  4062. "$ref": "#/components/responses/Error"
  4063. },
  4064. "415": {
  4065. "$ref": "#/components/responses/Error"
  4066. },
  4067. "422": {
  4068. "$ref": "#/components/responses/Error"
  4069. },
  4070. "500": {
  4071. "$ref": "#/components/responses/Error"
  4072. },
  4073. "503": {
  4074. "$ref": "#/components/responses/Error"
  4075. }
  4076. }
  4077. }
  4078. },
  4079. "/agents/{agent}/dashboard": {
  4080. "get": {
  4081. "tags": [
  4082. "代理"
  4083. ],
  4084. "summary": "代理经营看板",
  4085. "operationId": "get_agents_agent_dashboard",
  4086. "description": "本代理及有效下级企业,按企业当前归属统计真实收款;历史订单可能随企业归属变化,不是佣金账本。",
  4087. "parameters": [
  4088. {
  4089. "name": "agent",
  4090. "in": "path",
  4091. "required": true,
  4092. "schema": {
  4093. "type": "integer",
  4094. "format": "int64",
  4095. "description": "正整数资源 ID",
  4096. "minimum": 1,
  4097. "maximum": 2147483647
  4098. }
  4099. }
  4100. ],
  4101. "responses": {
  4102. "200": {
  4103. "description": "成功;JSON 业务码 code=0",
  4104. "content": {
  4105. "application/json": {
  4106. "schema": {
  4107. "type": "object",
  4108. "properties": {
  4109. "code": {
  4110. "type": "integer",
  4111. "enum": [
  4112. 0
  4113. ]
  4114. },
  4115. "message": {
  4116. "type": "string",
  4117. "example": "ok"
  4118. },
  4119. "data": {
  4120. "$ref": "#/components/schemas/AgentDashboard"
  4121. },
  4122. "request_id": {
  4123. "type": "string",
  4124. "pattern": "^[a-f0-9]{32}$"
  4125. }
  4126. },
  4127. "required": [
  4128. "code",
  4129. "message",
  4130. "data",
  4131. "request_id"
  4132. ]
  4133. }
  4134. }
  4135. }
  4136. },
  4137. "400": {
  4138. "$ref": "#/components/responses/Error"
  4139. },
  4140. "401": {
  4141. "$ref": "#/components/responses/Error"
  4142. },
  4143. "403": {
  4144. "$ref": "#/components/responses/Error"
  4145. },
  4146. "404": {
  4147. "$ref": "#/components/responses/Error"
  4148. },
  4149. "409": {
  4150. "$ref": "#/components/responses/Error"
  4151. },
  4152. "413": {
  4153. "$ref": "#/components/responses/Error"
  4154. },
  4155. "415": {
  4156. "$ref": "#/components/responses/Error"
  4157. },
  4158. "422": {
  4159. "$ref": "#/components/responses/Error"
  4160. },
  4161. "500": {
  4162. "$ref": "#/components/responses/Error"
  4163. },
  4164. "503": {
  4165. "$ref": "#/components/responses/Error"
  4166. }
  4167. }
  4168. }
  4169. },
  4170. "/agents/{agent}/customers": {
  4171. "get": {
  4172. "tags": [
  4173. "代理"
  4174. ],
  4175. "summary": "代理客户列表",
  4176. "operationId": "get_agents_agent_customers",
  4177. "description": "new=本月新增;unpaid=截至当前时间无收款。summary不随关键词/分页/筛选变化。金额排除未来日期记录。",
  4178. "parameters": [
  4179. {
  4180. "name": "agent",
  4181. "in": "path",
  4182. "required": true,
  4183. "schema": {
  4184. "type": "integer",
  4185. "format": "int64",
  4186. "description": "正整数资源 ID",
  4187. "minimum": 1,
  4188. "maximum": 2147483647
  4189. }
  4190. },
  4191. {
  4192. "name": "page",
  4193. "in": "query",
  4194. "required": false,
  4195. "schema": {
  4196. "type": "integer",
  4197. "format": "int64",
  4198. "minimum": 1,
  4199. "maximum": 1000000,
  4200. "default": 1
  4201. }
  4202. },
  4203. {
  4204. "name": "page_size",
  4205. "in": "query",
  4206. "required": false,
  4207. "schema": {
  4208. "type": "integer",
  4209. "format": "int64",
  4210. "minimum": 1,
  4211. "maximum": 100,
  4212. "default": 20
  4213. }
  4214. },
  4215. {
  4216. "name": "keyword",
  4217. "in": "query",
  4218. "required": false,
  4219. "schema": {
  4220. "type": "string",
  4221. "maxLength": 120
  4222. }
  4223. },
  4224. {
  4225. "name": "filter",
  4226. "in": "query",
  4227. "required": false,
  4228. "schema": {
  4229. "type": "string",
  4230. "enum": [
  4231. "all",
  4232. "new",
  4233. "unpaid"
  4234. ],
  4235. "default": "all"
  4236. }
  4237. }
  4238. ],
  4239. "responses": {
  4240. "200": {
  4241. "description": "成功;JSON 业务码 code=0",
  4242. "content": {
  4243. "application/json": {
  4244. "schema": {
  4245. "type": "object",
  4246. "properties": {
  4247. "code": {
  4248. "type": "integer",
  4249. "enum": [
  4250. 0
  4251. ]
  4252. },
  4253. "message": {
  4254. "type": "string",
  4255. "example": "ok"
  4256. },
  4257. "data": {
  4258. "$ref": "#/components/schemas/CustomerPage"
  4259. },
  4260. "request_id": {
  4261. "type": "string",
  4262. "pattern": "^[a-f0-9]{32}$"
  4263. }
  4264. },
  4265. "required": [
  4266. "code",
  4267. "message",
  4268. "data",
  4269. "request_id"
  4270. ]
  4271. }
  4272. }
  4273. }
  4274. },
  4275. "400": {
  4276. "$ref": "#/components/responses/Error"
  4277. },
  4278. "401": {
  4279. "$ref": "#/components/responses/Error"
  4280. },
  4281. "403": {
  4282. "$ref": "#/components/responses/Error"
  4283. },
  4284. "404": {
  4285. "$ref": "#/components/responses/Error"
  4286. },
  4287. "409": {
  4288. "$ref": "#/components/responses/Error"
  4289. },
  4290. "413": {
  4291. "$ref": "#/components/responses/Error"
  4292. },
  4293. "415": {
  4294. "$ref": "#/components/responses/Error"
  4295. },
  4296. "422": {
  4297. "$ref": "#/components/responses/Error"
  4298. },
  4299. "500": {
  4300. "$ref": "#/components/responses/Error"
  4301. },
  4302. "503": {
  4303. "$ref": "#/components/responses/Error"
  4304. }
  4305. }
  4306. }
  4307. },
  4308. "/agents/{agent}/orders": {
  4309. "get": {
  4310. "tags": [
  4311. "代理"
  4312. ],
  4313. "summary": "代理范围内已收款订单",
  4314. "operationId": "get_agents_agent_orders",
  4315. "description": "不含小程序待支付意向;排除未来日期记录。",
  4316. "parameters": [
  4317. {
  4318. "name": "agent",
  4319. "in": "path",
  4320. "required": true,
  4321. "schema": {
  4322. "type": "integer",
  4323. "format": "int64",
  4324. "description": "正整数资源 ID",
  4325. "minimum": 1,
  4326. "maximum": 2147483647
  4327. }
  4328. },
  4329. {
  4330. "name": "page",
  4331. "in": "query",
  4332. "required": false,
  4333. "schema": {
  4334. "type": "integer",
  4335. "format": "int64",
  4336. "minimum": 1,
  4337. "maximum": 1000000,
  4338. "default": 1
  4339. }
  4340. },
  4341. {
  4342. "name": "page_size",
  4343. "in": "query",
  4344. "required": false,
  4345. "schema": {
  4346. "type": "integer",
  4347. "format": "int64",
  4348. "minimum": 1,
  4349. "maximum": 100,
  4350. "default": 20
  4351. }
  4352. },
  4353. {
  4354. "name": "enterprise_id",
  4355. "in": "query",
  4356. "required": false,
  4357. "schema": {
  4358. "type": "integer",
  4359. "format": "int64",
  4360. "description": "正整数资源 ID",
  4361. "minimum": 1,
  4362. "maximum": 2147483647
  4363. },
  4364. "description": "仅缩小当前代理范围;不在范围返回空列表"
  4365. }
  4366. ],
  4367. "responses": {
  4368. "200": {
  4369. "description": "成功;JSON 业务码 code=0",
  4370. "content": {
  4371. "application/json": {
  4372. "schema": {
  4373. "type": "object",
  4374. "properties": {
  4375. "code": {
  4376. "type": "integer",
  4377. "enum": [
  4378. 0
  4379. ]
  4380. },
  4381. "message": {
  4382. "type": "string",
  4383. "example": "ok"
  4384. },
  4385. "data": {
  4386. "$ref": "#/components/schemas/AgentOrderPage"
  4387. },
  4388. "request_id": {
  4389. "type": "string",
  4390. "pattern": "^[a-f0-9]{32}$"
  4391. }
  4392. },
  4393. "required": [
  4394. "code",
  4395. "message",
  4396. "data",
  4397. "request_id"
  4398. ]
  4399. }
  4400. }
  4401. }
  4402. },
  4403. "400": {
  4404. "$ref": "#/components/responses/Error"
  4405. },
  4406. "401": {
  4407. "$ref": "#/components/responses/Error"
  4408. },
  4409. "403": {
  4410. "$ref": "#/components/responses/Error"
  4411. },
  4412. "404": {
  4413. "$ref": "#/components/responses/Error"
  4414. },
  4415. "409": {
  4416. "$ref": "#/components/responses/Error"
  4417. },
  4418. "413": {
  4419. "$ref": "#/components/responses/Error"
  4420. },
  4421. "415": {
  4422. "$ref": "#/components/responses/Error"
  4423. },
  4424. "422": {
  4425. "$ref": "#/components/responses/Error"
  4426. },
  4427. "500": {
  4428. "$ref": "#/components/responses/Error"
  4429. },
  4430. "503": {
  4431. "$ref": "#/components/responses/Error"
  4432. }
  4433. }
  4434. }
  4435. },
  4436. "/agents/{agent}/commissions": {
  4437. "get": {
  4438. "tags": [
  4439. "代理"
  4440. ],
  4441. "summary": "代理佣金计提明细",
  4442. "operationId": "get_agents_agent_commissions",
  4443. "description": "正式订单仅给成交时客户直接归属代理按后台当前比例计提,默认一级10%、二级5%、三级2%。新佣金状态为pending,提现未开放。历史订单不补记;调整比例不重算历史佣金;source=demo仅返回本地演示数据。",
  4444. "parameters": [
  4445. {
  4446. "name": "agent",
  4447. "in": "path",
  4448. "required": true,
  4449. "schema": {
  4450. "type": "integer",
  4451. "format": "int64",
  4452. "description": "正整数资源 ID",
  4453. "minimum": 1,
  4454. "maximum": 2147483647
  4455. }
  4456. },
  4457. {
  4458. "name": "page",
  4459. "in": "query",
  4460. "schema": {
  4461. "type": "integer",
  4462. "minimum": 1,
  4463. "default": 1
  4464. }
  4465. },
  4466. {
  4467. "name": "page_size",
  4468. "in": "query",
  4469. "schema": {
  4470. "type": "integer",
  4471. "minimum": 1,
  4472. "maximum": 100,
  4473. "default": 20
  4474. }
  4475. },
  4476. {
  4477. "name": "status",
  4478. "in": "query",
  4479. "schema": {
  4480. "type": "string",
  4481. "enum": [
  4482. "all",
  4483. "pending",
  4484. "settled",
  4485. "adjustment",
  4486. "withdrawn"
  4487. ],
  4488. "default": "all"
  4489. }
  4490. },
  4491. {
  4492. "name": "source",
  4493. "in": "query",
  4494. "description": "默认正式佣金账本;demo仅用于本地测试夹具",
  4495. "schema": {
  4496. "type": "string",
  4497. "enum": [
  4498. "regular",
  4499. "demo"
  4500. ],
  4501. "default": "regular"
  4502. }
  4503. }
  4504. ],
  4505. "responses": {
  4506. "200": {
  4507. "description": "成功;JSON 业务码 code=0",
  4508. "content": {
  4509. "application/json": {
  4510. "schema": {
  4511. "type": "object",
  4512. "properties": {
  4513. "code": {
  4514. "type": "integer",
  4515. "enum": [
  4516. 0
  4517. ]
  4518. },
  4519. "message": {
  4520. "type": "string",
  4521. "example": "ok"
  4522. },
  4523. "data": {
  4524. "$ref": "#/components/schemas/Commissions"
  4525. },
  4526. "request_id": {
  4527. "type": "string",
  4528. "pattern": "^[a-f0-9]{32}$"
  4529. }
  4530. },
  4531. "required": [
  4532. "code",
  4533. "message",
  4534. "data",
  4535. "request_id"
  4536. ]
  4537. }
  4538. }
  4539. }
  4540. },
  4541. "400": {
  4542. "$ref": "#/components/responses/Error"
  4543. },
  4544. "401": {
  4545. "$ref": "#/components/responses/Error"
  4546. },
  4547. "403": {
  4548. "$ref": "#/components/responses/Error"
  4549. },
  4550. "404": {
  4551. "$ref": "#/components/responses/Error"
  4552. },
  4553. "409": {
  4554. "$ref": "#/components/responses/Error"
  4555. },
  4556. "413": {
  4557. "$ref": "#/components/responses/Error"
  4558. },
  4559. "415": {
  4560. "$ref": "#/components/responses/Error"
  4561. },
  4562. "422": {
  4563. "$ref": "#/components/responses/Error"
  4564. },
  4565. "500": {
  4566. "$ref": "#/components/responses/Error"
  4567. },
  4568. "503": {
  4569. "$ref": "#/components/responses/Error"
  4570. }
  4571. }
  4572. }
  4573. },
  4574. "/agents/{agent}/withdrawals": {
  4575. "post": {
  4576. "tags": [
  4577. "代理"
  4578. ],
  4579. "summary": "佣金提现(尚未开通)",
  4580. "operationId": "post_agents_agent_withdrawals",
  4581. "description": "校验代理身份后返回 HTTP503/code50303,不创建提现申请,无提现请求参数。可发送 {}。",
  4582. "parameters": [
  4583. {
  4584. "name": "agent",
  4585. "in": "path",
  4586. "required": true,
  4587. "schema": {
  4588. "type": "integer",
  4589. "format": "int64",
  4590. "description": "正整数资源 ID",
  4591. "minimum": 1,
  4592. "maximum": 2147483647
  4593. }
  4594. }
  4595. ],
  4596. "responses": {
  4597. "400": {
  4598. "$ref": "#/components/responses/Error"
  4599. },
  4600. "401": {
  4601. "$ref": "#/components/responses/Error"
  4602. },
  4603. "403": {
  4604. "$ref": "#/components/responses/Error"
  4605. },
  4606. "404": {
  4607. "$ref": "#/components/responses/Error"
  4608. },
  4609. "409": {
  4610. "$ref": "#/components/responses/Error"
  4611. },
  4612. "413": {
  4613. "$ref": "#/components/responses/Error"
  4614. },
  4615. "415": {
  4616. "$ref": "#/components/responses/Error"
  4617. },
  4618. "422": {
  4619. "$ref": "#/components/responses/Error"
  4620. },
  4621. "500": {
  4622. "$ref": "#/components/responses/Error"
  4623. },
  4624. "503": {
  4625. "$ref": "#/components/responses/Error"
  4626. }
  4627. }
  4628. }
  4629. },
  4630. "/auth/send-sms": {
  4631. "post": {
  4632. "tags": [
  4633. "公共与登录"
  4634. ],
  4635. "summary": "下发短信登录验证码",
  4636. "operationId": "post_auth_send_sms",
  4637. "description": "需开启 MINI_SMS_LOGIN 且配置短信宝账号。手机号必须先在后台绑定到已有小程序账号,否则不会真正下发短信。为防止枚举注册手机号,已绑定与未绑定返回完全一致的成功响应,未绑定时不发送也不落库。服务端限流:同号 60 秒内不可重发、同号每日上限、单 IP 每小时上限;超限返回 42901。验证码 6 位、2 分钟(120秒)过期、仅存哈希、单次有效、重发即作废旧码、连续错误 5 次作废。发送失败统一 50302,不透出短信宝返回码。",
  4638. "parameters": [],
  4639. "responses": {
  4640. "200": {
  4641. "description": "成功;JSON 业务码 code=0。无论手机号是否绑定均返回此结构。",
  4642. "content": {
  4643. "application/json": {
  4644. "schema": {
  4645. "type": "object",
  4646. "properties": {
  4647. "code": {
  4648. "type": "integer",
  4649. "enum": [
  4650. 0
  4651. ]
  4652. },
  4653. "message": {
  4654. "type": "string",
  4655. "example": "ok"
  4656. },
  4657. "data": {
  4658. "type": "object",
  4659. "properties": {
  4660. "sent": {
  4661. "type": "boolean",
  4662. "example": true
  4663. },
  4664. "expires_in": {
  4665. "type": "integer",
  4666. "example": 120
  4667. }
  4668. },
  4669. "required": [
  4670. "sent",
  4671. "expires_in"
  4672. ]
  4673. },
  4674. "request_id": {
  4675. "type": "string",
  4676. "pattern": "^[a-f0-9]{32}$"
  4677. }
  4678. },
  4679. "required": [
  4680. "code",
  4681. "message",
  4682. "data",
  4683. "request_id"
  4684. ]
  4685. }
  4686. }
  4687. }
  4688. },
  4689. "400": {
  4690. "$ref": "#/components/responses/Error"
  4691. },
  4692. "413": {
  4693. "$ref": "#/components/responses/Error"
  4694. },
  4695. "415": {
  4696. "$ref": "#/components/responses/Error"
  4697. },
  4698. "422": {
  4699. "$ref": "#/components/responses/Error"
  4700. },
  4701. "429": {
  4702. "$ref": "#/components/responses/Error"
  4703. },
  4704. "500": {
  4705. "$ref": "#/components/responses/Error"
  4706. },
  4707. "503": {
  4708. "$ref": "#/components/responses/Error"
  4709. }
  4710. },
  4711. "security": [],
  4712. "requestBody": {
  4713. "required": true,
  4714. "content": {
  4715. "application/json": {
  4716. "schema": {
  4717. "type": "object",
  4718. "additionalProperties": false,
  4719. "required": [
  4720. "phone"
  4721. ],
  4722. "properties": {
  4723. "phone": {
  4724. "type": "string",
  4725. "pattern": "^1[3-9][0-9]{9}$"
  4726. }
  4727. }
  4728. },
  4729. "example": {
  4730. "phone": "13800138000"
  4731. }
  4732. }
  4733. }
  4734. }
  4735. }
  4736. },
  4737. "/auth/phone-login": {
  4738. "post": {
  4739. "tags": [
  4740. "公共与登录"
  4741. ],
  4742. "summary": "短信验证码登录",
  4743. "operationId": "post_auth_phone_login",
  4744. "description": "需开启 MINI_SMS_LOGIN。校验通过后登录到该手机号所绑定的小程序账号,user_id、身份与权限与同一账号的微信登录完全一致;验证码消费后立即作废,重复提交返回 40102。手机号未绑定或账号已停用时同样返回 40102,不透露账号是否存在。验证码错误累计 5 次后该验证码作废,需重新获取。",
  4745. "parameters": [],
  4746. "responses": {
  4747. "200": {
  4748. "description": "成功;JSON 业务码 code=0",
  4749. "content": {
  4750. "application/json": {
  4751. "schema": {
  4752. "type": "object",
  4753. "properties": {
  4754. "code": {
  4755. "type": "integer",
  4756. "enum": [
  4757. 0
  4758. ]
  4759. },
  4760. "message": {
  4761. "type": "string",
  4762. "example": "ok"
  4763. },
  4764. "data": {
  4765. "$ref": "#/components/schemas/Login"
  4766. },
  4767. "request_id": {
  4768. "type": "string",
  4769. "pattern": "^[a-f0-9]{32}$"
  4770. }
  4771. },
  4772. "required": [
  4773. "code",
  4774. "message",
  4775. "data",
  4776. "request_id"
  4777. ]
  4778. }
  4779. }
  4780. }
  4781. },
  4782. "400": {
  4783. "$ref": "#/components/responses/Error"
  4784. },
  4785. "401": {
  4786. "$ref": "#/components/responses/Error"
  4787. },
  4788. "403": {
  4789. "$ref": "#/components/responses/Error"
  4790. },
  4791. "404": {
  4792. "$ref": "#/components/responses/Error"
  4793. },
  4794. "413": {
  4795. "$ref": "#/components/responses/Error"
  4796. },
  4797. "415": {
  4798. "$ref": "#/components/responses/Error"
  4799. },
  4800. "422": {
  4801. "$ref": "#/components/responses/Error"
  4802. },
  4803. "429": {
  4804. "$ref": "#/components/responses/Error"
  4805. },
  4806. "500": {
  4807. "$ref": "#/components/responses/Error"
  4808. },
  4809. "503": {
  4810. "$ref": "#/components/responses/Error"
  4811. }
  4812. },
  4813. "security": [],
  4814. "requestBody": {
  4815. "required": true,
  4816. "content": {
  4817. "application/json": {
  4818. "schema": {
  4819. "type": "object",
  4820. "additionalProperties": false,
  4821. "required": [
  4822. "phone",
  4823. "code"
  4824. ],
  4825. "properties": {
  4826. "phone": {
  4827. "type": "string",
  4828. "pattern": "^1[3-9][0-9]{9}$"
  4829. },
  4830. "code": {
  4831. "type": "string",
  4832. "pattern": "^[0-9]{6}$"
  4833. }
  4834. }
  4835. },
  4836. "example": {
  4837. "phone": "13800138000",
  4838. "code": "123456"
  4839. }
  4840. }
  4841. }
  4842. }
  4843. }
  4844. }, "/auth/test-phone": {
  4845. "post": {
  4846. "tags": [
  4847. "公共与登录"
  4848. ],
  4849. "summary": "本地测试手机号登录",
  4850. "operationId": "post_auth_test_phone",
  4851. "description": "仅 APP_ENV=local 且 MINI_TEST_PHONE_LOGIN=true 开启,要求连接来源为本机回环地址(不信任代理头)。固定测试身份,与微信及真实手机身份隔离;账号须预先初始化,仅获得已绑定权限。关闭开关后既有测试会话失效。非短信验证接口,禁止正式部署启用。",
  4852. "parameters": [],
  4853. "responses": {
  4854. "200": {
  4855. "description": "成功;JSON 业务码 code=0",
  4856. "content": {
  4857. "application/json": {
  4858. "schema": {
  4859. "type": "object",
  4860. "properties": {
  4861. "code": {
  4862. "type": "integer",
  4863. "enum": [
  4864. 0
  4865. ]
  4866. },
  4867. "message": {
  4868. "type": "string",
  4869. "example": "ok"
  4870. },
  4871. "data": {
  4872. "$ref": "#/components/schemas/Login"
  4873. },
  4874. "request_id": {
  4875. "type": "string",
  4876. "pattern": "^[a-f0-9]{32}$"
  4877. }
  4878. },
  4879. "required": [
  4880. "code",
  4881. "message",
  4882. "data",
  4883. "request_id"
  4884. ]
  4885. }
  4886. }
  4887. }
  4888. },
  4889. "400": {
  4890. "$ref": "#/components/responses/Error"
  4891. },
  4892. "401": {
  4893. "$ref": "#/components/responses/Error"
  4894. },
  4895. "403": {
  4896. "$ref": "#/components/responses/Error"
  4897. },
  4898. "404": {
  4899. "$ref": "#/components/responses/Error"
  4900. },
  4901. "413": {
  4902. "$ref": "#/components/responses/Error"
  4903. },
  4904. "415": {
  4905. "$ref": "#/components/responses/Error"
  4906. },
  4907. "422": {
  4908. "$ref": "#/components/responses/Error"
  4909. },
  4910. "429": {
  4911. "$ref": "#/components/responses/Error"
  4912. },
  4913. "500": {
  4914. "$ref": "#/components/responses/Error"
  4915. },
  4916. "503": {
  4917. "$ref": "#/components/responses/Error"
  4918. }
  4919. },
  4920. "security": [],
  4921. "requestBody": {
  4922. "required": true,
  4923. "content": {
  4924. "application/json": {
  4925. "schema": {
  4926. "type": "object",
  4927. "additionalProperties": false,
  4928. "required": [
  4929. "phone",
  4930. "code"
  4931. ],
  4932. "properties": {
  4933. "phone": {
  4934. "type": "string",
  4935. "enum": [
  4936. "13012345678"
  4937. ]
  4938. },
  4939. "code": {
  4940. "type": "string",
  4941. "enum": [
  4942. "66666"
  4943. ]
  4944. }
  4945. }
  4946. },
  4947. "example": {
  4948. "phone": "13012345678",
  4949. "code": "66666"
  4950. }
  4951. }
  4952. }
  4953. }
  4954. }
  4955. },
  4956. "/enterprises/{enterprise}/addresses": {
  4957. "post": {
  4958. "tags": [
  4959. "企业"
  4960. ],
  4961. "summary": "新增配送地址",
  4962. "operationId": "post_enterprises_enterprise_addresses",
  4963. "description": "仅企业管理员。首个地址自动设为默认;写入使用请求标识保证幂等。",
  4964. "parameters": [
  4965. {
  4966. "name": "enterprise",
  4967. "in": "path",
  4968. "required": true,
  4969. "schema": {
  4970. "type": "integer",
  4971. "format": "int64",
  4972. "description": "正整数资源 ID",
  4973. "minimum": 1,
  4974. "maximum": 2147483647
  4975. }
  4976. }
  4977. ],
  4978. "responses": {
  4979. "200": {
  4980. "description": "成功;JSON 业务码 code=0",
  4981. "content": {
  4982. "application/json": {
  4983. "schema": {
  4984. "type": "object",
  4985. "properties": {
  4986. "code": {
  4987. "type": "integer",
  4988. "enum": [
  4989. 0
  4990. ]
  4991. },
  4992. "message": {
  4993. "type": "string",
  4994. "example": "ok"
  4995. },
  4996. "data": {
  4997. "$ref": "#/components/schemas/DeliveryAddressResult"
  4998. },
  4999. "request_id": {
  5000. "type": "string",
  5001. "pattern": "^[a-f0-9]{32}$"
  5002. }
  5003. },
  5004. "required": [
  5005. "code",
  5006. "message",
  5007. "data",
  5008. "request_id"
  5009. ]
  5010. }
  5011. }
  5012. }
  5013. },
  5014. "400": {
  5015. "$ref": "#/components/responses/Error"
  5016. },
  5017. "401": {
  5018. "$ref": "#/components/responses/Error"
  5019. },
  5020. "403": {
  5021. "$ref": "#/components/responses/Error"
  5022. },
  5023. "404": {
  5024. "$ref": "#/components/responses/Error"
  5025. },
  5026. "409": {
  5027. "$ref": "#/components/responses/Error"
  5028. },
  5029. "413": {
  5030. "$ref": "#/components/responses/Error"
  5031. },
  5032. "415": {
  5033. "$ref": "#/components/responses/Error"
  5034. },
  5035. "422": {
  5036. "$ref": "#/components/responses/Error"
  5037. },
  5038. "500": {
  5039. "$ref": "#/components/responses/Error"
  5040. },
  5041. "503": {
  5042. "$ref": "#/components/responses/Error"
  5043. }
  5044. },
  5045. "requestBody": {
  5046. "required": true,
  5047. "content": {
  5048. "application/json": {
  5049. "schema": {
  5050. "$ref": "#/components/schemas/DeliveryAddressCreate"
  5051. },
  5052. "example": {
  5053. "request_key": "address-create-20261008-0001",
  5054. "label": "办公楼",
  5055. "address": "深圳市示例地址",
  5056. "contact": "张先生",
  5057. "phone": "13812345678",
  5058. "is_default": true
  5059. }
  5060. }
  5061. }
  5062. }
  5063. }
  5064. },
  5065. "/enterprises/{enterprise}/addresses/{address}": {
  5066. "get": {
  5067. "tags": [
  5068. "企业"
  5069. ],
  5070. "summary": "读取配送地址详情",
  5071. "operationId": "get_enterprises_enterprise_addresses_address",
  5072. "description": "仅企业管理员。按企业和配送地址 ID 校验归属,返回编辑资料与版本。",
  5073. "parameters": [
  5074. {
  5075. "name": "enterprise",
  5076. "in": "path",
  5077. "required": true,
  5078. "schema": {
  5079. "type": "integer",
  5080. "format": "int64",
  5081. "description": "正整数资源 ID",
  5082. "minimum": 1,
  5083. "maximum": 2147483647
  5084. }
  5085. },
  5086. {
  5087. "name": "address",
  5088. "in": "path",
  5089. "required": true,
  5090. "schema": {
  5091. "type": "integer",
  5092. "minimum": 1
  5093. }
  5094. }
  5095. ],
  5096. "responses": {
  5097. "200": {
  5098. "description": "成功;JSON 业务码 code=0",
  5099. "content": {
  5100. "application/json": {
  5101. "schema": {
  5102. "type": "object",
  5103. "properties": {
  5104. "code": {
  5105. "type": "integer",
  5106. "enum": [
  5107. 0
  5108. ]
  5109. },
  5110. "message": {
  5111. "type": "string",
  5112. "example": "ok"
  5113. },
  5114. "data": {
  5115. "$ref": "#/components/schemas/EditableAddress"
  5116. },
  5117. "request_id": {
  5118. "type": "string",
  5119. "pattern": "^[a-f0-9]{32}$"
  5120. }
  5121. },
  5122. "required": [
  5123. "code",
  5124. "message",
  5125. "data",
  5126. "request_id"
  5127. ]
  5128. }
  5129. }
  5130. }
  5131. },
  5132. "400": {
  5133. "$ref": "#/components/responses/Error"
  5134. },
  5135. "401": {
  5136. "$ref": "#/components/responses/Error"
  5137. },
  5138. "403": {
  5139. "$ref": "#/components/responses/Error"
  5140. },
  5141. "404": {
  5142. "$ref": "#/components/responses/Error"
  5143. },
  5144. "409": {
  5145. "$ref": "#/components/responses/Error"
  5146. },
  5147. "413": {
  5148. "$ref": "#/components/responses/Error"
  5149. },
  5150. "415": {
  5151. "$ref": "#/components/responses/Error"
  5152. },
  5153. "422": {
  5154. "$ref": "#/components/responses/Error"
  5155. },
  5156. "500": {
  5157. "$ref": "#/components/responses/Error"
  5158. },
  5159. "503": {
  5160. "$ref": "#/components/responses/Error"
  5161. }
  5162. }
  5163. },
  5164. "post": {
  5165. "tags": [
  5166. "企业"
  5167. ],
  5168. "summary": "修改配送地址",
  5169. "operationId": "post_enterprises_enterprise_addresses_address",
  5170. "description": "仅企业管理员。校验地址归属及 revision;该地址存在有效配送时禁止修改位置。",
  5171. "parameters": [
  5172. {
  5173. "name": "enterprise",
  5174. "in": "path",
  5175. "required": true,
  5176. "schema": {
  5177. "type": "integer",
  5178. "format": "int64",
  5179. "description": "正整数资源 ID",
  5180. "minimum": 1,
  5181. "maximum": 2147483647
  5182. }
  5183. },
  5184. {
  5185. "name": "address",
  5186. "in": "path",
  5187. "required": true,
  5188. "schema": {
  5189. "type": "integer",
  5190. "minimum": 1
  5191. }
  5192. }
  5193. ],
  5194. "responses": {
  5195. "200": {
  5196. "description": "成功;JSON 业务码 code=0",
  5197. "content": {
  5198. "application/json": {
  5199. "schema": {
  5200. "type": "object",
  5201. "properties": {
  5202. "code": {
  5203. "type": "integer",
  5204. "enum": [
  5205. 0
  5206. ]
  5207. },
  5208. "message": {
  5209. "type": "string",
  5210. "example": "ok"
  5211. },
  5212. "data": {
  5213. "$ref": "#/components/schemas/DeliveryAddressResult"
  5214. },
  5215. "request_id": {
  5216. "type": "string",
  5217. "pattern": "^[a-f0-9]{32}$"
  5218. }
  5219. },
  5220. "required": [
  5221. "code",
  5222. "message",
  5223. "data",
  5224. "request_id"
  5225. ]
  5226. }
  5227. }
  5228. }
  5229. },
  5230. "400": {
  5231. "$ref": "#/components/responses/Error"
  5232. },
  5233. "401": {
  5234. "$ref": "#/components/responses/Error"
  5235. },
  5236. "403": {
  5237. "$ref": "#/components/responses/Error"
  5238. },
  5239. "404": {
  5240. "$ref": "#/components/responses/Error"
  5241. },
  5242. "409": {
  5243. "$ref": "#/components/responses/Error"
  5244. },
  5245. "413": {
  5246. "$ref": "#/components/responses/Error"
  5247. },
  5248. "415": {
  5249. "$ref": "#/components/responses/Error"
  5250. },
  5251. "422": {
  5252. "$ref": "#/components/responses/Error"
  5253. },
  5254. "500": {
  5255. "$ref": "#/components/responses/Error"
  5256. },
  5257. "503": {
  5258. "$ref": "#/components/responses/Error"
  5259. }
  5260. },
  5261. "requestBody": {
  5262. "required": true,
  5263. "content": {
  5264. "application/json": {
  5265. "schema": {
  5266. "$ref": "#/components/schemas/DeliveryAddressUpdate"
  5267. },
  5268. "example": {
  5269. "request_key": "address-create-20261008-0001",
  5270. "label": "办公楼",
  5271. "address": "深圳市示例地址",
  5272. "contact": "张先生",
  5273. "phone": "13812345678",
  5274. "is_default": true,
  5275. "revision": "replace-with-current-revision"
  5276. }
  5277. }
  5278. }
  5279. }
  5280. }
  5281. },
  5282. "/enterprises/{enterprise}/promotion/code": {
  5283. "post": {
  5284. "tags": [
  5285. "企业"
  5286. ],
  5287. "summary": "获取专属企业邀请码",
  5288. "operationId": "post_enterprises_enterprise_promotion_code",
  5289. "description": "仅企业管理员;复用request_key幂等、撤权复核及审计。活动开启后生成企业唯一随机邀请码。",
  5290. "parameters": [
  5291. {
  5292. "name": "enterprise",
  5293. "in": "path",
  5294. "required": true,
  5295. "schema": {
  5296. "type": "integer",
  5297. "format": "int64",
  5298. "description": "正整数资源 ID",
  5299. "minimum": 1,
  5300. "maximum": 2147483647
  5301. }
  5302. }
  5303. ],
  5304. "responses": {
  5305. "200": {
  5306. "description": "成功;JSON 业务码 code=0",
  5307. "content": {
  5308. "application/json": {
  5309. "schema": {
  5310. "type": "object",
  5311. "properties": {
  5312. "code": {
  5313. "type": "integer",
  5314. "enum": [
  5315. 0
  5316. ]
  5317. },
  5318. "message": {
  5319. "type": "string",
  5320. "example": "ok"
  5321. },
  5322. "data": {
  5323. "$ref": "#/components/schemas/PromotionCodeResult"
  5324. },
  5325. "request_id": {
  5326. "type": "string",
  5327. "pattern": "^[a-f0-9]{32}$"
  5328. }
  5329. },
  5330. "required": [
  5331. "code",
  5332. "message",
  5333. "data",
  5334. "request_id"
  5335. ]
  5336. }
  5337. }
  5338. }
  5339. },
  5340. "400": {
  5341. "$ref": "#/components/responses/Error"
  5342. },
  5343. "401": {
  5344. "$ref": "#/components/responses/Error"
  5345. },
  5346. "403": {
  5347. "$ref": "#/components/responses/Error"
  5348. },
  5349. "404": {
  5350. "$ref": "#/components/responses/Error"
  5351. },
  5352. "409": {
  5353. "$ref": "#/components/responses/Error"
  5354. },
  5355. "413": {
  5356. "$ref": "#/components/responses/Error"
  5357. },
  5358. "415": {
  5359. "$ref": "#/components/responses/Error"
  5360. },
  5361. "422": {
  5362. "$ref": "#/components/responses/Error"
  5363. },
  5364. "500": {
  5365. "$ref": "#/components/responses/Error"
  5366. },
  5367. "503": {
  5368. "$ref": "#/components/responses/Error"
  5369. }
  5370. },
  5371. "requestBody": {
  5372. "required": true,
  5373. "content": {
  5374. "application/json": {
  5375. "schema": {
  5376. "$ref": "#/components/schemas/PromotionCodeRequest"
  5377. },
  5378. "example": {
  5379. "request_key": "promotion-code-20261019"
  5380. }
  5381. }
  5382. }
  5383. }
  5384. }
  5385. },
  5386. "/enterprises/{enterprise}/promotion/bind": {
  5387. "post": {
  5388. "tags": [
  5389. "企业"
  5390. ],
  5391. "summary": "首购前绑定企业邀请人",
  5392. "operationId": "post_enterprises_enterprise_promotion_bind",
  5393. "description": "仅企业管理员;复用request_key幂等、撤权复核及审计。活动开启且从未购水的企业仅可绑定一次;禁止自邀、共用管理员及循环邀请,规则在绑定时快照。",
  5394. "parameters": [
  5395. {
  5396. "name": "enterprise",
  5397. "in": "path",
  5398. "required": true,
  5399. "schema": {
  5400. "type": "integer",
  5401. "format": "int64",
  5402. "description": "正整数资源 ID",
  5403. "minimum": 1,
  5404. "maximum": 2147483647
  5405. }
  5406. }
  5407. ],
  5408. "responses": {
  5409. "200": {
  5410. "description": "成功;JSON 业务码 code=0",
  5411. "content": {
  5412. "application/json": {
  5413. "schema": {
  5414. "type": "object",
  5415. "properties": {
  5416. "code": {
  5417. "type": "integer",
  5418. "enum": [
  5419. 0
  5420. ]
  5421. },
  5422. "message": {
  5423. "type": "string",
  5424. "example": "ok"
  5425. },
  5426. "data": {
  5427. "$ref": "#/components/schemas/CommandResult"
  5428. },
  5429. "request_id": {
  5430. "type": "string",
  5431. "pattern": "^[a-f0-9]{32}$"
  5432. }
  5433. },
  5434. "required": [
  5435. "code",
  5436. "message",
  5437. "data",
  5438. "request_id"
  5439. ]
  5440. }
  5441. }
  5442. }
  5443. },
  5444. "400": {
  5445. "$ref": "#/components/responses/Error"
  5446. },
  5447. "401": {
  5448. "$ref": "#/components/responses/Error"
  5449. },
  5450. "403": {
  5451. "$ref": "#/components/responses/Error"
  5452. },
  5453. "404": {
  5454. "$ref": "#/components/responses/Error"
  5455. },
  5456. "409": {
  5457. "$ref": "#/components/responses/Error"
  5458. },
  5459. "413": {
  5460. "$ref": "#/components/responses/Error"
  5461. },
  5462. "415": {
  5463. "$ref": "#/components/responses/Error"
  5464. },
  5465. "422": {
  5466. "$ref": "#/components/responses/Error"
  5467. },
  5468. "500": {
  5469. "$ref": "#/components/responses/Error"
  5470. },
  5471. "503": {
  5472. "$ref": "#/components/responses/Error"
  5473. }
  5474. },
  5475. "requestBody": {
  5476. "required": true,
  5477. "content": {
  5478. "application/json": {
  5479. "schema": {
  5480. "$ref": "#/components/schemas/PromotionBindRequest"
  5481. },
  5482. "example": {
  5483. "request_key": "promotion-bind-20261019",
  5484. "invite_code": "AABBCCDDEEFF00112233"
  5485. }
  5486. }
  5487. }
  5488. }
  5489. }
  5490. }
  5491. },
  5492. "components": {
  5493. "securitySchemes": {
  5494. "MiniBearer": {
  5495. "type": "http",
  5496. "scheme": "bearer",
  5497. "bearerFormat": "Opaque token",
  5498. "description": "POST /auth/wechat 返回的 access_token;非后台JWT"
  5499. }
  5500. },
  5501. "schemas": {
  5502. "Error": {
  5503. "type": "object",
  5504. "properties": {
  5505. "code": {
  5506. "type": "integer",
  5507. "format": "int64",
  5508. "description": "业务错误码"
  5509. },
  5510. "message": {
  5511. "type": "string",
  5512. "description": "适合向用户展示的说明"
  5513. },
  5514. "data": {
  5515. "type": "object",
  5516. "properties": {
  5517. "fields": {
  5518. "type": "object",
  5519. "additionalProperties": {
  5520. "type": "string",
  5521. "description": "字段错误说明"
  5522. }
  5523. }
  5524. },
  5525. "nullable": true
  5526. },
  5527. "request_id": {
  5528. "type": "string",
  5529. "description": "排障时提供此编号",
  5530. "pattern": "^[a-f0-9]{32}$"
  5531. }
  5532. },
  5533. "required": [
  5534. "code",
  5535. "message",
  5536. "data",
  5537. "request_id"
  5538. ]
  5539. },
  5540. "Identity": {
  5541. "type": "object",
  5542. "properties": {
  5543. "role": {
  5544. "type": "string",
  5545. "enum": [
  5546. "enterprise_admin",
  5547. "enterprise_member",
  5548. "driver",
  5549. "agent"
  5550. ]
  5551. },
  5552. "resource_id": {
  5553. "type": "integer",
  5554. "format": "int64",
  5555. "description": "正整数资源 ID",
  5556. "minimum": 1,
  5557. "maximum": 2147483647
  5558. },
  5559. "name": {
  5560. "type": "string"
  5561. }
  5562. },
  5563. "required": [
  5564. "role",
  5565. "resource_id",
  5566. "name"
  5567. ]
  5568. },
  5569. "Login": {
  5570. "type": "object",
  5571. "properties": {
  5572. "access_token": {
  5573. "type": "string",
  5574. "description": "随机不透明令牌,前端不要解析",
  5575. "minLength": 64,
  5576. "maxLength": 64
  5577. },
  5578. "token_type": {
  5579. "type": "string",
  5580. "enum": [
  5581. "Bearer"
  5582. ]
  5583. },
  5584. "expires_at": {
  5585. "type": "string",
  5586. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  5587. "example": "2026-09-18 10:30:00"
  5588. },
  5589. "user_id": {
  5590. "type": "string",
  5591. "description": "用户 ID 是字符串"
  5592. },
  5593. "identities": {
  5594. "type": "array",
  5595. "items": {
  5596. "$ref": "#/components/schemas/Identity"
  5597. }
  5598. }
  5599. },
  5600. "required": [
  5601. "access_token",
  5602. "token_type",
  5603. "expires_at",
  5604. "user_id",
  5605. "identities"
  5606. ]
  5607. },
  5608. "Enterprise": {
  5609. "type": "object",
  5610. "properties": {
  5611. "id": {
  5612. "type": "integer",
  5613. "format": "int64",
  5614. "description": "正整数资源 ID",
  5615. "minimum": 1,
  5616. "maximum": 2147483647
  5617. },
  5618. "name": {
  5619. "type": "string"
  5620. },
  5621. "contact": {
  5622. "type": "string"
  5623. },
  5624. "phone": {
  5625. "type": "string",
  5626. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  5627. },
  5628. "address": {
  5629. "type": "string"
  5630. },
  5631. "region": {
  5632. "type": "string"
  5633. },
  5634. "longitude": {
  5635. "type": "number",
  5636. "nullable": true
  5637. },
  5638. "latitude": {
  5639. "type": "number",
  5640. "nullable": true
  5641. },
  5642. "employee_count": {
  5643. "type": "integer",
  5644. "format": "int64",
  5645. "nullable": true
  5646. },
  5647. "revision": {
  5648. "type": "string",
  5649. "description": "编辑地址时原样提交的版本",
  5650. "minLength": 64,
  5651. "maxLength": 64
  5652. }
  5653. },
  5654. "required": [
  5655. "id",
  5656. "name",
  5657. "contact",
  5658. "phone",
  5659. "address",
  5660. "region",
  5661. "longitude",
  5662. "latitude",
  5663. "employee_count",
  5664. "revision"
  5665. ]
  5666. },
  5667. "EditableAddress": {
  5668. "type": "object",
  5669. "properties": {
  5670. "id": {
  5671. "type": "integer",
  5672. "format": "int64",
  5673. "description": "正整数资源 ID",
  5674. "minimum": 0,
  5675. "maximum": 2147483647
  5676. },
  5677. "name": {
  5678. "type": "string"
  5679. },
  5680. "contact": {
  5681. "type": "string"
  5682. },
  5683. "phone": {
  5684. "type": "string",
  5685. "description": "仅企业管理员可读完整号码;表单应使用此接口,不能使用脱敏列表"
  5686. },
  5687. "address": {
  5688. "type": "string"
  5689. },
  5690. "region": {
  5691. "type": "string"
  5692. },
  5693. "longitude": {
  5694. "type": "number",
  5695. "nullable": true
  5696. },
  5697. "latitude": {
  5698. "type": "number",
  5699. "nullable": true
  5700. },
  5701. "employee_count": {
  5702. "type": "integer",
  5703. "format": "int64",
  5704. "nullable": true
  5705. },
  5706. "revision": {
  5707. "type": "string",
  5708. "description": "编辑地址时原样提交的版本",
  5709. "minLength": 64,
  5710. "maxLength": 64
  5711. },
  5712. "enterprise_id": {
  5713. "type": "integer",
  5714. "minimum": 1
  5715. },
  5716. "label": {
  5717. "type": "string"
  5718. },
  5719. "is_default": {
  5720. "type": "boolean"
  5721. },
  5722. "status": {
  5723. "type": "integer"
  5724. }
  5725. },
  5726. "required": [
  5727. "id",
  5728. "name",
  5729. "contact",
  5730. "phone",
  5731. "address",
  5732. "region",
  5733. "longitude",
  5734. "latitude",
  5735. "employee_count",
  5736. "revision"
  5737. ]
  5738. },
  5739. "Package": {
  5740. "type": "object",
  5741. "properties": {
  5742. "id": {
  5743. "type": "integer",
  5744. "format": "int64",
  5745. "description": "正整数资源 ID",
  5746. "minimum": 1,
  5747. "maximum": 2147483647
  5748. },
  5749. "name": {
  5750. "type": "string"
  5751. },
  5752. "sku_id": {
  5753. "type": "integer",
  5754. "format": "int64",
  5755. "description": "正整数资源 ID",
  5756. "minimum": 1,
  5757. "maximum": 2147483647
  5758. },
  5759. "sku_name": {
  5760. "type": "string",
  5761. "nullable": true
  5762. },
  5763. "liters": {
  5764. "type": "number",
  5765. "nullable": true
  5766. },
  5767. "buckets": {
  5768. "type": "integer",
  5769. "format": "int64",
  5770. "description": "套餐总桶数"
  5771. },
  5772. "price_cents": {
  5773. "type": "integer",
  5774. "format": "int64",
  5775. "description": "人民币整数分",
  5776. "minimum": 0
  5777. },
  5778. "unit_price_cents": {
  5779. "type": "integer",
  5780. "format": "int64",
  5781. "description": "每桶参考单价,四舍五入为整数分"
  5782. },
  5783. "category": {
  5784. "type": "string",
  5785. "nullable": true,
  5786. "description": "当前为 null,尚无可用数据"
  5787. },
  5788. "valid_months": {
  5789. "type": "integer",
  5790. "nullable": true,
  5791. "description": "当前为 null,尚无可用数据"
  5792. },
  5793. "includes_device": {
  5794. "type": "boolean",
  5795. "nullable": true,
  5796. "description": "当前为 null,尚无可用数据"
  5797. }
  5798. },
  5799. "required": [
  5800. "id",
  5801. "name",
  5802. "sku_id",
  5803. "sku_name",
  5804. "liters",
  5805. "buckets",
  5806. "price_cents",
  5807. "unit_price_cents",
  5808. "category",
  5809. "valid_months",
  5810. "includes_device"
  5811. ]
  5812. },
  5813. "PackagePage": {
  5814. "type": "object",
  5815. "properties": {
  5816. "items": {
  5817. "type": "array",
  5818. "items": {
  5819. "$ref": "#/components/schemas/Package"
  5820. }
  5821. },
  5822. "total": {
  5823. "type": "integer",
  5824. "format": "int64"
  5825. },
  5826. "page": {
  5827. "type": "integer",
  5828. "format": "int64"
  5829. },
  5830. "page_size": {
  5831. "type": "integer",
  5832. "format": "int64"
  5833. },
  5834. "has_more": {
  5835. "type": "boolean"
  5836. },
  5837. "categories": {
  5838. "type": "array",
  5839. "items": {
  5840. "type": "object",
  5841. "properties": {
  5842. "value": {
  5843. "type": "string",
  5844. "enum": [
  5845. "all"
  5846. ]
  5847. },
  5848. "label": {
  5849. "type": "string"
  5850. }
  5851. },
  5852. "required": [
  5853. "value",
  5854. "label"
  5855. ]
  5856. }
  5857. },
  5858. "capabilities": {
  5859. "type": "object",
  5860. "properties": {
  5861. "category_filter": {
  5862. "type": "boolean",
  5863. "description": "以服务器返回值决定是否开放入口"
  5864. }
  5865. },
  5866. "required": [
  5867. "category_filter"
  5868. ]
  5869. }
  5870. },
  5871. "required": [
  5872. "items",
  5873. "total",
  5874. "page",
  5875. "page_size",
  5876. "has_more",
  5877. "categories",
  5878. "capabilities"
  5879. ]
  5880. },
  5881. "RightsSummary": {
  5882. "type": "object",
  5883. "properties": {
  5884. "remaining": {
  5885. "type": "integer",
  5886. "format": "int64",
  5887. "description": "剩余权益(含冻结)"
  5888. },
  5889. "available": {
  5890. "type": "integer",
  5891. "format": "int64",
  5892. "description": "可用权益"
  5893. },
  5894. "frozen": {
  5895. "type": "integer",
  5896. "format": "int64",
  5897. "description": "已预约冻结"
  5898. },
  5899. "full_qty": {
  5900. "type": "integer",
  5901. "format": "int64",
  5902. "description": "现场满桶"
  5903. },
  5904. "purchased": {
  5905. "type": "integer",
  5906. "format": "int64",
  5907. "description": "历史购买桶数"
  5908. },
  5909. "delivered": {
  5910. "type": "integer",
  5911. "format": "int64",
  5912. "description": "历史实收桶数"
  5913. }
  5914. },
  5915. "required": [
  5916. "remaining",
  5917. "available",
  5918. "frozen",
  5919. "full_qty",
  5920. "purchased",
  5921. "delivered"
  5922. ]
  5923. },
  5924. "Rights": {
  5925. "type": "object",
  5926. "properties": {
  5927. "items": {
  5928. "type": "array",
  5929. "items": {
  5930. "type": "object",
  5931. "properties": {
  5932. "id": {
  5933. "type": "integer",
  5934. "format": "int64",
  5935. "description": "正整数资源 ID",
  5936. "minimum": 1,
  5937. "maximum": 2147483647
  5938. },
  5939. "sku_id": {
  5940. "type": "integer",
  5941. "format": "int64",
  5942. "description": "正整数资源 ID",
  5943. "minimum": 1,
  5944. "maximum": 2147483647
  5945. },
  5946. "sku_name": {
  5947. "type": "string",
  5948. "nullable": true
  5949. },
  5950. "liters": {
  5951. "type": "number",
  5952. "nullable": true
  5953. },
  5954. "remaining": {
  5955. "type": "integer",
  5956. "format": "int64"
  5957. },
  5958. "frozen": {
  5959. "type": "integer",
  5960. "format": "int64"
  5961. },
  5962. "available": {
  5963. "type": "integer",
  5964. "format": "int64"
  5965. },
  5966. "full_qty": {
  5967. "type": "integer",
  5968. "format": "int64"
  5969. },
  5970. "empty_qty": {
  5971. "type": "integer",
  5972. "format": "int64"
  5973. },
  5974. "days_left": {
  5975. "type": "number",
  5976. "description": "预计可用天数",
  5977. "nullable": true
  5978. },
  5979. "severity": {
  5980. "type": "string",
  5981. "enum": [
  5982. "healthy",
  5983. "normal",
  5984. "urgent"
  5985. ]
  5986. },
  5987. "expires_at": {
  5988. "type": "string",
  5989. "nullable": true,
  5990. "description": "当前为 null,尚无可用数据"
  5991. }
  5992. },
  5993. "required": [
  5994. "id",
  5995. "sku_id",
  5996. "sku_name",
  5997. "liters",
  5998. "remaining",
  5999. "frozen",
  6000. "available",
  6001. "full_qty",
  6002. "empty_qty",
  6003. "days_left",
  6004. "severity",
  6005. "expires_at"
  6006. ]
  6007. }
  6008. },
  6009. "summary": {
  6010. "$ref": "#/components/schemas/RightsSummary"
  6011. },
  6012. "policy": {
  6013. "type": "object",
  6014. "properties": {
  6015. "alert_qty": {
  6016. "type": "integer",
  6017. "format": "int64"
  6018. },
  6019. "days_per_barrel": {
  6020. "type": "integer",
  6021. "format": "int64"
  6022. },
  6023. "urgent_qty": {
  6024. "type": "integer",
  6025. "format": "int64"
  6026. },
  6027. "revision": {
  6028. "type": "integer",
  6029. "format": "int64"
  6030. },
  6031. "updated_at": {
  6032. "type": "string",
  6033. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6034. "example": "2026-09-18 10:30:00"
  6035. },
  6036. "comparison": {
  6037. "type": "string",
  6038. "enum": [
  6039. "lt"
  6040. ]
  6041. },
  6042. "accuracy_available": {
  6043. "type": "boolean"
  6044. }
  6045. },
  6046. "required": [
  6047. "alert_qty",
  6048. "days_per_barrel",
  6049. "urgent_qty",
  6050. "revision",
  6051. "updated_at",
  6052. "comparison",
  6053. "accuracy_available"
  6054. ]
  6055. },
  6056. "accounting": {
  6057. "type": "string",
  6058. "enum": [
  6059. "enterprise_sku"
  6060. ]
  6061. },
  6062. "capabilities": {
  6063. "type": "object",
  6064. "properties": {
  6065. "individual_package_cards": {
  6066. "type": "boolean",
  6067. "description": "以服务器返回值决定是否开放入口"
  6068. },
  6069. "expiry_deduction": {
  6070. "type": "boolean",
  6071. "description": "以服务器返回值决定是否开放入口"
  6072. }
  6073. },
  6074. "required": [
  6075. "individual_package_cards",
  6076. "expiry_deduction"
  6077. ]
  6078. }
  6079. },
  6080. "required": [
  6081. "items",
  6082. "summary",
  6083. "policy",
  6084. "accounting",
  6085. "capabilities"
  6086. ]
  6087. },
  6088. "Profile": {
  6089. "type": "object",
  6090. "properties": {
  6091. "user_id": {
  6092. "type": "string"
  6093. },
  6094. "identities": {
  6095. "type": "array",
  6096. "items": {
  6097. "$ref": "#/components/schemas/Identity"
  6098. }
  6099. },
  6100. "balance_cents": {
  6101. "type": "integer",
  6102. "nullable": true,
  6103. "description": "当前企业可用余额,人民币整数分"
  6104. },
  6105. "reward_cents": {
  6106. "type": "integer",
  6107. "nullable": true,
  6108. "description": "当前为 null,尚无可用数据"
  6109. },
  6110. "capabilities": {
  6111. "type": "object",
  6112. "properties": {
  6113. "balance_payment": {
  6114. "type": "boolean",
  6115. "description": "以服务器返回值决定是否开放入口"
  6116. },
  6117. "rewards": {
  6118. "type": "boolean",
  6119. "description": "以服务器返回值决定是否开放入口"
  6120. },
  6121. "withdrawals": {
  6122. "type": "boolean",
  6123. "description": "以服务器返回值决定是否开放入口"
  6124. }
  6125. },
  6126. "required": [
  6127. "balance_payment",
  6128. "rewards",
  6129. "withdrawals"
  6130. ]
  6131. },
  6132. "enterprise": {
  6133. "$ref": "#/components/schemas/Enterprise"
  6134. },
  6135. "rights": {
  6136. "$ref": "#/components/schemas/RightsSummary"
  6137. },
  6138. "reward_buckets": {
  6139. "type": "integer",
  6140. "nullable": true,
  6141. "description": "累计已发放的推广赠水桶数,非现金、非剩余权益"
  6142. }
  6143. },
  6144. "required": [
  6145. "user_id",
  6146. "identities",
  6147. "balance_cents",
  6148. "reward_cents",
  6149. "capabilities",
  6150. "reward_buckets"
  6151. ]
  6152. },
  6153. "Addresses": {
  6154. "type": "object",
  6155. "properties": {
  6156. "items": {
  6157. "type": "array",
  6158. "items": {
  6159. "$ref": "#/components/schemas/DeliveryAddress"
  6160. }
  6161. },
  6162. "capabilities": {
  6163. "type": "object",
  6164. "properties": {
  6165. "multiple_sites_per_enterprise": {
  6166. "type": "boolean",
  6167. "description": "以服务器返回值决定是否开放入口"
  6168. },
  6169. "self_create_enterprise": {
  6170. "type": "boolean",
  6171. "description": "以服务器返回值决定是否开放入口"
  6172. }
  6173. },
  6174. "required": [
  6175. "multiple_sites_per_enterprise",
  6176. "self_create_enterprise"
  6177. ]
  6178. },
  6179. "service_hours": {
  6180. "type": "string",
  6181. "nullable": true,
  6182. "description": "当前为 null,尚无可用数据"
  6183. },
  6184. "coverage_verified": {
  6185. "type": "boolean"
  6186. }
  6187. },
  6188. "required": [
  6189. "items",
  6190. "capabilities",
  6191. "service_hours",
  6192. "coverage_verified"
  6193. ]
  6194. },
  6195. "Delivery": {
  6196. "type": "object",
  6197. "properties": {
  6198. "id": {
  6199. "type": "integer",
  6200. "format": "int64",
  6201. "description": "正整数资源 ID",
  6202. "minimum": 1,
  6203. "maximum": 2147483647
  6204. },
  6205. "code": {
  6206. "type": "string",
  6207. "description": "展示配送号,例如 DS123"
  6208. },
  6209. "sku_id": {
  6210. "type": "integer",
  6211. "format": "int64",
  6212. "description": "正整数资源 ID",
  6213. "minimum": 1,
  6214. "maximum": 2147483647
  6215. },
  6216. "sku_name": {
  6217. "type": "string",
  6218. "nullable": true
  6219. },
  6220. "quantity": {
  6221. "type": "integer",
  6222. "format": "int64",
  6223. "description": "计划配送桶数"
  6224. },
  6225. "status": {
  6226. "type": "string",
  6227. "enum": [
  6228. "pending",
  6229. "assigned",
  6230. "transit",
  6231. "completed",
  6232. "cancelled",
  6233. "returning",
  6234. "returned"
  6235. ]
  6236. },
  6237. "delivered_qty": {
  6238. "type": "integer",
  6239. "format": "int64",
  6240. "description": "实际签收桶数"
  6241. },
  6242. "empty_returned": {
  6243. "type": "integer",
  6244. "format": "int64"
  6245. },
  6246. "address": {
  6247. "type": "string"
  6248. },
  6249. "scheduled_date": {
  6250. "type": "string",
  6251. "format": "date",
  6252. "nullable": true
  6253. },
  6254. "deadline_at": {
  6255. "type": "string",
  6256. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6257. "example": "2026-09-18 10:30:00",
  6258. "nullable": true
  6259. },
  6260. "driver_name": {
  6261. "type": "string"
  6262. },
  6263. "driver_phone": {
  6264. "type": "string",
  6265. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  6266. },
  6267. "created_at": {
  6268. "type": "string",
  6269. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6270. "example": "2026-09-18 10:30:00"
  6271. },
  6272. "received_at": {
  6273. "type": "string",
  6274. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6275. "example": "2026-09-18 10:30:00",
  6276. "nullable": true
  6277. },
  6278. "completed_at": {
  6279. "type": "string",
  6280. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6281. "example": "2026-09-18 10:30:00",
  6282. "nullable": true
  6283. }
  6284. },
  6285. "required": [
  6286. "id",
  6287. "code",
  6288. "sku_id",
  6289. "sku_name",
  6290. "quantity",
  6291. "status",
  6292. "delivered_qty",
  6293. "empty_returned",
  6294. "address",
  6295. "scheduled_date",
  6296. "deadline_at",
  6297. "driver_name",
  6298. "driver_phone",
  6299. "created_at",
  6300. "received_at",
  6301. "completed_at"
  6302. ]
  6303. },
  6304. "PhotoMeta": {
  6305. "type": "object",
  6306. "properties": {
  6307. "id": {
  6308. "type": "integer",
  6309. "format": "int64",
  6310. "description": "正整数资源 ID",
  6311. "minimum": 1,
  6312. "maximum": 2147483647
  6313. },
  6314. "created_at": {
  6315. "type": "string",
  6316. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6317. "example": "2026-09-18 10:30:00"
  6318. }
  6319. },
  6320. "required": [
  6321. "id",
  6322. "created_at"
  6323. ]
  6324. },
  6325. "Tracking": {
  6326. "allOf": [
  6327. {
  6328. "$ref": "#/components/schemas/Delivery"
  6329. },
  6330. {
  6331. "type": "object",
  6332. "properties": {
  6333. "events": {
  6334. "type": "array",
  6335. "items": {
  6336. "type": "object",
  6337. "properties": {
  6338. "action": {
  6339. "type": "string",
  6340. "description": "后台履约动作或 depart/checkin/exception"
  6341. },
  6342. "created_at": {
  6343. "type": "string",
  6344. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6345. "example": "2026-09-18 10:30:00"
  6346. }
  6347. },
  6348. "required": [
  6349. "action",
  6350. "created_at"
  6351. ]
  6352. }
  6353. },
  6354. "photos": {
  6355. "type": "array",
  6356. "items": {
  6357. "$ref": "#/components/schemas/PhotoMeta"
  6358. }
  6359. },
  6360. "eta": {
  6361. "type": "string",
  6362. "nullable": true,
  6363. "description": "当前为 null,尚无可用数据"
  6364. },
  6365. "distance_km": {
  6366. "type": "number",
  6367. "nullable": true,
  6368. "description": "当前为 null,尚无可用数据"
  6369. },
  6370. "capabilities": {
  6371. "type": "object",
  6372. "properties": {
  6373. "live_gps": {
  6374. "type": "boolean",
  6375. "description": "以服务器返回值决定是否开放入口"
  6376. }
  6377. },
  6378. "required": [
  6379. "live_gps"
  6380. ]
  6381. }
  6382. },
  6383. "required": [
  6384. "events",
  6385. "photos",
  6386. "eta",
  6387. "distance_km",
  6388. "capabilities"
  6389. ]
  6390. }
  6391. ]
  6392. },
  6393. "Device": {
  6394. "type": "object",
  6395. "properties": {
  6396. "id": {
  6397. "type": "integer",
  6398. "format": "int64",
  6399. "description": "正整数资源 ID",
  6400. "minimum": 1,
  6401. "maximum": 2147483647
  6402. },
  6403. "name": {
  6404. "type": "string"
  6405. },
  6406. "sn": {
  6407. "type": "string"
  6408. },
  6409. "sku_id": {
  6410. "type": "integer",
  6411. "format": "int64",
  6412. "description": "正整数资源 ID",
  6413. "minimum": 1,
  6414. "maximum": 2147483647
  6415. },
  6416. "state": {
  6417. "type": "string",
  6418. "enum": [
  6419. "fault",
  6420. "unconnected",
  6421. "offline",
  6422. "online"
  6423. ]
  6424. },
  6425. "last_seen": {
  6426. "type": "string",
  6427. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6428. "example": "2026-09-18 10:30:00",
  6429. "nullable": true
  6430. },
  6431. "today_liters": {
  6432. "type": "number",
  6433. "description": "无当日遥测时 null,不能显示成 0",
  6434. "nullable": true
  6435. },
  6436. "fault": {
  6437. "type": "string"
  6438. }
  6439. },
  6440. "required": [
  6441. "id",
  6442. "name",
  6443. "sn",
  6444. "sku_id",
  6445. "state",
  6446. "last_seen",
  6447. "today_liters",
  6448. "fault"
  6449. ]
  6450. },
  6451. "DevicePage": {
  6452. "type": "object",
  6453. "properties": {
  6454. "items": {
  6455. "type": "array",
  6456. "items": {
  6457. "$ref": "#/components/schemas/Device"
  6458. }
  6459. },
  6460. "total": {
  6461. "type": "integer",
  6462. "format": "int64"
  6463. },
  6464. "page": {
  6465. "type": "integer",
  6466. "format": "int64"
  6467. },
  6468. "page_size": {
  6469. "type": "integer",
  6470. "format": "int64"
  6471. },
  6472. "has_more": {
  6473. "type": "boolean"
  6474. }
  6475. },
  6476. "required": [
  6477. "items",
  6478. "total",
  6479. "page",
  6480. "page_size",
  6481. "has_more"
  6482. ]
  6483. },
  6484. "DeviceDetail": {
  6485. "allOf": [
  6486. {
  6487. "$ref": "#/components/schemas/Device"
  6488. },
  6489. {
  6490. "type": "object",
  6491. "properties": {
  6492. "trend": {
  6493. "type": "array",
  6494. "items": {
  6495. "type": "object",
  6496. "properties": {
  6497. "day": {
  6498. "type": "string",
  6499. "format": "date"
  6500. },
  6501. "liters": {
  6502. "type": "number",
  6503. "nullable": true
  6504. }
  6505. },
  6506. "required": [
  6507. "day",
  6508. "liters"
  6509. ]
  6510. }
  6511. },
  6512. "rights": {
  6513. "$ref": "#/components/schemas/Rights"
  6514. },
  6515. "automatic_delivery": {
  6516. "type": "boolean"
  6517. }
  6518. },
  6519. "required": [
  6520. "trend",
  6521. "rights",
  6522. "automatic_delivery"
  6523. ]
  6524. }
  6525. ]
  6526. },
  6527. "Banner": {
  6528. "type": "object",
  6529. "properties": {
  6530. "id": {
  6531. "type": "integer",
  6532. "format": "int64",
  6533. "description": "正整数资源 ID",
  6534. "minimum": 1,
  6535. "maximum": 2147483647
  6536. },
  6537. "title": {
  6538. "type": "string"
  6539. },
  6540. "image_url": {
  6541. "type": "string"
  6542. },
  6543. "target_url": {
  6544. "type": "string"
  6545. },
  6546. "audience": {
  6547. "type": "string",
  6548. "enum": [
  6549. "all",
  6550. "new",
  6551. "purchased",
  6552. "enterprise_admin"
  6553. ]
  6554. },
  6555. "region": {
  6556. "type": "string",
  6557. "nullable": true
  6558. },
  6559. "starts_at": {
  6560. "type": "string",
  6561. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6562. "example": "2026-09-18 10:30:00",
  6563. "nullable": true
  6564. },
  6565. "ends_at": {
  6566. "type": "string",
  6567. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6568. "example": "2026-09-18 10:30:00",
  6569. "nullable": true
  6570. },
  6571. "sort": {
  6572. "type": "integer",
  6573. "format": "int64"
  6574. },
  6575. "status": {
  6576. "type": "integer",
  6577. "format": "int64"
  6578. },
  6579. "created_at": {
  6580. "type": "string",
  6581. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6582. "example": "2026-09-18 10:30:00"
  6583. },
  6584. "updated_at": {
  6585. "type": "string",
  6586. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6587. "example": "2026-09-18 10:30:00"
  6588. },
  6589. "delivery_status": {
  6590. "type": "string"
  6591. },
  6592. "status_label": {
  6593. "type": "string"
  6594. }
  6595. },
  6596. "required": [
  6597. "id",
  6598. "title",
  6599. "image_url",
  6600. "target_url",
  6601. "audience",
  6602. "region",
  6603. "starts_at",
  6604. "ends_at",
  6605. "sort",
  6606. "status",
  6607. "created_at",
  6608. "updated_at",
  6609. "delivery_status",
  6610. "status_label"
  6611. ]
  6612. },
  6613. "Home": {
  6614. "type": "object",
  6615. "properties": {
  6616. "enterprise": {
  6617. "$ref": "#/components/schemas/Enterprise"
  6618. },
  6619. "banners": {
  6620. "type": "array",
  6621. "items": {
  6622. "$ref": "#/components/schemas/Banner"
  6623. }
  6624. },
  6625. "packages": {
  6626. "type": "array",
  6627. "items": {
  6628. "$ref": "#/components/schemas/Package"
  6629. }
  6630. },
  6631. "rights": {
  6632. "$ref": "#/components/schemas/Rights"
  6633. },
  6634. "devices": {
  6635. "$ref": "#/components/schemas/DevicePage"
  6636. },
  6637. "unread_messages": {
  6638. "type": "integer",
  6639. "nullable": true,
  6640. "description": "当前为 null,尚无可用数据"
  6641. },
  6642. "capabilities": {
  6643. "type": "object",
  6644. "properties": {
  6645. "coupon": {
  6646. "type": "boolean",
  6647. "description": "以服务器返回值决定是否开放入口"
  6648. },
  6649. "messages": {
  6650. "type": "boolean",
  6651. "description": "以服务器返回值决定是否开放入口"
  6652. },
  6653. "automatic_delivery": {
  6654. "type": "boolean",
  6655. "description": "以服务器返回值决定是否开放入口"
  6656. }
  6657. },
  6658. "required": [
  6659. "coupon",
  6660. "messages",
  6661. "automatic_delivery"
  6662. ]
  6663. }
  6664. },
  6665. "required": [
  6666. "enterprise",
  6667. "banners",
  6668. "packages",
  6669. "rights",
  6670. "devices",
  6671. "unread_messages",
  6672. "capabilities"
  6673. ]
  6674. },
  6675. "LedgerPage": {
  6676. "type": "object",
  6677. "properties": {
  6678. "items": {
  6679. "type": "array",
  6680. "items": {
  6681. "type": "object",
  6682. "properties": {
  6683. "id": {
  6684. "type": "integer",
  6685. "format": "int64",
  6686. "description": "正整数资源 ID",
  6687. "minimum": 1,
  6688. "maximum": 2147483647
  6689. },
  6690. "sku_id": {
  6691. "type": "integer",
  6692. "format": "int64",
  6693. "description": "正整数资源 ID",
  6694. "minimum": 1,
  6695. "maximum": 2147483647
  6696. },
  6697. "kind": {
  6698. "type": "string",
  6699. "enum": [
  6700. "purchase",
  6701. "reserve",
  6702. "cancel",
  6703. "complete",
  6704. "partial_receive",
  6705. "delivery_return"
  6706. ]
  6707. },
  6708. "quantity": {
  6709. "type": "integer",
  6710. "format": "int64"
  6711. },
  6712. "reference": {
  6713. "type": "string"
  6714. },
  6715. "created_at": {
  6716. "type": "string",
  6717. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6718. "example": "2026-09-18 10:30:00"
  6719. }
  6720. },
  6721. "required": [
  6722. "id",
  6723. "sku_id",
  6724. "kind",
  6725. "quantity",
  6726. "reference",
  6727. "created_at"
  6728. ]
  6729. }
  6730. },
  6731. "total": {
  6732. "type": "integer",
  6733. "format": "int64"
  6734. },
  6735. "page": {
  6736. "type": "integer",
  6737. "format": "int64"
  6738. },
  6739. "page_size": {
  6740. "type": "integer",
  6741. "format": "int64"
  6742. },
  6743. "has_more": {
  6744. "type": "boolean"
  6745. },
  6746. "quantity_semantics": {
  6747. "type": "string",
  6748. "description": "操作桶数不等于权益扣减数"
  6749. }
  6750. },
  6751. "required": [
  6752. "items",
  6753. "total",
  6754. "page",
  6755. "page_size",
  6756. "has_more",
  6757. "quantity_semantics"
  6758. ]
  6759. },
  6760. "Purchase": {
  6761. "type": "object",
  6762. "properties": {
  6763. "id": {
  6764. "type": "integer",
  6765. "format": "int64",
  6766. "description": "正整数资源 ID",
  6767. "minimum": 1,
  6768. "maximum": 2147483647
  6769. },
  6770. "package_name": {
  6771. "type": "string"
  6772. },
  6773. "sku_id": {
  6774. "type": "integer",
  6775. "format": "int64",
  6776. "description": "正整数资源 ID",
  6777. "minimum": 1,
  6778. "maximum": 2147483647
  6779. },
  6780. "buckets": {
  6781. "type": "integer",
  6782. "format": "int64"
  6783. },
  6784. "amount_cents": {
  6785. "type": "integer",
  6786. "format": "int64",
  6787. "description": "人民币整数分",
  6788. "minimum": 0
  6789. },
  6790. "created_at": {
  6791. "type": "string",
  6792. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6793. "example": "2026-09-18 10:30:00"
  6794. }
  6795. },
  6796. "required": [
  6797. "id",
  6798. "package_name",
  6799. "sku_id",
  6800. "buckets",
  6801. "amount_cents",
  6802. "created_at"
  6803. ]
  6804. },
  6805. "QuoteItem": {
  6806. "type": "object",
  6807. "properties": {
  6808. "package_id": {
  6809. "type": "integer",
  6810. "format": "int64",
  6811. "description": "正整数资源 ID",
  6812. "minimum": 1,
  6813. "maximum": 2147483647
  6814. },
  6815. "name": {
  6816. "type": "string"
  6817. },
  6818. "sku_id": {
  6819. "type": "integer",
  6820. "format": "int64",
  6821. "description": "正整数资源 ID",
  6822. "minimum": 1,
  6823. "maximum": 2147483647
  6824. },
  6825. "quantity": {
  6826. "type": "integer",
  6827. "format": "int64",
  6828. "description": "套餐份数"
  6829. },
  6830. "buckets": {
  6831. "type": "integer",
  6832. "format": "int64",
  6833. "description": "本行总桶数"
  6834. },
  6835. "unit_price_cents": {
  6836. "type": "integer",
  6837. "format": "int64",
  6838. "description": "每份套餐价;与套餐详情的每桶单价语义不同"
  6839. },
  6840. "amount_cents": {
  6841. "type": "integer",
  6842. "format": "int64",
  6843. "description": "人民币整数分",
  6844. "minimum": 0
  6845. }
  6846. },
  6847. "required": [
  6848. "package_id",
  6849. "name",
  6850. "sku_id",
  6851. "quantity",
  6852. "buckets",
  6853. "unit_price_cents",
  6854. "amount_cents"
  6855. ]
  6856. },
  6857. "Quote": {
  6858. "type": "object",
  6859. "properties": {
  6860. "items": {
  6861. "type": "array",
  6862. "items": {
  6863. "$ref": "#/components/schemas/QuoteItem"
  6864. }
  6865. },
  6866. "subtotal_cents": {
  6867. "type": "integer",
  6868. "format": "int64",
  6869. "description": "人民币整数分",
  6870. "minimum": 0
  6871. },
  6872. "discount_cents": {
  6873. "type": "integer",
  6874. "format": "int64",
  6875. "description": "人民币整数分",
  6876. "minimum": 0
  6877. },
  6878. "amount_cents": {
  6879. "type": "integer",
  6880. "format": "int64",
  6881. "description": "人民币整数分",
  6882. "minimum": 0
  6883. },
  6884. "payment_methods": {
  6885. "type": "array",
  6886. "items": {
  6887. "type": "string"
  6888. }
  6889. },
  6890. "capabilities": {
  6891. "type": "object",
  6892. "properties": {
  6893. "payment": {
  6894. "type": "boolean",
  6895. "description": "以服务器返回值决定是否开放入口"
  6896. },
  6897. "balance": {
  6898. "type": "boolean",
  6899. "description": "以服务器返回值决定是否开放入口"
  6900. },
  6901. "first_purchase_discount": {
  6902. "type": "boolean",
  6903. "description": "以服务器返回值决定是否开放入口"
  6904. },
  6905. "invoice_issuance": {
  6906. "type": "boolean",
  6907. "description": "以服务器返回值决定是否开放入口"
  6908. }
  6909. },
  6910. "required": [
  6911. "payment",
  6912. "balance",
  6913. "first_purchase_discount",
  6914. "invoice_issuance"
  6915. ]
  6916. },
  6917. "agreement_url": {
  6918. "type": "string",
  6919. "nullable": true
  6920. },
  6921. "balance_cents": {
  6922. "type": "integer",
  6923. "format": "int64",
  6924. "minimum": 0,
  6925. "description": "当前企业可用余额,人民币整数分"
  6926. },
  6927. "quote_revision": {
  6928. "type": "string",
  6929. "minLength": 64,
  6930. "maxLength": 64,
  6931. "description": "服务器对套餐价格、名称、规格和桶数生成的报价版本;下单原样提交,变更返回40904"
  6932. }
  6933. },
  6934. "required": [
  6935. "items",
  6936. "subtotal_cents",
  6937. "discount_cents",
  6938. "amount_cents",
  6939. "payment_methods",
  6940. "capabilities",
  6941. "agreement_url",
  6942. "balance_cents",
  6943. "quote_revision"
  6944. ]
  6945. },
  6946. "Checkout": {
  6947. "type": "object",
  6948. "properties": {
  6949. "id": {
  6950. "type": "integer",
  6951. "format": "int64",
  6952. "description": "正整数资源 ID",
  6953. "minimum": 1,
  6954. "maximum": 2147483647
  6955. },
  6956. "code": {
  6957. "type": "string",
  6958. "description": "MP 开头的意向单号"
  6959. },
  6960. "enterprise_id": {
  6961. "type": "integer",
  6962. "format": "int64",
  6963. "description": "正整数资源 ID",
  6964. "minimum": 1,
  6965. "maximum": 2147483647
  6966. },
  6967. "status": {
  6968. "type": "string",
  6969. "enum": [
  6970. "pending",
  6971. "cancelled",
  6972. "expired",
  6973. "paid"
  6974. ]
  6975. },
  6976. "items": {
  6977. "type": "array",
  6978. "items": {
  6979. "$ref": "#/components/schemas/QuoteItem"
  6980. }
  6981. },
  6982. "amount_cents": {
  6983. "type": "integer",
  6984. "format": "int64",
  6985. "description": "人民币整数分",
  6986. "minimum": 0
  6987. },
  6988. "created_at": {
  6989. "type": "string",
  6990. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6991. "example": "2026-09-18 10:30:00"
  6992. },
  6993. "expires_at": {
  6994. "type": "string",
  6995. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6996. "example": "2026-09-18 10:30:00"
  6997. },
  6998. "payment_enabled": {
  6999. "type": "boolean"
  7000. },
  7001. "replayed": {
  7002. "type": "boolean",
  7003. "description": "同 key 重试时才出现"
  7004. },
  7005. "payment_method": {
  7006. "type": "string",
  7007. "enum": [
  7008. "balance",
  7009. "wechat"
  7010. ],
  7011. "nullable": true
  7012. },
  7013. "paid_at": {
  7014. "type": "string",
  7015. "nullable": true,
  7016. "description": "支付完成时间"
  7017. },
  7018. "balance_cents": {
  7019. "type": "integer",
  7020. "format": "int64",
  7021. "minimum": 0,
  7022. "description": "当前企业可用余额,人民币整数分"
  7023. }
  7024. },
  7025. "required": [
  7026. "id",
  7027. "code",
  7028. "enterprise_id",
  7029. "status",
  7030. "items",
  7031. "amount_cents",
  7032. "created_at",
  7033. "expires_at",
  7034. "payment_enabled",
  7035. "balance_cents"
  7036. ]
  7037. },
  7038. "CheckoutDetail": {
  7039. "allOf": [
  7040. {
  7041. "$ref": "#/components/schemas/Checkout"
  7042. },
  7043. {
  7044. "type": "object",
  7045. "properties": {
  7046. "address": {
  7047. "type": "object",
  7048. "properties": {
  7049. "name": {
  7050. "type": "string"
  7051. },
  7052. "address": {
  7053. "type": "string"
  7054. },
  7055. "region": {
  7056. "type": "string"
  7057. },
  7058. "contact": {
  7059. "type": "string"
  7060. },
  7061. "phone": {
  7062. "type": "string",
  7063. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  7064. }
  7065. },
  7066. "required": [
  7067. "name",
  7068. "address",
  7069. "region",
  7070. "contact",
  7071. "phone"
  7072. ]
  7073. }
  7074. },
  7075. "required": [
  7076. "address"
  7077. ]
  7078. }
  7079. ]
  7080. },
  7081. "EnterpriseOrderPage": {
  7082. "type": "object",
  7083. "properties": {
  7084. "items": {
  7085. "type": "array",
  7086. "items": {
  7087. "oneOf": [
  7088. {
  7089. "$ref": "#/components/schemas/Delivery"
  7090. },
  7091. {
  7092. "$ref": "#/components/schemas/Purchase"
  7093. },
  7094. {
  7095. "$ref": "#/components/schemas/Checkout"
  7096. }
  7097. ]
  7098. }
  7099. },
  7100. "total": {
  7101. "type": "integer",
  7102. "format": "int64"
  7103. },
  7104. "page": {
  7105. "type": "integer",
  7106. "format": "int64"
  7107. },
  7108. "page_size": {
  7109. "type": "integer",
  7110. "format": "int64"
  7111. },
  7112. "has_more": {
  7113. "type": "boolean"
  7114. },
  7115. "kind": {
  7116. "type": "string",
  7117. "enum": [
  7118. "deliveries",
  7119. "purchases",
  7120. "checkouts"
  7121. ]
  7122. }
  7123. },
  7124. "required": [
  7125. "items",
  7126. "total",
  7127. "page",
  7128. "page_size",
  7129. "has_more",
  7130. "kind"
  7131. ]
  7132. },
  7133. "Rewards": {
  7134. "type": "object",
  7135. "properties": {
  7136. "enabled": {
  7137. "type": "boolean"
  7138. },
  7139. "reason": {
  7140. "type": "string"
  7141. },
  7142. "reward_type": {
  7143. "type": "string",
  7144. "enum": [
  7145. "water"
  7146. ]
  7147. },
  7148. "total_cents": {
  7149. "type": "integer",
  7150. "nullable": true
  7151. },
  7152. "withdrawable_cents": {
  7153. "type": "integer",
  7154. "nullable": true
  7155. },
  7156. "demo": {
  7157. "type": "boolean",
  7158. "enum": [
  7159. false
  7160. ]
  7161. },
  7162. "invite_code": {
  7163. "type": "string",
  7164. "nullable": true
  7165. },
  7166. "total_buckets": {
  7167. "type": "integer"
  7168. },
  7169. "successful_invites": {
  7170. "type": "integer"
  7171. },
  7172. "first_order_enterprises": {
  7173. "type": "integer"
  7174. },
  7175. "bound": {
  7176. "type": "object",
  7177. "nullable": true,
  7178. "allOf": [
  7179. {
  7180. "$ref": "#/components/schemas/PromotionRecord"
  7181. }
  7182. ]
  7183. },
  7184. "items": {
  7185. "type": "array",
  7186. "items": {
  7187. "$ref": "#/components/schemas/PromotionRecord"
  7188. }
  7189. },
  7190. "total": {
  7191. "type": "integer"
  7192. },
  7193. "policy": {
  7194. "$ref": "#/components/schemas/PromotionPolicy"
  7195. }
  7196. },
  7197. "required": [
  7198. "enabled",
  7199. "reason",
  7200. "reward_type",
  7201. "total_cents",
  7202. "withdrawable_cents",
  7203. "demo",
  7204. "invite_code",
  7205. "total_buckets",
  7206. "successful_invites",
  7207. "first_order_enterprises",
  7208. "bound",
  7209. "items",
  7210. "total",
  7211. "policy"
  7212. ]
  7213. },
  7214. "TaskListItem": {
  7215. "allOf": [
  7216. {
  7217. "$ref": "#/components/schemas/Delivery"
  7218. },
  7219. {
  7220. "type": "object",
  7221. "properties": {
  7222. "enterprise_name": {
  7223. "type": "string",
  7224. "nullable": true
  7225. },
  7226. "route_id": {
  7227. "type": "integer",
  7228. "format": "int64",
  7229. "nullable": true
  7230. },
  7231. "stop_order": {
  7232. "type": "integer",
  7233. "format": "int64"
  7234. }
  7235. },
  7236. "required": [
  7237. "enterprise_name",
  7238. "route_id",
  7239. "stop_order"
  7240. ]
  7241. }
  7242. ]
  7243. },
  7244. "TaskPage": {
  7245. "type": "object",
  7246. "properties": {
  7247. "items": {
  7248. "type": "array",
  7249. "items": {
  7250. "$ref": "#/components/schemas/TaskListItem"
  7251. }
  7252. },
  7253. "total": {
  7254. "type": "integer",
  7255. "format": "int64"
  7256. },
  7257. "page": {
  7258. "type": "integer",
  7259. "format": "int64"
  7260. },
  7261. "page_size": {
  7262. "type": "integer",
  7263. "format": "int64"
  7264. },
  7265. "has_more": {
  7266. "type": "boolean"
  7267. }
  7268. },
  7269. "required": [
  7270. "items",
  7271. "total",
  7272. "page",
  7273. "page_size",
  7274. "has_more"
  7275. ]
  7276. },
  7277. "TaskRecord": {
  7278. "type": "object",
  7279. "properties": {
  7280. "id": {
  7281. "type": "integer",
  7282. "format": "int64",
  7283. "description": "正整数资源 ID",
  7284. "minimum": 1,
  7285. "maximum": 2147483647
  7286. },
  7287. "kind": {
  7288. "type": "string",
  7289. "enum": [
  7290. "depart",
  7291. "checkin",
  7292. "exception",
  7293. "draft",
  7294. "complete"
  7295. ]
  7296. },
  7297. "data": {
  7298. "oneOf": [
  7299. {
  7300. "type": "object",
  7301. "properties": {
  7302. "latitude": {
  7303. "type": "number"
  7304. },
  7305. "longitude": {
  7306. "type": "number"
  7307. },
  7308. "coordinate_system": {
  7309. "type": "string"
  7310. },
  7311. "source": {
  7312. "type": "string"
  7313. },
  7314. "reason": {
  7315. "type": "string"
  7316. },
  7317. "accepted_qty": {
  7318. "type": "integer",
  7319. "format": "int64"
  7320. },
  7321. "empty_returned": {
  7322. "type": "integer",
  7323. "format": "int64"
  7324. },
  7325. "receiver": {
  7326. "type": "string"
  7327. },
  7328. "photo_ids": {
  7329. "type": "array",
  7330. "items": {
  7331. "type": "integer",
  7332. "format": "int64",
  7333. "description": "正整数资源 ID",
  7334. "minimum": 1,
  7335. "maximum": 2147483647
  7336. }
  7337. }
  7338. }
  7339. },
  7340. {
  7341. "type": "array",
  7342. "items": {},
  7343. "maxItems": 0
  7344. }
  7345. ],
  7346. "description": "按 kind 区分。depart 为 [];checkin 为坐标;exception 为 reason;draft/complete 为履约内容"
  7347. },
  7348. "created_at": {
  7349. "type": "string",
  7350. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  7351. "example": "2026-09-18 10:30:00"
  7352. }
  7353. },
  7354. "required": [
  7355. "id",
  7356. "kind",
  7357. "data",
  7358. "created_at"
  7359. ]
  7360. },
  7361. "TaskDetail": {
  7362. "allOf": [
  7363. {
  7364. "$ref": "#/components/schemas/Delivery"
  7365. },
  7366. {
  7367. "type": "object",
  7368. "properties": {
  7369. "enterprise_name": {
  7370. "type": "string",
  7371. "nullable": true
  7372. },
  7373. "contact": {
  7374. "type": "string",
  7375. "nullable": true
  7376. },
  7377. "phone": {
  7378. "type": "string",
  7379. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****",
  7380. "nullable": true
  7381. },
  7382. "contact_phone": {
  7383. "type": "string",
  7384. "description": "仅本人 assigned/transit/returning 任务提供完整拨号号码,完成后 null",
  7385. "nullable": true
  7386. },
  7387. "longitude": {
  7388. "anyOf": [
  7389. {
  7390. "type": "number",
  7391. "nullable": true
  7392. },
  7393. {
  7394. "type": "string",
  7395. "description": "数据库 DECIMAL 原值"
  7396. }
  7397. ],
  7398. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7399. },
  7400. "latitude": {
  7401. "anyOf": [
  7402. {
  7403. "type": "number",
  7404. "nullable": true
  7405. },
  7406. {
  7407. "type": "string",
  7408. "description": "数据库 DECIMAL 原值"
  7409. }
  7410. ],
  7411. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7412. },
  7413. "route_id": {
  7414. "type": "integer",
  7415. "format": "int64",
  7416. "nullable": true
  7417. },
  7418. "records": {
  7419. "type": "array",
  7420. "items": {
  7421. "$ref": "#/components/schemas/TaskRecord"
  7422. }
  7423. },
  7424. "photos": {
  7425. "type": "array",
  7426. "items": {
  7427. "$ref": "#/components/schemas/PhotoMeta"
  7428. }
  7429. },
  7430. "capabilities": {
  7431. "type": "object",
  7432. "properties": {
  7433. "checkin": {
  7434. "type": "boolean",
  7435. "description": "以服务器返回值决定是否开放入口"
  7436. },
  7437. "photos": {
  7438. "type": "boolean",
  7439. "description": "以服务器返回值决定是否开放入口"
  7440. },
  7441. "fulfillment": {
  7442. "type": "boolean",
  7443. "description": "以服务器返回值决定是否开放入口"
  7444. },
  7445. "device_binding": {
  7446. "type": "boolean",
  7447. "description": "以服务器返回值决定是否开放入口"
  7448. }
  7449. },
  7450. "required": [
  7451. "checkin",
  7452. "photos",
  7453. "fulfillment",
  7454. "device_binding"
  7455. ]
  7456. }
  7457. },
  7458. "required": [
  7459. "enterprise_name",
  7460. "contact",
  7461. "phone",
  7462. "contact_phone",
  7463. "longitude",
  7464. "latitude",
  7465. "route_id",
  7466. "records",
  7467. "photos",
  7468. "capabilities"
  7469. ]
  7470. }
  7471. ]
  7472. },
  7473. "Route": {
  7474. "type": "object",
  7475. "properties": {
  7476. "id": {
  7477. "type": "integer",
  7478. "format": "int64",
  7479. "description": "正整数资源 ID",
  7480. "minimum": 1,
  7481. "maximum": 2147483647
  7482. },
  7483. "code": {
  7484. "type": "string"
  7485. },
  7486. "work_date": {
  7487. "type": "string",
  7488. "format": "date"
  7489. },
  7490. "region": {
  7491. "type": "string"
  7492. },
  7493. "optimization": {
  7494. "type": "object",
  7495. "nullable": true,
  7496. "description": "后台路线规划元数据,可能为 null;展示站点请使用 stops,不能据此承诺实时 ETA",
  7497. "additionalProperties": true
  7498. },
  7499. "stops": {
  7500. "type": "array",
  7501. "items": {
  7502. "type": "object",
  7503. "properties": {
  7504. "id": {
  7505. "type": "integer",
  7506. "format": "int64",
  7507. "description": "正整数资源 ID",
  7508. "minimum": 1,
  7509. "maximum": 2147483647
  7510. },
  7511. "address": {
  7512. "type": "string"
  7513. },
  7514. "status": {
  7515. "type": "string",
  7516. "enum": [
  7517. "pending",
  7518. "assigned",
  7519. "transit",
  7520. "completed",
  7521. "cancelled",
  7522. "returning",
  7523. "returned"
  7524. ]
  7525. },
  7526. "quantity": {
  7527. "type": "integer",
  7528. "format": "int64"
  7529. },
  7530. "longitude": {
  7531. "anyOf": [
  7532. {
  7533. "type": "number",
  7534. "nullable": true
  7535. },
  7536. {
  7537. "type": "string",
  7538. "description": "数据库 DECIMAL 原值"
  7539. }
  7540. ],
  7541. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7542. },
  7543. "latitude": {
  7544. "anyOf": [
  7545. {
  7546. "type": "number",
  7547. "nullable": true
  7548. },
  7549. {
  7550. "type": "string",
  7551. "description": "数据库 DECIMAL 原值"
  7552. }
  7553. ],
  7554. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7555. },
  7556. "origin_address": {
  7557. "type": "string"
  7558. },
  7559. "origin_longitude": {
  7560. "anyOf": [
  7561. {
  7562. "type": "number",
  7563. "nullable": true
  7564. },
  7565. {
  7566. "type": "string",
  7567. "description": "数据库 DECIMAL 原值"
  7568. }
  7569. ],
  7570. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7571. },
  7572. "origin_latitude": {
  7573. "anyOf": [
  7574. {
  7575. "type": "number",
  7576. "nullable": true
  7577. },
  7578. {
  7579. "type": "string",
  7580. "description": "数据库 DECIMAL 原值"
  7581. }
  7582. ],
  7583. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7584. },
  7585. "stop_order": {
  7586. "type": "integer",
  7587. "format": "int64"
  7588. }
  7589. },
  7590. "required": [
  7591. "id",
  7592. "address",
  7593. "status",
  7594. "quantity",
  7595. "longitude",
  7596. "latitude",
  7597. "origin_address",
  7598. "origin_longitude",
  7599. "origin_latitude",
  7600. "stop_order"
  7601. ]
  7602. }
  7603. }
  7604. },
  7605. "required": [
  7606. "id",
  7607. "code",
  7608. "work_date",
  7609. "region",
  7610. "optimization",
  7611. "stops"
  7612. ]
  7613. },
  7614. "DriverDashboard": {
  7615. "type": "object",
  7616. "properties": {
  7617. "driver": {
  7618. "type": "object",
  7619. "properties": {
  7620. "id": {
  7621. "type": "integer",
  7622. "format": "int64",
  7623. "description": "正整数资源 ID",
  7624. "minimum": 1,
  7625. "maximum": 2147483647
  7626. },
  7627. "name": {
  7628. "type": "string"
  7629. },
  7630. "vehicle": {
  7631. "type": "string"
  7632. }
  7633. },
  7634. "required": [
  7635. "id",
  7636. "name",
  7637. "vehicle"
  7638. ]
  7639. },
  7640. "shift": {
  7641. "type": "string",
  7642. "description": "今日班次;未设置为 null",
  7643. "nullable": true
  7644. },
  7645. "summary": {
  7646. "type": "object",
  7647. "properties": {
  7648. "pending": {
  7649. "type": "integer",
  7650. "format": "int64"
  7651. },
  7652. "transit": {
  7653. "type": "integer",
  7654. "format": "int64"
  7655. },
  7656. "completed_today": {
  7657. "type": "integer",
  7658. "format": "int64"
  7659. }
  7660. },
  7661. "required": [
  7662. "pending",
  7663. "transit",
  7664. "completed_today"
  7665. ]
  7666. },
  7667. "tasks": {
  7668. "$ref": "#/components/schemas/TaskPage"
  7669. },
  7670. "routes": {
  7671. "type": "array",
  7672. "items": {
  7673. "$ref": "#/components/schemas/Route"
  7674. }
  7675. },
  7676. "capabilities": {
  7677. "type": "object",
  7678. "properties": {
  7679. "live_gps": {
  7680. "type": "boolean",
  7681. "description": "以服务器返回值决定是否开放入口"
  7682. },
  7683. "self_accept_unassigned": {
  7684. "type": "boolean",
  7685. "description": "以服务器返回值决定是否开放入口"
  7686. }
  7687. },
  7688. "required": [
  7689. "live_gps",
  7690. "self_accept_unassigned"
  7691. ]
  7692. }
  7693. },
  7694. "required": [
  7695. "driver",
  7696. "shift",
  7697. "summary",
  7698. "tasks",
  7699. "routes",
  7700. "capabilities"
  7701. ]
  7702. },
  7703. "DeviceCheck": {
  7704. "type": "object",
  7705. "properties": {
  7706. "id": {
  7707. "type": "integer",
  7708. "format": "int64",
  7709. "description": "正整数资源 ID",
  7710. "minimum": 1,
  7711. "maximum": 2147483647
  7712. },
  7713. "sn": {
  7714. "type": "string"
  7715. },
  7716. "last_seen": {
  7717. "type": "string",
  7718. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  7719. "example": "2026-09-18 10:30:00",
  7720. "nullable": true
  7721. },
  7722. "online": {
  7723. "type": "boolean",
  7724. "description": "按最近15分钟心跳与故障标记判断"
  7725. },
  7726. "network_test_passed": {
  7727. "type": "boolean",
  7728. "nullable": true,
  7729. "description": "当前为 null,尚无可用数据"
  7730. },
  7731. "binding_enabled": {
  7732. "type": "boolean"
  7733. }
  7734. },
  7735. "required": [
  7736. "id",
  7737. "sn",
  7738. "last_seen",
  7739. "online",
  7740. "network_test_passed",
  7741. "binding_enabled"
  7742. ]
  7743. },
  7744. "AgentDashboard": {
  7745. "type": "object",
  7746. "properties": {
  7747. "agent": {
  7748. "type": "object",
  7749. "properties": {
  7750. "id": {
  7751. "type": "integer",
  7752. "format": "int64",
  7753. "description": "正整数资源 ID",
  7754. "minimum": 1,
  7755. "maximum": 2147483647
  7756. },
  7757. "name": {
  7758. "type": "string"
  7759. },
  7760. "region": {
  7761. "type": "string"
  7762. }
  7763. },
  7764. "required": [
  7765. "id",
  7766. "name",
  7767. "region"
  7768. ]
  7769. },
  7770. "summary": {
  7771. "type": "object",
  7772. "properties": {
  7773. "month_amount_cents": {
  7774. "type": "integer",
  7775. "format": "int64",
  7776. "description": "人民币整数分",
  7777. "minimum": 0
  7778. },
  7779. "previous_month_amount_cents": {
  7780. "type": "integer",
  7781. "format": "int64",
  7782. "description": "人民币整数分",
  7783. "minimum": 0
  7784. },
  7785. "growth_percent": {
  7786. "type": "number",
  7787. "description": "上月为0时 null",
  7788. "nullable": true
  7789. },
  7790. "customer_count": {
  7791. "type": "integer",
  7792. "format": "int64"
  7793. },
  7794. "new_customers": {
  7795. "type": "integer",
  7796. "format": "int64"
  7797. },
  7798. "team_count": {
  7799. "type": "integer",
  7800. "format": "int64"
  7801. },
  7802. "estimated_commission_cents": {
  7803. "type": "integer",
  7804. "nullable": true,
  7805. "description": "当前代理自己的待结算佣金,单位分;旧订单不补记"
  7806. },
  7807. "withdrawable_cents": {
  7808. "type": "integer",
  7809. "nullable": true,
  7810. "description": "提现尚未开放,当前为0"
  7811. },
  7812. "pending_commission_cents": {
  7813. "type": "integer",
  7814. "nullable": true,
  7815. "description": "当前代理自己的待结算佣金,单位分"
  7816. }
  7817. },
  7818. "required": [
  7819. "month_amount_cents",
  7820. "previous_month_amount_cents",
  7821. "growth_percent",
  7822. "customer_count",
  7823. "new_customers",
  7824. "team_count",
  7825. "estimated_commission_cents",
  7826. "withdrawable_cents",
  7827. "pending_commission_cents"
  7828. ]
  7829. },
  7830. "trend": {
  7831. "type": "array",
  7832. "items": {
  7833. "type": "object",
  7834. "properties": {
  7835. "day": {
  7836. "type": "string",
  7837. "format": "date"
  7838. },
  7839. "amount_cents": {
  7840. "type": "integer",
  7841. "format": "int64",
  7842. "description": "人民币整数分",
  7843. "minimum": 0
  7844. }
  7845. },
  7846. "required": [
  7847. "day",
  7848. "amount_cents"
  7849. ]
  7850. }
  7851. },
  7852. "attribution": {
  7853. "type": "string",
  7854. "enum": [
  7855. "current_enterprise_agent"
  7856. ]
  7857. },
  7858. "capabilities": {
  7859. "type": "object",
  7860. "properties": {
  7861. "commission": {
  7862. "type": "boolean",
  7863. "description": "以服务器返回值决定是否开放入口"
  7864. },
  7865. "withdrawal": {
  7866. "type": "boolean",
  7867. "description": "以服务器返回值决定是否开放入口"
  7868. }
  7869. },
  7870. "required": [
  7871. "commission",
  7872. "withdrawal"
  7873. ]
  7874. }
  7875. },
  7876. "required": [
  7877. "agent",
  7878. "summary",
  7879. "trend",
  7880. "attribution",
  7881. "capabilities"
  7882. ]
  7883. },
  7884. "Customer": {
  7885. "type": "object",
  7886. "properties": {
  7887. "id": {
  7888. "type": "integer",
  7889. "format": "int64",
  7890. "description": "正整数资源 ID",
  7891. "minimum": 1,
  7892. "maximum": 2147483647
  7893. },
  7894. "name": {
  7895. "type": "string"
  7896. },
  7897. "contact": {
  7898. "type": "string"
  7899. },
  7900. "phone": {
  7901. "type": "string",
  7902. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  7903. },
  7904. "region": {
  7905. "type": "string"
  7906. },
  7907. "created_at": {
  7908. "type": "string",
  7909. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  7910. "example": "2026-09-18 10:30:00"
  7911. },
  7912. "amount_cents": {
  7913. "type": "integer",
  7914. "format": "int64",
  7915. "description": "人民币整数分",
  7916. "minimum": 0
  7917. },
  7918. "last_purchase_at": {
  7919. "type": "string",
  7920. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  7921. "example": "2026-09-18 10:30:00",
  7922. "nullable": true
  7923. },
  7924. "has_purchased": {
  7925. "type": "boolean"
  7926. },
  7927. "device_count": {
  7928. "type": "integer",
  7929. "format": "int64"
  7930. }
  7931. },
  7932. "required": [
  7933. "id",
  7934. "name",
  7935. "contact",
  7936. "phone",
  7937. "region",
  7938. "created_at",
  7939. "amount_cents",
  7940. "last_purchase_at",
  7941. "has_purchased",
  7942. "device_count"
  7943. ]
  7944. },
  7945. "CustomerPage": {
  7946. "type": "object",
  7947. "properties": {
  7948. "items": {
  7949. "type": "array",
  7950. "items": {
  7951. "$ref": "#/components/schemas/Customer"
  7952. }
  7953. },
  7954. "total": {
  7955. "type": "integer",
  7956. "format": "int64"
  7957. },
  7958. "page": {
  7959. "type": "integer",
  7960. "format": "int64"
  7961. },
  7962. "page_size": {
  7963. "type": "integer",
  7964. "format": "int64"
  7965. },
  7966. "has_more": {
  7967. "type": "boolean"
  7968. },
  7969. "summary": {
  7970. "type": "object",
  7971. "properties": {
  7972. "all": {
  7973. "type": "integer",
  7974. "format": "int64"
  7975. },
  7976. "new": {
  7977. "type": "integer",
  7978. "format": "int64",
  7979. "description": "本月新增"
  7980. },
  7981. "unpaid": {
  7982. "type": "integer",
  7983. "format": "int64",
  7984. "description": "无已发生收款"
  7985. }
  7986. },
  7987. "required": [
  7988. "all",
  7989. "new",
  7990. "unpaid"
  7991. ]
  7992. }
  7993. },
  7994. "required": [
  7995. "items",
  7996. "total",
  7997. "page",
  7998. "page_size",
  7999. "has_more",
  8000. "summary"
  8001. ]
  8002. },
  8003. "AgentOrderPage": {
  8004. "type": "object",
  8005. "properties": {
  8006. "items": {
  8007. "type": "array",
  8008. "items": {
  8009. "type": "object",
  8010. "properties": {
  8011. "id": {
  8012. "type": "integer",
  8013. "format": "int64",
  8014. "description": "正整数资源 ID",
  8015. "minimum": 1,
  8016. "maximum": 2147483647
  8017. },
  8018. "enterprise_id": {
  8019. "type": "integer",
  8020. "format": "int64",
  8021. "description": "正整数资源 ID",
  8022. "minimum": 1,
  8023. "maximum": 2147483647
  8024. },
  8025. "package_name": {
  8026. "type": "string"
  8027. },
  8028. "buckets": {
  8029. "type": "integer",
  8030. "format": "int64"
  8031. },
  8032. "amount_cents": {
  8033. "type": "integer",
  8034. "format": "int64",
  8035. "description": "人民币整数分",
  8036. "minimum": 0
  8037. },
  8038. "created_at": {
  8039. "type": "string",
  8040. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  8041. "example": "2026-09-18 10:30:00"
  8042. }
  8043. },
  8044. "required": [
  8045. "id",
  8046. "enterprise_id",
  8047. "package_name",
  8048. "buckets",
  8049. "amount_cents",
  8050. "created_at"
  8051. ]
  8052. }
  8053. },
  8054. "total": {
  8055. "type": "integer",
  8056. "format": "int64"
  8057. },
  8058. "page": {
  8059. "type": "integer",
  8060. "format": "int64"
  8061. },
  8062. "page_size": {
  8063. "type": "integer",
  8064. "format": "int64"
  8065. },
  8066. "has_more": {
  8067. "type": "boolean"
  8068. }
  8069. },
  8070. "required": [
  8071. "items",
  8072. "total",
  8073. "page",
  8074. "page_size",
  8075. "has_more"
  8076. ]
  8077. },
  8078. "Commissions": {
  8079. "type": "object",
  8080. "properties": {
  8081. "enabled": {
  8082. "type": "boolean"
  8083. },
  8084. "reason": {
  8085. "type": "string"
  8086. },
  8087. "withdrawable_cents": {
  8088. "type": "integer",
  8089. "nullable": true,
  8090. "description": "正式佣金账本当前为0,提现尚未开放;演示模式可为null"
  8091. },
  8092. "pending_cents": {
  8093. "type": "integer",
  8094. "nullable": true,
  8095. "description": "当前代理自己的待结算佣金,单位分;演示模式可为null"
  8096. },
  8097. "total_cents": {
  8098. "type": "integer",
  8099. "nullable": true,
  8100. "description": "当前代理自己的累计计提金额,单位分;演示模式可为null"
  8101. },
  8102. "withdrawn_cents": {
  8103. "type": "integer",
  8104. "nullable": true,
  8105. "description": "正式佣金账本当前为0,提现尚未开放;演示模式可为null"
  8106. },
  8107. "items": {
  8108. "type": "array",
  8109. "items": {
  8110. "type": "object",
  8111. "properties": {
  8112. "id": {
  8113. "type": "integer"
  8114. },
  8115. "customer_name": {
  8116. "type": "string"
  8117. },
  8118. "title": {
  8119. "type": "string"
  8120. },
  8121. "status": {
  8122. "type": "string",
  8123. "enum": [
  8124. "settled",
  8125. "pending",
  8126. "withdrawn",
  8127. "adjustment"
  8128. ]
  8129. },
  8130. "status_text": {
  8131. "type": "string"
  8132. },
  8133. "amount_cents": {
  8134. "type": "integer"
  8135. },
  8136. "created_at": {
  8137. "type": "string"
  8138. }
  8139. },
  8140. "required": [
  8141. "id",
  8142. "customer_name",
  8143. "title",
  8144. "status",
  8145. "status_text",
  8146. "amount_cents",
  8147. "created_at"
  8148. ]
  8149. }
  8150. },
  8151. "demo": {
  8152. "type": "boolean",
  8153. "description": "本地测试展示数据,不可兑现"
  8154. },
  8155. "total": {
  8156. "type": "integer"
  8157. },
  8158. "page": {
  8159. "type": "integer"
  8160. },
  8161. "page_size": {
  8162. "type": "integer"
  8163. },
  8164. "has_more": {
  8165. "type": "boolean"
  8166. }
  8167. },
  8168. "required": [
  8169. "enabled",
  8170. "reason",
  8171. "withdrawable_cents",
  8172. "pending_cents",
  8173. "total_cents",
  8174. "withdrawn_cents",
  8175. "items",
  8176. "total",
  8177. "page",
  8178. "page_size",
  8179. "has_more"
  8180. ]
  8181. },
  8182. "Config": {
  8183. "type": "object",
  8184. "properties": {
  8185. "currency": {
  8186. "type": "string",
  8187. "enum": [
  8188. "CNY"
  8189. ]
  8190. },
  8191. "money_unit": {
  8192. "type": "string",
  8193. "enum": [
  8194. "cent"
  8195. ]
  8196. },
  8197. "timezone": {
  8198. "type": "string",
  8199. "enum": [
  8200. "Asia/Shanghai"
  8201. ]
  8202. },
  8203. "support_phone": {
  8204. "type": "string",
  8205. "nullable": true
  8206. },
  8207. "privacy_url": {
  8208. "type": "string",
  8209. "nullable": true
  8210. },
  8211. "purchase_agreement_url": {
  8212. "type": "string",
  8213. "nullable": true
  8214. },
  8215. "capabilities": {
  8216. "type": "object",
  8217. "properties": {
  8218. "wechat_login": {
  8219. "type": "boolean",
  8220. "description": "以服务器返回值决定是否开放入口"
  8221. }, "sms_login": {
  8222. "type": "boolean",
  8223. "description": "短信登录总开关;关闭时不下发验证码,也不接受验证码登录"
  8224. },
  8225. "enterprise": {
  8226. "type": "boolean",
  8227. "description": "以服务器返回值决定是否开放入口"
  8228. },
  8229. "driver": {
  8230. "type": "boolean",
  8231. "description": "以服务器返回值决定是否开放入口"
  8232. },
  8233. "agent": {
  8234. "type": "boolean",
  8235. "description": "以服务器返回值决定是否开放入口"
  8236. },
  8237. "payment": {
  8238. "type": "boolean",
  8239. "description": "以服务器返回值决定是否开放入口"
  8240. },
  8241. "balance_payment": {
  8242. "type": "boolean",
  8243. "description": "以服务器返回值决定是否开放入口"
  8244. },
  8245. "commissions": {
  8246. "type": "boolean",
  8247. "description": "以服务器返回值决定是否开放入口"
  8248. },
  8249. "withdrawal": {
  8250. "type": "boolean",
  8251. "description": "以服务器返回值决定是否开放入口"
  8252. },
  8253. "rewards": {
  8254. "type": "boolean",
  8255. "description": "以服务器返回值决定是否开放入口"
  8256. },
  8257. "individual_package_cards": {
  8258. "type": "boolean",
  8259. "description": "以服务器返回值决定是否开放入口"
  8260. },
  8261. "multiple_sites_per_enterprise": {
  8262. "type": "boolean",
  8263. "description": "以服务器返回值决定是否开放入口"
  8264. },
  8265. "device_binding": {
  8266. "type": "boolean",
  8267. "description": "以服务器返回值决定是否开放入口"
  8268. },
  8269. "test_phone_login": {
  8270. "type": "boolean",
  8271. "description": "仅本机测试手机号入口是否启用,非正式短信能力"
  8272. }
  8273. },
  8274. "required": [
  8275. "wechat_login",
  8276. "enterprise",
  8277. "driver",
  8278. "agent",
  8279. "payment",
  8280. "balance_payment",
  8281. "commissions",
  8282. "withdrawal",
  8283. "rewards",
  8284. "individual_package_cards",
  8285. "multiple_sites_per_enterprise",
  8286. "device_binding",
  8287. "test_phone_login"
  8288. ]
  8289. },
  8290. "setup_messages": {
  8291. "type": "object",
  8292. "description": "运营配置指引。能力未开启时给出在 server/.env 写入与重启的步骤;不会泄露密钥或具体配置值",
  8293. "additionalProperties": {
  8294. "type": "object",
  8295. "properties": {
  8296. "action": {
  8297. "type": "string",
  8298. "enum": [
  8299. "configure",
  8300. "optional"
  8301. ]
  8302. },
  8303. "summary": {
  8304. "type": "string"
  8305. },
  8306. "steps": {
  8307. "type": "array",
  8308. "items": {
  8309. "type": "string"
  8310. }
  8311. }
  8312. },
  8313. "required": [
  8314. "action",
  8315. "summary",
  8316. "steps"
  8317. ],
  8318. "additionalProperties": false
  8319. }
  8320. },
  8321. "admin_binding": {
  8322. "type": "object",
  8323. "description": "后台管理员绑定小程序账号流程所需端点与角色清单。仅在 capabilities 指定管理员 ID 上调用",
  8324. "properties": {
  8325. "route_users": {
  8326. "type": "string"
  8327. },
  8328. "route_grants": {
  8329. "type": "string"
  8330. },
  8331. "roles": {
  8332. "type": "array",
  8333. "items": {
  8334. "type": "string",
  8335. "enum": [
  8336. "enterprise_admin",
  8337. "enterprise_member",
  8338. "driver",
  8339. "agent"
  8340. ]
  8341. }
  8342. },
  8343. "note": {
  8344. "type": "string"
  8345. }
  8346. },
  8347. "required": [
  8348. "route_users",
  8349. "route_grants",
  8350. "roles",
  8351. "note"
  8352. ],
  8353. "additionalProperties": false
  8354. }
  8355. },
  8356. "required": [
  8357. "currency",
  8358. "money_unit",
  8359. "timezone",
  8360. "support_phone",
  8361. "privacy_url",
  8362. "purchase_agreement_url",
  8363. "capabilities",
  8364. "setup_messages",
  8365. "admin_binding"
  8366. ]
  8367. },
  8368. "Health": {
  8369. "type": "object",
  8370. "properties": {
  8371. "service": {
  8372. "type": "string",
  8373. "enum": [
  8374. "water-mini-api"
  8375. ]
  8376. },
  8377. "version": {
  8378. "type": "string",
  8379. "enum": [
  8380. "v1"
  8381. ]
  8382. },
  8383. "status": {
  8384. "type": "string",
  8385. "enum": [
  8386. "ok"
  8387. ]
  8388. },
  8389. "capabilities": {
  8390. "type": "object",
  8391. "properties": {
  8392. "login": {
  8393. "type": "boolean",
  8394. "description": "以服务器返回值决定是否开放入口"
  8395. },
  8396. "business": {
  8397. "type": "boolean",
  8398. "description": "以服务器返回值决定是否开放入口"
  8399. },
  8400. "wechat_payment": {
  8401. "type": "boolean",
  8402. "description": "以服务器返回值决定是否开放入口"
  8403. },
  8404. "balance_payment": {
  8405. "type": "boolean",
  8406. "description": "以服务器返回值决定是否开放入口"
  8407. },
  8408. "commissions": {
  8409. "type": "boolean",
  8410. "description": "以服务器返回值决定是否开放入口"
  8411. },
  8412. "withdrawals": {
  8413. "type": "boolean",
  8414. "description": "以服务器返回值决定是否开放入口"
  8415. }
  8416. },
  8417. "required": [
  8418. "login",
  8419. "business",
  8420. "wechat_payment",
  8421. "balance_payment",
  8422. "commissions",
  8423. "withdrawals"
  8424. ]
  8425. }
  8426. },
  8427. "required": [
  8428. "service",
  8429. "version",
  8430. "status",
  8431. "capabilities"
  8432. ]
  8433. },
  8434. "CommandRequest": {
  8435. "type": "object",
  8436. "properties": {
  8437. "request_key": {
  8438. "type": "string",
  8439. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8440. "minLength": 8,
  8441. "maxLength": 80,
  8442. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8443. "example": "mini-20260918-0001"
  8444. }
  8445. },
  8446. "required": [
  8447. "request_key"
  8448. ],
  8449. "additionalProperties": false
  8450. },
  8451. "LoginRequest": {
  8452. "type": "object",
  8453. "properties": {
  8454. "code": {
  8455. "type": "string",
  8456. "description": "wx.login 返回的一次性 code",
  8457. "minLength": 1,
  8458. "maxLength": 512
  8459. }
  8460. },
  8461. "required": [
  8462. "code"
  8463. ],
  8464. "additionalProperties": false
  8465. },
  8466. "AddressRequest": {
  8467. "type": "object",
  8468. "properties": {
  8469. "request_key": {
  8470. "type": "string",
  8471. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8472. "minLength": 8,
  8473. "maxLength": 80,
  8474. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8475. "example": "mini-20260918-0001"
  8476. },
  8477. "revision": {
  8478. "type": "string",
  8479. "description": "GET address 返回的 revision 原样提交",
  8480. "minLength": 1,
  8481. "maxLength": 64
  8482. },
  8483. "address": {
  8484. "type": "string",
  8485. "minLength": 1,
  8486. "maxLength": 255
  8487. },
  8488. "contact": {
  8489. "type": "string",
  8490. "minLength": 1,
  8491. "maxLength": 60
  8492. },
  8493. "phone": {
  8494. "type": "string",
  8495. "description": "7–15位数字;允许前置+、空格、短横线、成对括号。保存时规范化;拒绝掩码和纯符号。格式校验不代表号码已验证",
  8496. "minLength": 7,
  8497. "maxLength": 30,
  8498. "example": "+86 138 1234 5678"
  8499. }
  8500. },
  8501. "required": [
  8502. "request_key",
  8503. "revision",
  8504. "address",
  8505. "contact",
  8506. "phone"
  8507. ],
  8508. "additionalProperties": false
  8509. },
  8510. "BookingRequest": {
  8511. "type": "object",
  8512. "properties": {
  8513. "request_key": {
  8514. "type": "string",
  8515. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8516. "minLength": 8,
  8517. "maxLength": 80,
  8518. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8519. "example": "mini-20260918-0001"
  8520. },
  8521. "sku_id": {
  8522. "type": "integer",
  8523. "format": "int64",
  8524. "description": "正整数资源 ID",
  8525. "minimum": 1,
  8526. "maximum": 2147483647
  8527. },
  8528. "quantity": {
  8529. "type": "integer",
  8530. "format": "int64",
  8531. "minimum": 1,
  8532. "maximum": 10000
  8533. },
  8534. "address_id": {
  8535. "type": "integer",
  8536. "minimum": 0,
  8537. "description": "配送地址 ID;省略或 0 使用默认地址"
  8538. }
  8539. },
  8540. "required": [
  8541. "request_key",
  8542. "sku_id",
  8543. "quantity"
  8544. ],
  8545. "additionalProperties": false
  8546. },
  8547. "QuoteRequest": {
  8548. "type": "object",
  8549. "properties": {
  8550. "items": {
  8551. "type": "array",
  8552. "items": {
  8553. "type": "object",
  8554. "properties": {
  8555. "package_id": {
  8556. "type": "integer",
  8557. "format": "int64",
  8558. "description": "正整数资源 ID",
  8559. "minimum": 1,
  8560. "maximum": 2147483647
  8561. },
  8562. "quantity": {
  8563. "type": "integer",
  8564. "format": "int64",
  8565. "description": "套餐份数",
  8566. "minimum": 1,
  8567. "maximum": 100
  8568. }
  8569. },
  8570. "required": [
  8571. "package_id",
  8572. "quantity"
  8573. ],
  8574. "additionalProperties": false
  8575. },
  8576. "minItems": 1,
  8577. "maxItems": 20,
  8578. "description": "同一套餐不能重复,不能提交客户端单价"
  8579. }
  8580. },
  8581. "required": [
  8582. "items"
  8583. ],
  8584. "additionalProperties": false
  8585. },
  8586. "Invoice": {
  8587. "type": "object",
  8588. "properties": {
  8589. "title": {
  8590. "type": "string",
  8591. "minLength": 1,
  8592. "maxLength": 120
  8593. },
  8594. "tax_number": {
  8595. "type": "string",
  8596. "minLength": 1,
  8597. "maxLength": 30
  8598. },
  8599. "email": {
  8600. "type": "string",
  8601. "format": "email",
  8602. "maxLength": 120
  8603. }
  8604. },
  8605. "required": [
  8606. "title",
  8607. "tax_number",
  8608. "email"
  8609. ],
  8610. "additionalProperties": false
  8611. },
  8612. "CheckoutRequest": {
  8613. "type": "object",
  8614. "properties": {
  8615. "request_key": {
  8616. "type": "string",
  8617. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8618. "minLength": 8,
  8619. "maxLength": 80,
  8620. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8621. "example": "mini-20260918-0001"
  8622. },
  8623. "items": {
  8624. "type": "array",
  8625. "items": {
  8626. "type": "object",
  8627. "properties": {
  8628. "package_id": {
  8629. "type": "integer",
  8630. "format": "int64",
  8631. "description": "正整数资源 ID",
  8632. "minimum": 1,
  8633. "maximum": 2147483647
  8634. },
  8635. "quantity": {
  8636. "type": "integer",
  8637. "format": "int64",
  8638. "description": "套餐份数",
  8639. "minimum": 1,
  8640. "maximum": 100
  8641. }
  8642. },
  8643. "required": [
  8644. "package_id",
  8645. "quantity"
  8646. ],
  8647. "additionalProperties": false
  8648. },
  8649. "minItems": 1,
  8650. "maxItems": 20,
  8651. "description": "同一套餐不能重复,不能提交客户端单价"
  8652. },
  8653. "expected_amount_cents": {
  8654. "type": "integer",
  8655. "format": "int64",
  8656. "description": "人民币整数分",
  8657. "minimum": 0
  8658. },
  8659. "agreement_accepted": {
  8660. "type": "boolean",
  8661. "enum": [
  8662. true
  8663. ]
  8664. },
  8665. "invoice": {
  8666. "type": "object",
  8667. "properties": {
  8668. "title": {
  8669. "type": "string",
  8670. "minLength": 1,
  8671. "maxLength": 120
  8672. },
  8673. "tax_number": {
  8674. "type": "string",
  8675. "minLength": 1,
  8676. "maxLength": 30
  8677. },
  8678. "email": {
  8679. "type": "string",
  8680. "format": "email",
  8681. "maxLength": 120
  8682. }
  8683. },
  8684. "required": [
  8685. "title",
  8686. "tax_number",
  8687. "email"
  8688. ],
  8689. "additionalProperties": false,
  8690. "nullable": true
  8691. },
  8692. "quote_revision": {
  8693. "type": "string",
  8694. "minLength": 64,
  8695. "maxLength": 64,
  8696. "description": "服务器对套餐价格、名称、规格和桶数生成的报价版本;下单原样提交,变更返回40904;兼容旧客户端允许省略,新客户端应提交"
  8697. }
  8698. },
  8699. "required": [
  8700. "request_key",
  8701. "items",
  8702. "expected_amount_cents",
  8703. "agreement_accepted"
  8704. ],
  8705. "additionalProperties": false
  8706. },
  8707. "CheckinRequest": {
  8708. "type": "object",
  8709. "properties": {
  8710. "request_key": {
  8711. "type": "string",
  8712. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8713. "minLength": 8,
  8714. "maxLength": 80,
  8715. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8716. "example": "mini-20260918-0001"
  8717. },
  8718. "latitude": {
  8719. "type": "number",
  8720. "description": "GCJ-02 纬度,须为 JSON 数值",
  8721. "minimum": -90,
  8722. "maximum": 90
  8723. },
  8724. "longitude": {
  8725. "type": "number",
  8726. "description": "GCJ-02 经度,须为 JSON 数值",
  8727. "minimum": -180,
  8728. "maximum": 180
  8729. }
  8730. },
  8731. "required": [
  8732. "request_key",
  8733. "latitude",
  8734. "longitude"
  8735. ],
  8736. "additionalProperties": false
  8737. },
  8738. "PhotoRequest": {
  8739. "type": "object",
  8740. "properties": {
  8741. "request_key": {
  8742. "type": "string",
  8743. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8744. "minLength": 8,
  8745. "maxLength": 80,
  8746. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8747. "example": "mini-20260918-0001"
  8748. },
  8749. "image_base64": {
  8750. "type": "string",
  8751. "description": "纯 base64,无 data: 前缀;JPEG/PNG ≤2MiB,最长边4096、总像素≤800万",
  8752. "maxLength": 2800000
  8753. },
  8754. "latitude": {
  8755. "type": "number",
  8756. "description": "GCJ-02 纬度,须为 JSON 数值",
  8757. "minimum": -90,
  8758. "maximum": 90
  8759. },
  8760. "longitude": {
  8761. "type": "number",
  8762. "description": "GCJ-02 经度,须为 JSON 数值",
  8763. "minimum": -180,
  8764. "maximum": 180
  8765. }
  8766. },
  8767. "required": [
  8768. "request_key",
  8769. "image_base64",
  8770. "latitude",
  8771. "longitude"
  8772. ],
  8773. "additionalProperties": false
  8774. },
  8775. "ExceptionRequest": {
  8776. "type": "object",
  8777. "properties": {
  8778. "request_key": {
  8779. "type": "string",
  8780. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8781. "minLength": 8,
  8782. "maxLength": 80,
  8783. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8784. "example": "mini-20260918-0001"
  8785. },
  8786. "reason": {
  8787. "type": "string",
  8788. "minLength": 1,
  8789. "maxLength": 255
  8790. }
  8791. },
  8792. "required": [
  8793. "request_key",
  8794. "reason"
  8795. ],
  8796. "additionalProperties": false
  8797. },
  8798. "DraftRequest": {
  8799. "type": "object",
  8800. "properties": {
  8801. "request_key": {
  8802. "type": "string",
  8803. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8804. "minLength": 8,
  8805. "maxLength": 80,
  8806. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8807. "example": "mini-20260918-0001"
  8808. },
  8809. "accepted_qty": {
  8810. "type": "integer",
  8811. "format": "int64",
  8812. "description": "0至任务计划桶数",
  8813. "minimum": 0
  8814. },
  8815. "empty_returned": {
  8816. "type": "integer",
  8817. "format": "int64",
  8818. "minimum": 0,
  8819. "maximum": 10000000,
  8820. "default": 0
  8821. },
  8822. "receiver": {
  8823. "type": "string",
  8824. "minLength": 1,
  8825. "maxLength": 60
  8826. },
  8827. "reason": {
  8828. "type": "string",
  8829. "description": "部分/全部拒收时必填",
  8830. "maxLength": 255
  8831. },
  8832. "photo_ids": {
  8833. "type": "array",
  8834. "items": {
  8835. "type": "integer",
  8836. "format": "int64",
  8837. "description": "正整数资源 ID",
  8838. "minimum": 1,
  8839. "maximum": 2147483647
  8840. },
  8841. "maxItems": 4,
  8842. "uniqueItems": true
  8843. },
  8844. "confirmed": {
  8845. "type": "boolean"
  8846. }
  8847. },
  8848. "required": [
  8849. "request_key",
  8850. "accepted_qty",
  8851. "receiver"
  8852. ],
  8853. "additionalProperties": false
  8854. },
  8855. "CompleteRequest": {
  8856. "type": "object",
  8857. "properties": {
  8858. "request_key": {
  8859. "type": "string",
  8860. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8861. "minLength": 8,
  8862. "maxLength": 80,
  8863. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8864. "example": "mini-20260918-0001"
  8865. },
  8866. "accepted_qty": {
  8867. "type": "integer",
  8868. "format": "int64",
  8869. "description": "0至任务计划桶数",
  8870. "minimum": 0
  8871. },
  8872. "empty_returned": {
  8873. "type": "integer",
  8874. "format": "int64",
  8875. "minimum": 0,
  8876. "maximum": 10000000,
  8877. "default": 0
  8878. },
  8879. "receiver": {
  8880. "type": "string",
  8881. "minLength": 1,
  8882. "maxLength": 60
  8883. },
  8884. "reason": {
  8885. "type": "string",
  8886. "description": "部分/全部拒收时必填",
  8887. "maxLength": 255
  8888. },
  8889. "photo_ids": {
  8890. "type": "array",
  8891. "items": {
  8892. "type": "integer",
  8893. "format": "int64",
  8894. "description": "正整数资源 ID",
  8895. "minimum": 1,
  8896. "maximum": 2147483647
  8897. },
  8898. "maxItems": 4,
  8899. "uniqueItems": true,
  8900. "minItems": 1
  8901. },
  8902. "confirmed": {
  8903. "type": "boolean",
  8904. "enum": [
  8905. true
  8906. ]
  8907. }
  8908. },
  8909. "required": [
  8910. "request_key",
  8911. "accepted_qty",
  8912. "receiver",
  8913. "photo_ids",
  8914. "confirmed"
  8915. ],
  8916. "additionalProperties": false
  8917. },
  8918. "CommandResult": {
  8919. "type": "object",
  8920. "properties": {
  8921. "id": {
  8922. "type": "integer",
  8923. "format": "int64",
  8924. "description": "正整数资源 ID",
  8925. "minimum": 1,
  8926. "maximum": 2147483647
  8927. },
  8928. "status": {
  8929. "type": "string",
  8930. "enum": [
  8931. "pending",
  8932. "assigned",
  8933. "transit",
  8934. "completed",
  8935. "cancelled",
  8936. "returning",
  8937. "returned"
  8938. ]
  8939. },
  8940. "replayed": {
  8941. "type": "boolean",
  8942. "description": "可能仅有 id/replayed,无 status;需要当前状态时重新取详情"
  8943. }
  8944. },
  8945. "required": [
  8946. "id"
  8947. ]
  8948. },
  8949. "AddressResult": {
  8950. "type": "object",
  8951. "properties": {
  8952. "id": {
  8953. "type": "integer",
  8954. "format": "int64",
  8955. "description": "正整数资源 ID",
  8956. "minimum": 1,
  8957. "maximum": 2147483647
  8958. },
  8959. "revision": {
  8960. "type": "string"
  8961. },
  8962. "replayed": {
  8963. "type": "boolean"
  8964. }
  8965. },
  8966. "required": [
  8967. "id",
  8968. "revision"
  8969. ]
  8970. },
  8971. "CheckinResult": {
  8972. "type": "object",
  8973. "properties": {
  8974. "id": {
  8975. "type": "integer",
  8976. "format": "int64",
  8977. "description": "正整数资源 ID",
  8978. "minimum": 1,
  8979. "maximum": 2147483647
  8980. },
  8981. "checked_in": {
  8982. "type": "boolean"
  8983. },
  8984. "location_verified": {
  8985. "type": "boolean"
  8986. },
  8987. "replayed": {
  8988. "type": "boolean"
  8989. }
  8990. },
  8991. "required": [
  8992. "id",
  8993. "checked_in",
  8994. "location_verified"
  8995. ]
  8996. },
  8997. "DraftResult": {
  8998. "type": "object",
  8999. "properties": {
  9000. "id": {
  9001. "type": "integer",
  9002. "format": "int64",
  9003. "description": "正整数资源 ID",
  9004. "minimum": 1,
  9005. "maximum": 2147483647
  9006. },
  9007. "saved": {
  9008. "type": "boolean"
  9009. },
  9010. "replayed": {
  9011. "type": "boolean"
  9012. }
  9013. },
  9014. "required": [
  9015. "id",
  9016. "saved"
  9017. ]
  9018. },
  9019. "ExceptionResult": {
  9020. "type": "object",
  9021. "properties": {
  9022. "id": {
  9023. "type": "integer",
  9024. "format": "int64",
  9025. "description": "正整数资源 ID",
  9026. "minimum": 1,
  9027. "maximum": 2147483647
  9028. },
  9029. "reported": {
  9030. "type": "boolean"
  9031. },
  9032. "status": {
  9033. "type": "string",
  9034. "enum": [
  9035. "pending",
  9036. "assigned",
  9037. "transit",
  9038. "completed",
  9039. "cancelled",
  9040. "returning",
  9041. "returned"
  9042. ]
  9043. },
  9044. "replayed": {
  9045. "type": "boolean"
  9046. }
  9047. },
  9048. "required": [
  9049. "id",
  9050. "reported",
  9051. "status"
  9052. ]
  9053. },
  9054. "PhotoResult": {
  9055. "type": "object",
  9056. "properties": {
  9057. "id": {
  9058. "type": "integer",
  9059. "format": "int64",
  9060. "description": "正整数资源 ID",
  9061. "minimum": 1,
  9062. "maximum": 2147483647
  9063. },
  9064. "delivery_id": {
  9065. "type": "integer",
  9066. "format": "int64",
  9067. "description": "正整数资源 ID",
  9068. "minimum": 1,
  9069. "maximum": 2147483647
  9070. },
  9071. "location_verified": {
  9072. "type": "boolean"
  9073. },
  9074. "watermark": {
  9075. "type": "string",
  9076. "enum": [
  9077. "server_time_and_client_location"
  9078. ]
  9079. },
  9080. "replayed": {
  9081. "type": "boolean"
  9082. }
  9083. },
  9084. "required": [
  9085. "id",
  9086. "delivery_id",
  9087. "location_verified",
  9088. "watermark"
  9089. ]
  9090. },
  9091. "PayRequest": {
  9092. "type": "object",
  9093. "properties": {
  9094. "request_key": {
  9095. "type": "string",
  9096. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  9097. "minLength": 8,
  9098. "maxLength": 80,
  9099. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  9100. "example": "mini-20260918-0001"
  9101. },
  9102. "payment_method": {
  9103. "type": "string",
  9104. "enum": [
  9105. "balance",
  9106. "wechat"
  9107. ],
  9108. "description": "balance 已开通;wechat 预留"
  9109. }
  9110. },
  9111. "required": [
  9112. "request_key",
  9113. "payment_method"
  9114. ],
  9115. "additionalProperties": false
  9116. },
  9117. "DeliveryAddress": {
  9118. "type": "object",
  9119. "properties": {
  9120. "id": {
  9121. "type": "integer",
  9122. "format": "int64",
  9123. "description": "配送地址 ID;0 表示尚未建立独立地址档案的企业主地址",
  9124. "minimum": 0,
  9125. "maximum": 2147483647
  9126. },
  9127. "name": {
  9128. "type": "string"
  9129. },
  9130. "contact": {
  9131. "type": "string"
  9132. },
  9133. "phone": {
  9134. "type": "string",
  9135. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  9136. },
  9137. "address": {
  9138. "type": "string"
  9139. },
  9140. "region": {
  9141. "type": "string"
  9142. },
  9143. "longitude": {
  9144. "type": "number",
  9145. "nullable": true
  9146. },
  9147. "latitude": {
  9148. "type": "number",
  9149. "nullable": true
  9150. },
  9151. "employee_count": {
  9152. "type": "integer",
  9153. "format": "int64",
  9154. "nullable": true
  9155. },
  9156. "revision": {
  9157. "type": "string",
  9158. "description": "编辑地址时原样提交的版本",
  9159. "minLength": 64,
  9160. "maxLength": 64
  9161. },
  9162. "enterprise_id": {
  9163. "type": "integer",
  9164. "minimum": 1
  9165. },
  9166. "label": {
  9167. "type": "string"
  9168. },
  9169. "is_default": {
  9170. "type": "boolean"
  9171. },
  9172. "status": {
  9173. "type": "integer"
  9174. }
  9175. },
  9176. "required": [
  9177. "id",
  9178. "name",
  9179. "contact",
  9180. "phone",
  9181. "address",
  9182. "region",
  9183. "longitude",
  9184. "latitude",
  9185. "employee_count",
  9186. "revision",
  9187. "enterprise_id",
  9188. "label",
  9189. "is_default",
  9190. "status"
  9191. ]
  9192. },
  9193. "DeliveryAddressUpdate": {
  9194. "type": "object",
  9195. "properties": {
  9196. "request_key": {
  9197. "type": "string",
  9198. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  9199. "minLength": 8,
  9200. "maxLength": 80,
  9201. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  9202. "example": "mini-20260918-0001"
  9203. },
  9204. "revision": {
  9205. "type": "string",
  9206. "description": "修改时原样提交配送地址详情的 revision",
  9207. "minLength": 1,
  9208. "maxLength": 64
  9209. },
  9210. "address": {
  9211. "type": "string",
  9212. "minLength": 1,
  9213. "maxLength": 255
  9214. },
  9215. "contact": {
  9216. "type": "string",
  9217. "minLength": 1,
  9218. "maxLength": 60
  9219. },
  9220. "phone": {
  9221. "type": "string",
  9222. "description": "7–15位数字;允许前置+、空格、短横线、成对括号。保存时规范化;拒绝掩码和纯符号。格式校验不代表号码已验证",
  9223. "minLength": 7,
  9224. "maxLength": 30,
  9225. "example": "+86 138 1234 5678"
  9226. },
  9227. "label": {
  9228. "type": "string",
  9229. "maxLength": 80
  9230. },
  9231. "region": {
  9232. "type": "string",
  9233. "maxLength": 80
  9234. },
  9235. "longitude": {
  9236. "type": "number",
  9237. "minimum": -180,
  9238. "maximum": 180
  9239. },
  9240. "latitude": {
  9241. "type": "number",
  9242. "minimum": -90,
  9243. "maximum": 90
  9244. },
  9245. "is_default": {
  9246. "type": "boolean"
  9247. }
  9248. },
  9249. "required": [
  9250. "request_key",
  9251. "revision",
  9252. "address",
  9253. "contact",
  9254. "phone"
  9255. ],
  9256. "additionalProperties": false
  9257. },
  9258. "DeliveryAddressCreate": {
  9259. "type": "object",
  9260. "properties": {
  9261. "request_key": {
  9262. "type": "string",
  9263. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  9264. "minLength": 8,
  9265. "maxLength": 80,
  9266. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  9267. "example": "mini-20260918-0001"
  9268. },
  9269. "address": {
  9270. "type": "string",
  9271. "minLength": 1,
  9272. "maxLength": 255
  9273. },
  9274. "contact": {
  9275. "type": "string",
  9276. "minLength": 1,
  9277. "maxLength": 60
  9278. },
  9279. "phone": {
  9280. "type": "string",
  9281. "description": "7–15位数字;允许前置+、空格、短横线、成对括号。保存时规范化;拒绝掩码和纯符号。格式校验不代表号码已验证",
  9282. "minLength": 7,
  9283. "maxLength": 30,
  9284. "example": "+86 138 1234 5678"
  9285. },
  9286. "label": {
  9287. "type": "string",
  9288. "maxLength": 80
  9289. },
  9290. "region": {
  9291. "type": "string",
  9292. "maxLength": 80
  9293. },
  9294. "longitude": {
  9295. "type": "number",
  9296. "minimum": -180,
  9297. "maximum": 180
  9298. },
  9299. "latitude": {
  9300. "type": "number",
  9301. "minimum": -90,
  9302. "maximum": 90
  9303. },
  9304. "is_default": {
  9305. "type": "boolean"
  9306. }
  9307. },
  9308. "required": [
  9309. "request_key",
  9310. "address",
  9311. "contact",
  9312. "phone"
  9313. ],
  9314. "additionalProperties": false
  9315. },
  9316. "DeliveryAddressResult": {
  9317. "type": "object",
  9318. "properties": {
  9319. "id": {
  9320. "type": "integer",
  9321. "minimum": 1
  9322. },
  9323. "revision": {
  9324. "type": "string"
  9325. },
  9326. "is_default": {
  9327. "type": "boolean"
  9328. },
  9329. "replayed": {
  9330. "type": "boolean"
  9331. }
  9332. },
  9333. "required": [
  9334. "id",
  9335. "is_default"
  9336. ]
  9337. },
  9338. "PromotionPolicy": {
  9339. "type": "object",
  9340. "properties": {
  9341. "initialized": {
  9342. "type": "boolean"
  9343. },
  9344. "enabled": {
  9345. "type": "boolean"
  9346. },
  9347. "sku_id": {
  9348. "type": "integer",
  9349. "nullable": true
  9350. },
  9351. "sku_name": {
  9352. "type": "string",
  9353. "nullable": true
  9354. },
  9355. "quantity": {
  9356. "type": "integer"
  9357. },
  9358. "min_amount_cents": {
  9359. "type": "integer"
  9360. },
  9361. "revision": {
  9362. "type": "integer"
  9363. },
  9364. "rules": {
  9365. "type": "string"
  9366. }
  9367. },
  9368. "required": [
  9369. "initialized",
  9370. "enabled",
  9371. "sku_id",
  9372. "sku_name",
  9373. "quantity",
  9374. "min_amount_cents",
  9375. "revision",
  9376. "rules"
  9377. ]
  9378. },
  9379. "PromotionRecord": {
  9380. "type": "object",
  9381. "properties": {
  9382. "id": {
  9383. "type": "integer"
  9384. },
  9385. "inviter_name": {
  9386. "type": "string"
  9387. },
  9388. "enterprise_name": {
  9389. "type": "string"
  9390. },
  9391. "sku_name": {
  9392. "type": "string"
  9393. },
  9394. "quantity": {
  9395. "type": "integer"
  9396. },
  9397. "status": {
  9398. "type": "string",
  9399. "enum": [
  9400. "bound",
  9401. "pending",
  9402. "issued",
  9403. "rejected"
  9404. ]
  9405. },
  9406. "status_text": {
  9407. "type": "string"
  9408. },
  9409. "order_id": {
  9410. "type": "integer",
  9411. "nullable": true
  9412. },
  9413. "reference": {
  9414. "type": "string",
  9415. "nullable": true
  9416. },
  9417. "amount_cents": {
  9418. "type": "integer",
  9419. "nullable": true
  9420. },
  9421. "created_at": {
  9422. "type": "string"
  9423. },
  9424. "qualified_at": {
  9425. "type": "string",
  9426. "nullable": true
  9427. },
  9428. "reviewed_at": {
  9429. "type": "string",
  9430. "nullable": true
  9431. },
  9432. "review_note": {
  9433. "type": "string"
  9434. },
  9435. "delivery_id": {
  9436. "type": "integer",
  9437. "nullable": true
  9438. },
  9439. "revision": {
  9440. "type": "integer"
  9441. }
  9442. },
  9443. "required": [
  9444. "id",
  9445. "inviter_name",
  9446. "enterprise_name",
  9447. "sku_name",
  9448. "quantity",
  9449. "status",
  9450. "status_text",
  9451. "order_id",
  9452. "reference",
  9453. "amount_cents",
  9454. "created_at",
  9455. "qualified_at",
  9456. "reviewed_at",
  9457. "review_note",
  9458. "delivery_id",
  9459. "revision"
  9460. ]
  9461. },
  9462. "PromotionCodeRequest": {
  9463. "type": "object",
  9464. "properties": {
  9465. "request_key": {
  9466. "type": "string",
  9467. "minLength": 8,
  9468. "maxLength": 80,
  9469. "pattern": "^[A-Za-z0-9_-]{8,80}$"
  9470. }
  9471. },
  9472. "required": [
  9473. "request_key"
  9474. ]
  9475. },
  9476. "PromotionBindRequest": {
  9477. "type": "object",
  9478. "properties": {
  9479. "request_key": {
  9480. "type": "string",
  9481. "minLength": 8,
  9482. "maxLength": 80,
  9483. "pattern": "^[A-Za-z0-9_-]{8,80}$"
  9484. },
  9485. "invite_code": {
  9486. "type": "string",
  9487. "pattern": "^[A-Fa-f0-9]{20}$"
  9488. }
  9489. },
  9490. "required": [
  9491. "request_key",
  9492. "invite_code"
  9493. ]
  9494. },
  9495. "PromotionCodeResult": {
  9496. "type": "object",
  9497. "properties": {
  9498. "invite_code": {
  9499. "type": "string",
  9500. "pattern": "^[A-F0-9]{20}$"
  9501. },
  9502. "replayed": {
  9503. "type": "boolean"
  9504. }
  9505. },
  9506. "required": [
  9507. "invite_code"
  9508. ]
  9509. }
  9510. },
  9511. "responses": {
  9512. "Error": {
  9513. "description": "失败。根据HTTP状态与code分支;40101登录过期,40301业务权限不足,40901幂等/版本冲突,40902状态冲突,40904价格变化,42201参数错误,50301登录未配置,50302外部服务暂不可用,50303能力未开通;data可能为null。",
  9514. "content": {
  9515. "application/json": {
  9516. "schema": {
  9517. "$ref": "#/components/schemas/Error"
  9518. },
  9519. "example": {
  9520. "code": 42201,
  9521. "message": "参数校验失败",
  9522. "data": {
  9523. "fields": {
  9524. "phone": "请填写完整有效的联系电话"
  9525. }
  9526. },
  9527. "request_id": "0123456789abcdef0123456789abcdef"
  9528. }
  9529. }
  9530. }
  9531. }
  9532. }
  9533. }
  9534. }