> ## 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.

# Get Location Groups

> Returns all location groups for a given workspace, along with associated locations and metadata.



## OpenAPI

````yaml GET /api/v1/mgt/workspaces/{workspaceId}/location-groups
openapi: 3.1.0
info:
  title: Xenia Team API - Get Location Groups
  description: >-
    Fetches all location groups for a given workspace. Each location group
    includes a list of associated locations.
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/workspaces/{workspaceId}/location-groups:
    get:
      tags:
        - Location Groups
      summary: Get Location Groups
      description: >-
        Returns all location groups for a given workspace, along with associated
        locations and metadata.
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: UUID of the workspace.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Location groups retrieved successfully.
          content:
            application/json:
              example:
                data:
                  - id: 6d94241f-46cf-405b-a781-37facbfcce9c
                    WorkspaceId: cb363f7e-c52a-4478-911d-f6a6f791090e
                    name: location test group - edit
                    description: location test group name
                    CreatedBy: dfea8b8a-5b22-4668-b68d-dc641eb3a101
                    UpdatedBy: dfea8b8a-5b22-4668-b68d-dc641eb3a101
                    createdAt: '2025-06-23T07:34:26.175Z'
                    updatedAt: '2025-06-23T09:15:01.746Z'
                    Creator:
                      id: dfea8b8a-5b22-4668-b68d-dc641eb3a101
                      firstName: Admin
                      lastName: (Karachi)
                    LocationGroupLocations:
                      - id: ef43545a-c2a2-4735-b346-55d7c117b089
                        WorkspaceId: cb363f7e-c52a-4478-911d-f6a6f791090e
                        LocationId: 1d5ceb29-ab86-4138-ad7f-b8290b1771f5
                        LocationGroupId: 6d94241f-46cf-405b-a781-37facbfcce9c
                        CreatedBy: dfea8b8a-5b22-4668-b68d-dc641eb3a101
                        UpdatedBy: dfea8b8a-5b22-4668-b68d-dc641eb3a101
                        createdAt: '2025-06-23T07:34:26.183Z'
                        updatedAt: '2025-06-23T07:34:26.183Z'
                        deletedAt: null
                        Location:
                          id: 1d5ceb29-ab86-4138-ad7f-b8290b1771f5
                          HotelId: cb363f7e-c52a-4478-911d-f6a6f791090e
                          name: No time (Site)
                          description: null
                          avatar:
                            color: '#B3E5FC'
                          ParentId: null
                          LevelId: 98329f39-e263-484d-8fa7-e951fcddb9c1
                          slugCode: no-time-site
                          isQREnable: false
                          locationNumber: 166
                          attachments: []
                          deletedTimestamp: '0'
                          CreatedBy: dfea8b8a-5b22-4668-b68d-dc641eb3a101
                          UpdatedBy: e25dd448-7ae7-4588-8767-7e1a316547e5
                          DeletedBy: null
                          timezone: America/New_York
                          coordinates:
                            type: Point
                            coordinates:
                              - -73.6239838
                              - 44.6974132
                          address: 43 Park Row, Cadyville, New York
                          createdAt: '2024-12-23T08:34:15.842Z'
                          updatedAt: '2025-06-17T06:44:29.216Z'
                          deletedAt: null
                meta: {}
        '400':
          description: Bad Request - Invalid workspace ID format.
        '401':
          description: Unauthorized - Missing or invalid authentication.
        '403':
          description: Forbidden - Insufficient permissions to access location groups.
        '404':
          description: Not Found - Workspace does not exist.
        '500':
          description: Internal Server Error.
      security:
        - clientKey: []
          clientSecret: []
components:
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret

````