Overview

Namespaces

  • None
  • PHP

Classes

  • Mailchimp
  • Mailchimp_Campaigns
  • Mailchimp_Ecomm
  • Mailchimp_Folders
  • Mailchimp_Gallery
  • Mailchimp_Helper
  • Mailchimp_Lists
  • Mailchimp_Mobile
  • Mailchimp_Neapolitan
  • Mailchimp_Reports
  • Mailchimp_Templates
  • Mailchimp_Users
  • Mailchimp_Vip

Exceptions

  • Mailchimp_Absplit_UnknownError
  • Mailchimp_Absplit_UnknownSplitTest
  • Mailchimp_Absplit_UnknownTestType
  • Mailchimp_Absplit_UnknownWaitUnit
  • Mailchimp_Absplit_UnknownWinnerType
  • Mailchimp_Absplit_WinnerNotSelected
  • Mailchimp_Avesta_Db_Exception
  • Mailchimp_Campaign_BounceMissing
  • Mailchimp_Campaign_DoesNotExist
  • Mailchimp_Campaign_InvalidAbsplit
  • Mailchimp_Campaign_InvalidAuto
  • Mailchimp_Campaign_InvalidContent
  • Mailchimp_Campaign_InvalidOption
  • Mailchimp_Campaign_InvalidRss
  • Mailchimp_Campaign_InvalidSegment
  • Mailchimp_Campaign_InvalidStatus
  • Mailchimp_Campaign_InvalidTemplate
  • Mailchimp_Campaign_NotSaved
  • Mailchimp_Campaign_StatsNotAvailable
  • Mailchimp_Email_AlreadySubscribed
  • Mailchimp_Email_AlreadyUnsubscribed
  • Mailchimp_Email_NotExists
  • Mailchimp_Email_NotSubscribed
  • Mailchimp_Error
  • Mailchimp_HttpError
  • Mailchimp_Invalid_Analytics
  • Mailchimp_Invalid_ApiKey
  • Mailchimp_Invalid_AppKey
  • Mailchimp_Invalid_DateTime
  • Mailchimp_Invalid_EcommOrder
  • Mailchimp_Invalid_Email
  • Mailchimp_Invalid_Folder
  • Mailchimp_Invalid_IP
  • Mailchimp_Invalid_Options
  • Mailchimp_Invalid_PagingLimit
  • Mailchimp_Invalid_PagingStart
  • Mailchimp_Invalid_SendType
  • Mailchimp_Invalid_Template
  • Mailchimp_Invalid_TrackingOptions
  • Mailchimp_Invalid_URL
  • Mailchimp_List_AlreadySubscribed
  • Mailchimp_List_CannotRemoveEmailMerge
  • Mailchimp_List_DoesNotExist
  • Mailchimp_List_InvalidBounceMember
  • Mailchimp_List_InvalidImport
  • Mailchimp_List_InvalidInterestFieldType
  • Mailchimp_List_InvalidInterestGroup
  • Mailchimp_List_InvalidMergeField
  • Mailchimp_List_InvalidOption
  • Mailchimp_List_InvalidUnsubMember
  • Mailchimp_List_Merge_InvalidMergeID
  • Mailchimp_List_MergeFieldRequired
  • Mailchimp_List_NotSubscribed
  • Mailchimp_List_TooManyInterestGroups
  • Mailchimp_List_TooManyMergeFields
  • Mailchimp_Max_Size_Reached
  • Mailchimp_MC_ContentImport_InvalidArchive
  • Mailchimp_MC_InvalidPayment
  • Mailchimp_MC_PastedList_Duplicate
  • Mailchimp_MC_PastedList_InvalidImport
  • Mailchimp_MC_SearchException
  • Mailchimp_Module_Unknown
  • Mailchimp_MonthlyPlan_Unknown
  • Mailchimp_Order_TypeUnknown
  • Mailchimp_Parse_Exception
  • Mailchimp_PDOException
  • Mailchimp_Request_TimedOut
  • Mailchimp_ServerError_InvalidParameters
  • Mailchimp_ServerError_MethodUnknown
  • Mailchimp_Too_Many_Connections
  • Mailchimp_Unknown_Exception
  • Mailchimp_User_CannotSendCampaign
  • Mailchimp_User_Disabled
  • Mailchimp_User_DoesExist
  • Mailchimp_User_DoesNotExist
  • Mailchimp_User_InvalidAction
  • Mailchimp_User_InvalidRole
  • Mailchimp_User_MissingEmail
  • Mailchimp_User_MissingModuleOutbox
  • Mailchimp_User_ModuleAlreadyPurchased
  • Mailchimp_User_ModuleNotPurchased
  • Mailchimp_User_NotApproved
  • Mailchimp_User_NotEnoughCredit
  • Mailchimp_User_UnderMaintenance
  • Mailchimp_User_Unknown
  • Mailchimp_ValidationError
  • Mailchimp_XML_RPC2_Exception
  • Mailchimp_XML_RPC2_FaultException
  • Mailchimp_Zend_Uri_Exception
  • Overview
  • Namespace
  • Class
  • Tree

