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

# List Locations with External IDs

> Flat list of the workspace's non-deleted locations. Compared with the general [Locations API](/api-reference/endpoints/locations/get-locations), this response is deliberately narrow — placement columns plus your `externalId`, with no members, assets, or nesting — so it is cheap to poll from a sync job.

Requires the **Public API** and **Location Attributes** workspace features plus `CAN_MANAGE_LOCATIONS`.



## OpenAPI

````yaml GET /api/v1/mgt/enterprise/workspaces/{workspaceId}/locations
openapi: 3.1.0
info:
  title: Xenia Team API - List Locations with External IDs
  description: >-
    Returns every active location in the workspace as a flat list with its
    placement columns and the `external_id` your system supplied (or `null`).
    This is the reconciliation read for the Enterprise Location API — call it to
    confirm what Xenia stored after an upsert, and to resolve the ids you need
    for parents and levels.
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/enterprise/workspaces/{workspaceId}/locations:
    get:
      tags:
        - Enterprise Locations
      summary: List Locations with External IDs
      description: >-
        Flat list of the workspace's non-deleted locations. Compared with the
        general [Locations
        API](/api-reference/endpoints/locations/get-locations), this response is
        deliberately narrow — placement columns plus your `externalId`, with no
        members, assets, or nesting — so it is cheap to poll from a sync job.


        Requires the **Public API** and **Location Attributes** workspace
        features plus `CAN_MANAGE_LOCATIONS`.
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: >-
            UUID of the workspace. Must be the workspace your API key is bound
            to.
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Locations with their mapped external ids.
          content:
            application/json:
              example:
                data:
                  - id: 2f169333-21f1-4197-8cac-cd0860a83515
                    name: Southwest District 3
                    description: null
                    LocationHierarchyId: 9c2a1b7e-4d3f-4a11-9c88-2f0e5a6b1c34
                    ParentId: null
                    LevelId: 5b6c7d8e-9f01-4a2b-8c3d-4e5f6a7b8c9d
                    locationNumber: 240
                    externalId: DISTRICT-SW-3
                  - id: 8099a742-c9bb-40a7-976e-1963a07e77b6
                    name: Store 1042 - Rosedale
                    description: null
                    LocationHierarchyId: 9c2a1b7e-4d3f-4a11-9c88-2f0e5a6b1c34
                    ParentId: 2f169333-21f1-4197-8cac-cd0860a83515
                    LevelId: 6c7d8e9f-0a12-4b3c-8d4e-5f6a7b8c9d0e
                    locationNumber: 241
                    externalId: STORE-1042
                extra_meta:
                  message: ''
        '401':
          description: >-
            Unauthorized - invalid client credentials, or the `workspaceId` in
            the path is not the workspace your key is bound to (`Client does not
            belong to this workspace`).
        '403':
          description: >-
            Forbidden - route not allow-listed for API keys, missing
            `CAN_MANAGE_LOCATIONS`, or the **Public API** / **Location
            Attributes** feature is not enabled for the workspace.
        '422':
          description: Unprocessable Entity - `workspaceId` is not a UUID.
        '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

````