Idempotency-Key, If-Match, pending operations and the error format. This page uses $CONNECT_API_BASE_URL for the base URL. Ask GRiDD support (support@grdd.net) for the Connect API base URL for your environment.
What is available
The Connect API README describes Fleets and Vehicles as complete production implementations in code. The route handlers validate requests and responses with the contracts inpackages/api-contracts. This page describes those contracts. It does not say that a given environment serves them.
Endpoints
Owner routes
These routes act on the company in your token.PATCH and DELETE for a fleet do not read an Idempotency-Key header. They use If-Match to prevent duplicate or stale changes.
Other owner routes
These routes use the same authentication. This page does not describe their request and response bodies in full.Read another company’s published fleets
The response has
items, and can have meta, lockedCount and lockedSlugs. Each item is a reduced record. It has no document IDs, no vehicle links and no verification data. The API leaves out inactive fleets, and fleets with private or unlisted visibility. It returns gnet fleets to any signed-in caller. It returns partners fleets only if core confirms that you are a partner of the company. If core cannot confirm the partnership, the API does not return them. A fleet with no stored visibility value is treated as visible.
Not for external use
GET /api/fleets/published/{griddid}uses theServicecredential of the public website renderer.POST /api/fleets/vehiclesandDELETE /api/fleets/vehiclesare a retired route. They always return503 temporarily_unavailablewith the message “Vehicle relationship operations are not available”. To link vehicles, use thevehiclesfield of a fleet, or/api/vehicles/links.
Authentication and access
- Send
Authorization: Bearer YOUR_ACCESS_TOKEN. See Authentication. - The owner routes do not check a role in the token.
- Subscription. Creating a fleet checks your subscription, and so does changing an inactive fleet to
active. In the subscription contract in source, no plan has a numeric limit for fleets. The check refuses a cancelled subscription with403 entitlement_denied. An active trial passes. If the plan cannot be determined, the API returns503 temporarily_unavailable. Updates and deletes do not count against a limit. - Verification. Changing the fleet
type, or deleting the fleet, revokes its reservation verification first. The save response hasverificationRevoked: truewhen that happens. If the verification state cannot be changed safely, the API returns409 verification_guard(retryable: true).
Fleet fields
Read record
Write body
All write bodies are strict. Unknown keys, such asid, griddid or version, return 400 invalid_request.
Create (POST /api/fleets):
Fields in
fleet:
Update (
PATCH /api/fleets/{fleetId}): the same shape. fleet can hold any subset of the fields above, and none is required. contentLanguage must be update_version or add_version. Send If-Match.
- If you omit a field, the API does not change it.
image_url: nullandextra_photos: []clear the images.documentIds: nullor[]clears the document links. If you omitdocumentIds, the links stay.vehiclesis the full set of vehicle links. An empty list removes all links. If you omitvehicles, the links stay. The API checks that every vehicle ID belongs to your company.
DELETE /api/fleets/{fleetId}): send If-Match. Optional query locale and languageVersion.
Image rules
In addition to the general image URL rules, a fleet image URL must belong to your company:- the host is
asset.grdd.dev, or - the first path segment is
shared,globalor your company ID, or - the first path segment is
fleet,fleetsorprofileand the second is your company ID.
403 forbidden. A rule violation, such as a duplicate gallery URL, returns 422 domain_rejected with fieldErrors for image_url or extra_photos.
Create a fleet
201 Created with the header ETag: "v1":
data, invalidated, verificationRevoked and status. It can also have operationId and effects. status is completed, pending or partial. A pending result returns 202. See Pending operations.
Read fleets
200. The record below is the fixture fleet-list.json:
GET /api/fleets/42 (or /api/fleets/airport-sedan) returns one fleet and an ETag. A fleet that does not exist for your company returns 404 not_found.
Update a fleet
200 OK with the header ETag: "v2". This is the fixture fleet-patch-response.json:
If-Match, the response is 412:
Delete a fleet
204 No Contentwhen the delete is complete.202when the fleet record is deleted but follow-up work is not finished. The body is the fixturefleet-delete-pending.json(see Pending operations).
POST /api/fleets/operations/{operationId}. The fixture fleet-operation.json shows a response that is still pending: