Overview
  • Namespace
  • Class

Namespaces

  • MailChimp
    • AuthorizedApps
    • Automations
    • Batches
    • CampaignFolders
    • Campaigns
    • Conversations
    • Ecommerce
    • FileManager
    • Lists
    • Reports
    • TemplateFolders
    • Templates

Classes

  • Interests
  • Lists
  • Members
  • MergeFields
  • Segments
  • SignupForms
  • Webhooks

Class MergeFields

MailChimp\MailChimp
Extended by MailChimp\Lists\Lists
Extended by MailChimp\Lists\MergeFields
Namespace: MailChimp\Lists
Located at Lists/MergeFields.php

Methods summary

public object
# getMergeFields( string $list_id, array $query = [] )

Get a list of all merge fields (formerly merge vars) for a list. Available query fields: array["fields"] array list of strings of response fields to return array["exclude_fields"] array list of strings of response fields to exclude (not to be used with "fields") array["count"] int number of records to return array["offset"] int number of records from a collection to skip. array["type"] string The merge field type. array["required"] boolean The boolean value if the merge field is required.

Get a list of all merge fields (formerly merge vars) for a list. Available query fields: array["fields"] array list of strings of response fields to return array["exclude_fields"] array list of strings of response fields to exclude (not to be used with "fields") array["count"] int number of records to return array["offset"] int number of records from a collection to skip. array["type"] string The merge field type. array["required"] boolean The boolean value if the merge field is required.

Parameters

$list_id
$query
(See Above) OPTIONAL associative array of query parameters.

Returns

object
public object
# getMergeField( string $list_id, integer $merge_id, array $query = [] )

Get information about a specific merge field in a list. Available query fields: array["fields"] array list of strings of response fields to return array["exclude_fields"] array list of strings of response fields to exclude (not to be used with "fields")

Get information about a specific merge field in a list. Available query fields: array["fields"] array list of strings of response fields to return array["exclude_fields"] array list of strings of response fields to exclude (not to be used with "fields")

Parameters

$list_id
$merge_id
$query
(See Above) OPTIONAL associative array of query parameters.

Returns

object
public object
# createMergeField( string $list_id, string $name, string $type, array $optional_settings = [] )

Create a new merge field for a specific list "name" string Required. The name of the merge field "type" string Required. The type for the merge field array["optional_settings"] ["tag"] string The tag used in MailChimp campaigns and for the /members endpoint. ["required"] boolean The boolaen value if the merge field is required ["default_value"] string The type for the merge field ["public"] boolean Whether the merge field is displayed on the signup form. ["display_order"] int The order the merge field displays on the signup form. ["options"] array Extra option for some merge field tidy_parse_string ["default_country"] int In an address field, the default country code if none supplied ["phone_format"] string In a phone field, the phone number tupe: US or International ["date_format"] string In a date or birthday field, the format of the date ["choices"] array In a radio or dropdown non-group field, the available options. ["size"] int In a text field, the default length fo the text field ["help_text"] string Extra text to help the subscrber fill out the form

Create a new merge field for a specific list "name" string Required. The name of the merge field "type" string Required. The type for the merge field array["optional_settings"] ["tag"] string The tag used in MailChimp campaigns and for the /members endpoint. ["required"] boolean The boolaen value if the merge field is required ["default_value"] string The type for the merge field ["public"] boolean Whether the merge field is displayed on the signup form. ["display_order"] int The order the merge field displays on the signup form. ["options"] array Extra option for some merge field tidy_parse_string ["default_country"] int In an address field, the default country code if none supplied ["phone_format"] string In a phone field, the phone number tupe: US or International ["date_format"] string In a date or birthday field, the format of the date ["choices"] array In a radio or dropdown non-group field, the available options. ["size"] int In a text field, the default length fo the text field ["help_text"] string Extra text to help the subscrber fill out the form

Parameters

$list_id
$name
$type
$optional_settings

Returns

object
public object
# updateMergeField( string $list_id, string $merge_id, array $data = [] )

Update a specific merge field in a list

Update a specific merge field in a list

Parameters

$list_id
$merge_id
$data
(See createMergeField() for structure)

Returns

object
public
# deleteMergeField( string $list_id, integer $merge_id )

Delete a specific merge field in a list.

Delete a specific merge field in a list.

Parameters

$list_id
$merge_id

Methods inherited from MailChimp\Lists\Lists

batchMembers(), createList(), deleteList(), getAbuseReport(), getAbuseReports(), getActivity(), getClients(), getGrowthHistory(), getGrowthHistoryMonth(), getList(), getLists(), interests(), members(), mergeFields(), segments(), signupForms(), updateList(), webhooks()

Methods inherited from MailChimp\MailChimp

__construct(), authorizedApps(), automations(), batchOps(), campaignFolders(), campaigns(), conversations(), createLog(), ecommerce(), execute(), fileManager(), fileManagerFolders(), getAccountInfo(), getMemberHash(), lists(), logData(), optionalFields(), reports(), searchMembers(), templateFolders(), templates()

API documentation generated by ApiGen