curl --request PATCH \
--url https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"is_headquarters": true,
"postal_code": "97205"
}
'import requests
url = "https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id}"
payload = {
"is_headquarters": True,
"postal_code": "97205"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_headquarters: true, postal_code: '97205'})
};
fetch('https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id}', 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/{location_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'is_headquarters' => true,
'postal_code' => '97205'
]),
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/{location_id}"
payload := strings.NewReader("{\n \"is_headquarters\": true,\n \"postal_code\": \"97205\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"is_headquarters\": true,\n \"postal_code\": \"97205\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_headquarters\": true,\n \"postal_code\": \"97205\"\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"
}Update a brand location
Change a brand location. Send only the fields you are changing; null is refused with 422. Requires the Owner, Manager or Editor role; a read-only key is refused with 403.
curl --request PATCH \
--url https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"is_headquarters": true,
"postal_code": "97205"
}
'import requests
url = "https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id}"
payload = {
"is_headquarters": True,
"postal_code": "97205"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_headquarters: true, postal_code: '97205'})
};
fetch('https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id}', 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/{location_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'is_headquarters' => true,
'postal_code' => '97205'
]),
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/{location_id}"
payload := strings.NewReader("{\n \"is_headquarters\": true,\n \"postal_code\": \"97205\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"is_headquarters\": true,\n \"postal_code\": \"97205\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.closient.com/brands/api/v1/brands/{id}/locations/{location_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_headquarters\": true,\n \"postal_code\": \"97205\"\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}$Identifier of the location, as listed.
22^[23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{22}$Body
Payload to change a brand location: send only the fields you are changing.
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}$State or province, up to 100 characters; empty when not applicable.
100^[^\x00]{0,100}$Postal or ZIP code (1 to 20 characters).
1 - 20^[^\x00]{1,20}$Country (1 to 100 characters).
1 - 100^[^\x00]{1,100}$Make this the brand's headquarters, clearing the flag on any other location.
Response
OK
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.