Get a list of locations
curl --request GET \
--url https://app.variable.global/api/v1/location \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.variable.global/api/v1/location"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.variable.global/api/v1/location', 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://app.variable.global/api/v1/location",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.variable.global/api/v1/location"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.variable.global/api/v1/location")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.variable.global/api/v1/location")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 1500,
"page": 1,
"pageSize": 100,
"data": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Tokyo factory",
"type": "factory",
"owner": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Name"
},
"address1": "1-1 Marunouchi",
"address2": "<string>",
"postCode": "100-0005",
"city": "Tokyo",
"state": "<string>",
"country": "Japan",
"geoLocation": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"googleMapsId": "ChIJA4UGSG_xNIgRNBuiWqEV-Y0",
"name": "Syracuse, NY, USA",
"countryCode": "US",
"latitude": 43.0481,
"longitude": -76.1474,
"locationType": "APPROXIMATE"
}
}
]
}{
"message": "token expired"
}Location
List Locations
List the locations your company owns
GET
/
v1
/
location
Get a list of locations
curl --request GET \
--url https://app.variable.global/api/v1/location \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.variable.global/api/v1/location"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.variable.global/api/v1/location', 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://app.variable.global/api/v1/location",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://app.variable.global/api/v1/location"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.variable.global/api/v1/location")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.variable.global/api/v1/location")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"count": 1500,
"page": 1,
"pageSize": 100,
"data": [
{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Tokyo factory",
"type": "factory",
"owner": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Name"
},
"address1": "1-1 Marunouchi",
"address2": "<string>",
"postCode": "100-0005",
"city": "Tokyo",
"state": "<string>",
"country": "Japan",
"geoLocation": {
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"googleMapsId": "ChIJA4UGSG_xNIgRNBuiWqEV-Y0",
"name": "Syracuse, NY, USA",
"countryCode": "US",
"latitude": 43.0481,
"longitude": -76.1474,
"locationType": "APPROXIMATE"
}
}
]
}{
"message": "token expired"
}Requires permission:
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by site type
Available options:
factory, warehouse, office, port, other Filter by owning company uuid (your own company or an unclaimed supplier of yours)
Limit the number of results
Example:
100
The page number
Example:
1
⌘I