---
title: "Update the primary group for a vehicle."
url: "https://developers.vzconnect.com/apis/vehicle-api-v1/versions/3941fe83-a6d1-4bef-90e3-c94cadaf0d4d/operations/updateVehiclePrimaryGroup"
---

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

# Update the primary group for a vehicle.

`PUT` `/cmd/v1/vehicles/{vehiclenumber}/primarygroup`

Operation ID: `updateVehiclePrimaryGroup`

Update a vehicle's primary group. If the Vehicle Number is currently assigned to a primary group, the vehicle will be updated to reflect the Group ID provided. The PrimaryGroupId is the Group ID assigned when creating and modifying groups within REVEAL's Admin section.

## Path parameters

- `vehiclenumber` (string, required) - The Vehicle Number; the unique identifier used to reference the vehicle within the API.

## Request body

Content types: `application/json`

## Responses

- `204` - Primary group successfully updated.
- `400` - Bad request. The request body is invalid.
- `401` - Unauthorized. Authentication credentials are missing or invalid.
- `404` - The Vehicle Number (or other unique identifier used for the call) was not found.
- `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/{vehiclenumber}/primarygroup:
    put:
      summary: Update the primary group for a vehicle.
      description: Update a vehicle's primary group. If the Vehicle Number is
        currently assigned to a primary group, the vehicle will be updated to
        reflect the Group ID provided. The PrimaryGroupId is the Group ID
        assigned when creating and modifying groups within REVEAL's Admin
        section.
      operationId: updateVehiclePrimaryGroup
      tags:
        - Vehicle API
      parameters:
        - name: vehiclenumber
          in: path
          required: true
          description: The Vehicle Number; the unique identifier used to reference the
            vehicle within the API.
          schema:
            type: string
            example: "890001"
      requestBody:
        description: New primary group assignment details.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PrimaryGroupUpdateRequest"
            example:
              PrimaryGroupId: "12345"
      responses:
        "204":
          description: Primary group successfully updated.
          content:
            application/json: {}
        "400":
          description: Bad request. The request body is invalid.
          content:
            application/json: {}
        "401":
          description: Unauthorized. Authentication credentials are missing or invalid.
          content:
            application/json: {}
        "404":
          description: The Vehicle Number (or other unique identifier used for the call)
            was not found.
        "500":
          description: Internal server error.
          content:
            application/json: {}
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/cmd/v1/vehicles/[^/]+/primarygroup/?$
components:
  schemas:
    PrimaryGroupUpdateRequest:
      type: object
      description: Request body to update a vehicle's primary group.
      required:
        - PrimaryGroupId
      properties:
        PrimaryGroupId:
          type: string
          description: The Group ID that corresponds to the Primary Group the vehicle is
            being added to. This is the unique identifier assigned when creating
            and modifying groups within REVEAL's Admin section.
          example: "12345"
```