Class Mailchimp_Templates

Located at Mailchimp/Templates.php
Methods summary
public
# __construct( Mailchimp $master )
public associative_array
# add( string $name, string $html, integer $folder_id = null )

Create a new user template, <strong>NOT</strong> campaign content. These templates can then be applied while creating campaigns.

Create a new user template, <strong>NOT</strong> campaign content. These templates can then be applied while creating campaigns.

Parameters

$name
string
$name
$html
string
$html
$folder_id
integer
$folder_id

Returns

associative_array
with a single element: - template_id int the new template id, otherwise an error is thrown.
public associative_array
# del( integer $template_id )

Delete (deactivate) a user template

Delete (deactivate) a user template

Parameters

$template_id
integer
$template_id

Returns

associative_array
with a single entry: - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
public associative_array
# info( integer $template_id, string $type = 'user' )

Pull details for a specific template to help support editing

Pull details for a specific template to help support editing

Parameters

$template_id
integer
$template_id
$type
string
$type

Returns

associative_array
info to be used when editing - default_content associative_array the default content broken down into the named editable sections for the template - dependant upon template, so not documented - sections associative_array the valid editable section names - dependant upon template, so not documented - source string the full source of the template as if you exported it via our template editor - preview string similar to the source, but the rendered version of the source from our popup preview
public associative_array
# getList( associative_array $types = array(), associative_array $filters = array() )

Retrieve various templates available in the system, allowing some thing similar to our template gallery to be created.

Retrieve various templates available in the system, allowing some thing similar to our template gallery to be created.

Parameters

$types
associative_array
$types - user boolean Custom templates for this user account. Defaults to true. - gallery boolean Templates from our Gallery. Note that some templates that require extra configuration are withheld. (eg, the Etsy template). Defaults to false. - base boolean Our "start from scratch" extremely basic templates. Defaults to false.
$filters
associative_array
$filters - category string optional for Gallery templates only, limit to a specific template category - folder_id string user templates, limit to this folder_id - include_inactive boolean user templates are not deleted, only set inactive. defaults to false. - inactive_only boolean only include inactive user templates. defaults to false.

Returns

associative_array
for each type - user array matching user templates, if requested. - id int Id of the template - name string Name of the template - layout string General description of the layout of the template - category string The category for the template, if there is one. - preview_image string If we've generated it, the url of the preview image for the template. We do out best to keep these up to date, but Preview image urls are not guaranteed to be available - date_created string The date/time the template was created - active boolean whether or not the template is active and available for use. - edit_source boolean Whether or not you are able to edit the source of a template. - folder_id boolean if it's in one, the folder id - gallery array matching gallery templates, if requested. - id int Id of the template - name string Name of the template - layout string General description of the layout of the template - category string The category for the template, if there is one. - preview_image string If we've generated it, the url of the preview image for the template. We do out best to keep these up to date, but Preview image urls are not guaranteed to be available - date_created string The date/time the template was created - active boolean whether or not the template is active and available for use. - edit_source boolean Whether or not you are able to edit the source of a template. - base array matching base templates, if requested. - id int Id of the template - name string Name of the template - layout string General description of the layout of the template - category string The category for the template, if there is one. - preview_image string If we've generated it, the url of the preview image for the template. We do out best to keep these up to date, but Preview image urls are not guaranteed to be available - active boolean whether or not the template is active and available for use. - date_created string The date/time the template was created - edit_source boolean Whether or not you are able to edit the source of a template.
public associative_array
# undel( integer $template_id )

Undelete (reactivate) a user template

Undelete (reactivate) a user template

Parameters

$template_id
integer
$template_id

Returns

associative_array
with a single entry: - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
public associative_array
# update( integer $template_id, associative_array $values )

Replace the content of a user template, <strong>NOT</strong> campaign content.

Replace the content of a user template, <strong>NOT</strong> campaign content.

Parameters

$template_id
integer
$template_id
$values
associative_array
$values - name string the name for the template - names must be unique and a max of 50 bytes - html string a string specifying the entire template to be created. This is <strong>NOT</strong> campaign content. They are intended to utilize our template language. - folder_id int the folder to put this template in - 0 or a blank values will remove it from a folder.

Returns

associative_array
with a single entry: - complete bool whether the call worked. reallistically this will always be true as errors will be thrown otherwise.
API documentation generated by ApiGen 2.8.0