Get a summary of account details.
Make a GET call to the /account/summary
endpoint to get a summary of account details, such as the organization name and account contact information (name, email, phone, and website URL) for a specific account. This is the same account level information that can be set using the My Account page from the Constant Contact web application.
Parameters
Use the extra_fields
parameter to include physical_address
or company_logo
information in the response body for the specified account (as shown in the examples that follow). To include both fields in the response body, use a comma separated list (physical_address
, company_logo
).
Example GET Request
GET https://api.cc.email/v3/account/summary
Endpoint Requirements
User privileges: account:read
Authorization scopes: account_read
<?php
$request = new HttpRequest();
$request->setUrl('https://api.cc.email/v3/account/summary/');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData(array(
'extra_fields' => 'physical_address,%20company_logo'
));
$request->setHeaders(array(
'cache-control' => 'no-cache',
'Connection' => 'keep-alive',
'accept-encoding' => 'gzip, deflate',
'Host' => 'api.cc.email',
'Postman-Token' => '93835f9a-2931-42d7-957a-77dc6bff4c98,99cfe0b4-e808-41de-84fe-3bf4b6f3ee6e',
'Cache-Control' => 'no-cache',
'User-Agent' => 'PostmanRuntime/7.11.0',
'Authorization' => 'Bearer {access_token}',
'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/?extra_fields=physical_address,%20company_logo' \
-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: 93835f9a-2931-42d7-957a-77dc6bff4c98,9cbff5ca-b0fb-4485-a7f5-43a1a6d40593' \
-H 'User-Agent: PostmanRuntime/7.11.0' \
-H 'accept-encoding: gzip, deflate' \
-H 'cache-control: no-cache'
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.cc.email/v3/account/summary/?extra_fields=physical_address,%20company_logo")
.get()
.addHeader("Accept", "application/json")
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer {access_token}")
.addHeader("User-Agent", "PostmanRuntime/7.11.0")
.addHeader("Cache-Control", "no-cache")
.addHeader("Postman-Token", "93835f9a-2931-42d7-957a-77dc6bff4c98,a69d611b-c017-4137-8c20-95eb165c6545")
.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
{
"contact_email": "InstaPrinz@gmail.com",
"contact_phone": "5081111212",
"country_code": "US",
"encoded_account_id": "p07e1l8cdif9dl",
"first_name": "Lola",
"last_name": "Zang",
"organization_name": "InstaPrinz",
"organization_phone": "333-333-3335",
"state_code": "MA",
"time_zone_id": "US/Eastern",
"website": "http://InstaPriz4me.com",
"physical_address": {
"address_line1": "123 Maple Street",
"address_line2": "Unit 1",
"address_line3": "string",
"city": "Boston",
"state_code": "MA",
"state_name": "string",
"postal_code": "02451",
"country_code": "US"
},
"company_logo": {
"url": "https://files.constantcontact.com/3a20c2f5701/780c1ff3-7fc6-4712-a862-ad5b6af57d38.jpg.",
"external_url": "https://www.google.com/images/logos/google_logo_41.png.",
"internal_id": "ACCOUNT.IMAGE.5"
}
}