Get Flat Locations List
curl --request GET \
--url 'https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true' \
--header 'x-client-key: <api-key>' \
--header 'x-client-secret: <api-key>'import requests
url = "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true"
headers = {
"x-client-key": "<api-key>",
"x-client-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-client-key': '<api-key>', 'x-client-secret': '<api-key>'}
};
fetch('https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-client-key: <api-key>",
"x-client-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-client-key", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true")
.header("x-client-key", "<api-key>")
.header("x-client-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-client-key"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "8099a742-c9bb-40a7-976e-1963a07e77b6",
"HotelId": "cb363f7e-c52a-4478-911d-f6a6f791090e",
"name": "Testing 1",
"description": "",
"avatar": {
"color": "#B2DFDB"
},
"ParentId": "2f169333-21f1-4197-8cac-cd0860a83515",
"LevelId": null,
"slugCode": "testing-1",
"isQREnable": false,
"locationNumber": 226,
"attachments": [],
"deletedTimestamp": "0",
"CreatedBy": "dfea8b8a-5b22-4668-b68d-dc641eb3a101",
"UpdatedBy": "dfea8b8a-5b22-4668-b68d-dc641eb3a101",
"DeletedBy": null,
"timezone": "Asia/Karachi",
"coordinates": {
"type": "Point",
"coordinates": [
null,
null
]
},
"address": null,
"createdAt": "2025-06-18T11:39:28.164Z",
"updatedAt": "2025-06-18T11:39:28.164Z",
"deletedAt": null,
"Members": [
{
"photo": "https://cdn.xenia.team/00158aa1-f9d0-4b68-ba11-6dee2ce89aa1/2024/1/16/12218415/a-137917-d-ae-2-a-4-baf-8-b-40-4914-c-697-e-6-f-8.jpg",
"fullName": "Full User (China)",
"id": "e25dd448-7ae7-4588-8767-7e1a316547e5",
"firstName": "Full User",
"lastName": "(China)",
"emailId": "nihad2@yopmail.com",
"phoneNo": "+923345020366",
"deletedAt": null,
"timezone": "Asia/Karachi",
"RoleId": "4ccf0b65-fb99-40da-92d6-3f98730df8b2",
"defaultLocationId": "a13ddb59-3e5c-4bdd-8673-fc913b93b9db",
"type": "user"
}
],
"Level": null,
"assetCount": 0
}
],
"extra_meta": {
"message": ""
}
}Locations
Get Locations - No Sub Locations Hierarchy
Fetches all locations for a given workspace as a flat array by using notree=true query param. Useful for dropdowns, filters, or simple listings.
GET
/
api
/
v1
/
mgt
/
workspaces
/
{workspaceId}
/
locations?notree=true
Get Flat Locations List
curl --request GET \
--url 'https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true' \
--header 'x-client-key: <api-key>' \
--header 'x-client-secret: <api-key>'import requests
url = "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true"
headers = {
"x-client-key": "<api-key>",
"x-client-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-client-key': '<api-key>', 'x-client-secret': '<api-key>'}
};
fetch('https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-client-key: <api-key>",
"x-client-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-client-key", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true")
.header("x-client-key", "<api-key>")
.header("x-client-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.xenia.team/api/v1/mgt/workspaces/{workspaceId}/locations?notree=true")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-client-key"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "8099a742-c9bb-40a7-976e-1963a07e77b6",
"HotelId": "cb363f7e-c52a-4478-911d-f6a6f791090e",
"name": "Testing 1",
"description": "",
"avatar": {
"color": "#B2DFDB"
},
"ParentId": "2f169333-21f1-4197-8cac-cd0860a83515",
"LevelId": null,
"slugCode": "testing-1",
"isQREnable": false,
"locationNumber": 226,
"attachments": [],
"deletedTimestamp": "0",
"CreatedBy": "dfea8b8a-5b22-4668-b68d-dc641eb3a101",
"UpdatedBy": "dfea8b8a-5b22-4668-b68d-dc641eb3a101",
"DeletedBy": null,
"timezone": "Asia/Karachi",
"coordinates": {
"type": "Point",
"coordinates": [
null,
null
]
},
"address": null,
"createdAt": "2025-06-18T11:39:28.164Z",
"updatedAt": "2025-06-18T11:39:28.164Z",
"deletedAt": null,
"Members": [
{
"photo": "https://cdn.xenia.team/00158aa1-f9d0-4b68-ba11-6dee2ce89aa1/2024/1/16/12218415/a-137917-d-ae-2-a-4-baf-8-b-40-4914-c-697-e-6-f-8.jpg",
"fullName": "Full User (China)",
"id": "e25dd448-7ae7-4588-8767-7e1a316547e5",
"firstName": "Full User",
"lastName": "(China)",
"emailId": "nihad2@yopmail.com",
"phoneNo": "+923345020366",
"deletedAt": null,
"timezone": "Asia/Karachi",
"RoleId": "4ccf0b65-fb99-40da-92d6-3f98730df8b2",
"defaultLocationId": "a13ddb59-3e5c-4bdd-8673-fc913b93b9db",
"type": "user"
}
],
"Level": null,
"assetCount": 0
}
],
"extra_meta": {
"message": ""
}
}⌘I