> ## 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 Sub-Locations

> Returns one page of sub-locations with their type, site and attribute values, plus the `externalId`s you mapped to each. Attribute values are keyed by attribute `key`; select values hold option ids (resolve labels with List Sub-Location Types).

Results are ordered stably. Page through with `offset` until a page returns fewer than `limit` rows.

Requires the **Public API** workspace feature, `CAN_MANAGE_LOCATIONS`, and **Sub-Locations** enabled for the workspace (contact Xenia to enable it; until then every sub-location endpoint returns `404`).



## OpenAPI

````yaml GET /api/v1/mgt/enterprise/workspaces/{workspaceId}/sub-locations
openapi: 3.1.0
info:
  title: Xenia Team API - List Sub-Locations
  description: >-
    Returns one page of sub-locations with their type, site and attribute
    values, plus the `externalId`s you mapped to each. Attribute values are
    keyed by attribute `key`; select values hold option ids (resolve labels with
    List Sub-Location Types).
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/enterprise/workspaces/{workspaceId}/sub-locations:
    get:
      tags:
        - Enterprise Sub-Locations
      summary: List Sub-Locations
      description: >-
        Returns one page of sub-locations with their type, site and attribute
        values, plus the `externalId`s you mapped to each. Attribute values are
        keyed by attribute `key`; select values hold option ids (resolve labels
        with List Sub-Location Types).


        Results are ordered stably. Page through with `offset` until a page
        returns fewer than `limit` rows.


        Requires the **Public API** workspace feature, `CAN_MANAGE_LOCATIONS`,
        and **Sub-Locations** enabled for the workspace (contact Xenia to enable
        it; until then every sub-location endpoint returns `404`).
      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
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 2000
            default: 500
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        '200':
          description: One page of sub-locations.
          content:
            application/json:
              example:
                data:
                  - id: 54fd6d64-4e76-4c9e-8171-f1a4f1c95bf9
                    externalId: STORE-001-FRIDGE-1
                    name: Fridge 1
                    status: active
                    archived: false
                    type:
                      id: 5ea865b5-1503-4cc4-975d-101ecf67a5e4
                      externalId: FRIDGE
                    location:
                      id: 33333333-3333-4333-8333-333333333331
                      externalId: STORE-001
                    attributeValues:
                      zone:
                        type: single_select
                        selected: 2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e
                      capacity:
                        type: number
                        value: 40
                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 - missing `CAN_MANAGE_LOCATIONS`, or the **Public API**
            feature is not enabled for the workspace.
        '404':
          description: Not Found - Sub-Locations is not enabled for this workspace.
        '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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.