curl --request POST \
--url https://api.getenso.ai/entities/{id}/addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address1": "123 Main St",
"city": "Bengaluru",
"zip": "560001",
"address2": "Suite 200",
"taxId": "29ABCDE1234F1Z5",
"StateId": "sta_1a2b3c4d",
"CountryId": "cou_1a2b3c4d",
"State": {
"name": "Karnataka",
"code": "KA",
"Country": {
"name": "India",
"iso2": "IN"
}
},
"Country": {
"name": "India"
}
}
'import requests
url = "https://api.getenso.ai/entities/{id}/addresses"
payload = {
"address1": "123 Main St",
"city": "Bengaluru",
"zip": "560001",
"address2": "Suite 200",
"taxId": "29ABCDE1234F1Z5",
"StateId": "sta_1a2b3c4d",
"CountryId": "cou_1a2b3c4d",
"State": {
"name": "Karnataka",
"code": "KA",
"Country": {
"name": "India",
"iso2": "IN"
}
},
"Country": { "name": "India" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address1: '123 Main St',
city: 'Bengaluru',
zip: '560001',
address2: 'Suite 200',
taxId: '29ABCDE1234F1Z5',
StateId: 'sta_1a2b3c4d',
CountryId: 'cou_1a2b3c4d',
State: {name: 'Karnataka', code: 'KA', Country: {name: 'India', iso2: 'IN'}},
Country: {name: 'India'}
})
};
fetch('https://api.getenso.ai/entities/{id}/addresses', 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.getenso.ai/entities/{id}/addresses",
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([
'address1' => '123 Main St',
'city' => 'Bengaluru',
'zip' => '560001',
'address2' => 'Suite 200',
'taxId' => '29ABCDE1234F1Z5',
'StateId' => 'sta_1a2b3c4d',
'CountryId' => 'cou_1a2b3c4d',
'State' => [
'name' => 'Karnataka',
'code' => 'KA',
'Country' => [
'name' => 'India',
'iso2' => 'IN'
]
],
'Country' => [
'name' => 'India'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.getenso.ai/entities/{id}/addresses"
payload := strings.NewReader("{\n \"address1\": \"123 Main St\",\n \"city\": \"Bengaluru\",\n \"zip\": \"560001\",\n \"address2\": \"Suite 200\",\n \"taxId\": \"29ABCDE1234F1Z5\",\n \"StateId\": \"sta_1a2b3c4d\",\n \"CountryId\": \"cou_1a2b3c4d\",\n \"State\": {\n \"name\": \"Karnataka\",\n \"code\": \"KA\",\n \"Country\": {\n \"name\": \"India\",\n \"iso2\": \"IN\"\n }\n },\n \"Country\": {\n \"name\": \"India\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.getenso.ai/entities/{id}/addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address1\": \"123 Main St\",\n \"city\": \"Bengaluru\",\n \"zip\": \"560001\",\n \"address2\": \"Suite 200\",\n \"taxId\": \"29ABCDE1234F1Z5\",\n \"StateId\": \"sta_1a2b3c4d\",\n \"CountryId\": \"cou_1a2b3c4d\",\n \"State\": {\n \"name\": \"Karnataka\",\n \"code\": \"KA\",\n \"Country\": {\n \"name\": \"India\",\n \"iso2\": \"IN\"\n }\n },\n \"Country\": {\n \"name\": \"India\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getenso.ai/entities/{id}/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address1\": \"123 Main St\",\n \"city\": \"Bengaluru\",\n \"zip\": \"560001\",\n \"address2\": \"Suite 200\",\n \"taxId\": \"29ABCDE1234F1Z5\",\n \"StateId\": \"sta_1a2b3c4d\",\n \"CountryId\": \"cou_1a2b3c4d\",\n \"State\": {\n \"name\": \"Karnataka\",\n \"code\": \"KA\",\n \"Country\": {\n \"name\": \"India\",\n \"iso2\": \"IN\"\n }\n },\n \"Country\": {\n \"name\": \"India\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Success",
"data": {}
}{
"status": "error",
"message": "Forbidden",
"errors": [
{}
]
}Create entity address
Add a new address to an entity.
curl --request POST \
--url https://api.getenso.ai/entities/{id}/addresses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"address1": "123 Main St",
"city": "Bengaluru",
"zip": "560001",
"address2": "Suite 200",
"taxId": "29ABCDE1234F1Z5",
"StateId": "sta_1a2b3c4d",
"CountryId": "cou_1a2b3c4d",
"State": {
"name": "Karnataka",
"code": "KA",
"Country": {
"name": "India",
"iso2": "IN"
}
},
"Country": {
"name": "India"
}
}
'import requests
url = "https://api.getenso.ai/entities/{id}/addresses"
payload = {
"address1": "123 Main St",
"city": "Bengaluru",
"zip": "560001",
"address2": "Suite 200",
"taxId": "29ABCDE1234F1Z5",
"StateId": "sta_1a2b3c4d",
"CountryId": "cou_1a2b3c4d",
"State": {
"name": "Karnataka",
"code": "KA",
"Country": {
"name": "India",
"iso2": "IN"
}
},
"Country": { "name": "India" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address1: '123 Main St',
city: 'Bengaluru',
zip: '560001',
address2: 'Suite 200',
taxId: '29ABCDE1234F1Z5',
StateId: 'sta_1a2b3c4d',
CountryId: 'cou_1a2b3c4d',
State: {name: 'Karnataka', code: 'KA', Country: {name: 'India', iso2: 'IN'}},
Country: {name: 'India'}
})
};
fetch('https://api.getenso.ai/entities/{id}/addresses', 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.getenso.ai/entities/{id}/addresses",
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([
'address1' => '123 Main St',
'city' => 'Bengaluru',
'zip' => '560001',
'address2' => 'Suite 200',
'taxId' => '29ABCDE1234F1Z5',
'StateId' => 'sta_1a2b3c4d',
'CountryId' => 'cou_1a2b3c4d',
'State' => [
'name' => 'Karnataka',
'code' => 'KA',
'Country' => [
'name' => 'India',
'iso2' => 'IN'
]
],
'Country' => [
'name' => 'India'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.getenso.ai/entities/{id}/addresses"
payload := strings.NewReader("{\n \"address1\": \"123 Main St\",\n \"city\": \"Bengaluru\",\n \"zip\": \"560001\",\n \"address2\": \"Suite 200\",\n \"taxId\": \"29ABCDE1234F1Z5\",\n \"StateId\": \"sta_1a2b3c4d\",\n \"CountryId\": \"cou_1a2b3c4d\",\n \"State\": {\n \"name\": \"Karnataka\",\n \"code\": \"KA\",\n \"Country\": {\n \"name\": \"India\",\n \"iso2\": \"IN\"\n }\n },\n \"Country\": {\n \"name\": \"India\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.getenso.ai/entities/{id}/addresses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"address1\": \"123 Main St\",\n \"city\": \"Bengaluru\",\n \"zip\": \"560001\",\n \"address2\": \"Suite 200\",\n \"taxId\": \"29ABCDE1234F1Z5\",\n \"StateId\": \"sta_1a2b3c4d\",\n \"CountryId\": \"cou_1a2b3c4d\",\n \"State\": {\n \"name\": \"Karnataka\",\n \"code\": \"KA\",\n \"Country\": {\n \"name\": \"India\",\n \"iso2\": \"IN\"\n }\n },\n \"Country\": {\n \"name\": \"India\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getenso.ai/entities/{id}/addresses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address1\": \"123 Main St\",\n \"city\": \"Bengaluru\",\n \"zip\": \"560001\",\n \"address2\": \"Suite 200\",\n \"taxId\": \"29ABCDE1234F1Z5\",\n \"StateId\": \"sta_1a2b3c4d\",\n \"CountryId\": \"cou_1a2b3c4d\",\n \"State\": {\n \"name\": \"Karnataka\",\n \"code\": \"KA\",\n \"Country\": {\n \"name\": \"India\",\n \"iso2\": \"IN\"\n }\n },\n \"Country\": {\n \"name\": \"India\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Success",
"data": {}
}{
"status": "error",
"message": "Forbidden",
"errors": [
{}
]
}AddressService:createAddress
Authorizations
JWT bearer token obtained from POST /auth/system-login using your client credentials.
Path Parameters
Entity ID
Body
State is optional and independent of Country - an address can be created with only a Country and no State/province. Either StateId/CountryId (direct IDs) or the nested State/Country objects (resolved by name) may be used.
"123 Main St"
"Bengaluru"
"560001"
"Suite 200"
"29ABCDE1234F1Z5"
Optional. Omit if the address only has a Country.
"sta_1a2b3c4d"
Optional, but recommended - a Country can be set independently of State.
"cou_1a2b3c4d"
Alternative to StateId - resolves the state (and its Country) by name instead of ID.
Show child attributes
Show child attributes
Alternative to CountryId - resolves the Country by name. Used when the address has no State at all.
Show child attributes
Show child attributes

