List Locations with External IDs
curl --request GET \
--url https://api.xenia.team/api/v1/mgt/enterprise/workspaces/{workspaceId}/locations \
--header 'x-client-key: <api-key>' \
--header 'x-client-secret: <api-key>'import requests
url = "https://api.xenia.team/api/v1/mgt/enterprise/workspaces/{workspaceId}/locations"
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/enterprise/workspaces/{workspaceId}/locations', 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/enterprise/workspaces/{workspaceId}/locations",
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/enterprise/workspaces/{workspaceId}/locations"
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/enterprise/workspaces/{workspaceId}/locations")
.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/enterprise/workspaces/{workspaceId}/locations")
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": "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": ""
}
}Enterprise Locations
List Locations with External IDs
Flat list of the workspace’s non-deleted locations. Compared with the general Locations API, 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.
GET
/
api
/
v1
/
mgt
/
enterprise
/
workspaces
/
{workspaceId}
/
locations
List Locations with External IDs
curl --request GET \
--url https://api.xenia.team/api/v1/mgt/enterprise/workspaces/{workspaceId}/locations \
--header 'x-client-key: <api-key>' \
--header 'x-client-secret: <api-key>'import requests
url = "https://api.xenia.team/api/v1/mgt/enterprise/workspaces/{workspaceId}/locations"
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/enterprise/workspaces/{workspaceId}/locations', 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/enterprise/workspaces/{workspaceId}/locations",
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/enterprise/workspaces/{workspaceId}/locations"
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/enterprise/workspaces/{workspaceId}/locations")
.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/enterprise/workspaces/{workspaceId}/locations")
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": "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": ""
}
}⌘I