Skip to main content
A fleet is a vehicle category that your company offers, for example “Airport Sedan”. A fleet has a type, capacity, rates, images and, optionally, linked vehicles and documents. Read Connect API conventions first. It explains the base URL, authentication, 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 in packages/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 the Service credential of the public website renderer.
  • POST /api/fleets/vehicles and DELETE /api/fleets/vehicles are a retired route. They always return 503 temporarily_unavailable with the message “Vehicle relationship operations are not available”. To link vehicles, use the vehicles field 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 with 403 entitlement_denied. An active trial passes. If the plan cannot be determined, the API returns 503 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 has verificationRevoked: true when that happens. If the verification state cannot be changed safely, the API returns 409 verification_guard (retryable: true).

Fleet fields

Read record

Write body

All write bodies are strict. Unknown keys, such as id, 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: null and extra_photos: [] clear the images.
  • documentIds: null or [] clears the document links. If you omit documentIds, the links stay.
  • vehicles is the full set of vehicle links. An empty list removes all links. If you omit vehicles, the links stay. The API checks that every vehicle ID belongs to your company.
Delete (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, global or your company ID, or
  • the first path segment is fleet, fleets or profile and the second is your company ID.
Another URL returns 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":
The save response has 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

Response 200. The record below is the fixture fleet-list.json:
The list has no pagination parameters. 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 the stored version is newer than If-Match, the response is 412:

Delete a fleet

  • 204 No Content when the delete is complete.
  • 202 when the fleet record is deleted but follow-up work is not finished. The body is the fixture fleet-delete-pending.json (see Pending operations).
Resume a pending operation with POST /api/fleets/operations/{operationId}. The fixture fleet-operation.json shows a response that is still pending:

Errors

Error bodies use the problem format. These codes come from the fleet routes.