curl --request POST \
--url https://www.closient.com/brands/api/v1/brands/{id}/locations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "100 Main Street",
"city": "Portland",
"country": "United States",
"is_headquarters": true,
"name": "Head office",
"postal_code": "97201",
"state_province": "OR"
}
'import requests
url = "https://www.closient.com/brands/api/v1/brands/{id}/locations"
payload = {
"address": "100 Main Street",
"city": "Portland",
"country": "United States",
"is_headquarters": True,
"name": "Head office",
"postal_code": "97201",
"state_province": "OR"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '100 Main Street',
city: 'Portland',
country: 'United States',
is_headquarters: true,
name: 'Head office',
postal_code: '97201',
state_province: 'OR'
})
};
fetch('https://www.closient.com/brands/api/v1/brands/{id}/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://www.closient.com/brands/api/v1/brands/{id}/locations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '100 Main Street',
'city' => 'Portland',
'country' => 'United States',
'is_headquarters' => true,
'name' => 'Head office',
'postal_code' => '97201',
'state_province' => 'OR'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/brands/api/v1/brands/{id}/locations"
payload := strings.NewReader("{\n \"address\": \"100 Main Street\",\n \"city\": \"Portland\",\n \"country\": \"United States\",\n \"is_headquarters\": true,\n \"name\": \"Head office\",\n \"postal_code\": \"97201\",\n \"state_province\": \"OR\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.closient.com/brands/api/v1/brands/{id}/locations")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"100 Main Street\",\n \"city\": \"Portland\",\n \"country\": \"United States\",\n \"is_headquarters\": true,\n \"name\": \"Head office\",\n \"postal_code\": \"97201\",\n \"state_province\": \"OR\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/brands/api/v1/brands/{id}/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"100 Main Street\",\n \"city\": \"Portland\",\n \"country\": \"United States\",\n \"is_headquarters\": true,\n \"name\": \"Head office\",\n \"postal_code\": \"97201\",\n \"state_province\": \"OR\"\n}"
response = http.request(request)
puts response.read_body{
"address": "100 Main Street",
"city": "Portland",
"country": "United States",
"created": "2026-06-01T09:00:00Z",
"id": "cD4eF6gH8jK2mN3pQ5rS7t",
"is_headquarters": true,
"modified": "2026-06-19T14:30:00Z",
"name": "Head office",
"postal_code": "97201",
"state_province": "OR"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Add a brand location
Add a physical location to the brand. Marking it the headquarters clears the flag on the previous one. Requires the Owner, Manager or Editor role on the organization that owns the brand; a read-only key is refused with 403.
curl --request POST \
--url https://www.closient.com/brands/api/v1/brands/{id}/locations \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "100 Main Street",
"city": "Portland",
"country": "United States",
"is_headquarters": true,
"name": "Head office",
"postal_code": "97201",
"state_province": "OR"
}
'import requests
url = "https://www.closient.com/brands/api/v1/brands/{id}/locations"
payload = {
"address": "100 Main Street",
"city": "Portland",
"country": "United States",
"is_headquarters": True,
"name": "Head office",
"postal_code": "97201",
"state_province": "OR"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '100 Main Street',
city: 'Portland',
country: 'United States',
is_headquarters: true,
name: 'Head office',
postal_code: '97201',
state_province: 'OR'
})
};
fetch('https://www.closient.com/brands/api/v1/brands/{id}/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://www.closient.com/brands/api/v1/brands/{id}/locations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '100 Main Street',
'city' => 'Portland',
'country' => 'United States',
'is_headquarters' => true,
'name' => 'Head office',
'postal_code' => '97201',
'state_province' => 'OR'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.closient.com/brands/api/v1/brands/{id}/locations"
payload := strings.NewReader("{\n \"address\": \"100 Main Street\",\n \"city\": \"Portland\",\n \"country\": \"United States\",\n \"is_headquarters\": true,\n \"name\": \"Head office\",\n \"postal_code\": \"97201\",\n \"state_province\": \"OR\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.closient.com/brands/api/v1/brands/{id}/locations")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"100 Main Street\",\n \"city\": \"Portland\",\n \"country\": \"United States\",\n \"is_headquarters\": true,\n \"name\": \"Head office\",\n \"postal_code\": \"97201\",\n \"state_province\": \"OR\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/brands/api/v1/brands/{id}/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"100 Main Street\",\n \"city\": \"Portland\",\n \"country\": \"United States\",\n \"is_headquarters\": true,\n \"name\": \"Head office\",\n \"postal_code\": \"97201\",\n \"state_province\": \"OR\"\n}"
response = http.request(request)
puts response.read_body{
"address": "100 Main Street",
"city": "Portland",
"country": "United States",
"created": "2026-06-01T09:00:00Z",
"id": "cD4eF6gH8jK2mN3pQ5rS7t",
"is_headquarters": true,
"modified": "2026-06-19T14:30:00Z",
"name": "Head office",
"postal_code": "97201",
"state_province": "OR"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}{
"detail": "The requested resource was not found.",
"error_code": "not_found",
"retryable": false,
"status": 404,
"timestamp": "2026-03-31T12:00:00+00:00",
"title": "Not Found",
"type": "https://closient.com/docs/errors/not_found"
}Authorizations
Path Parameters
URL-safe brand identifier.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Body
Payload to add a location to a brand. The same fields as the dashboard's location form.
Name of the location (1 to 255 characters).
1 - 255^[^\x00]{1,255}$Street address (at least 1 character).
1 - 2000^[^\x00]{1,}$City (1 to 100 characters).
1 - 100^[^\x00]{1,100}$Postal or ZIP code (1 to 20 characters).
1 - 20^[^\x00]{1,20}$Country (1 to 100 characters).
1 - 100^[^\x00]{1,100}$State or province, up to 100 characters; empty when not applicable.
100^[^\x00]{0,100}$Make this the brand's headquarters, clearing the flag on any other location.
Response
Created
One physical location of a brand.
Identifier of the location.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Name of the location, such as 'Head office' or 'Bakery'.
Street address.
City.
State or province; empty when not applicable.
Postal or ZIP code.
Country, as the brand writes it.
Whether this is the brand's headquarters. At most one is.
ISO-8601 creation timestamp.
ISO-8601 last-modified timestamp.