Get customer address
curl --request GET \
--url https://api.zenskar.com/customers/{customer_id}/addresses/{address_id} \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zenskar.com/customers/{customer_id}/addresses/{address_id}"
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', organisation: '<api-key>'}};
fetch('https://api.zenskar.com/customers/{customer_id}/addresses/{address_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://api.zenskar.com/customers/{customer_id}/addresses/{address_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"organisation: <api-key>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.zenskar.com/customers/{customer_id}/addresses/{address_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<api-key>")
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.zenskar.com/customers/{customer_id}/addresses/{address_id}")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/customers/{customer_id}/addresses/{address_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"customer_id": "223e4567-e89b-12d3-a456-426614174001",
"line1": "123 Business Ave",
"line2": "Suite 100",
"city": "San Francisco",
"state": "CA",
"zip_code": "94102",
"country": "United States",
"country_code": "US",
"is_default_billing": true,
"is_default_shipping": false,
"validation_status": "valid",
"created_at": "2023-01-01T00:00:00",
"updated_at": "2023-06-15T10:30:00"
}{
"error_code": "CUSTOMER_ADDRESS_NOT_FOUND",
"message": "customer address not found"
}{
"status_code": 10422,
"message": "1 validation error for Path; address_id: value is not a valid uuid"
}{
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Failed to retrieve customer address"
}Customer Addresses
Get customer address
Retrieve detailed information for a specific address by its unique identifier.
Returns comprehensive address data including:
- Full address details (lines, city, state, zip, country)
- Default flags (is_default_billing, is_default_shipping)
- Validation status for tax calculation purposes
- Metadata (creation and update timestamps)
Requirements:
- Address must belong to the authenticated organization
- Valid UUID format required for both customer_id and address_id
- Returns 404 if address doesn’t exist or has been deleted
GET
/
customers
/
{customer_id}
/
addresses
/
{address_id}
Get customer address
curl --request GET \
--url https://api.zenskar.com/customers/{customer_id}/addresses/{address_id} \
--header 'organisation: <api-key>' \
--header 'x-api-key: <api-key>'import requests
url = "https://api.zenskar.com/customers/{customer_id}/addresses/{address_id}"
headers = {
"x-api-key": "<api-key>",
"organisation": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', organisation: '<api-key>'}};
fetch('https://api.zenskar.com/customers/{customer_id}/addresses/{address_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://api.zenskar.com/customers/{customer_id}/addresses/{address_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"organisation: <api-key>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.zenskar.com/customers/{customer_id}/addresses/{address_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("organisation", "<api-key>")
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.zenskar.com/customers/{customer_id}/addresses/{address_id}")
.header("x-api-key", "<api-key>")
.header("organisation", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zenskar.com/customers/{customer_id}/addresses/{address_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["organisation"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "123e4567-e89b-12d3-a456-426614174000",
"customer_id": "223e4567-e89b-12d3-a456-426614174001",
"line1": "123 Business Ave",
"line2": "Suite 100",
"city": "San Francisco",
"state": "CA",
"zip_code": "94102",
"country": "United States",
"country_code": "US",
"is_default_billing": true,
"is_default_shipping": false,
"validation_status": "valid",
"created_at": "2023-01-01T00:00:00",
"updated_at": "2023-06-15T10:30:00"
}{
"error_code": "CUSTOMER_ADDRESS_NOT_FOUND",
"message": "customer address not found"
}{
"status_code": 10422,
"message": "1 validation error for Path; address_id: value is not a valid uuid"
}{
"error_code": "INTERNAL_SERVER_ERROR",
"message": "Failed to retrieve customer address"
}Authorizations
Response
Successfully retrieved customer address
Customer Address Response Schema
Address ID
Customer ID
Whether this is the default billing address
Whether this is the default shipping address
Street address line 1 (e.g., building number and street name)
Street address line 2 (e.g., apartment, suite, unit number)
Street address line 3 (additional address information)
City or locality name
State, province, or region
Postal/ZIP code
Country name (e.g., 'United States')
Two-letter ISO country code (e.g., 'US', 'GB')
Address validation status
Validation data from external connector