Retrieve a Civic Address
Return the details of an existing Civic Address with its Locations inside the ‘data’ attribute of the response.
GET
/
external_connections
/
{id}
/
civic_addresses
/
{address_id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const civicAddress = await client.externalConnections.civicAddresses.retrieve(
'318fb664-d341-44d2-8405-e6bfb9ced6d9',
{ id: '1293384261075731499' },
);
console.log(civicAddress.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
civic_address = client.external_connections.civic_addresses.retrieve(
address_id="318fb664-d341-44d2-8405-e6bfb9ced6d9",
id="1293384261075731499",
)
print(civic_address.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
civicAddress, err := client.ExternalConnections.CivicAddresses.Get(
context.TODO(),
"318fb664-d341-44d2-8405-e6bfb9ced6d9",
telnyx.ExternalConnectionCivicAddressGetParams{
ID: "1293384261075731499",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", civicAddress.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.externalconnections.civicaddresses.CivicAddressRetrieveParams;
import com.telnyx.sdk.models.externalconnections.civicaddresses.CivicAddressRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
CivicAddressRetrieveParams params = CivicAddressRetrieveParams.builder()
.id("1293384261075731499")
.addressId("318fb664-d341-44d2-8405-e6bfb9ced6d9")
.build();
CivicAddressRetrieveResponse civicAddress = client.externalConnections().civicAddresses().retrieve(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
civic_address = telnyx.external_connections.civic_addresses.retrieve(
"318fb664-d341-44d2-8405-e6bfb9ced6d9",
id: "1293384261075731499"
)
puts(civic_address)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$civicAddress = $client->externalConnections->civicAddresses->retrieve(
'318fb664-d341-44d2-8405-e6bfb9ced6d9', id: '1293384261075731499'
);
var_dump($civicAddress);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx external-connections:civic-addresses retrieve \
--api-key 'My API Key' \
--id 1293384261075731499 \
--address-id 318fb664-d341-44d2-8405-e6bfb9ced6d9curl --request GET \
--url https://api.telnyx.com/v2/external_connections/{id}/civic_addresses/{address_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "07a4dc5d-9b3b-4ba2-88a4-6ba172316c65",
"record_type": "civic_address",
"city_or_town": "Austin",
"city_or_town_alias": "",
"company_name": "Telnyx",
"country": "US",
"country_or_district": "US",
"default_location_id": "18ded4bb-b694-44c1-a89b-a35b7acd4c9e",
"description": "Austin Office",
"house_number": "600",
"house_number_suffix": "",
"locations": [
{
"id": "18ded4bb-b694-44c1-a89b-a35b7acd4c9e",
"additional_info": "",
"description": "Austin Office",
"is_default": true
},
{
"id": "d420a57f-c4ae-4697-87e1-fbefd9e86f72",
"additional_info": "14th Floor",
"description": "",
"is_default": false
}
],
"postal_or_zip_code": "78701",
"state_or_province": "TX",
"street_name": "Congress Street",
"street_suffix": ""
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifies the resource.
Example:
"1293384261075731499"
Identifies a civic address or a location.
Example:
"318fb664-d341-44d2-8405-e6bfb9ced6d9"
Response
Successful response
Show child attributes
Show child attributes
Example:
{
"id": "07a4dc5d-9b3b-4ba2-88a4-6ba172316c65",
"record_type": "civic_address",
"city_or_town": "Austin",
"city_or_town_alias": "",
"company_name": "Telnyx",
"country": "US",
"country_or_district": "US",
"default_location_id": "18ded4bb-b694-44c1-a89b-a35b7acd4c9e",
"description": "Austin Office",
"house_number": "600",
"house_number_suffix": "",
"locations": [
{
"id": "18ded4bb-b694-44c1-a89b-a35b7acd4c9e",
"additional_info": "",
"description": "Austin Office",
"is_default": true
},
{
"id": "d420a57f-c4ae-4697-87e1-fbefd9e86f72",
"additional_info": "14th Floor",
"description": "",
"is_default": false
}
],
"postal_or_zip_code": "78701",
"state_or_province": "TX",
"street_name": "Congress Street",
"street_suffix": ""
}
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const civicAddress = await client.externalConnections.civicAddresses.retrieve(
'318fb664-d341-44d2-8405-e6bfb9ced6d9',
{ id: '1293384261075731499' },
);
console.log(civicAddress.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
civic_address = client.external_connections.civic_addresses.retrieve(
address_id="318fb664-d341-44d2-8405-e6bfb9ced6d9",
id="1293384261075731499",
)
print(civic_address.data)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
civicAddress, err := client.ExternalConnections.CivicAddresses.Get(
context.TODO(),
"318fb664-d341-44d2-8405-e6bfb9ced6d9",
telnyx.ExternalConnectionCivicAddressGetParams{
ID: "1293384261075731499",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", civicAddress.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.externalconnections.civicaddresses.CivicAddressRetrieveParams;
import com.telnyx.sdk.models.externalconnections.civicaddresses.CivicAddressRetrieveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
CivicAddressRetrieveParams params = CivicAddressRetrieveParams.builder()
.id("1293384261075731499")
.addressId("318fb664-d341-44d2-8405-e6bfb9ced6d9")
.build();
CivicAddressRetrieveResponse civicAddress = client.externalConnections().civicAddresses().retrieve(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
civic_address = telnyx.external_connections.civic_addresses.retrieve(
"318fb664-d341-44d2-8405-e6bfb9ced6d9",
id: "1293384261075731499"
)
puts(civic_address)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$civicAddress = $client->externalConnections->civicAddresses->retrieve(
'318fb664-d341-44d2-8405-e6bfb9ced6d9', id: '1293384261075731499'
);
var_dump($civicAddress);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx external-connections:civic-addresses retrieve \
--api-key 'My API Key' \
--id 1293384261075731499 \
--address-id 318fb664-d341-44d2-8405-e6bfb9ced6d9curl --request GET \
--url https://api.telnyx.com/v2/external_connections/{id}/civic_addresses/{address_id} \
--header 'Authorization: Bearer <token>'{
"data": {
"id": "07a4dc5d-9b3b-4ba2-88a4-6ba172316c65",
"record_type": "civic_address",
"city_or_town": "Austin",
"city_or_town_alias": "",
"company_name": "Telnyx",
"country": "US",
"country_or_district": "US",
"default_location_id": "18ded4bb-b694-44c1-a89b-a35b7acd4c9e",
"description": "Austin Office",
"house_number": "600",
"house_number_suffix": "",
"locations": [
{
"id": "18ded4bb-b694-44c1-a89b-a35b7acd4c9e",
"additional_info": "",
"description": "Austin Office",
"is_default": true
},
{
"id": "d420a57f-c4ae-4697-87e1-fbefd9e86f72",
"additional_info": "14th Floor",
"description": "",
"is_default": false
}
],
"postal_or_zip_code": "78701",
"state_or_province": "TX",
"street_name": "Congress Street",
"street_suffix": ""
}
}