Skip to content

Acceptd/ConstantContact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Constant Contact SDK

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/Acceptd/ConstantContact.git"
    }
  ],
  "require": {
    "Acceptd/ConstantContact": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure OAuth2 access token for authorization: oauth2_access_code
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: api_key
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');

// Configure OAuth2 access token for authorization: oauth2_implicit
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\AccountServicesApi(
    // If you want to use a custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new 'ConstantContact\Client\Model\AccountEmailInput(); // 'ConstantContact\Client\Model\AccountEmailInput | A JSON request payload containing the new email address you want to add to the Constant Contact account.

try {
    $result = $apiInstance->addAccountEmailAddress($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountServicesApi->addAccountEmailAddress: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.cc.email/v3

Class Method HTTP request Description
AccountServicesApi addAccountEmailAddress POST /account/emails POST Add an Account Email Address
AccountServicesApi getAccountById GET /account/summary GET a Summary of Account Details
AccountServicesApi getPhysicalAddress GET /account/summary/physical_address GET the Physical Address for the Account
AccountServicesApi getUserPrivileges GET /account/user/privileges GET User Privileges
AccountServicesApi putCustomerById PUT /account/summary PUT (update) Account Details
AccountServicesApi putPhysicalAddress PUT /account/summary/physical_address PUT (update) the Physical Address for an Account
AccountServicesApi retrieveEmailAddresses GET /account/emails GET a Collection of Account Email Addresses
BulkActivitiesApi bulkImportContactsJSON POST /activities/contacts_json_import Import Contacts using a JSON Payload
BulkActivitiesApi contactsCSVImport POST /activities/contacts_file_import Import Contacts using a CSV File
BulkActivitiesApi getActivity GET /activities/{activity_id} GET an Activity Status
BulkActivitiesApi getActivityStatusCollection GET /activities GET Activity Status Collection
BulkActivitiesApi getContactsExport GET /contact_exports/{file_export_id} Retrieve Exported Contacts File
BulkActivitiesApi postContactDelete POST /activities/contact_delete Delete Contacts in Bulk
BulkActivitiesApi postContactsExport POST /activities/contact_exports Export Contacts to a File
BulkActivitiesApi postCustomFieldDelete POST /activities/custom_fields_delete Delete Custom Fields
BulkActivitiesApi postListAddContact POST /activities/add_list_memberships Add Contacts to Lists
BulkActivitiesApi postListDelete POST /activities/list_delete Delete Contact Lists
BulkActivitiesApi postListRemoveContact POST /activities/remove_list_memberships Remove Contacts from Lists
BulkActivitiesApi postTagAddContact POST /activities/contacts_taggings_add Add Tags to Contacts
BulkActivitiesApi postTagDelete POST /activities/contacts_tags_delete Delete Tags
BulkActivitiesApi postTagRemoveContact POST /activities/contacts_taggings_remove Remove Tags from Contacts
ContactListsApi createList POST /contact_lists POST (create) a List
ContactListsApi deleteListActivity DELETE /contact_lists/{list_id} DELETE a List
ContactListsApi getList GET /contact_lists/{list_id} GET a List
ContactListsApi getListIdXrefs GET /contact_lists/list_id_xrefs GET a collection of V2 and V3 API List IDs
ContactListsApi getLists GET /contact_lists GET Lists Collection
ContactListsApi putList PUT /contact_lists/{list_id} PUT (update) a List
ContactTagsApi deleteTag DELETE /contact_tags/{tag_id} DELETE a Tag
ContactTagsApi getTag GET /contact_tags/{tag_id} GET Tag Details
ContactTagsApi getTags GET /contact_tags GET Details for All Tags
ContactTagsApi postTag POST /contact_tags POST (Create) a Tag
ContactTagsApi putTag PUT /contact_tags/{tag_id} PUT (Update) a Tag
ContactsApi countContact GET /contacts/counts GET Contact Consent Counts
ContactsApi createContact POST /contacts POST (create) a Contact
ContactsApi createOrUpdateContact POST /contacts/sign_up_form Create or Update a Contact
ContactsApi deleteContact DELETE /contacts/{contact_id} DELETE a Contact
ContactsApi getContact GET /contacts/{contact_id} GET a Contact
ContactsApi getContactIdXrefs GET /contacts/contact_id_xrefs GET a collection of V2 and V3 API contact IDs
ContactsApi getContacts GET /contacts GET Contacts Collection
ContactsApi getSmsEngagementHistory GET /contacts/sms_engagement_history/{contact_id} GET SMS Engagement History for a Contact
ContactsApi putContact PUT /contacts/{contact_id} PUT (update) a Contact
ContactsCustomFieldsApi deleteCustomField DELETE /contact_custom_fields/{custom_field_id} DELETE a custom_field
ContactsCustomFieldsApi getCustomField GET /contact_custom_fields/{custom_field_id} GET a custom_field
ContactsCustomFieldsApi getCustomFields GET /contact_custom_fields GET custom_fields Collection
ContactsCustomFieldsApi postCustomFields POST /contact_custom_fields POST (create) a custom_field
ContactsCustomFieldsApi putCustomField PUT /contact_custom_fields/{custom_field_id} PUT (update) a custom_field
ContactsReportingApi getContactOpenClickRate GET /reports/contact_reports/{contact_id}/open_and_click_rates GET Average Open and Click Rates
ContactsReportingApi getContactTracking GET /reports/contact_reports/{contact_id}/activity_details GET Contact Activity Details
ContactsReportingApi getContactTrackingCount GET /reports/contact_reports/{contact_id}/activity_summary GET Contact Action Summary
EmailCampaignsApi createEmailCampaignUsingPOST POST /emails POST (Create) a New Email Campaign
EmailCampaignsApi createResendToNonOpenersUsingPOST POST /emails/activities/{campaign_activity_id}/non_opener_resends POST a Resend to Non-openers Campaign Activity
EmailCampaignsApi deleteResendToNonOpenersUsingDELETE DELETE /emails/activities/{campaign_activity_id}/non_opener_resends/{resend_request_id} DELETE a Resend to Non Openers Activity
EmailCampaignsApi removeEmailCampaignUsingDELETE DELETE /emails/{campaign_id} DELETE an Email Campaign
EmailCampaignsApi renameEmailCampaignUsingPATCH PATCH /emails/{campaign_id} PATCH (Update) an Email Campaign Name
EmailCampaignsApi retrieveEmailCampaignActivityUsingGET GET /emails/activities/{campaign_activity_id} GET a Single Email Campaign Activity
EmailCampaignsApi retrieveEmailCampaignUsingGET GET /emails/{campaign_id} GET Details About a Single Email Campaign
EmailCampaignsApi retrieveEmailCampaignsUsingGET GET /emails GET a Collection of Email Campaigns
EmailCampaignsApi retrieveResendToNonOpenersUsingGET GET /emails/activities/{campaign_activity_id}/non_opener_resends GET Details for a Resend to Non-openers Campaign Activity
EmailCampaignsApi retrieveXrefMappingsUsingGET GET /emails/campaign_id_xrefs GET a Collection of V2 and V3 API Email Campaign Identifiers
EmailCampaignsApi updateEmailCampaignActivityUsingPUT PUT /emails/activities/{campaign_activity_id} PUT (Update) An Email Campaign Activity
EmailCampaignsABTestsApi createEmailCampaignABTestUsingPOST POST /emails/activities/{campaign_activity_id}/abtest POST (Create) an A/B Test for an Email Campaign Activity
EmailCampaignsABTestsApi deleteEmailCampaignABTestUsingDELETE DELETE /emails/activities/{campaign_activity_id}/abtest DELETE an A/B Test for an Email Campaign Activity
EmailCampaignsABTestsApi retrieveEmailCampaignABTestUsingGET GET /emails/activities/{campaign_activity_id}/abtest GET A/B Test Details for an Email Campaign Activity
EmailReportingApi getAllBulkEmailCampaignSummaries GET /reports/summary_reports/email_campaign_summaries GET an Email Campaigns Summary Report
EmailReportingApi getBounces GET /reports/email_reports/{campaign_activity_id}/tracking/bounces GET an Email Bounces Report
EmailReportingApi getCampaignActivityLinkStats GET /reports/email_reports/{campaign_activity_id}/links GET an Email Links Report
EmailReportingApi getClicks GET /reports/email_reports/{campaign_activity_id}/tracking/clicks GET an Email Clicks Report
EmailReportingApi getDidNotOpens GET /reports/email_reports/{campaign_activity_id}/tracking/didnotopens GET an Email Did Not Opens Report
EmailReportingApi getEmailCampaignActivitySummary GET /reports/stats/email_campaign_activities/{campaign_activity_ids} GET an Email Campaign Activity Stats Report
EmailReportingApi getEmailSummary GET /reports/stats/email_campaigns/{campaign_ids} GET an Email Campaign Stats Report
EmailReportingApi getForwards GET /reports/email_reports/{campaign_activity_id}/tracking/forwards GET an Email Forwards Report
EmailReportingApi getOpens GET /reports/email_reports/{campaign_activity_id}/tracking/opens GET an Email Opens Report
EmailReportingApi getOptouts GET /reports/email_reports/{campaign_activity_id}/tracking/optouts GET an Email Opt-outs Report
EmailReportingApi getSends GET /reports/email_reports/{campaign_activity_id}/tracking/sends GET an Email Sends Report
EmailReportingApi getUniqueOpens GET /reports/email_reports/{campaign_activity_id}/tracking/unique_opens GET an Email Unique Opens Report
EmailSchedulingApi retrieveEmailCampaignActivityPreviewUsingGET GET /emails/activities/{campaign_activity_id}/previews GET the HTML Preview of an Email Campaign Activity
EmailSchedulingApi retrieveEmailSchedulesUsingGET GET /emails/activities/{campaign_activity_id}/schedules GET an Email Campaign Activity Schedule
EmailSchedulingApi retrieveEmailSendHistoryUsingGET GET /emails/activities/{campaign_activity_id}/send_history GET the Send History of an Email Campaign Activity
EmailSchedulingApi scheduleEmailCampaignActivityUsingPOST POST /emails/activities/{campaign_activity_id}/schedules POST (Create) an Email Campaign Activity Schedule
EmailSchedulingApi testSendCampaignActivityUsingPOST POST /emails/activities/{campaign_activity_id}/tests POST Test Send an Email Campaign Activity
EmailSchedulingApi unscheduleEmailCampaignActivityUsingDELETE DELETE /emails/activities/{campaign_activity_id}/schedules DELETE an Email Campaign Activity Schedule
LandingPagesReportingApi getContactAdds GET /reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_adds GET a Unique Contacts Adds Landing Page Report
LandingPagesReportingApi getContactOpens GET /reports/landing_pages/campaign_details/{campaign_activity_id}/p_contact_opens GET a Contacts Opens Landing Page Report
LandingPagesReportingApi getUniqueContactClicks GET /reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_clicks GET a Unique Contacts Clicks Landing Page Report
LandingPagesReportingApi getUniqueContactOpens GET /reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_opens GET a Unique Contacts Opens Landing Page Report
LandingPagesReportingApi getUniqueContactSMSOptIns GET /reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_sms_optins GET a Unique Contacts SMS Opt-In Landing Page Report
LandingPagesReportingApi getUniqueContactUpdates GET /reports/landing_pages/campaign_details/{campaign_activity_id}/p_unique_contact_updates GET a Unique Contacts Updates Landing Page Report
SMSReportingApi getAllBulkSmsCampaignSummaries GET /reports/summary_reports/sms_campaign_summaries GET an SMS Campaigns Summary Report
SegmentsApi createSegment POST /segments POST (create) a Segment
SegmentsApi deleteSegment DELETE /segments/{segment_id} DELETE a Segment
SegmentsApi getAccountSegments GET /segments GET all Segments
SegmentsApi getSegmentDetail GET /segments/{segment_id} GET a Segment's Details
SegmentsApi updateSegment PUT /segments/{segment_id} PUT (update) a Segment
SegmentsApi updateSegmentName PATCH /segments/{segment_id}/name PATCH (rename) a Segment
TechnologyPartnersApi cancelAccount PUT /partner/accounts/{encoded_account_id}/status/cancel PUT Cancel the Billing Plan for a Client Account
TechnologyPartnersApi createSSOUser POST /partner/accounts/{encoded_account_id}/users/sso POST a User Under a Partner's SSO-Enabled Client Account
TechnologyPartnersApi getPartnerSiteOwners GET /partner/accounts GET Partner Client Accounts
TechnologyPartnersApi getPlan GET /partner/accounts/{encoded_account_id}/plan GET Billing Plan Details for a Client Account
TechnologyPartnersApi partnerAccountOperationsPostSync POST /partner/accounts/{encoded_account_id}/account_operations/sync POST Send an API request on Behalf of a Client Account
TechnologyPartnersApi provision POST /partner/accounts POST (create) a Partner Client Account
TechnologyPartnersApi setPlan PUT /partner/accounts/{encoded_account_id}/plan PUT (update) Billing Plan Details for a Client Account
TechnologyPartnersWebhooksApi deleteWebhooksSubscriptions DELETE /partner/webhooks/subscriptions/{topic_id} DELETE Webhook Topic Subscriptions
TechnologyPartnersWebhooksApi getWebhooksCollection GET /partner/webhooks/subscriptions GET a Collection of Webhook Topic Subscriptions
TechnologyPartnersWebhooksApi getWebhooksTopic GET /partner/webhooks/subscriptions/{topic_id} GET Webhook Topic Subscription
TechnologyPartnersWebhooksApi putWebhooksTopic PUT /partner/webhooks/subscriptions/{topic_id} PUT Webhook Topic Subscription
TechnologyPartnersWebhooksApi testSendWebhooksTopic POST /partner/webhooks/subscriptions/{topic_id}/tests POST Test Send Webhook Notification

Models

Authorization

Authentication schemes defined for the API:

oauth2_implicit

  • Type: OAuth
  • Flow: implicit
  • Authorization URL: https://authz.constantcontact.com/oauth2/default/v1/authorize
  • Scopes:
    • contact_data: Read or modify contact data.
    • campaign_data: Read or modify email campaign data.
    • account_read: Read account data.
    • account_update: Modify account data.

oauth2_access_code

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://authz.constantcontact.com/oauth2/default/v1/authorize
  • Scopes:
    • contact_data: Read or modify contact data.
    • campaign_data: Read or modify email campaign data.
    • account_read: Read account data.
    • account_update: Modify account data.

ctctPartnerAuthorizer

  • Type: API key
  • API key parameter name: Unnamed
  • Location: HTTP header

api_key

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 3.0.2400
    • Generator version: 7.6.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

Constant Contact REST v3 SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages