> ## 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-Location Types

> Returns every sub-location type in the workspace with its attribute definitions and the `externalId` you mapped to each type and attribute (or `null`). Use it to reconcile your own ids and to look up attribute `key`s and option ids.

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-location-types
openapi: 3.1.0
info:
  title: Xenia Team API - List Sub-Location Types
  description: >-
    Returns every sub-location type in the workspace with its attribute
    definitions and the `externalId` you mapped to each type and attribute (or
    `null`). Use it to reconcile your own ids and to look up attribute `key`s
    and option ids.
  version: 1.0.0
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/enterprise/workspaces/{workspaceId}/sub-location-types:
    get:
      tags:
        - Enterprise Sub-Locations
      summary: List Sub-Location Types
      description: >-
        Returns every sub-location type in the workspace with its attribute
        definitions and the `externalId` you mapped to each type and attribute
        (or `null`). Use it to reconcile your own ids and to look up attribute
        `key`s and option ids.


        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
      responses:
        '200':
          description: All sub-location types, ordered by name.
          content:
            application/json:
              example:
                data:
                  - id: 5ea865b5-1503-4cc4-975d-101ecf67a5e4
                    externalId: FRIDGE
                    name: Fridge
                    status: active
                    attributes:
                      - id: 8b1d2c3e-4f50-4a61-8b72-93a4b5c6d7e8
                        externalId: ZONE
                        key: zone
                        name: Zone
                        type: single_select
                        options:
                          - id: 1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d
                            label: Front
                            color: '#7C5CFC'
                          - id: 2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e
                            label: Back
                            color: '#22B8CF'
                        isRequired: false
                      - id: 9c2e3d4f-5061-4b72-9c83-a4b5c6d7e8f9
                        externalId: CAPACITY
                        key: capacity
                        name: Capacity
                        type: number
                        options: []
                        isRequired: false
                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.