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 Segments

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

Methods summary

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

Get a list of campaigns for the account 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 campaign type. Possible values: saved,static,fuzzy array["since_created_at"] string Restrict the response to campaigns created after the set time. ISO 8601 time format: 2015-10-21T15:41:36+00:00. array["before_created_at"] string Restrict the response to segments created before the set time. ISO 8601 time format: 2015-10-21T15:41:36+00:00. array["since_updated_at"] string Restrict the response to segments updated after the set time. ISO 8601 time format: 2015-10-21T15:41:36+00:00. array["before_updated_at"] string Restrict the response to segments updated after the set time. ISO 8601 time format: 2015-10-21T15:41:36+00:00.

Get a list of campaigns for the account 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 campaign type. Possible values: saved,static,fuzzy array["since_created_at"] string Restrict the response to campaigns created after the set time. ISO 8601 time format: 2015-10-21T15:41:36+00:00. array["before_created_at"] string Restrict the response to segments created before the set time. ISO 8601 time format: 2015-10-21T15:41:36+00:00. array["since_updated_at"] string Restrict the response to segments updated after the set time. ISO 8601 time format: 2015-10-21T15:41:36+00:00. array["before_updated_at"] string Restrict the response to segments updated after the set time. ISO 8601 time format: 2015-10-21T15:41:36+00:00.

Parameters

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

Returns

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

Get information about a specific segment. 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 segment. 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
$segment_id
$query
(See Above) OPTIONAL associative array of query parameters.

Returns

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

Get information about members in a saved segment. 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.

Get information about members in a saved segment. 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.

Parameters

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

Returns

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

Create a new segment in a specific list. array["data"] ["name"] string required ["static_segment"] array An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. Passing an empty array will create a static segment without any subscribers. This field cannot be provided with the options field. ["options"] array The conditions of the segment. Static and fuzzy segments don’t have conditions. ["match"] string Match Type Possible Values: any, all ["conditions"] array An array of segment conditions. Structure depends on segment http://developer.mailchimp.com/documentation/mailchimp/reference/lists/segments/#

Create a new segment in a specific list. array["data"] ["name"] string required ["static_segment"] array An array of emails to be used for a static segment. Any emails provided that are not present on the list will be ignored. Passing an empty array will create a static segment without any subscribers. This field cannot be provided with the options field. ["options"] array The conditions of the segment. Static and fuzzy segments don’t have conditions. ["match"] string Match Type Possible Values: any, all ["conditions"] array An array of segment conditions. Structure depends on segment http://developer.mailchimp.com/documentation/mailchimp/reference/lists/segments/#

Parameters

$list_id
$data

Returns

object
public object
# updateListSegment( string $list_id, array $segment_id, array $data = null )

Update a specific segment in a list. Structure depends on segment http://developer.mailchimp.com/documentation/mailchimp/reference/lists/segments/#

Update a specific segment in a list. Structure depends on segment http://developer.mailchimp.com/documentation/mailchimp/reference/lists/segments/#

Parameters

$list_id
$segment_id
$data
$data

Returns

object
public object
# addListSegmentMember( string $list_id, array $segment_id, $email_address, array $data = [] )

Add a member to a static segment. array["data"] ["email_address"] string required

Add a member to a static segment. array["data"] ["email_address"] string required

Parameters

$list_id
$segment_id
$data
$email_address
$data

Returns

object
public object
# batchAddRemoveSegmentMembers( string $list_id, string $segment_id, array $emails = [] )

Batch add/remover members to a static segment. array["emails"] ["add"] array ["remove"] array

Batch add/remover members to a static segment. array["emails"] ["add"] array ["remove"] array

Parameters

$list_id
$segment_id
$emails

Returns

object
public
# removeListSegmentMember( string $list_id, string $segment_id, string $email_address )

Remove a member from the specified static segment.

Remove a member from the specified static segment.

Parameters

$list_id
$segment_id
$email_address
public
# deleteListSegment( string $list_id, string $segment_id )

Delete a specific segment in a list.

Delete a specific segment in a list.

Parameters

$list_id
$segment_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