Overview

Namespaces

  • Ctct
    • Auth
    • Components
      • Account
      • Activities
      • Contacts
      • EmailMarketing
      • Tracking
    • Exceptions
    • Services
  • PHP

Classes

  • AccountService
  • ActivityService
  • BaseService
  • CampaignScheduleService
  • CampaignTrackingService
  • ContactService
  • ContactTrackingService
  • EmailMarketingService
  • ListService
  • Overview
  • Namespace
  • Class
  • Tree

Class ContactService

Performs all actions pertaining to Constant Contact Contacts

Ctct\Services\BaseService
Extended by Ctct\Services\ContactService
Namespace: Ctct\Services
Package: Services
Author: Constant Contact
Located at Ctct/Services/ContactService.php
Methods summary
public Ctct\Components\ResultSet
# getContacts( string $accessToken, array $params = null )

Get a ResultSet of contacts

Get a ResultSet of contacts

Parameters

$accessToken
string
$accessToken - Constant Contact OAuth2 access token
$params
array
$params - array of query parameters to be appended to the url

Returns

Ctct\Components\ResultSet
public Ctct\Components\Contacts\Contact
# getContact( string $accessToken, integer $contact_id )

Get contact details for a specific contact

Get contact details for a specific contact

Parameters

$accessToken
string
$accessToken - Constant Contact OAuth2 access token
$contact_id
integer
$contact_id - Unique contact id

Returns

Ctct\Components\Contacts\Contact
public Ctct\Components\Contacts\Contact
# addContact( string $accessToken, Ctct\Components\Contacts\Contact $contact, boolean $actionByVisitor = false )

Add a new contact to the Constant Contact account

Add a new contact to the Constant Contact account

Parameters

$accessToken
string
$accessToken - Constant Contact OAuth2 access token
$contact
Ctct\Components\Contacts\Contact
$contact - Contact to add
$actionByVisitor
boolean
$actionByVisitor - is the action being taken by the visitor

Returns

Ctct\Components\Contacts\Contact
public boolean
# deleteContact( string $accessToken, integer $contact_id )

Delete contact details for a specific contact

Delete contact details for a specific contact

Parameters

$accessToken
string
$accessToken - Constant Contact OAuth2 access token
$contact_id
integer
$contact_id - Unique contact id

Returns

boolean
public boolean
# deleteContactFromLists( string $accessToken, integer $contact_id )

Delete a contact from all contact lists

Delete a contact from all contact lists

Parameters

$accessToken
string
$accessToken - Constant Contact OAuth2 access token
$contact_id
integer
$contact_id - Contact id to be removed from lists

Returns

boolean
public boolean
# deleteContactFromList( string $accessToken, integer $contact_id, integer $list_id )

Delete a contact from a specific contact list

Delete a contact from a specific contact list

Parameters

$accessToken
string
$accessToken - Constant Contact OAuth2 access token
$contact_id
integer
$contact_id - Contact id to be removed
$list_id
integer
$list_id - ContactList to remove the contact from

Returns

boolean
public Ctct\Components\Contacts\Contact
# updateContact( string $accessToken, Ctct\Components\Contacts\Contact $contact, boolean $actionByVisitor = false )

Update contact details for a specific contact

Update contact details for a specific contact

Parameters

$accessToken
string
$accessToken - Constant Contact OAuth2 access token
$contact
Ctct\Components\Contacts\Contact
$contact - Contact to be updated
$actionByVisitor
boolean
$actionByVisitor - is the action being taken by the visitor

Returns

Ctct\Components\Contacts\Contact
Methods inherited from Ctct\Services\BaseService
__construct(), buildUrl(), getHeaders(), getRestClient()
Properties inherited from Ctct\Services\BaseService
$apiKey, $rest_client
Appconnect PHP SDK API documentation generated by ApiGen 2.8.0