feat(platform): add vehicle service API

This commit is contained in:
lingniu
2026-07-04 01:43:26 +08:00
parent 5000d5cd1c
commit 8e800f795c
5 changed files with 37 additions and 9 deletions

View File

@@ -35,18 +35,20 @@ The platform is vehicle-first. Query APIs should accept `keyword` as the user-fa
The BFF resolves `keyword` through vehicle identity data before querying realtime, history, RAW, or mileage data. `vin` remains accepted as a compatibility alias on data query APIs, but new UI and integrations should send `keyword`.
If a keyword cannot be resolved to a VIN, data APIs must not fabricate a VIN. They should return empty result pages for vehicle data, while `/api/vehicles/detail` exposes `lookupResolved=false` and quality issues for follow-up binding work.
If a keyword cannot be resolved to a VIN, data APIs must not fabricate a VIN. They should return empty result pages for vehicle data, while `/api/vehicle-service` exposes `lookupResolved=false` and quality issues for follow-up binding work.
## Core Query APIs
### Vehicle Detail
### Vehicle Service
```http
GET /api/vehicles/detail?keyword=AG18312
GET /api/vehicle-service?keyword=AG18312
```
Returns one vehicle service view with identity, realtime summary, source coverage, history preview, RAW preview, mileage preview, and quality issues.
`/api/vehicles/detail` remains available as a compatibility alias. New UI and integrations should use `/api/vehicle-service` to make the vehicle-first boundary explicit.
### Realtime Vehicles
```http