water-mini-v1.json 265 KB

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