curl --request GET \
--url https://api.myhamlet.com/v1/locations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.myhamlet.com/v1/locations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.myhamlet.com/v1/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.myhamlet.com/v1/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 => [
"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://api.myhamlet.com/v1/locations"
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://api.myhamlet.com/v1/locations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myhamlet.com/v1/locations")
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{
"data": [
{
"uuid": "5f2b0c3a-1d4e-4a8b-9f6d-2a1c3e4b5d6f",
"type": "CITY",
"name": "Palo Alto",
"state_name": "California",
"state_abbreviation": "CA",
"county_names": [
"Santa Clara"
],
"created_at": "2025-01-10T00:00:00.000Z",
"updated_at": "2026-05-01T18:22:10.000Z"
}
],
"next_cursor": "eyJ1IjoiMjAyNi0wNS0wMSAxODoyMjoxMCIsImkiOjQyfQ"
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found."
}
}List locations
Returns a cursor-paginated list of the locations your API key is entitled to, ordered by last update (oldest first) so you can sync incrementally. Page forward by passing the previous response’s next_cursor as cursor. Pass updated_since to return only locations changed at or after that time; it composes with the cursor.
curl --request GET \
--url https://api.myhamlet.com/v1/locations \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.myhamlet.com/v1/locations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.myhamlet.com/v1/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.myhamlet.com/v1/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 => [
"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://api.myhamlet.com/v1/locations"
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://api.myhamlet.com/v1/locations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.myhamlet.com/v1/locations")
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{
"data": [
{
"uuid": "5f2b0c3a-1d4e-4a8b-9f6d-2a1c3e4b5d6f",
"type": "CITY",
"name": "Palo Alto",
"state_name": "California",
"state_abbreviation": "CA",
"county_names": [
"Santa Clara"
],
"created_at": "2025-01-10T00:00:00.000Z",
"updated_at": "2026-05-01T18:22:10.000Z"
}
],
"next_cursor": "eyJ1IjoiMjAyNi0wNS0wMSAxODoyMjoxMCIsImkiOjQyfQ"
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found."
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Maximum number of items to return per page.
1 <= x <= 10050
Opaque pagination cursor from a previous response's next_cursor. Omit for the first page.
"eyJ1IjoiMjAyNi0wNS0wMSAxODoyMjoxMCIsImkiOjQyfQ"
Inclusive lower bound on updated_at (ISO-8601 with a UTC Z or numeric offset, e.g. 2026-05-01T18:22:10Z). Returns only records changed at or after this time, ordered and paged exactly like a normal request — pass it alongside cursor to sync incrementally. A malformed or offset-less timestamp returns 400.
"2026-05-01T18:22:10Z"