Enter the Share Your Success Sweepstakes 2024 For the Chance to Win Great Prizes!

Reporting data of partner/accounts

user731863
Rookie
0 Votes
Hi, Recently I've noticed that Constant Contact API can get managed accounts under the main account, Documentation URL: https://developer.constantcontact.com/api_guide/partners_overview.html#get--partneraccounts The question is how to use managed accounts data to access reporting API endpoints. - is there an option to do it or is it an enhancement that will be provided in future API builds? Cheers, Fiodor Zilber
1 REPLY 1
Courtney_E
Moderator
0 Votes

Hello Fiodor,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

Once you have the encoded_account_id for a child account, you can then send API requests on behalf of a managed client account. This includes all of the endpoint calls that are available to standard accounts, but they need to be reformatted to fit the request body schemas for the partner endpoint.

 

Send API Requests on Behalf of Managed Client Accounts
https://v3.developer.constantcontact.com/api_guide/partners_master_token.html

 

Below is an example of the same call to GET /contacts with a specific email address with the partner endpoint vs. the corresponding standard endpoint:

 

Standard request URL and body:

 

GET 

V3/contacts?status=all&email=dlang@example.com&include=custom_fields,list_memberships,phone_numbers,street_addresses,taggings,notes

 

Request Body:

{none}

 

Partner request URL and body:

 

POST 

V3/partner/accounts/{encoded_account_id}/account_operations/sync

 

Request Body:

{

"account_operation_url": "/contacts",

"account_operation_method": "GET",

"account_operation_query_parameters": [

{"query_param_key": "email", "query_param_value": "dlang@example.com"},

{"query_param_key": "status", "query_param_value": "all"},

{"query_param_key": "include", "query_param_value":"custom_fields,list_memberships,phone_numbers,street_addresses,taggings,notes"}

],

"account_operation_headers": [

{

"header_key": "Accept",

"header_value": "application/json"

}

]

}

 

Please have a look and let us know if you have any other questions!


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
Resources
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up