> ## Documentation Index
> Fetch the complete documentation index at: https://docs.connectedfleet.michelin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Updates Group

> Based on body, endpoint updates existing group. Following properties can be updated: node name, persons and vehicles assigned to group, parent of group / node. If update run successfully it returns 200 with updated Group. Else if node has not been found it returns 400. Else if newly selected name for group is already taken or new parent group is one of the direct / indirect descendants it returns 409 - Conflict



## OpenAPI

````yaml /api-reference/fleet-management.json put /public/v1/customer/{customerId}/group
openapi: 3.0.1
info:
  title: Fleet management
  description: >-
    A comprehensive administration pack enabling full control over fleet
    structures, users, drivers, vehicles and operational data.
  contact:
    name: Masternaut
    url: https://www.masternaut.com
    email: support@masternautconnect.com
  version: 124.0.2607160821
servers:
  - url: https://api.masternautconnect.com/connect-webservices/services
    description: Product Server
security:
  - basicAuth: []
tags:
  - name: /driver
    description: Driver Operations
  - name: /group
    description: Group operations
  - name: /location/category
    description: Location category management operations
  - name: /location
    description: Location management operations
  - name: /role
    description: Role operations
  - name: /tokenInformation
    description: Token operations
  - name: /user
    description: User operations
  - name: /maintenance
    description: Vehicle maintenance operations
  - name: /vehicle
    description: Vehicle management operations
paths:
  /public/v1/customer/{customerId}/group:
    put:
      tags:
        - /group
      summary: Updates Group
      description: >-
        Based on body, endpoint updates existing group. Following properties can
        be updated: node name, persons and vehicles assigned to group, parent of
        group / node. If update run successfully it returns 200 with updated
        Group. Else if node has not been found it returns 400. Else if newly
        selected name for group is already taken or new parent group is one of
        the direct / indirect descendants it returns 409 - Conflict
      operationId: updateGroup
      parameters:
        - name: customerId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/GroupDto'
      responses:
        '200':
          description: Updated group.
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/GroupDto'
        '400':
          description: >-
            Bad request. When id is incorrect and group is not visible to user
            or is blank or doesn't fit for selected size.

            When name doesn't fit for selected size.

            When parentId is not visible to user

            When personIds or vehicleIds are not visible to user
          content:
            application/json;charset=UTF-8:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiErrorDto'
        '409':
          description: >-
            Conflict message, when group name is already taken by another group
            or when parentId is ID of group which is currently one of group
            descendants.
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: '#/components/schemas/ApiErrorDto'
components:
  schemas:
    GroupDto:
      required:
        - id
      type: object
      properties:
        id:
          maxLength: 24
          minLength: 1
          pattern: ^[a-z0-9]+$
          type: string
          description: ID of group
          example: groupID
        name:
          maxLength: 255
          minLength: 0
          type: string
          description: Group name
          example: group-name
        parentId:
          type: string
          description: ID of parent group, in case for changing the hierarchy
          example: rootGroupId
        path:
          type: string
          description: Hierarchy path from root group
          readOnly: true
          example: rootGroupId.groupID
        vehicleIds:
          type: array
          items:
            type: string
            description: List of Vehicle IDs to assign for concrete group
            example: '["vehicleID1","vehicleID2"]'
        personIds:
          type: array
          items:
            type: string
            description: List of Person IDs to assign for concrete group
            example: '["personID1","personID2"]'
    ApiErrorDto:
      type: object
      properties:
        errorCode:
          type: integer
          format: int32
        errorMessage:
          type: string
        offendingFields:
          type: array
          items:
            type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````