Get a user address
curl --request GET \
--url {schemes}://api.upsun.com/profiles/{userId}/address \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/profiles/{userId}/address"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/profiles/{userId}/address', 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 => "{schemes}://api.upsun.com/profiles/{userId}/address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "{schemes}://api.upsun.com/profiles/{userId}/address"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/profiles/{userId}/address")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/profiles/{userId}/address")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"country": "<string>",
"name_line": "<string>",
"premise": "<string>",
"sub_premise": "<string>",
"thoroughfare": "<string>",
"administrative_area": "<string>",
"sub_administrative_area": "<string>",
"locality": "<string>",
"dependent_locality": "<string>",
"postal_code": "<string>",
"metadata": {
"required_fields": [
"<string>"
],
"field_labels": {},
"show_vat": true
}
}User Profiles
Get a user address
GET
/
profiles
/
{userId}
/
address
Get a user address
curl --request GET \
--url {schemes}://api.upsun.com/profiles/{userId}/address \
--header 'Authorization: Bearer <token>'import requests
url = "{schemes}://api.upsun.com/profiles/{userId}/address"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('{schemes}://api.upsun.com/profiles/{userId}/address', 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 => "{schemes}://api.upsun.com/profiles/{userId}/address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "{schemes}://api.upsun.com/profiles/{userId}/address"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("{schemes}://api.upsun.com/profiles/{userId}/address")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("{schemes}://api.upsun.com/profiles/{userId}/address")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"country": "<string>",
"name_line": "<string>",
"premise": "<string>",
"sub_premise": "<string>",
"thoroughfare": "<string>",
"administrative_area": "<string>",
"sub_administrative_area": "<string>",
"locality": "<string>",
"dependent_locality": "<string>",
"postal_code": "<string>",
"metadata": {
"required_fields": [
"<string>"
],
"field_labels": {},
"show_vat": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The UUID of the user
Response
200 - application/json
A user Address object extended with field metadata
Information about fields required to express an address.
Two-letter country codes are used to represent countries and states
The full name of the user
Premise (i.e. Apt, Suite, Bldg.)
Sub Premise (i.e. Suite, Apartment, Floor, Unknown.
The address of the user
The administrative area of the user address
The sub-administrative area of the user address
The locality of the user address
The dependant_locality area of the user address
The postal code area of the user address
Address field metadata.
Show child attributes
Show child attributes
Last modified on September 25, 2026
Was this page helpful?