water-mini-v1.json 258 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317
  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/test-phone": {
  4631. "post": {
  4632. "tags": [
  4633. "公共与登录"
  4634. ],
  4635. "summary": "本地测试手机号登录",
  4636. "operationId": "post_auth_test_phone",
  4637. "description": "仅 APP_ENV=local 且 MINI_TEST_PHONE_LOGIN=true 开启,要求连接来源为本机回环地址(不信任代理头)。固定测试身份,与微信及真实手机身份隔离;账号须预先初始化,仅获得已绑定权限。关闭开关后既有测试会话失效。非短信验证接口,禁止正式部署启用。",
  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. "$ref": "#/components/schemas/Login"
  4659. },
  4660. "request_id": {
  4661. "type": "string",
  4662. "pattern": "^[a-f0-9]{32}$"
  4663. }
  4664. },
  4665. "required": [
  4666. "code",
  4667. "message",
  4668. "data",
  4669. "request_id"
  4670. ]
  4671. }
  4672. }
  4673. }
  4674. },
  4675. "400": {
  4676. "$ref": "#/components/responses/Error"
  4677. },
  4678. "401": {
  4679. "$ref": "#/components/responses/Error"
  4680. },
  4681. "403": {
  4682. "$ref": "#/components/responses/Error"
  4683. },
  4684. "404": {
  4685. "$ref": "#/components/responses/Error"
  4686. },
  4687. "413": {
  4688. "$ref": "#/components/responses/Error"
  4689. },
  4690. "415": {
  4691. "$ref": "#/components/responses/Error"
  4692. },
  4693. "422": {
  4694. "$ref": "#/components/responses/Error"
  4695. },
  4696. "429": {
  4697. "$ref": "#/components/responses/Error"
  4698. },
  4699. "500": {
  4700. "$ref": "#/components/responses/Error"
  4701. },
  4702. "503": {
  4703. "$ref": "#/components/responses/Error"
  4704. }
  4705. },
  4706. "security": [],
  4707. "requestBody": {
  4708. "required": true,
  4709. "content": {
  4710. "application/json": {
  4711. "schema": {
  4712. "type": "object",
  4713. "additionalProperties": false,
  4714. "required": [
  4715. "phone",
  4716. "code"
  4717. ],
  4718. "properties": {
  4719. "phone": {
  4720. "type": "string",
  4721. "enum": [
  4722. "13012345678"
  4723. ]
  4724. },
  4725. "code": {
  4726. "type": "string",
  4727. "enum": [
  4728. "66666"
  4729. ]
  4730. }
  4731. }
  4732. },
  4733. "example": {
  4734. "phone": "13012345678",
  4735. "code": "66666"
  4736. }
  4737. }
  4738. }
  4739. }
  4740. }
  4741. },
  4742. "/enterprises/{enterprise}/addresses": {
  4743. "post": {
  4744. "tags": [
  4745. "企业"
  4746. ],
  4747. "summary": "新增配送地址",
  4748. "operationId": "post_enterprises_enterprise_addresses",
  4749. "description": "仅企业管理员。首个地址自动设为默认;写入使用请求标识保证幂等。",
  4750. "parameters": [
  4751. {
  4752. "name": "enterprise",
  4753. "in": "path",
  4754. "required": true,
  4755. "schema": {
  4756. "type": "integer",
  4757. "format": "int64",
  4758. "description": "正整数资源 ID",
  4759. "minimum": 1,
  4760. "maximum": 2147483647
  4761. }
  4762. }
  4763. ],
  4764. "responses": {
  4765. "200": {
  4766. "description": "成功;JSON 业务码 code=0",
  4767. "content": {
  4768. "application/json": {
  4769. "schema": {
  4770. "type": "object",
  4771. "properties": {
  4772. "code": {
  4773. "type": "integer",
  4774. "enum": [
  4775. 0
  4776. ]
  4777. },
  4778. "message": {
  4779. "type": "string",
  4780. "example": "ok"
  4781. },
  4782. "data": {
  4783. "$ref": "#/components/schemas/DeliveryAddressResult"
  4784. },
  4785. "request_id": {
  4786. "type": "string",
  4787. "pattern": "^[a-f0-9]{32}$"
  4788. }
  4789. },
  4790. "required": [
  4791. "code",
  4792. "message",
  4793. "data",
  4794. "request_id"
  4795. ]
  4796. }
  4797. }
  4798. }
  4799. },
  4800. "400": {
  4801. "$ref": "#/components/responses/Error"
  4802. },
  4803. "401": {
  4804. "$ref": "#/components/responses/Error"
  4805. },
  4806. "403": {
  4807. "$ref": "#/components/responses/Error"
  4808. },
  4809. "404": {
  4810. "$ref": "#/components/responses/Error"
  4811. },
  4812. "409": {
  4813. "$ref": "#/components/responses/Error"
  4814. },
  4815. "413": {
  4816. "$ref": "#/components/responses/Error"
  4817. },
  4818. "415": {
  4819. "$ref": "#/components/responses/Error"
  4820. },
  4821. "422": {
  4822. "$ref": "#/components/responses/Error"
  4823. },
  4824. "500": {
  4825. "$ref": "#/components/responses/Error"
  4826. },
  4827. "503": {
  4828. "$ref": "#/components/responses/Error"
  4829. }
  4830. },
  4831. "requestBody": {
  4832. "required": true,
  4833. "content": {
  4834. "application/json": {
  4835. "schema": {
  4836. "$ref": "#/components/schemas/DeliveryAddressCreate"
  4837. },
  4838. "example": {
  4839. "request_key": "address-create-20261008-0001",
  4840. "label": "办公楼",
  4841. "address": "深圳市示例地址",
  4842. "contact": "张先生",
  4843. "phone": "13812345678",
  4844. "is_default": true
  4845. }
  4846. }
  4847. }
  4848. }
  4849. }
  4850. },
  4851. "/enterprises/{enterprise}/addresses/{address}": {
  4852. "get": {
  4853. "tags": [
  4854. "企业"
  4855. ],
  4856. "summary": "读取配送地址详情",
  4857. "operationId": "get_enterprises_enterprise_addresses_address",
  4858. "description": "仅企业管理员。按企业和配送地址 ID 校验归属,返回编辑资料与版本。",
  4859. "parameters": [
  4860. {
  4861. "name": "enterprise",
  4862. "in": "path",
  4863. "required": true,
  4864. "schema": {
  4865. "type": "integer",
  4866. "format": "int64",
  4867. "description": "正整数资源 ID",
  4868. "minimum": 1,
  4869. "maximum": 2147483647
  4870. }
  4871. },
  4872. {
  4873. "name": "address",
  4874. "in": "path",
  4875. "required": true,
  4876. "schema": {
  4877. "type": "integer",
  4878. "minimum": 1
  4879. }
  4880. }
  4881. ],
  4882. "responses": {
  4883. "200": {
  4884. "description": "成功;JSON 业务码 code=0",
  4885. "content": {
  4886. "application/json": {
  4887. "schema": {
  4888. "type": "object",
  4889. "properties": {
  4890. "code": {
  4891. "type": "integer",
  4892. "enum": [
  4893. 0
  4894. ]
  4895. },
  4896. "message": {
  4897. "type": "string",
  4898. "example": "ok"
  4899. },
  4900. "data": {
  4901. "$ref": "#/components/schemas/EditableAddress"
  4902. },
  4903. "request_id": {
  4904. "type": "string",
  4905. "pattern": "^[a-f0-9]{32}$"
  4906. }
  4907. },
  4908. "required": [
  4909. "code",
  4910. "message",
  4911. "data",
  4912. "request_id"
  4913. ]
  4914. }
  4915. }
  4916. }
  4917. },
  4918. "400": {
  4919. "$ref": "#/components/responses/Error"
  4920. },
  4921. "401": {
  4922. "$ref": "#/components/responses/Error"
  4923. },
  4924. "403": {
  4925. "$ref": "#/components/responses/Error"
  4926. },
  4927. "404": {
  4928. "$ref": "#/components/responses/Error"
  4929. },
  4930. "409": {
  4931. "$ref": "#/components/responses/Error"
  4932. },
  4933. "413": {
  4934. "$ref": "#/components/responses/Error"
  4935. },
  4936. "415": {
  4937. "$ref": "#/components/responses/Error"
  4938. },
  4939. "422": {
  4940. "$ref": "#/components/responses/Error"
  4941. },
  4942. "500": {
  4943. "$ref": "#/components/responses/Error"
  4944. },
  4945. "503": {
  4946. "$ref": "#/components/responses/Error"
  4947. }
  4948. }
  4949. },
  4950. "post": {
  4951. "tags": [
  4952. "企业"
  4953. ],
  4954. "summary": "修改配送地址",
  4955. "operationId": "post_enterprises_enterprise_addresses_address",
  4956. "description": "仅企业管理员。校验地址归属及 revision;该地址存在有效配送时禁止修改位置。",
  4957. "parameters": [
  4958. {
  4959. "name": "enterprise",
  4960. "in": "path",
  4961. "required": true,
  4962. "schema": {
  4963. "type": "integer",
  4964. "format": "int64",
  4965. "description": "正整数资源 ID",
  4966. "minimum": 1,
  4967. "maximum": 2147483647
  4968. }
  4969. },
  4970. {
  4971. "name": "address",
  4972. "in": "path",
  4973. "required": true,
  4974. "schema": {
  4975. "type": "integer",
  4976. "minimum": 1
  4977. }
  4978. }
  4979. ],
  4980. "responses": {
  4981. "200": {
  4982. "description": "成功;JSON 业务码 code=0",
  4983. "content": {
  4984. "application/json": {
  4985. "schema": {
  4986. "type": "object",
  4987. "properties": {
  4988. "code": {
  4989. "type": "integer",
  4990. "enum": [
  4991. 0
  4992. ]
  4993. },
  4994. "message": {
  4995. "type": "string",
  4996. "example": "ok"
  4997. },
  4998. "data": {
  4999. "$ref": "#/components/schemas/DeliveryAddressResult"
  5000. },
  5001. "request_id": {
  5002. "type": "string",
  5003. "pattern": "^[a-f0-9]{32}$"
  5004. }
  5005. },
  5006. "required": [
  5007. "code",
  5008. "message",
  5009. "data",
  5010. "request_id"
  5011. ]
  5012. }
  5013. }
  5014. }
  5015. },
  5016. "400": {
  5017. "$ref": "#/components/responses/Error"
  5018. },
  5019. "401": {
  5020. "$ref": "#/components/responses/Error"
  5021. },
  5022. "403": {
  5023. "$ref": "#/components/responses/Error"
  5024. },
  5025. "404": {
  5026. "$ref": "#/components/responses/Error"
  5027. },
  5028. "409": {
  5029. "$ref": "#/components/responses/Error"
  5030. },
  5031. "413": {
  5032. "$ref": "#/components/responses/Error"
  5033. },
  5034. "415": {
  5035. "$ref": "#/components/responses/Error"
  5036. },
  5037. "422": {
  5038. "$ref": "#/components/responses/Error"
  5039. },
  5040. "500": {
  5041. "$ref": "#/components/responses/Error"
  5042. },
  5043. "503": {
  5044. "$ref": "#/components/responses/Error"
  5045. }
  5046. },
  5047. "requestBody": {
  5048. "required": true,
  5049. "content": {
  5050. "application/json": {
  5051. "schema": {
  5052. "$ref": "#/components/schemas/DeliveryAddressUpdate"
  5053. },
  5054. "example": {
  5055. "request_key": "address-create-20261008-0001",
  5056. "label": "办公楼",
  5057. "address": "深圳市示例地址",
  5058. "contact": "张先生",
  5059. "phone": "13812345678",
  5060. "is_default": true,
  5061. "revision": "replace-with-current-revision"
  5062. }
  5063. }
  5064. }
  5065. }
  5066. }
  5067. },
  5068. "/enterprises/{enterprise}/promotion/code": {
  5069. "post": {
  5070. "tags": [
  5071. "企业"
  5072. ],
  5073. "summary": "获取专属企业邀请码",
  5074. "operationId": "post_enterprises_enterprise_promotion_code",
  5075. "description": "仅企业管理员;复用request_key幂等、撤权复核及审计。活动开启后生成企业唯一随机邀请码。",
  5076. "parameters": [
  5077. {
  5078. "name": "enterprise",
  5079. "in": "path",
  5080. "required": true,
  5081. "schema": {
  5082. "type": "integer",
  5083. "format": "int64",
  5084. "description": "正整数资源 ID",
  5085. "minimum": 1,
  5086. "maximum": 2147483647
  5087. }
  5088. }
  5089. ],
  5090. "responses": {
  5091. "200": {
  5092. "description": "成功;JSON 业务码 code=0",
  5093. "content": {
  5094. "application/json": {
  5095. "schema": {
  5096. "type": "object",
  5097. "properties": {
  5098. "code": {
  5099. "type": "integer",
  5100. "enum": [
  5101. 0
  5102. ]
  5103. },
  5104. "message": {
  5105. "type": "string",
  5106. "example": "ok"
  5107. },
  5108. "data": {
  5109. "$ref": "#/components/schemas/PromotionCodeResult"
  5110. },
  5111. "request_id": {
  5112. "type": "string",
  5113. "pattern": "^[a-f0-9]{32}$"
  5114. }
  5115. },
  5116. "required": [
  5117. "code",
  5118. "message",
  5119. "data",
  5120. "request_id"
  5121. ]
  5122. }
  5123. }
  5124. }
  5125. },
  5126. "400": {
  5127. "$ref": "#/components/responses/Error"
  5128. },
  5129. "401": {
  5130. "$ref": "#/components/responses/Error"
  5131. },
  5132. "403": {
  5133. "$ref": "#/components/responses/Error"
  5134. },
  5135. "404": {
  5136. "$ref": "#/components/responses/Error"
  5137. },
  5138. "409": {
  5139. "$ref": "#/components/responses/Error"
  5140. },
  5141. "413": {
  5142. "$ref": "#/components/responses/Error"
  5143. },
  5144. "415": {
  5145. "$ref": "#/components/responses/Error"
  5146. },
  5147. "422": {
  5148. "$ref": "#/components/responses/Error"
  5149. },
  5150. "500": {
  5151. "$ref": "#/components/responses/Error"
  5152. },
  5153. "503": {
  5154. "$ref": "#/components/responses/Error"
  5155. }
  5156. },
  5157. "requestBody": {
  5158. "required": true,
  5159. "content": {
  5160. "application/json": {
  5161. "schema": {
  5162. "$ref": "#/components/schemas/PromotionCodeRequest"
  5163. },
  5164. "example": {
  5165. "request_key": "promotion-code-20261019"
  5166. }
  5167. }
  5168. }
  5169. }
  5170. }
  5171. },
  5172. "/enterprises/{enterprise}/promotion/bind": {
  5173. "post": {
  5174. "tags": [
  5175. "企业"
  5176. ],
  5177. "summary": "首购前绑定企业邀请人",
  5178. "operationId": "post_enterprises_enterprise_promotion_bind",
  5179. "description": "仅企业管理员;复用request_key幂等、撤权复核及审计。活动开启且从未购水的企业仅可绑定一次;禁止自邀、共用管理员及循环邀请,规则在绑定时快照。",
  5180. "parameters": [
  5181. {
  5182. "name": "enterprise",
  5183. "in": "path",
  5184. "required": true,
  5185. "schema": {
  5186. "type": "integer",
  5187. "format": "int64",
  5188. "description": "正整数资源 ID",
  5189. "minimum": 1,
  5190. "maximum": 2147483647
  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/CommandResult"
  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/PromotionBindRequest"
  5267. },
  5268. "example": {
  5269. "request_key": "promotion-bind-20261019",
  5270. "invite_code": "AABBCCDDEEFF00112233"
  5271. }
  5272. }
  5273. }
  5274. }
  5275. }
  5276. }
  5277. },
  5278. "components": {
  5279. "securitySchemes": {
  5280. "MiniBearer": {
  5281. "type": "http",
  5282. "scheme": "bearer",
  5283. "bearerFormat": "Opaque token",
  5284. "description": "POST /auth/wechat 返回的 access_token;非后台JWT"
  5285. }
  5286. },
  5287. "schemas": {
  5288. "Error": {
  5289. "type": "object",
  5290. "properties": {
  5291. "code": {
  5292. "type": "integer",
  5293. "format": "int64",
  5294. "description": "业务错误码"
  5295. },
  5296. "message": {
  5297. "type": "string",
  5298. "description": "适合向用户展示的说明"
  5299. },
  5300. "data": {
  5301. "type": "object",
  5302. "properties": {
  5303. "fields": {
  5304. "type": "object",
  5305. "additionalProperties": {
  5306. "type": "string",
  5307. "description": "字段错误说明"
  5308. }
  5309. }
  5310. },
  5311. "nullable": true
  5312. },
  5313. "request_id": {
  5314. "type": "string",
  5315. "description": "排障时提供此编号",
  5316. "pattern": "^[a-f0-9]{32}$"
  5317. }
  5318. },
  5319. "required": [
  5320. "code",
  5321. "message",
  5322. "data",
  5323. "request_id"
  5324. ]
  5325. },
  5326. "Identity": {
  5327. "type": "object",
  5328. "properties": {
  5329. "role": {
  5330. "type": "string",
  5331. "enum": [
  5332. "enterprise_admin",
  5333. "enterprise_member",
  5334. "driver",
  5335. "agent"
  5336. ]
  5337. },
  5338. "resource_id": {
  5339. "type": "integer",
  5340. "format": "int64",
  5341. "description": "正整数资源 ID",
  5342. "minimum": 1,
  5343. "maximum": 2147483647
  5344. },
  5345. "name": {
  5346. "type": "string"
  5347. }
  5348. },
  5349. "required": [
  5350. "role",
  5351. "resource_id",
  5352. "name"
  5353. ]
  5354. },
  5355. "Login": {
  5356. "type": "object",
  5357. "properties": {
  5358. "access_token": {
  5359. "type": "string",
  5360. "description": "随机不透明令牌,前端不要解析",
  5361. "minLength": 64,
  5362. "maxLength": 64
  5363. },
  5364. "token_type": {
  5365. "type": "string",
  5366. "enum": [
  5367. "Bearer"
  5368. ]
  5369. },
  5370. "expires_at": {
  5371. "type": "string",
  5372. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  5373. "example": "2026-09-18 10:30:00"
  5374. },
  5375. "user_id": {
  5376. "type": "string",
  5377. "description": "用户 ID 是字符串"
  5378. },
  5379. "identities": {
  5380. "type": "array",
  5381. "items": {
  5382. "$ref": "#/components/schemas/Identity"
  5383. }
  5384. }
  5385. },
  5386. "required": [
  5387. "access_token",
  5388. "token_type",
  5389. "expires_at",
  5390. "user_id",
  5391. "identities"
  5392. ]
  5393. },
  5394. "Enterprise": {
  5395. "type": "object",
  5396. "properties": {
  5397. "id": {
  5398. "type": "integer",
  5399. "format": "int64",
  5400. "description": "正整数资源 ID",
  5401. "minimum": 1,
  5402. "maximum": 2147483647
  5403. },
  5404. "name": {
  5405. "type": "string"
  5406. },
  5407. "contact": {
  5408. "type": "string"
  5409. },
  5410. "phone": {
  5411. "type": "string",
  5412. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  5413. },
  5414. "address": {
  5415. "type": "string"
  5416. },
  5417. "region": {
  5418. "type": "string"
  5419. },
  5420. "longitude": {
  5421. "type": "number",
  5422. "nullable": true
  5423. },
  5424. "latitude": {
  5425. "type": "number",
  5426. "nullable": true
  5427. },
  5428. "employee_count": {
  5429. "type": "integer",
  5430. "format": "int64",
  5431. "nullable": true
  5432. },
  5433. "revision": {
  5434. "type": "string",
  5435. "description": "编辑地址时原样提交的版本",
  5436. "minLength": 64,
  5437. "maxLength": 64
  5438. }
  5439. },
  5440. "required": [
  5441. "id",
  5442. "name",
  5443. "contact",
  5444. "phone",
  5445. "address",
  5446. "region",
  5447. "longitude",
  5448. "latitude",
  5449. "employee_count",
  5450. "revision"
  5451. ]
  5452. },
  5453. "EditableAddress": {
  5454. "type": "object",
  5455. "properties": {
  5456. "id": {
  5457. "type": "integer",
  5458. "format": "int64",
  5459. "description": "正整数资源 ID",
  5460. "minimum": 0,
  5461. "maximum": 2147483647
  5462. },
  5463. "name": {
  5464. "type": "string"
  5465. },
  5466. "contact": {
  5467. "type": "string"
  5468. },
  5469. "phone": {
  5470. "type": "string",
  5471. "description": "仅企业管理员可读完整号码;表单应使用此接口,不能使用脱敏列表"
  5472. },
  5473. "address": {
  5474. "type": "string"
  5475. },
  5476. "region": {
  5477. "type": "string"
  5478. },
  5479. "longitude": {
  5480. "type": "number",
  5481. "nullable": true
  5482. },
  5483. "latitude": {
  5484. "type": "number",
  5485. "nullable": true
  5486. },
  5487. "employee_count": {
  5488. "type": "integer",
  5489. "format": "int64",
  5490. "nullable": true
  5491. },
  5492. "revision": {
  5493. "type": "string",
  5494. "description": "编辑地址时原样提交的版本",
  5495. "minLength": 64,
  5496. "maxLength": 64
  5497. },
  5498. "enterprise_id": {
  5499. "type": "integer",
  5500. "minimum": 1
  5501. },
  5502. "label": {
  5503. "type": "string"
  5504. },
  5505. "is_default": {
  5506. "type": "boolean"
  5507. },
  5508. "status": {
  5509. "type": "integer"
  5510. }
  5511. },
  5512. "required": [
  5513. "id",
  5514. "name",
  5515. "contact",
  5516. "phone",
  5517. "address",
  5518. "region",
  5519. "longitude",
  5520. "latitude",
  5521. "employee_count",
  5522. "revision"
  5523. ]
  5524. },
  5525. "Package": {
  5526. "type": "object",
  5527. "properties": {
  5528. "id": {
  5529. "type": "integer",
  5530. "format": "int64",
  5531. "description": "正整数资源 ID",
  5532. "minimum": 1,
  5533. "maximum": 2147483647
  5534. },
  5535. "name": {
  5536. "type": "string"
  5537. },
  5538. "sku_id": {
  5539. "type": "integer",
  5540. "format": "int64",
  5541. "description": "正整数资源 ID",
  5542. "minimum": 1,
  5543. "maximum": 2147483647
  5544. },
  5545. "sku_name": {
  5546. "type": "string",
  5547. "nullable": true
  5548. },
  5549. "liters": {
  5550. "type": "number",
  5551. "nullable": true
  5552. },
  5553. "buckets": {
  5554. "type": "integer",
  5555. "format": "int64",
  5556. "description": "套餐总桶数"
  5557. },
  5558. "price_cents": {
  5559. "type": "integer",
  5560. "format": "int64",
  5561. "description": "人民币整数分",
  5562. "minimum": 0
  5563. },
  5564. "unit_price_cents": {
  5565. "type": "integer",
  5566. "format": "int64",
  5567. "description": "每桶参考单价,四舍五入为整数分"
  5568. },
  5569. "category": {
  5570. "type": "string",
  5571. "nullable": true,
  5572. "description": "当前为 null,尚无可用数据"
  5573. },
  5574. "valid_months": {
  5575. "type": "integer",
  5576. "nullable": true,
  5577. "description": "当前为 null,尚无可用数据"
  5578. },
  5579. "includes_device": {
  5580. "type": "boolean",
  5581. "nullable": true,
  5582. "description": "当前为 null,尚无可用数据"
  5583. }
  5584. },
  5585. "required": [
  5586. "id",
  5587. "name",
  5588. "sku_id",
  5589. "sku_name",
  5590. "liters",
  5591. "buckets",
  5592. "price_cents",
  5593. "unit_price_cents",
  5594. "category",
  5595. "valid_months",
  5596. "includes_device"
  5597. ]
  5598. },
  5599. "PackagePage": {
  5600. "type": "object",
  5601. "properties": {
  5602. "items": {
  5603. "type": "array",
  5604. "items": {
  5605. "$ref": "#/components/schemas/Package"
  5606. }
  5607. },
  5608. "total": {
  5609. "type": "integer",
  5610. "format": "int64"
  5611. },
  5612. "page": {
  5613. "type": "integer",
  5614. "format": "int64"
  5615. },
  5616. "page_size": {
  5617. "type": "integer",
  5618. "format": "int64"
  5619. },
  5620. "has_more": {
  5621. "type": "boolean"
  5622. },
  5623. "categories": {
  5624. "type": "array",
  5625. "items": {
  5626. "type": "object",
  5627. "properties": {
  5628. "value": {
  5629. "type": "string",
  5630. "enum": [
  5631. "all"
  5632. ]
  5633. },
  5634. "label": {
  5635. "type": "string"
  5636. }
  5637. },
  5638. "required": [
  5639. "value",
  5640. "label"
  5641. ]
  5642. }
  5643. },
  5644. "capabilities": {
  5645. "type": "object",
  5646. "properties": {
  5647. "category_filter": {
  5648. "type": "boolean",
  5649. "description": "以服务器返回值决定是否开放入口"
  5650. }
  5651. },
  5652. "required": [
  5653. "category_filter"
  5654. ]
  5655. }
  5656. },
  5657. "required": [
  5658. "items",
  5659. "total",
  5660. "page",
  5661. "page_size",
  5662. "has_more",
  5663. "categories",
  5664. "capabilities"
  5665. ]
  5666. },
  5667. "RightsSummary": {
  5668. "type": "object",
  5669. "properties": {
  5670. "remaining": {
  5671. "type": "integer",
  5672. "format": "int64",
  5673. "description": "剩余权益(含冻结)"
  5674. },
  5675. "available": {
  5676. "type": "integer",
  5677. "format": "int64",
  5678. "description": "可用权益"
  5679. },
  5680. "frozen": {
  5681. "type": "integer",
  5682. "format": "int64",
  5683. "description": "已预约冻结"
  5684. },
  5685. "full_qty": {
  5686. "type": "integer",
  5687. "format": "int64",
  5688. "description": "现场满桶"
  5689. },
  5690. "purchased": {
  5691. "type": "integer",
  5692. "format": "int64",
  5693. "description": "历史购买桶数"
  5694. },
  5695. "delivered": {
  5696. "type": "integer",
  5697. "format": "int64",
  5698. "description": "历史实收桶数"
  5699. }
  5700. },
  5701. "required": [
  5702. "remaining",
  5703. "available",
  5704. "frozen",
  5705. "full_qty",
  5706. "purchased",
  5707. "delivered"
  5708. ]
  5709. },
  5710. "Rights": {
  5711. "type": "object",
  5712. "properties": {
  5713. "items": {
  5714. "type": "array",
  5715. "items": {
  5716. "type": "object",
  5717. "properties": {
  5718. "id": {
  5719. "type": "integer",
  5720. "format": "int64",
  5721. "description": "正整数资源 ID",
  5722. "minimum": 1,
  5723. "maximum": 2147483647
  5724. },
  5725. "sku_id": {
  5726. "type": "integer",
  5727. "format": "int64",
  5728. "description": "正整数资源 ID",
  5729. "minimum": 1,
  5730. "maximum": 2147483647
  5731. },
  5732. "sku_name": {
  5733. "type": "string",
  5734. "nullable": true
  5735. },
  5736. "liters": {
  5737. "type": "number",
  5738. "nullable": true
  5739. },
  5740. "remaining": {
  5741. "type": "integer",
  5742. "format": "int64"
  5743. },
  5744. "frozen": {
  5745. "type": "integer",
  5746. "format": "int64"
  5747. },
  5748. "available": {
  5749. "type": "integer",
  5750. "format": "int64"
  5751. },
  5752. "full_qty": {
  5753. "type": "integer",
  5754. "format": "int64"
  5755. },
  5756. "empty_qty": {
  5757. "type": "integer",
  5758. "format": "int64"
  5759. },
  5760. "days_left": {
  5761. "type": "number",
  5762. "description": "预计可用天数",
  5763. "nullable": true
  5764. },
  5765. "severity": {
  5766. "type": "string",
  5767. "enum": [
  5768. "healthy",
  5769. "normal",
  5770. "urgent"
  5771. ]
  5772. },
  5773. "expires_at": {
  5774. "type": "string",
  5775. "nullable": true,
  5776. "description": "当前为 null,尚无可用数据"
  5777. }
  5778. },
  5779. "required": [
  5780. "id",
  5781. "sku_id",
  5782. "sku_name",
  5783. "liters",
  5784. "remaining",
  5785. "frozen",
  5786. "available",
  5787. "full_qty",
  5788. "empty_qty",
  5789. "days_left",
  5790. "severity",
  5791. "expires_at"
  5792. ]
  5793. }
  5794. },
  5795. "summary": {
  5796. "$ref": "#/components/schemas/RightsSummary"
  5797. },
  5798. "policy": {
  5799. "type": "object",
  5800. "properties": {
  5801. "alert_qty": {
  5802. "type": "integer",
  5803. "format": "int64"
  5804. },
  5805. "days_per_barrel": {
  5806. "type": "integer",
  5807. "format": "int64"
  5808. },
  5809. "urgent_qty": {
  5810. "type": "integer",
  5811. "format": "int64"
  5812. },
  5813. "revision": {
  5814. "type": "integer",
  5815. "format": "int64"
  5816. },
  5817. "updated_at": {
  5818. "type": "string",
  5819. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  5820. "example": "2026-09-18 10:30:00"
  5821. },
  5822. "comparison": {
  5823. "type": "string",
  5824. "enum": [
  5825. "lt"
  5826. ]
  5827. },
  5828. "accuracy_available": {
  5829. "type": "boolean"
  5830. }
  5831. },
  5832. "required": [
  5833. "alert_qty",
  5834. "days_per_barrel",
  5835. "urgent_qty",
  5836. "revision",
  5837. "updated_at",
  5838. "comparison",
  5839. "accuracy_available"
  5840. ]
  5841. },
  5842. "accounting": {
  5843. "type": "string",
  5844. "enum": [
  5845. "enterprise_sku"
  5846. ]
  5847. },
  5848. "capabilities": {
  5849. "type": "object",
  5850. "properties": {
  5851. "individual_package_cards": {
  5852. "type": "boolean",
  5853. "description": "以服务器返回值决定是否开放入口"
  5854. },
  5855. "expiry_deduction": {
  5856. "type": "boolean",
  5857. "description": "以服务器返回值决定是否开放入口"
  5858. }
  5859. },
  5860. "required": [
  5861. "individual_package_cards",
  5862. "expiry_deduction"
  5863. ]
  5864. }
  5865. },
  5866. "required": [
  5867. "items",
  5868. "summary",
  5869. "policy",
  5870. "accounting",
  5871. "capabilities"
  5872. ]
  5873. },
  5874. "Profile": {
  5875. "type": "object",
  5876. "properties": {
  5877. "user_id": {
  5878. "type": "string"
  5879. },
  5880. "identities": {
  5881. "type": "array",
  5882. "items": {
  5883. "$ref": "#/components/schemas/Identity"
  5884. }
  5885. },
  5886. "balance_cents": {
  5887. "type": "integer",
  5888. "nullable": true,
  5889. "description": "当前企业可用余额,人民币整数分"
  5890. },
  5891. "reward_cents": {
  5892. "type": "integer",
  5893. "nullable": true,
  5894. "description": "当前为 null,尚无可用数据"
  5895. },
  5896. "capabilities": {
  5897. "type": "object",
  5898. "properties": {
  5899. "balance_payment": {
  5900. "type": "boolean",
  5901. "description": "以服务器返回值决定是否开放入口"
  5902. },
  5903. "rewards": {
  5904. "type": "boolean",
  5905. "description": "以服务器返回值决定是否开放入口"
  5906. },
  5907. "withdrawals": {
  5908. "type": "boolean",
  5909. "description": "以服务器返回值决定是否开放入口"
  5910. }
  5911. },
  5912. "required": [
  5913. "balance_payment",
  5914. "rewards",
  5915. "withdrawals"
  5916. ]
  5917. },
  5918. "enterprise": {
  5919. "$ref": "#/components/schemas/Enterprise"
  5920. },
  5921. "rights": {
  5922. "$ref": "#/components/schemas/RightsSummary"
  5923. },
  5924. "reward_buckets": {
  5925. "type": "integer",
  5926. "nullable": true,
  5927. "description": "累计已发放的推广赠水桶数,非现金、非剩余权益"
  5928. }
  5929. },
  5930. "required": [
  5931. "user_id",
  5932. "identities",
  5933. "balance_cents",
  5934. "reward_cents",
  5935. "capabilities",
  5936. "reward_buckets"
  5937. ]
  5938. },
  5939. "Addresses": {
  5940. "type": "object",
  5941. "properties": {
  5942. "items": {
  5943. "type": "array",
  5944. "items": {
  5945. "$ref": "#/components/schemas/DeliveryAddress"
  5946. }
  5947. },
  5948. "capabilities": {
  5949. "type": "object",
  5950. "properties": {
  5951. "multiple_sites_per_enterprise": {
  5952. "type": "boolean",
  5953. "description": "以服务器返回值决定是否开放入口"
  5954. },
  5955. "self_create_enterprise": {
  5956. "type": "boolean",
  5957. "description": "以服务器返回值决定是否开放入口"
  5958. }
  5959. },
  5960. "required": [
  5961. "multiple_sites_per_enterprise",
  5962. "self_create_enterprise"
  5963. ]
  5964. },
  5965. "service_hours": {
  5966. "type": "string",
  5967. "nullable": true,
  5968. "description": "当前为 null,尚无可用数据"
  5969. },
  5970. "coverage_verified": {
  5971. "type": "boolean"
  5972. }
  5973. },
  5974. "required": [
  5975. "items",
  5976. "capabilities",
  5977. "service_hours",
  5978. "coverage_verified"
  5979. ]
  5980. },
  5981. "Delivery": {
  5982. "type": "object",
  5983. "properties": {
  5984. "id": {
  5985. "type": "integer",
  5986. "format": "int64",
  5987. "description": "正整数资源 ID",
  5988. "minimum": 1,
  5989. "maximum": 2147483647
  5990. },
  5991. "code": {
  5992. "type": "string",
  5993. "description": "展示配送号,例如 DS123"
  5994. },
  5995. "sku_id": {
  5996. "type": "integer",
  5997. "format": "int64",
  5998. "description": "正整数资源 ID",
  5999. "minimum": 1,
  6000. "maximum": 2147483647
  6001. },
  6002. "sku_name": {
  6003. "type": "string",
  6004. "nullable": true
  6005. },
  6006. "quantity": {
  6007. "type": "integer",
  6008. "format": "int64",
  6009. "description": "计划配送桶数"
  6010. },
  6011. "status": {
  6012. "type": "string",
  6013. "enum": [
  6014. "pending",
  6015. "assigned",
  6016. "transit",
  6017. "completed",
  6018. "cancelled",
  6019. "returning",
  6020. "returned"
  6021. ]
  6022. },
  6023. "delivered_qty": {
  6024. "type": "integer",
  6025. "format": "int64",
  6026. "description": "实际签收桶数"
  6027. },
  6028. "empty_returned": {
  6029. "type": "integer",
  6030. "format": "int64"
  6031. },
  6032. "address": {
  6033. "type": "string"
  6034. },
  6035. "scheduled_date": {
  6036. "type": "string",
  6037. "format": "date",
  6038. "nullable": true
  6039. },
  6040. "deadline_at": {
  6041. "type": "string",
  6042. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6043. "example": "2026-09-18 10:30:00",
  6044. "nullable": true
  6045. },
  6046. "driver_name": {
  6047. "type": "string"
  6048. },
  6049. "driver_phone": {
  6050. "type": "string",
  6051. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  6052. },
  6053. "created_at": {
  6054. "type": "string",
  6055. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6056. "example": "2026-09-18 10:30:00"
  6057. },
  6058. "received_at": {
  6059. "type": "string",
  6060. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6061. "example": "2026-09-18 10:30:00",
  6062. "nullable": true
  6063. },
  6064. "completed_at": {
  6065. "type": "string",
  6066. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6067. "example": "2026-09-18 10:30:00",
  6068. "nullable": true
  6069. }
  6070. },
  6071. "required": [
  6072. "id",
  6073. "code",
  6074. "sku_id",
  6075. "sku_name",
  6076. "quantity",
  6077. "status",
  6078. "delivered_qty",
  6079. "empty_returned",
  6080. "address",
  6081. "scheduled_date",
  6082. "deadline_at",
  6083. "driver_name",
  6084. "driver_phone",
  6085. "created_at",
  6086. "received_at",
  6087. "completed_at"
  6088. ]
  6089. },
  6090. "PhotoMeta": {
  6091. "type": "object",
  6092. "properties": {
  6093. "id": {
  6094. "type": "integer",
  6095. "format": "int64",
  6096. "description": "正整数资源 ID",
  6097. "minimum": 1,
  6098. "maximum": 2147483647
  6099. },
  6100. "created_at": {
  6101. "type": "string",
  6102. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6103. "example": "2026-09-18 10:30:00"
  6104. }
  6105. },
  6106. "required": [
  6107. "id",
  6108. "created_at"
  6109. ]
  6110. },
  6111. "Tracking": {
  6112. "allOf": [
  6113. {
  6114. "$ref": "#/components/schemas/Delivery"
  6115. },
  6116. {
  6117. "type": "object",
  6118. "properties": {
  6119. "events": {
  6120. "type": "array",
  6121. "items": {
  6122. "type": "object",
  6123. "properties": {
  6124. "action": {
  6125. "type": "string",
  6126. "description": "后台履约动作或 depart/checkin/exception"
  6127. },
  6128. "created_at": {
  6129. "type": "string",
  6130. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6131. "example": "2026-09-18 10:30:00"
  6132. }
  6133. },
  6134. "required": [
  6135. "action",
  6136. "created_at"
  6137. ]
  6138. }
  6139. },
  6140. "photos": {
  6141. "type": "array",
  6142. "items": {
  6143. "$ref": "#/components/schemas/PhotoMeta"
  6144. }
  6145. },
  6146. "eta": {
  6147. "type": "string",
  6148. "nullable": true,
  6149. "description": "当前为 null,尚无可用数据"
  6150. },
  6151. "distance_km": {
  6152. "type": "number",
  6153. "nullable": true,
  6154. "description": "当前为 null,尚无可用数据"
  6155. },
  6156. "capabilities": {
  6157. "type": "object",
  6158. "properties": {
  6159. "live_gps": {
  6160. "type": "boolean",
  6161. "description": "以服务器返回值决定是否开放入口"
  6162. }
  6163. },
  6164. "required": [
  6165. "live_gps"
  6166. ]
  6167. }
  6168. },
  6169. "required": [
  6170. "events",
  6171. "photos",
  6172. "eta",
  6173. "distance_km",
  6174. "capabilities"
  6175. ]
  6176. }
  6177. ]
  6178. },
  6179. "Device": {
  6180. "type": "object",
  6181. "properties": {
  6182. "id": {
  6183. "type": "integer",
  6184. "format": "int64",
  6185. "description": "正整数资源 ID",
  6186. "minimum": 1,
  6187. "maximum": 2147483647
  6188. },
  6189. "name": {
  6190. "type": "string"
  6191. },
  6192. "sn": {
  6193. "type": "string"
  6194. },
  6195. "sku_id": {
  6196. "type": "integer",
  6197. "format": "int64",
  6198. "description": "正整数资源 ID",
  6199. "minimum": 1,
  6200. "maximum": 2147483647
  6201. },
  6202. "state": {
  6203. "type": "string",
  6204. "enum": [
  6205. "fault",
  6206. "unconnected",
  6207. "offline",
  6208. "online"
  6209. ]
  6210. },
  6211. "last_seen": {
  6212. "type": "string",
  6213. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6214. "example": "2026-09-18 10:30:00",
  6215. "nullable": true
  6216. },
  6217. "today_liters": {
  6218. "type": "number",
  6219. "description": "无当日遥测时 null,不能显示成 0",
  6220. "nullable": true
  6221. },
  6222. "fault": {
  6223. "type": "string"
  6224. }
  6225. },
  6226. "required": [
  6227. "id",
  6228. "name",
  6229. "sn",
  6230. "sku_id",
  6231. "state",
  6232. "last_seen",
  6233. "today_liters",
  6234. "fault"
  6235. ]
  6236. },
  6237. "DevicePage": {
  6238. "type": "object",
  6239. "properties": {
  6240. "items": {
  6241. "type": "array",
  6242. "items": {
  6243. "$ref": "#/components/schemas/Device"
  6244. }
  6245. },
  6246. "total": {
  6247. "type": "integer",
  6248. "format": "int64"
  6249. },
  6250. "page": {
  6251. "type": "integer",
  6252. "format": "int64"
  6253. },
  6254. "page_size": {
  6255. "type": "integer",
  6256. "format": "int64"
  6257. },
  6258. "has_more": {
  6259. "type": "boolean"
  6260. }
  6261. },
  6262. "required": [
  6263. "items",
  6264. "total",
  6265. "page",
  6266. "page_size",
  6267. "has_more"
  6268. ]
  6269. },
  6270. "DeviceDetail": {
  6271. "allOf": [
  6272. {
  6273. "$ref": "#/components/schemas/Device"
  6274. },
  6275. {
  6276. "type": "object",
  6277. "properties": {
  6278. "trend": {
  6279. "type": "array",
  6280. "items": {
  6281. "type": "object",
  6282. "properties": {
  6283. "day": {
  6284. "type": "string",
  6285. "format": "date"
  6286. },
  6287. "liters": {
  6288. "type": "number",
  6289. "nullable": true
  6290. }
  6291. },
  6292. "required": [
  6293. "day",
  6294. "liters"
  6295. ]
  6296. }
  6297. },
  6298. "rights": {
  6299. "$ref": "#/components/schemas/Rights"
  6300. },
  6301. "automatic_delivery": {
  6302. "type": "boolean"
  6303. }
  6304. },
  6305. "required": [
  6306. "trend",
  6307. "rights",
  6308. "automatic_delivery"
  6309. ]
  6310. }
  6311. ]
  6312. },
  6313. "Banner": {
  6314. "type": "object",
  6315. "properties": {
  6316. "id": {
  6317. "type": "integer",
  6318. "format": "int64",
  6319. "description": "正整数资源 ID",
  6320. "minimum": 1,
  6321. "maximum": 2147483647
  6322. },
  6323. "title": {
  6324. "type": "string"
  6325. },
  6326. "image_url": {
  6327. "type": "string"
  6328. },
  6329. "target_url": {
  6330. "type": "string"
  6331. },
  6332. "audience": {
  6333. "type": "string",
  6334. "enum": [
  6335. "all",
  6336. "new",
  6337. "purchased",
  6338. "enterprise_admin"
  6339. ]
  6340. },
  6341. "region": {
  6342. "type": "string",
  6343. "nullable": true
  6344. },
  6345. "starts_at": {
  6346. "type": "string",
  6347. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6348. "example": "2026-09-18 10:30:00",
  6349. "nullable": true
  6350. },
  6351. "ends_at": {
  6352. "type": "string",
  6353. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6354. "example": "2026-09-18 10:30:00",
  6355. "nullable": true
  6356. },
  6357. "sort": {
  6358. "type": "integer",
  6359. "format": "int64"
  6360. },
  6361. "status": {
  6362. "type": "integer",
  6363. "format": "int64"
  6364. },
  6365. "created_at": {
  6366. "type": "string",
  6367. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6368. "example": "2026-09-18 10:30:00"
  6369. },
  6370. "updated_at": {
  6371. "type": "string",
  6372. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6373. "example": "2026-09-18 10:30:00"
  6374. },
  6375. "delivery_status": {
  6376. "type": "string"
  6377. },
  6378. "status_label": {
  6379. "type": "string"
  6380. }
  6381. },
  6382. "required": [
  6383. "id",
  6384. "title",
  6385. "image_url",
  6386. "target_url",
  6387. "audience",
  6388. "region",
  6389. "starts_at",
  6390. "ends_at",
  6391. "sort",
  6392. "status",
  6393. "created_at",
  6394. "updated_at",
  6395. "delivery_status",
  6396. "status_label"
  6397. ]
  6398. },
  6399. "Home": {
  6400. "type": "object",
  6401. "properties": {
  6402. "enterprise": {
  6403. "$ref": "#/components/schemas/Enterprise"
  6404. },
  6405. "banners": {
  6406. "type": "array",
  6407. "items": {
  6408. "$ref": "#/components/schemas/Banner"
  6409. }
  6410. },
  6411. "packages": {
  6412. "type": "array",
  6413. "items": {
  6414. "$ref": "#/components/schemas/Package"
  6415. }
  6416. },
  6417. "rights": {
  6418. "$ref": "#/components/schemas/Rights"
  6419. },
  6420. "devices": {
  6421. "$ref": "#/components/schemas/DevicePage"
  6422. },
  6423. "unread_messages": {
  6424. "type": "integer",
  6425. "nullable": true,
  6426. "description": "当前为 null,尚无可用数据"
  6427. },
  6428. "capabilities": {
  6429. "type": "object",
  6430. "properties": {
  6431. "coupon": {
  6432. "type": "boolean",
  6433. "description": "以服务器返回值决定是否开放入口"
  6434. },
  6435. "messages": {
  6436. "type": "boolean",
  6437. "description": "以服务器返回值决定是否开放入口"
  6438. },
  6439. "automatic_delivery": {
  6440. "type": "boolean",
  6441. "description": "以服务器返回值决定是否开放入口"
  6442. }
  6443. },
  6444. "required": [
  6445. "coupon",
  6446. "messages",
  6447. "automatic_delivery"
  6448. ]
  6449. }
  6450. },
  6451. "required": [
  6452. "enterprise",
  6453. "banners",
  6454. "packages",
  6455. "rights",
  6456. "devices",
  6457. "unread_messages",
  6458. "capabilities"
  6459. ]
  6460. },
  6461. "LedgerPage": {
  6462. "type": "object",
  6463. "properties": {
  6464. "items": {
  6465. "type": "array",
  6466. "items": {
  6467. "type": "object",
  6468. "properties": {
  6469. "id": {
  6470. "type": "integer",
  6471. "format": "int64",
  6472. "description": "正整数资源 ID",
  6473. "minimum": 1,
  6474. "maximum": 2147483647
  6475. },
  6476. "sku_id": {
  6477. "type": "integer",
  6478. "format": "int64",
  6479. "description": "正整数资源 ID",
  6480. "minimum": 1,
  6481. "maximum": 2147483647
  6482. },
  6483. "kind": {
  6484. "type": "string",
  6485. "enum": [
  6486. "purchase",
  6487. "reserve",
  6488. "cancel",
  6489. "complete",
  6490. "partial_receive",
  6491. "delivery_return"
  6492. ]
  6493. },
  6494. "quantity": {
  6495. "type": "integer",
  6496. "format": "int64"
  6497. },
  6498. "reference": {
  6499. "type": "string"
  6500. },
  6501. "created_at": {
  6502. "type": "string",
  6503. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6504. "example": "2026-09-18 10:30:00"
  6505. }
  6506. },
  6507. "required": [
  6508. "id",
  6509. "sku_id",
  6510. "kind",
  6511. "quantity",
  6512. "reference",
  6513. "created_at"
  6514. ]
  6515. }
  6516. },
  6517. "total": {
  6518. "type": "integer",
  6519. "format": "int64"
  6520. },
  6521. "page": {
  6522. "type": "integer",
  6523. "format": "int64"
  6524. },
  6525. "page_size": {
  6526. "type": "integer",
  6527. "format": "int64"
  6528. },
  6529. "has_more": {
  6530. "type": "boolean"
  6531. },
  6532. "quantity_semantics": {
  6533. "type": "string",
  6534. "description": "操作桶数不等于权益扣减数"
  6535. }
  6536. },
  6537. "required": [
  6538. "items",
  6539. "total",
  6540. "page",
  6541. "page_size",
  6542. "has_more",
  6543. "quantity_semantics"
  6544. ]
  6545. },
  6546. "Purchase": {
  6547. "type": "object",
  6548. "properties": {
  6549. "id": {
  6550. "type": "integer",
  6551. "format": "int64",
  6552. "description": "正整数资源 ID",
  6553. "minimum": 1,
  6554. "maximum": 2147483647
  6555. },
  6556. "package_name": {
  6557. "type": "string"
  6558. },
  6559. "sku_id": {
  6560. "type": "integer",
  6561. "format": "int64",
  6562. "description": "正整数资源 ID",
  6563. "minimum": 1,
  6564. "maximum": 2147483647
  6565. },
  6566. "buckets": {
  6567. "type": "integer",
  6568. "format": "int64"
  6569. },
  6570. "amount_cents": {
  6571. "type": "integer",
  6572. "format": "int64",
  6573. "description": "人民币整数分",
  6574. "minimum": 0
  6575. },
  6576. "created_at": {
  6577. "type": "string",
  6578. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6579. "example": "2026-09-18 10:30:00"
  6580. }
  6581. },
  6582. "required": [
  6583. "id",
  6584. "package_name",
  6585. "sku_id",
  6586. "buckets",
  6587. "amount_cents",
  6588. "created_at"
  6589. ]
  6590. },
  6591. "QuoteItem": {
  6592. "type": "object",
  6593. "properties": {
  6594. "package_id": {
  6595. "type": "integer",
  6596. "format": "int64",
  6597. "description": "正整数资源 ID",
  6598. "minimum": 1,
  6599. "maximum": 2147483647
  6600. },
  6601. "name": {
  6602. "type": "string"
  6603. },
  6604. "sku_id": {
  6605. "type": "integer",
  6606. "format": "int64",
  6607. "description": "正整数资源 ID",
  6608. "minimum": 1,
  6609. "maximum": 2147483647
  6610. },
  6611. "quantity": {
  6612. "type": "integer",
  6613. "format": "int64",
  6614. "description": "套餐份数"
  6615. },
  6616. "buckets": {
  6617. "type": "integer",
  6618. "format": "int64",
  6619. "description": "本行总桶数"
  6620. },
  6621. "unit_price_cents": {
  6622. "type": "integer",
  6623. "format": "int64",
  6624. "description": "每份套餐价;与套餐详情的每桶单价语义不同"
  6625. },
  6626. "amount_cents": {
  6627. "type": "integer",
  6628. "format": "int64",
  6629. "description": "人民币整数分",
  6630. "minimum": 0
  6631. }
  6632. },
  6633. "required": [
  6634. "package_id",
  6635. "name",
  6636. "sku_id",
  6637. "quantity",
  6638. "buckets",
  6639. "unit_price_cents",
  6640. "amount_cents"
  6641. ]
  6642. },
  6643. "Quote": {
  6644. "type": "object",
  6645. "properties": {
  6646. "items": {
  6647. "type": "array",
  6648. "items": {
  6649. "$ref": "#/components/schemas/QuoteItem"
  6650. }
  6651. },
  6652. "subtotal_cents": {
  6653. "type": "integer",
  6654. "format": "int64",
  6655. "description": "人民币整数分",
  6656. "minimum": 0
  6657. },
  6658. "discount_cents": {
  6659. "type": "integer",
  6660. "format": "int64",
  6661. "description": "人民币整数分",
  6662. "minimum": 0
  6663. },
  6664. "amount_cents": {
  6665. "type": "integer",
  6666. "format": "int64",
  6667. "description": "人民币整数分",
  6668. "minimum": 0
  6669. },
  6670. "payment_methods": {
  6671. "type": "array",
  6672. "items": {
  6673. "type": "string"
  6674. }
  6675. },
  6676. "capabilities": {
  6677. "type": "object",
  6678. "properties": {
  6679. "payment": {
  6680. "type": "boolean",
  6681. "description": "以服务器返回值决定是否开放入口"
  6682. },
  6683. "balance": {
  6684. "type": "boolean",
  6685. "description": "以服务器返回值决定是否开放入口"
  6686. },
  6687. "first_purchase_discount": {
  6688. "type": "boolean",
  6689. "description": "以服务器返回值决定是否开放入口"
  6690. },
  6691. "invoice_issuance": {
  6692. "type": "boolean",
  6693. "description": "以服务器返回值决定是否开放入口"
  6694. }
  6695. },
  6696. "required": [
  6697. "payment",
  6698. "balance",
  6699. "first_purchase_discount",
  6700. "invoice_issuance"
  6701. ]
  6702. },
  6703. "agreement_url": {
  6704. "type": "string",
  6705. "nullable": true
  6706. },
  6707. "balance_cents": {
  6708. "type": "integer",
  6709. "format": "int64",
  6710. "minimum": 0,
  6711. "description": "当前企业可用余额,人民币整数分"
  6712. },
  6713. "quote_revision": {
  6714. "type": "string",
  6715. "minLength": 64,
  6716. "maxLength": 64,
  6717. "description": "服务器对套餐价格、名称、规格和桶数生成的报价版本;下单原样提交,变更返回40904"
  6718. }
  6719. },
  6720. "required": [
  6721. "items",
  6722. "subtotal_cents",
  6723. "discount_cents",
  6724. "amount_cents",
  6725. "payment_methods",
  6726. "capabilities",
  6727. "agreement_url",
  6728. "balance_cents",
  6729. "quote_revision"
  6730. ]
  6731. },
  6732. "Checkout": {
  6733. "type": "object",
  6734. "properties": {
  6735. "id": {
  6736. "type": "integer",
  6737. "format": "int64",
  6738. "description": "正整数资源 ID",
  6739. "minimum": 1,
  6740. "maximum": 2147483647
  6741. },
  6742. "code": {
  6743. "type": "string",
  6744. "description": "MP 开头的意向单号"
  6745. },
  6746. "enterprise_id": {
  6747. "type": "integer",
  6748. "format": "int64",
  6749. "description": "正整数资源 ID",
  6750. "minimum": 1,
  6751. "maximum": 2147483647
  6752. },
  6753. "status": {
  6754. "type": "string",
  6755. "enum": [
  6756. "pending",
  6757. "cancelled",
  6758. "expired",
  6759. "paid"
  6760. ]
  6761. },
  6762. "items": {
  6763. "type": "array",
  6764. "items": {
  6765. "$ref": "#/components/schemas/QuoteItem"
  6766. }
  6767. },
  6768. "amount_cents": {
  6769. "type": "integer",
  6770. "format": "int64",
  6771. "description": "人民币整数分",
  6772. "minimum": 0
  6773. },
  6774. "created_at": {
  6775. "type": "string",
  6776. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6777. "example": "2026-09-18 10:30:00"
  6778. },
  6779. "expires_at": {
  6780. "type": "string",
  6781. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  6782. "example": "2026-09-18 10:30:00"
  6783. },
  6784. "payment_enabled": {
  6785. "type": "boolean"
  6786. },
  6787. "replayed": {
  6788. "type": "boolean",
  6789. "description": "同 key 重试时才出现"
  6790. },
  6791. "payment_method": {
  6792. "type": "string",
  6793. "enum": [
  6794. "balance",
  6795. "wechat"
  6796. ],
  6797. "nullable": true
  6798. },
  6799. "paid_at": {
  6800. "type": "string",
  6801. "nullable": true,
  6802. "description": "支付完成时间"
  6803. },
  6804. "balance_cents": {
  6805. "type": "integer",
  6806. "format": "int64",
  6807. "minimum": 0,
  6808. "description": "当前企业可用余额,人民币整数分"
  6809. }
  6810. },
  6811. "required": [
  6812. "id",
  6813. "code",
  6814. "enterprise_id",
  6815. "status",
  6816. "items",
  6817. "amount_cents",
  6818. "created_at",
  6819. "expires_at",
  6820. "payment_enabled",
  6821. "balance_cents"
  6822. ]
  6823. },
  6824. "CheckoutDetail": {
  6825. "allOf": [
  6826. {
  6827. "$ref": "#/components/schemas/Checkout"
  6828. },
  6829. {
  6830. "type": "object",
  6831. "properties": {
  6832. "address": {
  6833. "type": "object",
  6834. "properties": {
  6835. "name": {
  6836. "type": "string"
  6837. },
  6838. "address": {
  6839. "type": "string"
  6840. },
  6841. "region": {
  6842. "type": "string"
  6843. },
  6844. "contact": {
  6845. "type": "string"
  6846. },
  6847. "phone": {
  6848. "type": "string",
  6849. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  6850. }
  6851. },
  6852. "required": [
  6853. "name",
  6854. "address",
  6855. "region",
  6856. "contact",
  6857. "phone"
  6858. ]
  6859. }
  6860. },
  6861. "required": [
  6862. "address"
  6863. ]
  6864. }
  6865. ]
  6866. },
  6867. "EnterpriseOrderPage": {
  6868. "type": "object",
  6869. "properties": {
  6870. "items": {
  6871. "type": "array",
  6872. "items": {
  6873. "oneOf": [
  6874. {
  6875. "$ref": "#/components/schemas/Delivery"
  6876. },
  6877. {
  6878. "$ref": "#/components/schemas/Purchase"
  6879. },
  6880. {
  6881. "$ref": "#/components/schemas/Checkout"
  6882. }
  6883. ]
  6884. }
  6885. },
  6886. "total": {
  6887. "type": "integer",
  6888. "format": "int64"
  6889. },
  6890. "page": {
  6891. "type": "integer",
  6892. "format": "int64"
  6893. },
  6894. "page_size": {
  6895. "type": "integer",
  6896. "format": "int64"
  6897. },
  6898. "has_more": {
  6899. "type": "boolean"
  6900. },
  6901. "kind": {
  6902. "type": "string",
  6903. "enum": [
  6904. "deliveries",
  6905. "purchases",
  6906. "checkouts"
  6907. ]
  6908. }
  6909. },
  6910. "required": [
  6911. "items",
  6912. "total",
  6913. "page",
  6914. "page_size",
  6915. "has_more",
  6916. "kind"
  6917. ]
  6918. },
  6919. "Rewards": {
  6920. "type": "object",
  6921. "properties": {
  6922. "enabled": {
  6923. "type": "boolean"
  6924. },
  6925. "reason": {
  6926. "type": "string"
  6927. },
  6928. "reward_type": {
  6929. "type": "string",
  6930. "enum": [
  6931. "water"
  6932. ]
  6933. },
  6934. "total_cents": {
  6935. "type": "integer",
  6936. "nullable": true
  6937. },
  6938. "withdrawable_cents": {
  6939. "type": "integer",
  6940. "nullable": true
  6941. },
  6942. "demo": {
  6943. "type": "boolean",
  6944. "enum": [
  6945. false
  6946. ]
  6947. },
  6948. "invite_code": {
  6949. "type": "string",
  6950. "nullable": true
  6951. },
  6952. "total_buckets": {
  6953. "type": "integer"
  6954. },
  6955. "successful_invites": {
  6956. "type": "integer"
  6957. },
  6958. "first_order_enterprises": {
  6959. "type": "integer"
  6960. },
  6961. "bound": {
  6962. "type": "object",
  6963. "nullable": true,
  6964. "allOf": [
  6965. {
  6966. "$ref": "#/components/schemas/PromotionRecord"
  6967. }
  6968. ]
  6969. },
  6970. "items": {
  6971. "type": "array",
  6972. "items": {
  6973. "$ref": "#/components/schemas/PromotionRecord"
  6974. }
  6975. },
  6976. "total": {
  6977. "type": "integer"
  6978. },
  6979. "policy": {
  6980. "$ref": "#/components/schemas/PromotionPolicy"
  6981. }
  6982. },
  6983. "required": [
  6984. "enabled",
  6985. "reason",
  6986. "reward_type",
  6987. "total_cents",
  6988. "withdrawable_cents",
  6989. "demo",
  6990. "invite_code",
  6991. "total_buckets",
  6992. "successful_invites",
  6993. "first_order_enterprises",
  6994. "bound",
  6995. "items",
  6996. "total",
  6997. "policy"
  6998. ]
  6999. },
  7000. "TaskListItem": {
  7001. "allOf": [
  7002. {
  7003. "$ref": "#/components/schemas/Delivery"
  7004. },
  7005. {
  7006. "type": "object",
  7007. "properties": {
  7008. "enterprise_name": {
  7009. "type": "string",
  7010. "nullable": true
  7011. },
  7012. "route_id": {
  7013. "type": "integer",
  7014. "format": "int64",
  7015. "nullable": true
  7016. },
  7017. "stop_order": {
  7018. "type": "integer",
  7019. "format": "int64"
  7020. }
  7021. },
  7022. "required": [
  7023. "enterprise_name",
  7024. "route_id",
  7025. "stop_order"
  7026. ]
  7027. }
  7028. ]
  7029. },
  7030. "TaskPage": {
  7031. "type": "object",
  7032. "properties": {
  7033. "items": {
  7034. "type": "array",
  7035. "items": {
  7036. "$ref": "#/components/schemas/TaskListItem"
  7037. }
  7038. },
  7039. "total": {
  7040. "type": "integer",
  7041. "format": "int64"
  7042. },
  7043. "page": {
  7044. "type": "integer",
  7045. "format": "int64"
  7046. },
  7047. "page_size": {
  7048. "type": "integer",
  7049. "format": "int64"
  7050. },
  7051. "has_more": {
  7052. "type": "boolean"
  7053. }
  7054. },
  7055. "required": [
  7056. "items",
  7057. "total",
  7058. "page",
  7059. "page_size",
  7060. "has_more"
  7061. ]
  7062. },
  7063. "TaskRecord": {
  7064. "type": "object",
  7065. "properties": {
  7066. "id": {
  7067. "type": "integer",
  7068. "format": "int64",
  7069. "description": "正整数资源 ID",
  7070. "minimum": 1,
  7071. "maximum": 2147483647
  7072. },
  7073. "kind": {
  7074. "type": "string",
  7075. "enum": [
  7076. "depart",
  7077. "checkin",
  7078. "exception",
  7079. "draft",
  7080. "complete"
  7081. ]
  7082. },
  7083. "data": {
  7084. "oneOf": [
  7085. {
  7086. "type": "object",
  7087. "properties": {
  7088. "latitude": {
  7089. "type": "number"
  7090. },
  7091. "longitude": {
  7092. "type": "number"
  7093. },
  7094. "coordinate_system": {
  7095. "type": "string"
  7096. },
  7097. "source": {
  7098. "type": "string"
  7099. },
  7100. "reason": {
  7101. "type": "string"
  7102. },
  7103. "accepted_qty": {
  7104. "type": "integer",
  7105. "format": "int64"
  7106. },
  7107. "empty_returned": {
  7108. "type": "integer",
  7109. "format": "int64"
  7110. },
  7111. "receiver": {
  7112. "type": "string"
  7113. },
  7114. "photo_ids": {
  7115. "type": "array",
  7116. "items": {
  7117. "type": "integer",
  7118. "format": "int64",
  7119. "description": "正整数资源 ID",
  7120. "minimum": 1,
  7121. "maximum": 2147483647
  7122. }
  7123. }
  7124. }
  7125. },
  7126. {
  7127. "type": "array",
  7128. "items": {},
  7129. "maxItems": 0
  7130. }
  7131. ],
  7132. "description": "按 kind 区分。depart 为 [];checkin 为坐标;exception 为 reason;draft/complete 为履约内容"
  7133. },
  7134. "created_at": {
  7135. "type": "string",
  7136. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  7137. "example": "2026-09-18 10:30:00"
  7138. }
  7139. },
  7140. "required": [
  7141. "id",
  7142. "kind",
  7143. "data",
  7144. "created_at"
  7145. ]
  7146. },
  7147. "TaskDetail": {
  7148. "allOf": [
  7149. {
  7150. "$ref": "#/components/schemas/Delivery"
  7151. },
  7152. {
  7153. "type": "object",
  7154. "properties": {
  7155. "enterprise_name": {
  7156. "type": "string",
  7157. "nullable": true
  7158. },
  7159. "contact": {
  7160. "type": "string",
  7161. "nullable": true
  7162. },
  7163. "phone": {
  7164. "type": "string",
  7165. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****",
  7166. "nullable": true
  7167. },
  7168. "contact_phone": {
  7169. "type": "string",
  7170. "description": "仅本人 assigned/transit/returning 任务提供完整拨号号码,完成后 null",
  7171. "nullable": true
  7172. },
  7173. "longitude": {
  7174. "anyOf": [
  7175. {
  7176. "type": "number",
  7177. "nullable": true
  7178. },
  7179. {
  7180. "type": "string",
  7181. "description": "数据库 DECIMAL 原值"
  7182. }
  7183. ],
  7184. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7185. },
  7186. "latitude": {
  7187. "anyOf": [
  7188. {
  7189. "type": "number",
  7190. "nullable": true
  7191. },
  7192. {
  7193. "type": "string",
  7194. "description": "数据库 DECIMAL 原值"
  7195. }
  7196. ],
  7197. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7198. },
  7199. "route_id": {
  7200. "type": "integer",
  7201. "format": "int64",
  7202. "nullable": true
  7203. },
  7204. "records": {
  7205. "type": "array",
  7206. "items": {
  7207. "$ref": "#/components/schemas/TaskRecord"
  7208. }
  7209. },
  7210. "photos": {
  7211. "type": "array",
  7212. "items": {
  7213. "$ref": "#/components/schemas/PhotoMeta"
  7214. }
  7215. },
  7216. "capabilities": {
  7217. "type": "object",
  7218. "properties": {
  7219. "checkin": {
  7220. "type": "boolean",
  7221. "description": "以服务器返回值决定是否开放入口"
  7222. },
  7223. "photos": {
  7224. "type": "boolean",
  7225. "description": "以服务器返回值决定是否开放入口"
  7226. },
  7227. "fulfillment": {
  7228. "type": "boolean",
  7229. "description": "以服务器返回值决定是否开放入口"
  7230. },
  7231. "device_binding": {
  7232. "type": "boolean",
  7233. "description": "以服务器返回值决定是否开放入口"
  7234. }
  7235. },
  7236. "required": [
  7237. "checkin",
  7238. "photos",
  7239. "fulfillment",
  7240. "device_binding"
  7241. ]
  7242. }
  7243. },
  7244. "required": [
  7245. "enterprise_name",
  7246. "contact",
  7247. "phone",
  7248. "contact_phone",
  7249. "longitude",
  7250. "latitude",
  7251. "route_id",
  7252. "records",
  7253. "photos",
  7254. "capabilities"
  7255. ]
  7256. }
  7257. ]
  7258. },
  7259. "Route": {
  7260. "type": "object",
  7261. "properties": {
  7262. "id": {
  7263. "type": "integer",
  7264. "format": "int64",
  7265. "description": "正整数资源 ID",
  7266. "minimum": 1,
  7267. "maximum": 2147483647
  7268. },
  7269. "code": {
  7270. "type": "string"
  7271. },
  7272. "work_date": {
  7273. "type": "string",
  7274. "format": "date"
  7275. },
  7276. "region": {
  7277. "type": "string"
  7278. },
  7279. "optimization": {
  7280. "type": "object",
  7281. "nullable": true,
  7282. "description": "后台路线规划元数据,可能为 null;展示站点请使用 stops,不能据此承诺实时 ETA",
  7283. "additionalProperties": true
  7284. },
  7285. "stops": {
  7286. "type": "array",
  7287. "items": {
  7288. "type": "object",
  7289. "properties": {
  7290. "id": {
  7291. "type": "integer",
  7292. "format": "int64",
  7293. "description": "正整数资源 ID",
  7294. "minimum": 1,
  7295. "maximum": 2147483647
  7296. },
  7297. "address": {
  7298. "type": "string"
  7299. },
  7300. "status": {
  7301. "type": "string",
  7302. "enum": [
  7303. "pending",
  7304. "assigned",
  7305. "transit",
  7306. "completed",
  7307. "cancelled",
  7308. "returning",
  7309. "returned"
  7310. ]
  7311. },
  7312. "quantity": {
  7313. "type": "integer",
  7314. "format": "int64"
  7315. },
  7316. "longitude": {
  7317. "anyOf": [
  7318. {
  7319. "type": "number",
  7320. "nullable": true
  7321. },
  7322. {
  7323. "type": "string",
  7324. "description": "数据库 DECIMAL 原值"
  7325. }
  7326. ],
  7327. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7328. },
  7329. "latitude": {
  7330. "anyOf": [
  7331. {
  7332. "type": "number",
  7333. "nullable": true
  7334. },
  7335. {
  7336. "type": "string",
  7337. "description": "数据库 DECIMAL 原值"
  7338. }
  7339. ],
  7340. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7341. },
  7342. "origin_address": {
  7343. "type": "string"
  7344. },
  7345. "origin_longitude": {
  7346. "anyOf": [
  7347. {
  7348. "type": "number",
  7349. "nullable": true
  7350. },
  7351. {
  7352. "type": "string",
  7353. "description": "数据库 DECIMAL 原值"
  7354. }
  7355. ],
  7356. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7357. },
  7358. "origin_latitude": {
  7359. "anyOf": [
  7360. {
  7361. "type": "number",
  7362. "nullable": true
  7363. },
  7364. {
  7365. "type": "string",
  7366. "description": "数据库 DECIMAL 原值"
  7367. }
  7368. ],
  7369. "description": "历史接口坐标可为数值、数字字符串或 null;前端使用前转换 Number"
  7370. },
  7371. "stop_order": {
  7372. "type": "integer",
  7373. "format": "int64"
  7374. }
  7375. },
  7376. "required": [
  7377. "id",
  7378. "address",
  7379. "status",
  7380. "quantity",
  7381. "longitude",
  7382. "latitude",
  7383. "origin_address",
  7384. "origin_longitude",
  7385. "origin_latitude",
  7386. "stop_order"
  7387. ]
  7388. }
  7389. }
  7390. },
  7391. "required": [
  7392. "id",
  7393. "code",
  7394. "work_date",
  7395. "region",
  7396. "optimization",
  7397. "stops"
  7398. ]
  7399. },
  7400. "DriverDashboard": {
  7401. "type": "object",
  7402. "properties": {
  7403. "driver": {
  7404. "type": "object",
  7405. "properties": {
  7406. "id": {
  7407. "type": "integer",
  7408. "format": "int64",
  7409. "description": "正整数资源 ID",
  7410. "minimum": 1,
  7411. "maximum": 2147483647
  7412. },
  7413. "name": {
  7414. "type": "string"
  7415. },
  7416. "vehicle": {
  7417. "type": "string"
  7418. }
  7419. },
  7420. "required": [
  7421. "id",
  7422. "name",
  7423. "vehicle"
  7424. ]
  7425. },
  7426. "shift": {
  7427. "type": "string",
  7428. "description": "今日班次;未设置为 null",
  7429. "nullable": true
  7430. },
  7431. "summary": {
  7432. "type": "object",
  7433. "properties": {
  7434. "pending": {
  7435. "type": "integer",
  7436. "format": "int64"
  7437. },
  7438. "transit": {
  7439. "type": "integer",
  7440. "format": "int64"
  7441. },
  7442. "completed_today": {
  7443. "type": "integer",
  7444. "format": "int64"
  7445. }
  7446. },
  7447. "required": [
  7448. "pending",
  7449. "transit",
  7450. "completed_today"
  7451. ]
  7452. },
  7453. "tasks": {
  7454. "$ref": "#/components/schemas/TaskPage"
  7455. },
  7456. "routes": {
  7457. "type": "array",
  7458. "items": {
  7459. "$ref": "#/components/schemas/Route"
  7460. }
  7461. },
  7462. "capabilities": {
  7463. "type": "object",
  7464. "properties": {
  7465. "live_gps": {
  7466. "type": "boolean",
  7467. "description": "以服务器返回值决定是否开放入口"
  7468. },
  7469. "self_accept_unassigned": {
  7470. "type": "boolean",
  7471. "description": "以服务器返回值决定是否开放入口"
  7472. }
  7473. },
  7474. "required": [
  7475. "live_gps",
  7476. "self_accept_unassigned"
  7477. ]
  7478. }
  7479. },
  7480. "required": [
  7481. "driver",
  7482. "shift",
  7483. "summary",
  7484. "tasks",
  7485. "routes",
  7486. "capabilities"
  7487. ]
  7488. },
  7489. "DeviceCheck": {
  7490. "type": "object",
  7491. "properties": {
  7492. "id": {
  7493. "type": "integer",
  7494. "format": "int64",
  7495. "description": "正整数资源 ID",
  7496. "minimum": 1,
  7497. "maximum": 2147483647
  7498. },
  7499. "sn": {
  7500. "type": "string"
  7501. },
  7502. "last_seen": {
  7503. "type": "string",
  7504. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  7505. "example": "2026-09-18 10:30:00",
  7506. "nullable": true
  7507. },
  7508. "online": {
  7509. "type": "boolean",
  7510. "description": "按最近15分钟心跳与故障标记判断"
  7511. },
  7512. "network_test_passed": {
  7513. "type": "boolean",
  7514. "nullable": true,
  7515. "description": "当前为 null,尚无可用数据"
  7516. },
  7517. "binding_enabled": {
  7518. "type": "boolean"
  7519. }
  7520. },
  7521. "required": [
  7522. "id",
  7523. "sn",
  7524. "last_seen",
  7525. "online",
  7526. "network_test_passed",
  7527. "binding_enabled"
  7528. ]
  7529. },
  7530. "AgentDashboard": {
  7531. "type": "object",
  7532. "properties": {
  7533. "agent": {
  7534. "type": "object",
  7535. "properties": {
  7536. "id": {
  7537. "type": "integer",
  7538. "format": "int64",
  7539. "description": "正整数资源 ID",
  7540. "minimum": 1,
  7541. "maximum": 2147483647
  7542. },
  7543. "name": {
  7544. "type": "string"
  7545. },
  7546. "region": {
  7547. "type": "string"
  7548. }
  7549. },
  7550. "required": [
  7551. "id",
  7552. "name",
  7553. "region"
  7554. ]
  7555. },
  7556. "summary": {
  7557. "type": "object",
  7558. "properties": {
  7559. "month_amount_cents": {
  7560. "type": "integer",
  7561. "format": "int64",
  7562. "description": "人民币整数分",
  7563. "minimum": 0
  7564. },
  7565. "previous_month_amount_cents": {
  7566. "type": "integer",
  7567. "format": "int64",
  7568. "description": "人民币整数分",
  7569. "minimum": 0
  7570. },
  7571. "growth_percent": {
  7572. "type": "number",
  7573. "description": "上月为0时 null",
  7574. "nullable": true
  7575. },
  7576. "customer_count": {
  7577. "type": "integer",
  7578. "format": "int64"
  7579. },
  7580. "new_customers": {
  7581. "type": "integer",
  7582. "format": "int64"
  7583. },
  7584. "team_count": {
  7585. "type": "integer",
  7586. "format": "int64"
  7587. },
  7588. "estimated_commission_cents": {
  7589. "type": "integer",
  7590. "nullable": true,
  7591. "description": "当前代理自己的待结算佣金,单位分;旧订单不补记"
  7592. },
  7593. "withdrawable_cents": {
  7594. "type": "integer",
  7595. "nullable": true,
  7596. "description": "提现尚未开放,当前为0"
  7597. },
  7598. "pending_commission_cents": {
  7599. "type": "integer",
  7600. "nullable": true,
  7601. "description": "当前代理自己的待结算佣金,单位分"
  7602. }
  7603. },
  7604. "required": [
  7605. "month_amount_cents",
  7606. "previous_month_amount_cents",
  7607. "growth_percent",
  7608. "customer_count",
  7609. "new_customers",
  7610. "team_count",
  7611. "estimated_commission_cents",
  7612. "withdrawable_cents",
  7613. "pending_commission_cents"
  7614. ]
  7615. },
  7616. "trend": {
  7617. "type": "array",
  7618. "items": {
  7619. "type": "object",
  7620. "properties": {
  7621. "day": {
  7622. "type": "string",
  7623. "format": "date"
  7624. },
  7625. "amount_cents": {
  7626. "type": "integer",
  7627. "format": "int64",
  7628. "description": "人民币整数分",
  7629. "minimum": 0
  7630. }
  7631. },
  7632. "required": [
  7633. "day",
  7634. "amount_cents"
  7635. ]
  7636. }
  7637. },
  7638. "attribution": {
  7639. "type": "string",
  7640. "enum": [
  7641. "current_enterprise_agent"
  7642. ]
  7643. },
  7644. "capabilities": {
  7645. "type": "object",
  7646. "properties": {
  7647. "commission": {
  7648. "type": "boolean",
  7649. "description": "以服务器返回值决定是否开放入口"
  7650. },
  7651. "withdrawal": {
  7652. "type": "boolean",
  7653. "description": "以服务器返回值决定是否开放入口"
  7654. }
  7655. },
  7656. "required": [
  7657. "commission",
  7658. "withdrawal"
  7659. ]
  7660. }
  7661. },
  7662. "required": [
  7663. "agent",
  7664. "summary",
  7665. "trend",
  7666. "attribution",
  7667. "capabilities"
  7668. ]
  7669. },
  7670. "Customer": {
  7671. "type": "object",
  7672. "properties": {
  7673. "id": {
  7674. "type": "integer",
  7675. "format": "int64",
  7676. "description": "正整数资源 ID",
  7677. "minimum": 1,
  7678. "maximum": 2147483647
  7679. },
  7680. "name": {
  7681. "type": "string"
  7682. },
  7683. "contact": {
  7684. "type": "string"
  7685. },
  7686. "phone": {
  7687. "type": "string",
  7688. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  7689. },
  7690. "region": {
  7691. "type": "string"
  7692. },
  7693. "created_at": {
  7694. "type": "string",
  7695. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  7696. "example": "2026-09-18 10:30:00"
  7697. },
  7698. "amount_cents": {
  7699. "type": "integer",
  7700. "format": "int64",
  7701. "description": "人民币整数分",
  7702. "minimum": 0
  7703. },
  7704. "last_purchase_at": {
  7705. "type": "string",
  7706. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  7707. "example": "2026-09-18 10:30:00",
  7708. "nullable": true
  7709. },
  7710. "has_purchased": {
  7711. "type": "boolean"
  7712. },
  7713. "device_count": {
  7714. "type": "integer",
  7715. "format": "int64"
  7716. }
  7717. },
  7718. "required": [
  7719. "id",
  7720. "name",
  7721. "contact",
  7722. "phone",
  7723. "region",
  7724. "created_at",
  7725. "amount_cents",
  7726. "last_purchase_at",
  7727. "has_purchased",
  7728. "device_count"
  7729. ]
  7730. },
  7731. "CustomerPage": {
  7732. "type": "object",
  7733. "properties": {
  7734. "items": {
  7735. "type": "array",
  7736. "items": {
  7737. "$ref": "#/components/schemas/Customer"
  7738. }
  7739. },
  7740. "total": {
  7741. "type": "integer",
  7742. "format": "int64"
  7743. },
  7744. "page": {
  7745. "type": "integer",
  7746. "format": "int64"
  7747. },
  7748. "page_size": {
  7749. "type": "integer",
  7750. "format": "int64"
  7751. },
  7752. "has_more": {
  7753. "type": "boolean"
  7754. },
  7755. "summary": {
  7756. "type": "object",
  7757. "properties": {
  7758. "all": {
  7759. "type": "integer",
  7760. "format": "int64"
  7761. },
  7762. "new": {
  7763. "type": "integer",
  7764. "format": "int64",
  7765. "description": "本月新增"
  7766. },
  7767. "unpaid": {
  7768. "type": "integer",
  7769. "format": "int64",
  7770. "description": "无已发生收款"
  7771. }
  7772. },
  7773. "required": [
  7774. "all",
  7775. "new",
  7776. "unpaid"
  7777. ]
  7778. }
  7779. },
  7780. "required": [
  7781. "items",
  7782. "total",
  7783. "page",
  7784. "page_size",
  7785. "has_more",
  7786. "summary"
  7787. ]
  7788. },
  7789. "AgentOrderPage": {
  7790. "type": "object",
  7791. "properties": {
  7792. "items": {
  7793. "type": "array",
  7794. "items": {
  7795. "type": "object",
  7796. "properties": {
  7797. "id": {
  7798. "type": "integer",
  7799. "format": "int64",
  7800. "description": "正整数资源 ID",
  7801. "minimum": 1,
  7802. "maximum": 2147483647
  7803. },
  7804. "enterprise_id": {
  7805. "type": "integer",
  7806. "format": "int64",
  7807. "description": "正整数资源 ID",
  7808. "minimum": 1,
  7809. "maximum": 2147483647
  7810. },
  7811. "package_name": {
  7812. "type": "string"
  7813. },
  7814. "buckets": {
  7815. "type": "integer",
  7816. "format": "int64"
  7817. },
  7818. "amount_cents": {
  7819. "type": "integer",
  7820. "format": "int64",
  7821. "description": "人民币整数分",
  7822. "minimum": 0
  7823. },
  7824. "created_at": {
  7825. "type": "string",
  7826. "description": "Asia/Shanghai 时间,格式 YYYY-MM-DD HH:mm:ss",
  7827. "example": "2026-09-18 10:30:00"
  7828. }
  7829. },
  7830. "required": [
  7831. "id",
  7832. "enterprise_id",
  7833. "package_name",
  7834. "buckets",
  7835. "amount_cents",
  7836. "created_at"
  7837. ]
  7838. }
  7839. },
  7840. "total": {
  7841. "type": "integer",
  7842. "format": "int64"
  7843. },
  7844. "page": {
  7845. "type": "integer",
  7846. "format": "int64"
  7847. },
  7848. "page_size": {
  7849. "type": "integer",
  7850. "format": "int64"
  7851. },
  7852. "has_more": {
  7853. "type": "boolean"
  7854. }
  7855. },
  7856. "required": [
  7857. "items",
  7858. "total",
  7859. "page",
  7860. "page_size",
  7861. "has_more"
  7862. ]
  7863. },
  7864. "Commissions": {
  7865. "type": "object",
  7866. "properties": {
  7867. "enabled": {
  7868. "type": "boolean"
  7869. },
  7870. "reason": {
  7871. "type": "string"
  7872. },
  7873. "withdrawable_cents": {
  7874. "type": "integer",
  7875. "nullable": true,
  7876. "description": "正式佣金账本当前为0,提现尚未开放;演示模式可为null"
  7877. },
  7878. "pending_cents": {
  7879. "type": "integer",
  7880. "nullable": true,
  7881. "description": "当前代理自己的待结算佣金,单位分;演示模式可为null"
  7882. },
  7883. "total_cents": {
  7884. "type": "integer",
  7885. "nullable": true,
  7886. "description": "当前代理自己的累计计提金额,单位分;演示模式可为null"
  7887. },
  7888. "withdrawn_cents": {
  7889. "type": "integer",
  7890. "nullable": true,
  7891. "description": "正式佣金账本当前为0,提现尚未开放;演示模式可为null"
  7892. },
  7893. "items": {
  7894. "type": "array",
  7895. "items": {
  7896. "type": "object",
  7897. "properties": {
  7898. "id": {
  7899. "type": "integer"
  7900. },
  7901. "customer_name": {
  7902. "type": "string"
  7903. },
  7904. "title": {
  7905. "type": "string"
  7906. },
  7907. "status": {
  7908. "type": "string",
  7909. "enum": [
  7910. "settled",
  7911. "pending",
  7912. "withdrawn",
  7913. "adjustment"
  7914. ]
  7915. },
  7916. "status_text": {
  7917. "type": "string"
  7918. },
  7919. "amount_cents": {
  7920. "type": "integer"
  7921. },
  7922. "created_at": {
  7923. "type": "string"
  7924. }
  7925. },
  7926. "required": [
  7927. "id",
  7928. "customer_name",
  7929. "title",
  7930. "status",
  7931. "status_text",
  7932. "amount_cents",
  7933. "created_at"
  7934. ]
  7935. }
  7936. },
  7937. "demo": {
  7938. "type": "boolean",
  7939. "description": "本地测试展示数据,不可兑现"
  7940. },
  7941. "total": {
  7942. "type": "integer"
  7943. },
  7944. "page": {
  7945. "type": "integer"
  7946. },
  7947. "page_size": {
  7948. "type": "integer"
  7949. },
  7950. "has_more": {
  7951. "type": "boolean"
  7952. }
  7953. },
  7954. "required": [
  7955. "enabled",
  7956. "reason",
  7957. "withdrawable_cents",
  7958. "pending_cents",
  7959. "total_cents",
  7960. "withdrawn_cents",
  7961. "items",
  7962. "total",
  7963. "page",
  7964. "page_size",
  7965. "has_more"
  7966. ]
  7967. },
  7968. "Config": {
  7969. "type": "object",
  7970. "properties": {
  7971. "currency": {
  7972. "type": "string",
  7973. "enum": [
  7974. "CNY"
  7975. ]
  7976. },
  7977. "money_unit": {
  7978. "type": "string",
  7979. "enum": [
  7980. "cent"
  7981. ]
  7982. },
  7983. "timezone": {
  7984. "type": "string",
  7985. "enum": [
  7986. "Asia/Shanghai"
  7987. ]
  7988. },
  7989. "support_phone": {
  7990. "type": "string",
  7991. "nullable": true
  7992. },
  7993. "privacy_url": {
  7994. "type": "string",
  7995. "nullable": true
  7996. },
  7997. "purchase_agreement_url": {
  7998. "type": "string",
  7999. "nullable": true
  8000. },
  8001. "capabilities": {
  8002. "type": "object",
  8003. "properties": {
  8004. "wechat_login": {
  8005. "type": "boolean",
  8006. "description": "以服务器返回值决定是否开放入口"
  8007. },
  8008. "enterprise": {
  8009. "type": "boolean",
  8010. "description": "以服务器返回值决定是否开放入口"
  8011. },
  8012. "driver": {
  8013. "type": "boolean",
  8014. "description": "以服务器返回值决定是否开放入口"
  8015. },
  8016. "agent": {
  8017. "type": "boolean",
  8018. "description": "以服务器返回值决定是否开放入口"
  8019. },
  8020. "payment": {
  8021. "type": "boolean",
  8022. "description": "以服务器返回值决定是否开放入口"
  8023. },
  8024. "balance_payment": {
  8025. "type": "boolean",
  8026. "description": "以服务器返回值决定是否开放入口"
  8027. },
  8028. "commissions": {
  8029. "type": "boolean",
  8030. "description": "以服务器返回值决定是否开放入口"
  8031. },
  8032. "withdrawal": {
  8033. "type": "boolean",
  8034. "description": "以服务器返回值决定是否开放入口"
  8035. },
  8036. "rewards": {
  8037. "type": "boolean",
  8038. "description": "以服务器返回值决定是否开放入口"
  8039. },
  8040. "individual_package_cards": {
  8041. "type": "boolean",
  8042. "description": "以服务器返回值决定是否开放入口"
  8043. },
  8044. "multiple_sites_per_enterprise": {
  8045. "type": "boolean",
  8046. "description": "以服务器返回值决定是否开放入口"
  8047. },
  8048. "device_binding": {
  8049. "type": "boolean",
  8050. "description": "以服务器返回值决定是否开放入口"
  8051. },
  8052. "test_phone_login": {
  8053. "type": "boolean",
  8054. "description": "仅本机测试手机号入口是否启用,非正式短信能力"
  8055. }
  8056. },
  8057. "required": [
  8058. "wechat_login",
  8059. "enterprise",
  8060. "driver",
  8061. "agent",
  8062. "payment",
  8063. "balance_payment",
  8064. "commissions",
  8065. "withdrawal",
  8066. "rewards",
  8067. "individual_package_cards",
  8068. "multiple_sites_per_enterprise",
  8069. "device_binding",
  8070. "test_phone_login"
  8071. ]
  8072. },
  8073. "setup_messages": {
  8074. "type": "object",
  8075. "description": "运营配置指引。能力未开启时给出在 server/.env 写入与重启的步骤;不会泄露密钥或具体配置值",
  8076. "additionalProperties": {
  8077. "type": "object",
  8078. "properties": {
  8079. "action": {
  8080. "type": "string",
  8081. "enum": [
  8082. "configure",
  8083. "optional"
  8084. ]
  8085. },
  8086. "summary": {
  8087. "type": "string"
  8088. },
  8089. "steps": {
  8090. "type": "array",
  8091. "items": {
  8092. "type": "string"
  8093. }
  8094. }
  8095. },
  8096. "required": [
  8097. "action",
  8098. "summary",
  8099. "steps"
  8100. ],
  8101. "additionalProperties": false
  8102. }
  8103. },
  8104. "admin_binding": {
  8105. "type": "object",
  8106. "description": "后台管理员绑定小程序账号流程所需端点与角色清单。仅在 capabilities 指定管理员 ID 上调用",
  8107. "properties": {
  8108. "route_users": {
  8109. "type": "string"
  8110. },
  8111. "route_grants": {
  8112. "type": "string"
  8113. },
  8114. "roles": {
  8115. "type": "array",
  8116. "items": {
  8117. "type": "string",
  8118. "enum": [
  8119. "enterprise_admin",
  8120. "enterprise_member",
  8121. "driver",
  8122. "agent"
  8123. ]
  8124. }
  8125. },
  8126. "note": {
  8127. "type": "string"
  8128. }
  8129. },
  8130. "required": [
  8131. "route_users",
  8132. "route_grants",
  8133. "roles",
  8134. "note"
  8135. ],
  8136. "additionalProperties": false
  8137. }
  8138. },
  8139. "required": [
  8140. "currency",
  8141. "money_unit",
  8142. "timezone",
  8143. "support_phone",
  8144. "privacy_url",
  8145. "purchase_agreement_url",
  8146. "capabilities",
  8147. "setup_messages",
  8148. "admin_binding"
  8149. ]
  8150. },
  8151. "Health": {
  8152. "type": "object",
  8153. "properties": {
  8154. "service": {
  8155. "type": "string",
  8156. "enum": [
  8157. "water-mini-api"
  8158. ]
  8159. },
  8160. "version": {
  8161. "type": "string",
  8162. "enum": [
  8163. "v1"
  8164. ]
  8165. },
  8166. "status": {
  8167. "type": "string",
  8168. "enum": [
  8169. "ok"
  8170. ]
  8171. },
  8172. "capabilities": {
  8173. "type": "object",
  8174. "properties": {
  8175. "login": {
  8176. "type": "boolean",
  8177. "description": "以服务器返回值决定是否开放入口"
  8178. },
  8179. "business": {
  8180. "type": "boolean",
  8181. "description": "以服务器返回值决定是否开放入口"
  8182. },
  8183. "wechat_payment": {
  8184. "type": "boolean",
  8185. "description": "以服务器返回值决定是否开放入口"
  8186. },
  8187. "balance_payment": {
  8188. "type": "boolean",
  8189. "description": "以服务器返回值决定是否开放入口"
  8190. },
  8191. "commissions": {
  8192. "type": "boolean",
  8193. "description": "以服务器返回值决定是否开放入口"
  8194. },
  8195. "withdrawals": {
  8196. "type": "boolean",
  8197. "description": "以服务器返回值决定是否开放入口"
  8198. }
  8199. },
  8200. "required": [
  8201. "login",
  8202. "business",
  8203. "wechat_payment",
  8204. "balance_payment",
  8205. "commissions",
  8206. "withdrawals"
  8207. ]
  8208. }
  8209. },
  8210. "required": [
  8211. "service",
  8212. "version",
  8213. "status",
  8214. "capabilities"
  8215. ]
  8216. },
  8217. "CommandRequest": {
  8218. "type": "object",
  8219. "properties": {
  8220. "request_key": {
  8221. "type": "string",
  8222. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8223. "minLength": 8,
  8224. "maxLength": 80,
  8225. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8226. "example": "mini-20260918-0001"
  8227. }
  8228. },
  8229. "required": [
  8230. "request_key"
  8231. ],
  8232. "additionalProperties": false
  8233. },
  8234. "LoginRequest": {
  8235. "type": "object",
  8236. "properties": {
  8237. "code": {
  8238. "type": "string",
  8239. "description": "wx.login 返回的一次性 code",
  8240. "minLength": 1,
  8241. "maxLength": 512
  8242. }
  8243. },
  8244. "required": [
  8245. "code"
  8246. ],
  8247. "additionalProperties": false
  8248. },
  8249. "AddressRequest": {
  8250. "type": "object",
  8251. "properties": {
  8252. "request_key": {
  8253. "type": "string",
  8254. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8255. "minLength": 8,
  8256. "maxLength": 80,
  8257. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8258. "example": "mini-20260918-0001"
  8259. },
  8260. "revision": {
  8261. "type": "string",
  8262. "description": "GET address 返回的 revision 原样提交",
  8263. "minLength": 1,
  8264. "maxLength": 64
  8265. },
  8266. "address": {
  8267. "type": "string",
  8268. "minLength": 1,
  8269. "maxLength": 255
  8270. },
  8271. "contact": {
  8272. "type": "string",
  8273. "minLength": 1,
  8274. "maxLength": 60
  8275. },
  8276. "phone": {
  8277. "type": "string",
  8278. "description": "7–15位数字;允许前置+、空格、短横线、成对括号。保存时规范化;拒绝掩码和纯符号。格式校验不代表号码已验证",
  8279. "minLength": 7,
  8280. "maxLength": 30,
  8281. "example": "+86 138 1234 5678"
  8282. }
  8283. },
  8284. "required": [
  8285. "request_key",
  8286. "revision",
  8287. "address",
  8288. "contact",
  8289. "phone"
  8290. ],
  8291. "additionalProperties": false
  8292. },
  8293. "BookingRequest": {
  8294. "type": "object",
  8295. "properties": {
  8296. "request_key": {
  8297. "type": "string",
  8298. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8299. "minLength": 8,
  8300. "maxLength": 80,
  8301. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8302. "example": "mini-20260918-0001"
  8303. },
  8304. "sku_id": {
  8305. "type": "integer",
  8306. "format": "int64",
  8307. "description": "正整数资源 ID",
  8308. "minimum": 1,
  8309. "maximum": 2147483647
  8310. },
  8311. "quantity": {
  8312. "type": "integer",
  8313. "format": "int64",
  8314. "minimum": 1,
  8315. "maximum": 10000
  8316. },
  8317. "address_id": {
  8318. "type": "integer",
  8319. "minimum": 0,
  8320. "description": "配送地址 ID;省略或 0 使用默认地址"
  8321. }
  8322. },
  8323. "required": [
  8324. "request_key",
  8325. "sku_id",
  8326. "quantity"
  8327. ],
  8328. "additionalProperties": false
  8329. },
  8330. "QuoteRequest": {
  8331. "type": "object",
  8332. "properties": {
  8333. "items": {
  8334. "type": "array",
  8335. "items": {
  8336. "type": "object",
  8337. "properties": {
  8338. "package_id": {
  8339. "type": "integer",
  8340. "format": "int64",
  8341. "description": "正整数资源 ID",
  8342. "minimum": 1,
  8343. "maximum": 2147483647
  8344. },
  8345. "quantity": {
  8346. "type": "integer",
  8347. "format": "int64",
  8348. "description": "套餐份数",
  8349. "minimum": 1,
  8350. "maximum": 100
  8351. }
  8352. },
  8353. "required": [
  8354. "package_id",
  8355. "quantity"
  8356. ],
  8357. "additionalProperties": false
  8358. },
  8359. "minItems": 1,
  8360. "maxItems": 20,
  8361. "description": "同一套餐不能重复,不能提交客户端单价"
  8362. }
  8363. },
  8364. "required": [
  8365. "items"
  8366. ],
  8367. "additionalProperties": false
  8368. },
  8369. "Invoice": {
  8370. "type": "object",
  8371. "properties": {
  8372. "title": {
  8373. "type": "string",
  8374. "minLength": 1,
  8375. "maxLength": 120
  8376. },
  8377. "tax_number": {
  8378. "type": "string",
  8379. "minLength": 1,
  8380. "maxLength": 30
  8381. },
  8382. "email": {
  8383. "type": "string",
  8384. "format": "email",
  8385. "maxLength": 120
  8386. }
  8387. },
  8388. "required": [
  8389. "title",
  8390. "tax_number",
  8391. "email"
  8392. ],
  8393. "additionalProperties": false
  8394. },
  8395. "CheckoutRequest": {
  8396. "type": "object",
  8397. "properties": {
  8398. "request_key": {
  8399. "type": "string",
  8400. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8401. "minLength": 8,
  8402. "maxLength": 80,
  8403. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8404. "example": "mini-20260918-0001"
  8405. },
  8406. "items": {
  8407. "type": "array",
  8408. "items": {
  8409. "type": "object",
  8410. "properties": {
  8411. "package_id": {
  8412. "type": "integer",
  8413. "format": "int64",
  8414. "description": "正整数资源 ID",
  8415. "minimum": 1,
  8416. "maximum": 2147483647
  8417. },
  8418. "quantity": {
  8419. "type": "integer",
  8420. "format": "int64",
  8421. "description": "套餐份数",
  8422. "minimum": 1,
  8423. "maximum": 100
  8424. }
  8425. },
  8426. "required": [
  8427. "package_id",
  8428. "quantity"
  8429. ],
  8430. "additionalProperties": false
  8431. },
  8432. "minItems": 1,
  8433. "maxItems": 20,
  8434. "description": "同一套餐不能重复,不能提交客户端单价"
  8435. },
  8436. "expected_amount_cents": {
  8437. "type": "integer",
  8438. "format": "int64",
  8439. "description": "人民币整数分",
  8440. "minimum": 0
  8441. },
  8442. "agreement_accepted": {
  8443. "type": "boolean",
  8444. "enum": [
  8445. true
  8446. ]
  8447. },
  8448. "invoice": {
  8449. "type": "object",
  8450. "properties": {
  8451. "title": {
  8452. "type": "string",
  8453. "minLength": 1,
  8454. "maxLength": 120
  8455. },
  8456. "tax_number": {
  8457. "type": "string",
  8458. "minLength": 1,
  8459. "maxLength": 30
  8460. },
  8461. "email": {
  8462. "type": "string",
  8463. "format": "email",
  8464. "maxLength": 120
  8465. }
  8466. },
  8467. "required": [
  8468. "title",
  8469. "tax_number",
  8470. "email"
  8471. ],
  8472. "additionalProperties": false,
  8473. "nullable": true
  8474. },
  8475. "quote_revision": {
  8476. "type": "string",
  8477. "minLength": 64,
  8478. "maxLength": 64,
  8479. "description": "服务器对套餐价格、名称、规格和桶数生成的报价版本;下单原样提交,变更返回40904;兼容旧客户端允许省略,新客户端应提交"
  8480. }
  8481. },
  8482. "required": [
  8483. "request_key",
  8484. "items",
  8485. "expected_amount_cents",
  8486. "agreement_accepted"
  8487. ],
  8488. "additionalProperties": false
  8489. },
  8490. "CheckinRequest": {
  8491. "type": "object",
  8492. "properties": {
  8493. "request_key": {
  8494. "type": "string",
  8495. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8496. "minLength": 8,
  8497. "maxLength": 80,
  8498. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8499. "example": "mini-20260918-0001"
  8500. },
  8501. "latitude": {
  8502. "type": "number",
  8503. "description": "GCJ-02 纬度,须为 JSON 数值",
  8504. "minimum": -90,
  8505. "maximum": 90
  8506. },
  8507. "longitude": {
  8508. "type": "number",
  8509. "description": "GCJ-02 经度,须为 JSON 数值",
  8510. "minimum": -180,
  8511. "maximum": 180
  8512. }
  8513. },
  8514. "required": [
  8515. "request_key",
  8516. "latitude",
  8517. "longitude"
  8518. ],
  8519. "additionalProperties": false
  8520. },
  8521. "PhotoRequest": {
  8522. "type": "object",
  8523. "properties": {
  8524. "request_key": {
  8525. "type": "string",
  8526. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8527. "minLength": 8,
  8528. "maxLength": 80,
  8529. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8530. "example": "mini-20260918-0001"
  8531. },
  8532. "image_base64": {
  8533. "type": "string",
  8534. "description": "纯 base64,无 data: 前缀;JPEG/PNG ≤2MiB,最长边4096、总像素≤800万",
  8535. "maxLength": 2800000
  8536. },
  8537. "latitude": {
  8538. "type": "number",
  8539. "description": "GCJ-02 纬度,须为 JSON 数值",
  8540. "minimum": -90,
  8541. "maximum": 90
  8542. },
  8543. "longitude": {
  8544. "type": "number",
  8545. "description": "GCJ-02 经度,须为 JSON 数值",
  8546. "minimum": -180,
  8547. "maximum": 180
  8548. }
  8549. },
  8550. "required": [
  8551. "request_key",
  8552. "image_base64",
  8553. "latitude",
  8554. "longitude"
  8555. ],
  8556. "additionalProperties": false
  8557. },
  8558. "ExceptionRequest": {
  8559. "type": "object",
  8560. "properties": {
  8561. "request_key": {
  8562. "type": "string",
  8563. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8564. "minLength": 8,
  8565. "maxLength": 80,
  8566. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8567. "example": "mini-20260918-0001"
  8568. },
  8569. "reason": {
  8570. "type": "string",
  8571. "minLength": 1,
  8572. "maxLength": 255
  8573. }
  8574. },
  8575. "required": [
  8576. "request_key",
  8577. "reason"
  8578. ],
  8579. "additionalProperties": false
  8580. },
  8581. "DraftRequest": {
  8582. "type": "object",
  8583. "properties": {
  8584. "request_key": {
  8585. "type": "string",
  8586. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8587. "minLength": 8,
  8588. "maxLength": 80,
  8589. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8590. "example": "mini-20260918-0001"
  8591. },
  8592. "accepted_qty": {
  8593. "type": "integer",
  8594. "format": "int64",
  8595. "description": "0至任务计划桶数",
  8596. "minimum": 0
  8597. },
  8598. "empty_returned": {
  8599. "type": "integer",
  8600. "format": "int64",
  8601. "minimum": 0,
  8602. "maximum": 10000000,
  8603. "default": 0
  8604. },
  8605. "receiver": {
  8606. "type": "string",
  8607. "minLength": 1,
  8608. "maxLength": 60
  8609. },
  8610. "reason": {
  8611. "type": "string",
  8612. "description": "部分/全部拒收时必填",
  8613. "maxLength": 255
  8614. },
  8615. "photo_ids": {
  8616. "type": "array",
  8617. "items": {
  8618. "type": "integer",
  8619. "format": "int64",
  8620. "description": "正整数资源 ID",
  8621. "minimum": 1,
  8622. "maximum": 2147483647
  8623. },
  8624. "maxItems": 4,
  8625. "uniqueItems": true
  8626. },
  8627. "confirmed": {
  8628. "type": "boolean"
  8629. }
  8630. },
  8631. "required": [
  8632. "request_key",
  8633. "accepted_qty",
  8634. "receiver"
  8635. ],
  8636. "additionalProperties": false
  8637. },
  8638. "CompleteRequest": {
  8639. "type": "object",
  8640. "properties": {
  8641. "request_key": {
  8642. "type": "string",
  8643. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8644. "minLength": 8,
  8645. "maxLength": 80,
  8646. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8647. "example": "mini-20260918-0001"
  8648. },
  8649. "accepted_qty": {
  8650. "type": "integer",
  8651. "format": "int64",
  8652. "description": "0至任务计划桶数",
  8653. "minimum": 0
  8654. },
  8655. "empty_returned": {
  8656. "type": "integer",
  8657. "format": "int64",
  8658. "minimum": 0,
  8659. "maximum": 10000000,
  8660. "default": 0
  8661. },
  8662. "receiver": {
  8663. "type": "string",
  8664. "minLength": 1,
  8665. "maxLength": 60
  8666. },
  8667. "reason": {
  8668. "type": "string",
  8669. "description": "部分/全部拒收时必填",
  8670. "maxLength": 255
  8671. },
  8672. "photo_ids": {
  8673. "type": "array",
  8674. "items": {
  8675. "type": "integer",
  8676. "format": "int64",
  8677. "description": "正整数资源 ID",
  8678. "minimum": 1,
  8679. "maximum": 2147483647
  8680. },
  8681. "maxItems": 4,
  8682. "uniqueItems": true,
  8683. "minItems": 1
  8684. },
  8685. "confirmed": {
  8686. "type": "boolean",
  8687. "enum": [
  8688. true
  8689. ]
  8690. }
  8691. },
  8692. "required": [
  8693. "request_key",
  8694. "accepted_qty",
  8695. "receiver",
  8696. "photo_ids",
  8697. "confirmed"
  8698. ],
  8699. "additionalProperties": false
  8700. },
  8701. "CommandResult": {
  8702. "type": "object",
  8703. "properties": {
  8704. "id": {
  8705. "type": "integer",
  8706. "format": "int64",
  8707. "description": "正整数资源 ID",
  8708. "minimum": 1,
  8709. "maximum": 2147483647
  8710. },
  8711. "status": {
  8712. "type": "string",
  8713. "enum": [
  8714. "pending",
  8715. "assigned",
  8716. "transit",
  8717. "completed",
  8718. "cancelled",
  8719. "returning",
  8720. "returned"
  8721. ]
  8722. },
  8723. "replayed": {
  8724. "type": "boolean",
  8725. "description": "可能仅有 id/replayed,无 status;需要当前状态时重新取详情"
  8726. }
  8727. },
  8728. "required": [
  8729. "id"
  8730. ]
  8731. },
  8732. "AddressResult": {
  8733. "type": "object",
  8734. "properties": {
  8735. "id": {
  8736. "type": "integer",
  8737. "format": "int64",
  8738. "description": "正整数资源 ID",
  8739. "minimum": 1,
  8740. "maximum": 2147483647
  8741. },
  8742. "revision": {
  8743. "type": "string"
  8744. },
  8745. "replayed": {
  8746. "type": "boolean"
  8747. }
  8748. },
  8749. "required": [
  8750. "id",
  8751. "revision"
  8752. ]
  8753. },
  8754. "CheckinResult": {
  8755. "type": "object",
  8756. "properties": {
  8757. "id": {
  8758. "type": "integer",
  8759. "format": "int64",
  8760. "description": "正整数资源 ID",
  8761. "minimum": 1,
  8762. "maximum": 2147483647
  8763. },
  8764. "checked_in": {
  8765. "type": "boolean"
  8766. },
  8767. "location_verified": {
  8768. "type": "boolean"
  8769. },
  8770. "replayed": {
  8771. "type": "boolean"
  8772. }
  8773. },
  8774. "required": [
  8775. "id",
  8776. "checked_in",
  8777. "location_verified"
  8778. ]
  8779. },
  8780. "DraftResult": {
  8781. "type": "object",
  8782. "properties": {
  8783. "id": {
  8784. "type": "integer",
  8785. "format": "int64",
  8786. "description": "正整数资源 ID",
  8787. "minimum": 1,
  8788. "maximum": 2147483647
  8789. },
  8790. "saved": {
  8791. "type": "boolean"
  8792. },
  8793. "replayed": {
  8794. "type": "boolean"
  8795. }
  8796. },
  8797. "required": [
  8798. "id",
  8799. "saved"
  8800. ]
  8801. },
  8802. "ExceptionResult": {
  8803. "type": "object",
  8804. "properties": {
  8805. "id": {
  8806. "type": "integer",
  8807. "format": "int64",
  8808. "description": "正整数资源 ID",
  8809. "minimum": 1,
  8810. "maximum": 2147483647
  8811. },
  8812. "reported": {
  8813. "type": "boolean"
  8814. },
  8815. "status": {
  8816. "type": "string",
  8817. "enum": [
  8818. "pending",
  8819. "assigned",
  8820. "transit",
  8821. "completed",
  8822. "cancelled",
  8823. "returning",
  8824. "returned"
  8825. ]
  8826. },
  8827. "replayed": {
  8828. "type": "boolean"
  8829. }
  8830. },
  8831. "required": [
  8832. "id",
  8833. "reported",
  8834. "status"
  8835. ]
  8836. },
  8837. "PhotoResult": {
  8838. "type": "object",
  8839. "properties": {
  8840. "id": {
  8841. "type": "integer",
  8842. "format": "int64",
  8843. "description": "正整数资源 ID",
  8844. "minimum": 1,
  8845. "maximum": 2147483647
  8846. },
  8847. "delivery_id": {
  8848. "type": "integer",
  8849. "format": "int64",
  8850. "description": "正整数资源 ID",
  8851. "minimum": 1,
  8852. "maximum": 2147483647
  8853. },
  8854. "location_verified": {
  8855. "type": "boolean"
  8856. },
  8857. "watermark": {
  8858. "type": "string",
  8859. "enum": [
  8860. "server_time_and_client_location"
  8861. ]
  8862. },
  8863. "replayed": {
  8864. "type": "boolean"
  8865. }
  8866. },
  8867. "required": [
  8868. "id",
  8869. "delivery_id",
  8870. "location_verified",
  8871. "watermark"
  8872. ]
  8873. },
  8874. "PayRequest": {
  8875. "type": "object",
  8876. "properties": {
  8877. "request_key": {
  8878. "type": "string",
  8879. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8880. "minLength": 8,
  8881. "maxLength": 80,
  8882. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8883. "example": "mini-20260918-0001"
  8884. },
  8885. "payment_method": {
  8886. "type": "string",
  8887. "enum": [
  8888. "balance",
  8889. "wechat"
  8890. ],
  8891. "description": "balance 已开通;wechat 预留"
  8892. }
  8893. },
  8894. "required": [
  8895. "request_key",
  8896. "payment_method"
  8897. ],
  8898. "additionalProperties": false
  8899. },
  8900. "DeliveryAddress": {
  8901. "type": "object",
  8902. "properties": {
  8903. "id": {
  8904. "type": "integer",
  8905. "format": "int64",
  8906. "description": "配送地址 ID;0 表示尚未建立独立地址档案的企业主地址",
  8907. "minimum": 0,
  8908. "maximum": 2147483647
  8909. },
  8910. "name": {
  8911. "type": "string"
  8912. },
  8913. "contact": {
  8914. "type": "string"
  8915. },
  8916. "phone": {
  8917. "type": "string",
  8918. "description": "脱敏电话;无号码为空串,无法识别的历史格式返回 ****"
  8919. },
  8920. "address": {
  8921. "type": "string"
  8922. },
  8923. "region": {
  8924. "type": "string"
  8925. },
  8926. "longitude": {
  8927. "type": "number",
  8928. "nullable": true
  8929. },
  8930. "latitude": {
  8931. "type": "number",
  8932. "nullable": true
  8933. },
  8934. "employee_count": {
  8935. "type": "integer",
  8936. "format": "int64",
  8937. "nullable": true
  8938. },
  8939. "revision": {
  8940. "type": "string",
  8941. "description": "编辑地址时原样提交的版本",
  8942. "minLength": 64,
  8943. "maxLength": 64
  8944. },
  8945. "enterprise_id": {
  8946. "type": "integer",
  8947. "minimum": 1
  8948. },
  8949. "label": {
  8950. "type": "string"
  8951. },
  8952. "is_default": {
  8953. "type": "boolean"
  8954. },
  8955. "status": {
  8956. "type": "integer"
  8957. }
  8958. },
  8959. "required": [
  8960. "id",
  8961. "name",
  8962. "contact",
  8963. "phone",
  8964. "address",
  8965. "region",
  8966. "longitude",
  8967. "latitude",
  8968. "employee_count",
  8969. "revision",
  8970. "enterprise_id",
  8971. "label",
  8972. "is_default",
  8973. "status"
  8974. ]
  8975. },
  8976. "DeliveryAddressUpdate": {
  8977. "type": "object",
  8978. "properties": {
  8979. "request_key": {
  8980. "type": "string",
  8981. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  8982. "minLength": 8,
  8983. "maxLength": 80,
  8984. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  8985. "example": "mini-20260918-0001"
  8986. },
  8987. "revision": {
  8988. "type": "string",
  8989. "description": "修改时原样提交配送地址详情的 revision",
  8990. "minLength": 1,
  8991. "maxLength": 64
  8992. },
  8993. "address": {
  8994. "type": "string",
  8995. "minLength": 1,
  8996. "maxLength": 255
  8997. },
  8998. "contact": {
  8999. "type": "string",
  9000. "minLength": 1,
  9001. "maxLength": 60
  9002. },
  9003. "phone": {
  9004. "type": "string",
  9005. "description": "7–15位数字;允许前置+、空格、短横线、成对括号。保存时规范化;拒绝掩码和纯符号。格式校验不代表号码已验证",
  9006. "minLength": 7,
  9007. "maxLength": 30,
  9008. "example": "+86 138 1234 5678"
  9009. },
  9010. "label": {
  9011. "type": "string",
  9012. "maxLength": 80
  9013. },
  9014. "region": {
  9015. "type": "string",
  9016. "maxLength": 80
  9017. },
  9018. "longitude": {
  9019. "type": "number",
  9020. "minimum": -180,
  9021. "maximum": 180
  9022. },
  9023. "latitude": {
  9024. "type": "number",
  9025. "minimum": -90,
  9026. "maximum": 90
  9027. },
  9028. "is_default": {
  9029. "type": "boolean"
  9030. }
  9031. },
  9032. "required": [
  9033. "request_key",
  9034. "revision",
  9035. "address",
  9036. "contact",
  9037. "phone"
  9038. ],
  9039. "additionalProperties": false
  9040. },
  9041. "DeliveryAddressCreate": {
  9042. "type": "object",
  9043. "properties": {
  9044. "request_key": {
  9045. "type": "string",
  9046. "description": "同一次提交及网络重试使用同一 key 和原始请求内容;修改内容必须生成新 key",
  9047. "minLength": 8,
  9048. "maxLength": 80,
  9049. "pattern": "^[A-Za-z0-9_-]{8,80}$",
  9050. "example": "mini-20260918-0001"
  9051. },
  9052. "address": {
  9053. "type": "string",
  9054. "minLength": 1,
  9055. "maxLength": 255
  9056. },
  9057. "contact": {
  9058. "type": "string",
  9059. "minLength": 1,
  9060. "maxLength": 60
  9061. },
  9062. "phone": {
  9063. "type": "string",
  9064. "description": "7–15位数字;允许前置+、空格、短横线、成对括号。保存时规范化;拒绝掩码和纯符号。格式校验不代表号码已验证",
  9065. "minLength": 7,
  9066. "maxLength": 30,
  9067. "example": "+86 138 1234 5678"
  9068. },
  9069. "label": {
  9070. "type": "string",
  9071. "maxLength": 80
  9072. },
  9073. "region": {
  9074. "type": "string",
  9075. "maxLength": 80
  9076. },
  9077. "longitude": {
  9078. "type": "number",
  9079. "minimum": -180,
  9080. "maximum": 180
  9081. },
  9082. "latitude": {
  9083. "type": "number",
  9084. "minimum": -90,
  9085. "maximum": 90
  9086. },
  9087. "is_default": {
  9088. "type": "boolean"
  9089. }
  9090. },
  9091. "required": [
  9092. "request_key",
  9093. "address",
  9094. "contact",
  9095. "phone"
  9096. ],
  9097. "additionalProperties": false
  9098. },
  9099. "DeliveryAddressResult": {
  9100. "type": "object",
  9101. "properties": {
  9102. "id": {
  9103. "type": "integer",
  9104. "minimum": 1
  9105. },
  9106. "revision": {
  9107. "type": "string"
  9108. },
  9109. "is_default": {
  9110. "type": "boolean"
  9111. },
  9112. "replayed": {
  9113. "type": "boolean"
  9114. }
  9115. },
  9116. "required": [
  9117. "id",
  9118. "is_default"
  9119. ]
  9120. },
  9121. "PromotionPolicy": {
  9122. "type": "object",
  9123. "properties": {
  9124. "initialized": {
  9125. "type": "boolean"
  9126. },
  9127. "enabled": {
  9128. "type": "boolean"
  9129. },
  9130. "sku_id": {
  9131. "type": "integer",
  9132. "nullable": true
  9133. },
  9134. "sku_name": {
  9135. "type": "string",
  9136. "nullable": true
  9137. },
  9138. "quantity": {
  9139. "type": "integer"
  9140. },
  9141. "min_amount_cents": {
  9142. "type": "integer"
  9143. },
  9144. "revision": {
  9145. "type": "integer"
  9146. },
  9147. "rules": {
  9148. "type": "string"
  9149. }
  9150. },
  9151. "required": [
  9152. "initialized",
  9153. "enabled",
  9154. "sku_id",
  9155. "sku_name",
  9156. "quantity",
  9157. "min_amount_cents",
  9158. "revision",
  9159. "rules"
  9160. ]
  9161. },
  9162. "PromotionRecord": {
  9163. "type": "object",
  9164. "properties": {
  9165. "id": {
  9166. "type": "integer"
  9167. },
  9168. "inviter_name": {
  9169. "type": "string"
  9170. },
  9171. "enterprise_name": {
  9172. "type": "string"
  9173. },
  9174. "sku_name": {
  9175. "type": "string"
  9176. },
  9177. "quantity": {
  9178. "type": "integer"
  9179. },
  9180. "status": {
  9181. "type": "string",
  9182. "enum": [
  9183. "bound",
  9184. "pending",
  9185. "issued",
  9186. "rejected"
  9187. ]
  9188. },
  9189. "status_text": {
  9190. "type": "string"
  9191. },
  9192. "order_id": {
  9193. "type": "integer",
  9194. "nullable": true
  9195. },
  9196. "reference": {
  9197. "type": "string",
  9198. "nullable": true
  9199. },
  9200. "amount_cents": {
  9201. "type": "integer",
  9202. "nullable": true
  9203. },
  9204. "created_at": {
  9205. "type": "string"
  9206. },
  9207. "qualified_at": {
  9208. "type": "string",
  9209. "nullable": true
  9210. },
  9211. "reviewed_at": {
  9212. "type": "string",
  9213. "nullable": true
  9214. },
  9215. "review_note": {
  9216. "type": "string"
  9217. },
  9218. "delivery_id": {
  9219. "type": "integer",
  9220. "nullable": true
  9221. },
  9222. "revision": {
  9223. "type": "integer"
  9224. }
  9225. },
  9226. "required": [
  9227. "id",
  9228. "inviter_name",
  9229. "enterprise_name",
  9230. "sku_name",
  9231. "quantity",
  9232. "status",
  9233. "status_text",
  9234. "order_id",
  9235. "reference",
  9236. "amount_cents",
  9237. "created_at",
  9238. "qualified_at",
  9239. "reviewed_at",
  9240. "review_note",
  9241. "delivery_id",
  9242. "revision"
  9243. ]
  9244. },
  9245. "PromotionCodeRequest": {
  9246. "type": "object",
  9247. "properties": {
  9248. "request_key": {
  9249. "type": "string",
  9250. "minLength": 8,
  9251. "maxLength": 80,
  9252. "pattern": "^[A-Za-z0-9_-]{8,80}$"
  9253. }
  9254. },
  9255. "required": [
  9256. "request_key"
  9257. ]
  9258. },
  9259. "PromotionBindRequest": {
  9260. "type": "object",
  9261. "properties": {
  9262. "request_key": {
  9263. "type": "string",
  9264. "minLength": 8,
  9265. "maxLength": 80,
  9266. "pattern": "^[A-Za-z0-9_-]{8,80}$"
  9267. },
  9268. "invite_code": {
  9269. "type": "string",
  9270. "pattern": "^[A-Fa-f0-9]{20}$"
  9271. }
  9272. },
  9273. "required": [
  9274. "request_key",
  9275. "invite_code"
  9276. ]
  9277. },
  9278. "PromotionCodeResult": {
  9279. "type": "object",
  9280. "properties": {
  9281. "invite_code": {
  9282. "type": "string",
  9283. "pattern": "^[A-F0-9]{20}$"
  9284. },
  9285. "replayed": {
  9286. "type": "boolean"
  9287. }
  9288. },
  9289. "required": [
  9290. "invite_code"
  9291. ]
  9292. }
  9293. },
  9294. "responses": {
  9295. "Error": {
  9296. "description": "失败。根据HTTP状态与code分支;40101登录过期,40301业务权限不足,40901幂等/版本冲突,40902状态冲突,40904价格变化,42201参数错误,50301登录未配置,50302外部服务暂不可用,50303能力未开通;data可能为null。",
  9297. "content": {
  9298. "application/json": {
  9299. "schema": {
  9300. "$ref": "#/components/schemas/Error"
  9301. },
  9302. "example": {
  9303. "code": 42201,
  9304. "message": "参数校验失败",
  9305. "data": {
  9306. "fields": {
  9307. "phone": "请填写完整有效的联系电话"
  9308. }
  9309. },
  9310. "request_id": "0123456789abcdef0123456789abcdef"
  9311. }
  9312. }
  9313. }
  9314. }
  9315. }
  9316. }
  9317. }