List Sub-Locations
curl --request GET \
--url https://api.xenia.team/api/v1/mgt/enterprise/workspaces/{workspaceId}/sub-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}/sub-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}/sub-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}/sub-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}/sub-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}/sub-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}/sub-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": "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": ""
}
}Enterprise Sub-Locations
List Sub-Locations
Returns one page of sub-locations with their type, site and attribute values, plus the externalIds 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).
GET
/
api
/
v1
/
mgt
/
enterprise
/
workspaces
/
{workspaceId}
/
sub-locations
List Sub-Locations
curl --request GET \
--url https://api.xenia.team/api/v1/mgt/enterprise/workspaces/{workspaceId}/sub-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}/sub-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}/sub-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}/sub-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}/sub-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}/sub-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}/sub-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": "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": ""
}
}Path Parameters
UUID of the workspace. Must be the workspace your API key is bound to.
Query Parameters
Required range:
1 <= x <= 2000Required range:
x >= 0Response
One page of sub-locations.