---
title: "Get location tree"
method: GET
path: "/locations/tree"
tags: ["Location"]
---

# Get location tree

`GET /locations/tree`

Get location hierarchical tree.

## Query parameters

- `parentId` integer
- `expandChildren` boolean

## Response `200`

OK

- XiqLocation[]
  - `id` integer, required — The unique identifier
  - `create_time` string, date-time, required — The create time in UTC (ISO 8601 format)
  - `update_time` string, date-time, required — The last update time in UTC (ISO 8601 format)
  - `org_id` integer — The organization identifier, valid when enabling HIQ feature
  - `parent_id` integer — The parent location ID
  - `name` string, required — The location name
  - `unique_name` string, required — The unique location name
  - `type` string, required — The location type
  - `address` string — The address for the location
  - `children` XiqLocation[] — The child locations

---

[API](https://skmtc.net/extremecloudiq/apis/extremecloud-iq-api.md) · [All operations](https://skmtc.net/extremecloudiq/apis/extremecloud-iq-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/extremecloudiq/extremecloud-iq-api/versions/5ff7ab84e8e8/schema)
