---
title: "Retrieve vehicles by group."
url: "https://developers.vzconnect.com/apis/vehicle-api-v1/versions/3941fe83-a6d1-4bef-90e3-c94cadaf0d4d/operations/getVehiclesByGroup"
---

> Full API specification: https://developers.vzconnect.com/apis/vehicle-api-v1/versions/3941fe83-a6d1-4bef-90e3-c94cadaf0d4d.md

# Retrieve vehicles by group.

`GET` `/cmd/v1/vehicles/group/{groupid}`

Operation ID: `getVehiclesByGroup`

Retrieve all vehicles associated with the given Group ID. Results include Vehicle Number and other relevant vehicle details. Multiple vehicles can be returned per Group ID since groups can contain multiple vehicles within REVEAL.

## Path parameters

- `groupid` (string, required) - The Group ID; the unique identifier assigned when creating and modifying groups within REVEAL's Admin section.

## Responses

- `200` - Successfully retrieved vehicles for the group.
- `204` - No vehicles found in the specified group.
- `400` - Bad request.
- `401` - Unauthorized. Authentication credentials are missing or invalid.
- `500` - Internal server error.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Vehicle API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /cmd/v1/vehicles/group/{groupid}:
    get:
      summary: Retrieve vehicles by group.
      description: Retrieve all vehicles associated with the given Group ID. Results
        include Vehicle Number and other relevant vehicle details. Multiple
        vehicles can be returned per Group ID since groups can contain multiple
        vehicles within REVEAL.
      operationId: getVehiclesByGroup
      tags:
        - Vehicle API
      parameters:
        - name: groupid
          in: path
          required: true
          description: The Group ID; the unique identifier assigned when creating and
            modifying groups within REVEAL's Admin section.
          schema:
            type: string
            example: "12345"
      responses:
        "200":
          description: Successfully retrieved vehicles for the group.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/VehicleByGroup"
              example:
                - Name: Ed's Car - 4641114658
                  VehicleNumber: "4641114658"
                  RegistrationNumber: RegNumber 196213
                  ESN: "890001"
                  FuelType: 1
                  FleetItemId: 81b66e37-3ceb-46a8-96ca-ce31d8d1e070
                - Name: Ed's Car - 4641063665
                  VehicleNumber: "4641063665"
                  RegistrationNumber: RegNumber 196214
                  ESN: "890002"
                  FuelType: 1
                  FleetItemId: fed67894-1619-408c-8135-655f069259f9
        "204":
          description: No vehicles found in the specified group.
          content:
            application/json: {}
        "400":
          description: Bad request.
          content:
            application/json: {}
        "401":
          description: Unauthorized. Authentication credentials are missing or invalid.
          content:
            application/json: {}
        "500":
          description: Internal server error.
          content:
            application/json: {}
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/cmd/v1/vehicles/group/[^/]+/?$
components:
  schemas:
    VehicleByGroup:
      type: object
      description: A vehicle record as returned by the GET Vehicles by Group ID method.
      properties:
        Name:
          type: string
          description: The Vehicle Name as recorded within the REVEAL vehicle profile.
          example: Ed's Car - 4641114658
        VehicleNumber:
          type: string
          description: The Vehicle Number is the unique identifier within the API. Not
            mandatory within the REVEAL account, but required for the API.
          example: "4641114658"
        RegistrationNumber:
          type: string
          description: Registration Number is not required within the REVEAL profile. When
            provided it must be unique within the account.
          example: RegNumber 196213
        ESN:
          type: string
          description: ESN is used to uniquely identify a vehicle from another. It is a
            mandatory field for vehicle creation in Reveal.
          example: "890001"
        FuelType:
          type: integer
          description: "The Fuel Type of the vehicle. 0: Not set, 1: Unleaded, 2: Diesel,
            3: Electric."
          enum:
            - 0
            - 1
            - 2
            - 3
          example: 1
        FleetItemId:
          type: string
          format: uuid
          description: The unique identifier of the fleet item (vehicle). This is the
            preferred identifier moving forward and will eventually replace
            vehicleId.
          example: 81b66e37-3ceb-46a8-96ca-ce31d8d1e070
```
