Fleet Search (Connect API)
GET /api/fleets/search finds fleet vehicles near a latitude and longitude. The Connect API service sends the search to core and then adds verification and audit-badge data. It can also filter results by those fields.
This endpoint is not the same as Fleet Search on core (
GET https://core.grdd.net/api/search/fleet). Differences:- It runs on the Connect API service, not on core.
- It needs
latandlon. It does not acceptairports. - It rejects unknown parameters.
- It adds
verified,interstate, andintrastatefilters. - It adds verification and badge fields to each item.
- It returns Connect API problem errors, not core’s
{"success": false, "message": ...}errors.
Base URL
The Connect API base URL is not published in these docs. Ask GRiDD support (support@grdd.net) for the Connect API base URL for your environment. The examples use a shell variable:Endpoint
GET $CONNECT_API_BASE_URL/api/fleets/search
Authentication
Send a token that core issued. See the Get Token API.GET /api/search/fleet as a Bearer token. Core’s rules for that endpoint therefore also apply to your request. This includes the page-size rule for accounts below the Professional plan. See Fleet Search on core.
Query parameters
lat and lon are required. The service rejects any parameter that is not in this table with 400. Each parameter can occur only once.
The boolean parameters accept only the text
true or false. If you send interstate=true and intrastate=true, an item matches if its badge is gold or blue.
How the filters work
- Core handles
lat,lon,types,q,radius_km,limit, andoffset. - The Connect API service handles
verified,interstate, andintrastate. It does not send them to core. - When you use one of these three filters, the service asks core for a large first page (at least 1000 items, from offset
0). It filters that page and then applies youroffsetandlimititself.totalis the number of items left after filtering. - Core still limits its own page size: to
100, or to20for accounts below the Professional plan. These filters can only see the items that core returns, so they can miss matches that are beyond that page.
Example request
Success response
200 - OK The body has the same envelope as core’s Fleet Search:data.items (array), data.total (integer), and data.warnings (array). It does not fix the fields of each item. Each item is an item from core’s Fleet Search. The service changes it as follows:
- If an item has photo fields, it normalizes them and puts the photo URL in
imageUrl. - It adds
verificationDate(a number, ornull),isVerified(boolean),auditBadge("gold","blue", ornull), andauditBadgePlus(boolean).
griddid.
200 with success: false
If core answers with a body that is not a successful fleet search, the service returns 200 with a failure body:
message is core’s message when core sent one. Check success on every response.
Error responses
Errors use theapplication/problem+json content type. The body has code, message, correlationId, and retryable. fieldErrors appears when it applies.
The service can also return
500 with internal_error for an unexpected failure.