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

# Update Location Group

> Update an existing location group. Partial updates allowed. Requires `CAN_MANAGE_LOCATIONS` permission.



## OpenAPI

````yaml PATCH /api/v1/mgt/workspaces/{workspaceId}/location-groups/{locationGroupId}
openapi: 3.1.0
info:
  title: Xenia API - Update Location Group
  version: 1.0.0
  description: >-
    Updates a location group by name, description, or locations for a given
    workspace.
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/workspaces/{workspaceId}/location-groups/{locationGroupId}:
    patch:
      tags:
        - Location Groups
      summary: Update Location Group
      description: >-
        Update an existing location group. Partial updates allowed. Requires
        `CAN_MANAGE_LOCATIONS` permission.
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID of the workspace.
        - name: locationGroupId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: ID of the location group to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  nullable: true
                  description: New name for the location group
                description:
                  type: string
                  nullable: true
                  description: New description for the location group
                Locations:
                  type: array
                  description: List of Location UUIDs to assign
                  items:
                    type: string
                    format: uuid
                  nullable: true
            example:
              name: location test group - edit
              description: location test group name
              Locations:
                - a13ddb59-3e5c-4bdd-8673-fc913b93b9db
                - 1d5ceb29-ab86-4138-ad7f-b8290b1771f5
                - 32e77f06-6cb1-4657-9310-1f4dcd902850
                - b9164b03-60c2-4500-89a4-f490e38c9872
      responses:
        '200':
          description: Location group updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/LocationGroupWithLocations'
                  meta:
                    type: object
        '400':
          description: Bad Request - Invalid input data.
        '401':
          description: Unauthorized - Missing or invalid authentication.
        '403':
          description: Forbidden - Insufficient permissions to update location group.
        '404':
          description: Not Found - Location group does not exist.
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  schemas:
    LocationGroupWithLocations:
      type: object
      properties:
        id:
          type: string
          format: uuid
        WorkspaceId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
        CreatedBy:
          type: string
          format: uuid
        UpdatedBy:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        Creator:
          type: object
          properties:
            id:
              type: string
              format: uuid
            firstName:
              type: string
            lastName:
              type: string
        LocationGroupLocations:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              WorkspaceId:
                type: string
                format: uuid
              LocationId:
                type: string
                format: uuid
              LocationGroupId:
                type: string
                format: uuid
              CreatedBy:
                type: string
                format: uuid
              UpdatedBy:
                type: string
                format: uuid
              createdAt:
                type: string
                format: date-time
              updatedAt:
                type: string
                format: date-time
              deletedAt:
                type: string
                nullable: true
              Location:
                $ref: '#/components/schemas/LocationDetails'
    LocationDetails:
      type: object
      properties:
        id:
          type: string
          format: uuid
        HotelId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
        avatar:
          type: object
          properties:
            color:
              type: string
        ParentId:
          type: string
          format: uuid
          nullable: true
        LevelId:
          type: string
          format: uuid
          nullable: true
        slugCode:
          type: string
        isQREnable:
          type: boolean
        locationNumber:
          type: integer
        attachments:
          type: array
          items: {}
        deletedTimestamp:
          type: string
        CreatedBy:
          type: string
          format: uuid
        UpdatedBy:
          type: string
          format: uuid
        DeletedBy:
          type: string
          format: uuid
          nullable: true
        timezone:
          type: string
        coordinates:
          type: object
          properties:
            type:
              type: string
            coordinates:
              type: array
              items:
                type:
                  - number
                  - 'null'
              minItems: 2
              maxItems: 2
        address:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
        Members:
          type: array
          items:
            type: object
            properties:
              photo:
                type: string
              fullName:
                type: string
              id:
                type: string
                format: uuid
              firstName:
                type: string
              lastName:
                type: string
              emailId:
                type: string
              phoneNo:
                type: string
                nullable: true
              deletedAt:
                type: string
                nullable: true
              timezone:
                type: string
              RoleId:
                type: string
                format: uuid
              defaultLocationId:
                type: string
                format: uuid
                nullable: true
              type:
                type: string
        Level:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            title:
              type: string
            isSite:
              type: boolean
        Sublocations:
          type: array
          items: {}
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````