Hello FirstNameL483309,
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.
When sending API requests on behalf of a managed client account, I know that we don't have many specific examples available within our documentation, as they are just modified versions of standard endpoint requests sent via the POST /partner/accounts/{encoded_account_id}/account_operations/sync endpoint.
Here are the JSON request body schemas for GET /contacts and POST /contacts when calling account_operations:
[[GET /contacts by email address 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"
}
]
}
[[POST /contacts request body:]]
{
"account_operation_url": "/contacts",
"account_operation_method": "POST",
"account_operation_payload": "{\"email_address\": { \"address\": \"dlang@example.com\", \"permission_to_send\":\"implicit\"}, \"first_name\": \"Debora\", \"last_name\": \"Lang\", \"create_source\":\"Account\", \"list_memberships\": [\"07936f78-662a-11eb-af0a-fa163e56c9b0\"]}",
"account_operation_query_parameters": [],
"account_operation_headers": [
{
"header_key": "Accept",
"header_value": "application/json"
}
]
}
[[PUT /contacts request body:]]
{
"account_operation_url": "/contacts/{contact_id}",
"account_operation_method": "PUT",
"account_operation_path_parameters": [
{"path_param_key": "contact_id", "path_param_value": "1618ae62-4752-11e9-9c8a-fa163e6b01c1"}
],
"account_operation_payload": "{\"email_address\": { \"address\": \"dlang@example.com\", \"permission_to_send\":\"implicit\"}, \"first_name\": \"Debora\", \"last_name\": \"Lang\", \"create_source\":\"Account\", \"update_source\":\"Account\", \"list_memberships\": [\"07936f78-662a-11eb-af0a-fa163e56c9b0\"]}",
"account_operation_headers": [
{
"header_key": "Accept",
"header_value": "application/json"
}
]
}
V3 API - Partners - Send API Requests on Behalf of Managed Client Accounts
https://v3.developer.constantcontact.com/api_guide/partners_master_token.html
Please have a look and let us know if you have any other questions!
You can also reach our team directly/securely via email at webservices@constantcontact.com
... View more