Update a location
curl --request PATCH \
--url https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"locationTypes": [
"REGISTERED_OFFICE_ADDRESS"
],
"address": {
"addressLine1": "548 Market St",
"postalCode": "94104",
"country": "US",
"addressLine2": "Suite 21045",
"addressLine3": "<string>",
"city": "San Francisco",
"state": "CA"
},
"locationName": "Singapore registered office",
"startDate": "2026-04-27",
"employeeCount": 12
}
'import requests
url = "https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}"
payload = {
"locationTypes": ["REGISTERED_OFFICE_ADDRESS"],
"address": {
"addressLine1": "548 Market St",
"postalCode": "94104",
"country": "US",
"addressLine2": "Suite 21045",
"addressLine3": "<string>",
"city": "San Francisco",
"state": "CA"
},
"locationName": "Singapore registered office",
"startDate": "2026-04-27",
"employeeCount": 12
}
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({
locationTypes: ['REGISTERED_OFFICE_ADDRESS'],
address: {
addressLine1: '548 Market St',
postalCode: '94104',
country: 'US',
addressLine2: 'Suite 21045',
addressLine3: '<string>',
city: 'San Francisco',
state: 'CA'
},
locationName: 'Singapore registered office',
startDate: '2026-04-27',
employeeCount: 12
})
};
fetch('https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}', 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.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}",
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([
'locationTypes' => [
'REGISTERED_OFFICE_ADDRESS'
],
'address' => [
'addressLine1' => '548 Market St',
'postalCode' => '94104',
'country' => 'US',
'addressLine2' => 'Suite 21045',
'addressLine3' => '<string>',
'city' => 'San Francisco',
'state' => 'CA'
],
'locationName' => 'Singapore registered office',
'startDate' => '2026-04-27',
'employeeCount' => 12
]),
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://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}"
payload := strings.NewReader("{\n \"locationTypes\": [\n \"REGISTERED_OFFICE_ADDRESS\"\n ],\n \"address\": {\n \"addressLine1\": \"548 Market St\",\n \"postalCode\": \"94104\",\n \"country\": \"US\",\n \"addressLine2\": \"Suite 21045\",\n \"addressLine3\": \"<string>\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\"\n },\n \"locationName\": \"Singapore registered office\",\n \"startDate\": \"2026-04-27\",\n \"employeeCount\": 12\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://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"locationTypes\": [\n \"REGISTERED_OFFICE_ADDRESS\"\n ],\n \"address\": {\n \"addressLine1\": \"548 Market St\",\n \"postalCode\": \"94104\",\n \"country\": \"US\",\n \"addressLine2\": \"Suite 21045\",\n \"addressLine3\": \"<string>\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\"\n },\n \"locationName\": \"Singapore registered office\",\n \"startDate\": \"2026-04-27\",\n \"employeeCount\": 12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}")
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 \"locationTypes\": [\n \"REGISTERED_OFFICE_ADDRESS\"\n ],\n \"address\": {\n \"addressLine1\": \"548 Market St\",\n \"postalCode\": \"94104\",\n \"country\": \"US\",\n \"addressLine2\": \"Suite 21045\",\n \"addressLine3\": \"<string>\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\"\n },\n \"locationName\": \"Singapore registered office\",\n \"startDate\": \"2026-04-27\",\n \"employeeCount\": 12\n}"
response = http.request(request)
puts response.read_body{
"location": {
"id": "loc_123",
"businessEntityId": 44,
"locationTypes": [
"OPERATIONS"
],
"address": {
"addressLine1": "548 Market St",
"postalCode": "94104",
"country": "US",
"addressLine2": "Suite 21045",
"addressLine3": "<string>",
"city": "San Francisco",
"state": "CA"
},
"createdAt": 1735689600000,
"updatedAt": 1735776000000,
"name": "Delaware HQ",
"startDate": "2025-01-01",
"employeeCount": 12
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Locations
Update a location
Update a reusable Commenda OS location for a customer’s business entity.
PATCH
/
partner
/
commenda-os
/
customers
/
{customerId}
/
business-entities
/
{businessEntityId}
/
locations
/
{locationId}
Update a location
curl --request PATCH \
--url https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"locationTypes": [
"REGISTERED_OFFICE_ADDRESS"
],
"address": {
"addressLine1": "548 Market St",
"postalCode": "94104",
"country": "US",
"addressLine2": "Suite 21045",
"addressLine3": "<string>",
"city": "San Francisco",
"state": "CA"
},
"locationName": "Singapore registered office",
"startDate": "2026-04-27",
"employeeCount": 12
}
'import requests
url = "https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}"
payload = {
"locationTypes": ["REGISTERED_OFFICE_ADDRESS"],
"address": {
"addressLine1": "548 Market St",
"postalCode": "94104",
"country": "US",
"addressLine2": "Suite 21045",
"addressLine3": "<string>",
"city": "San Francisco",
"state": "CA"
},
"locationName": "Singapore registered office",
"startDate": "2026-04-27",
"employeeCount": 12
}
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({
locationTypes: ['REGISTERED_OFFICE_ADDRESS'],
address: {
addressLine1: '548 Market St',
postalCode: '94104',
country: 'US',
addressLine2: 'Suite 21045',
addressLine3: '<string>',
city: 'San Francisco',
state: 'CA'
},
locationName: 'Singapore registered office',
startDate: '2026-04-27',
employeeCount: 12
})
};
fetch('https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}', 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.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}",
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([
'locationTypes' => [
'REGISTERED_OFFICE_ADDRESS'
],
'address' => [
'addressLine1' => '548 Market St',
'postalCode' => '94104',
'country' => 'US',
'addressLine2' => 'Suite 21045',
'addressLine3' => '<string>',
'city' => 'San Francisco',
'state' => 'CA'
],
'locationName' => 'Singapore registered office',
'startDate' => '2026-04-27',
'employeeCount' => 12
]),
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://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}"
payload := strings.NewReader("{\n \"locationTypes\": [\n \"REGISTERED_OFFICE_ADDRESS\"\n ],\n \"address\": {\n \"addressLine1\": \"548 Market St\",\n \"postalCode\": \"94104\",\n \"country\": \"US\",\n \"addressLine2\": \"Suite 21045\",\n \"addressLine3\": \"<string>\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\"\n },\n \"locationName\": \"Singapore registered office\",\n \"startDate\": \"2026-04-27\",\n \"employeeCount\": 12\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://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"locationTypes\": [\n \"REGISTERED_OFFICE_ADDRESS\"\n ],\n \"address\": {\n \"addressLine1\": \"548 Market St\",\n \"postalCode\": \"94104\",\n \"country\": \"US\",\n \"addressLine2\": \"Suite 21045\",\n \"addressLine3\": \"<string>\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\"\n },\n \"locationName\": \"Singapore registered office\",\n \"startDate\": \"2026-04-27\",\n \"employeeCount\": 12\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.commenda.io/api/v1/partner/commenda-os/customers/{customerId}/business-entities/{businessEntityId}/locations/{locationId}")
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 \"locationTypes\": [\n \"REGISTERED_OFFICE_ADDRESS\"\n ],\n \"address\": {\n \"addressLine1\": \"548 Market St\",\n \"postalCode\": \"94104\",\n \"country\": \"US\",\n \"addressLine2\": \"Suite 21045\",\n \"addressLine3\": \"<string>\",\n \"city\": \"San Francisco\",\n \"state\": \"CA\"\n },\n \"locationName\": \"Singapore registered office\",\n \"startDate\": \"2026-04-27\",\n \"employeeCount\": 12\n}"
response = http.request(request)
puts response.read_body{
"location": {
"id": "loc_123",
"businessEntityId": 44,
"locationTypes": [
"OPERATIONS"
],
"address": {
"addressLine1": "548 Market St",
"postalCode": "94104",
"country": "US",
"addressLine2": "Suite 21045",
"addressLine3": "<string>",
"city": "San Francisco",
"state": "CA"
},
"createdAt": 1735689600000,
"updatedAt": 1735776000000,
"name": "Delaware HQ",
"startDate": "2025-01-01",
"employeeCount": 12
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Update a reusable Commenda OS location for a customer’s business entity.
Use this endpoint when an incorporation references an existing location that is missing required registered office address details.
Authorizations
Path Parameters
Commenda customer identifier.
Commenda business-entity identifier for the specified customer.
Commenda location identifier.
Body
application/json
Update a reusable Commenda OS location. Omitted fields are left unchanged by the Partner API client, but locationTypes and address are required by the current location update contract.
Example:
["REGISTERED_OFFICE_ADDRESS"]
Show child attributes
Show child attributes
Optional display name. Required by some location types such as registered office and mailing address.
Example:
"Singapore registered office"
Example:
"2026-04-27"
Employee count for employee work locations.
Example:
12
Response
Location updated successfully
Show child attributes
Show child attributes
Was this page helpful?
⌘I