import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const userAddress = await client.userAddresses.retrieve('id');
console.log(userAddress.data);{
"data": {
"id": "c3527e69-dc5a-4b3e-8f44-99d209f83c1d",
"record_type": "user_address",
"customer_reference": "MY REF 001",
"first_name": "Alfred",
"last_name": "Foster",
"business_name": "Toy-O'Kon",
"phone_number": "+12125559000",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"neighborhood": "Ciudad de los deportes",
"borough": "Guadalajara",
"postal_code": "78701",
"country_code": "US",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Retrieves the details of an existing user address.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const userAddress = await client.userAddresses.retrieve('id');
console.log(userAddress.data);{
"data": {
"id": "c3527e69-dc5a-4b3e-8f44-99d209f83c1d",
"record_type": "user_address",
"customer_reference": "MY REF 001",
"first_name": "Alfred",
"last_name": "Foster",
"business_name": "Toy-O'Kon",
"phone_number": "+12125559000",
"street_address": "600 Congress Avenue",
"extended_address": "14th Floor",
"locality": "Austin",
"administrative_area": "TX",
"neighborhood": "Ciudad de los deportes",
"borough": "Guadalajara",
"postal_code": "78701",
"country_code": "US",
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
user address ID
Successful response
Show child attributes
Uniquely identifies the user address.
"c3527e69-dc5a-4b3e-8f44-99d209f83c1d"
Identifies the type of the resource.
"user_address"
A customer reference string for customer look ups.
"MY REF 001"
The first name associated with the user address.
"Alfred"
The last name associated with the user address.
"Foster"
The business name associated with the user address.
"Toy-O'Kon"
The phone number associated with the user address.
"+12125559000"
The primary street address information about the user address.
"600 Congress Avenue"
Additional street address information about the user address such as, but not limited to, unit number or apartment number.
"14th Floor"
The locality of the user address. For US addresses, this corresponds to the city of the address.
"Austin"
The locality of the user address. For US addresses, this corresponds to the state of the address.
"TX"
The neighborhood of the user address. This field is not used for addresses in the US but is used for some international addresses.
"Ciudad de los deportes"
The borough of the user address. This field is not used for addresses in the US but is used for some international addresses.
"Guadalajara"
The postal code of the user address.
"78701"
The two-character (ISO 3166-1 alpha-2) country code of the user address.
"US"
ISO 8601 formatted date indicating when the resource was created.
"2018-02-02T22:25:27.521Z"
ISO 8601 formatted date indicating when the resource was updated.
"2018-02-02T22:25:27.521Z"
Was this page helpful?