Get the account organization's physical address.

Make a GET call to the /account/summary/physical_address endpoint to get the organization’s current mailing address for a Constant Contact user account. You can also get the physical address, in addition to other account level details, by making a GET call to the /account/summary endpoint and including physical_address as an extra_fields parameter.

Before you can send an email from the account, you must first specify the contact information to use as the organization’s physical mailing address (physical_address). The physical address displays on the footer of all emails sent from the account. To update the physical address, make a PUT call to the /account/summary/physical_address endpoint.

You must have the Account Owner or Account Manager role assigned to get account level information. You must have the Account Owner role assigned to update account level details. Use the GET /account/user/privileges endpoint and the V3 API Endpoint Privileges table to determine the privileges that are associated with your access token.

Parameters

There are no request parameters for this method. The physical_address information that this GET method can return, primarily depends on the country that you specify in the country_code setting. See the examples that follow.

Examples

If the country_code is US (United States) or CA (Canada), the physical address must include address_line1, city, and the two letter state_code:

{
    "address_line1": "123 Maple Street",
    "address_line2": "Unit 1",
    "address_line3": "Apartment 234",
    "city": "Boston",
    "state_code": "MA",
    "postal_code": "01534",
    "country_code": "US"
}
 

If the country_code is not US (United States) or CA (Canada), the physical address must include address_line1, city, the state_name property.

{
    "address_line1": "123 Maple Street",
    "address_line2": "Unit 1",
    "address_line3": "Apartment 234",
    "city": "Paris",
    "state_name": "France",
    "postal_code": "01435678",
    "country_code": "FR"
}

To see descriptions for all physical_address properties, see Put (update) the Physical Address for the Account.

Example GET Request

GET https://api.cc.email/v3/account/summary/physical_address

Endpoint Requirements

User privileges: account:read

Authorization scopes: account_read

<?php

$request = new HttpRequest();
$request->setUrl('https://api.cc.email/v3/account/summary/physical_address');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'Connection' => 'keep-alive',
  'accept-encoding' => 'gzip, deflate',
  'Host' => 'api.cc.email',
  'Postman-Token' => 'a5f86407-98bf-430d-8632-e8be97efec58,ebcd3388-b171-45f4-b991-42dadc1b84ef',
  'Cache-Control' => 'no-cache',
  'User-Agent' => 'PostmanRuntime/7.13.0',
  'Authorization' => 'Bearer {access token}',
  'consumes' => 'application/json',
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}

curl -X GET \
  https://api.cc.email/v3/account/summary/physical_address \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access token}' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Host: api.cc.email' \
  -H 'Postman-Token: a5f86407-98bf-430d-8632-e8be97efec58,4e01f6bf-f514-4f52-b9ab-9057013872c6' \
  -H 'User-Agent: PostmanRuntime/7.13.0' \
  -H 'accept-encoding: gzip, deflate' \
  -H 'cache-control: no-cache' \
  -H 'consumes: application/json'    
'

OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.cc.email/v3/account/summary/physical_address")
  .get()
  .addHeader("Accept", "application/json")
  .addHeader("Content-Type", "application/json")
  .addHeader("consumes", "application/json")
  .addHeader("Authorization", "Bearer {access token}")
  .addHeader("User-Agent", "PostmanRuntime/7.13.0")
  .addHeader("Cache-Control", "no-cache")
  .addHeader("Postman-Token", "a5f86407-98bf-430d-8632-e8be97efec58,956a459a-650d-4e6a-974d-f413619e9d36")
  .addHeader("Host", "api.cc.email")
  .addHeader("accept-encoding", "gzip, deflate")
  .addHeader("Connection", "keep-alive")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Response

{
  "address_line1": "123 Maple Street",
  "address_line2": "Unit 1",
  "address_line3": "Apartment 234",
  "city": "Boston",
  "state_code": "MA",
  "postal_code": "02451",
  "country_code": "us"
}

Try it!