Copied!
CloneableInstantiable
Methods
public __construct(PHPFUI\ConstantContact\Client $client)
public get(?string $limit = NULL, ?string $sort_by = NULL) : array
 

GET all Segments

Use this method to get a list of all segments associated with the account. You can sort segment results and limit the number of segments that display per page. Deleted segments are excluded from the results. For more use case information, see Get All Segments in the API guide.

  • param string $limit The number of segments to return on a page.
  • param string $sort_by Specify the segment sort order to use. Sort by name (sort_by=name) in ascending order, or sort by date (sort_by=date) in descending order with the most recently updated segments listed first.
public PHPFUI\ConstantContact\Base::getLastError() : string
public PHPFUI\ConstantContact\Base::getResponseText() : string
public PHPFUI\ConstantContact\Base::getStatusCode() : int
public PHPFUI\ConstantContact\Base::next() : array
 

If the endpoint is paginated, you can call next() to retrieve the next set of data. If no next is provided, an empty array is returned.

  • return array filled with next part of the response from the endpoint, or empty if no next.
public post(PHPFUI\ConstantContact\Definition\SegmentData $body) : array
 

POST (create) a Segment

Use this method to create a new segment. You create segments to target a subset of your contacts that meet your specific criteria for a marketing campaign. The segment name must be unique. The segment_criteria requires single-string escaped JSON. Constant Contact uses the contact data that you specify in the segment_criteria to evaluate and identify the contacts you want to target. Contact data can be grouped from different data sources, including:

  • tracking: Supports or and and groups.

  • contact: Supports or and and groups.

  • list_membership: Supports or groups.

  • tags: Supports or groups.

If you do not specify list_membership as criteria, Constant Contact evaluates all contacts in your account. To avoid returning a 400 error response, when specifying the segment_criteria do not request more than 500 email campaigns or a date range greater than 1825 days (5 years) be evaluated.

For more use case information, see the Segments Overview in the API guide.

  • param \PHPFUI\ConstantContact\Definition\SegmentData $body The segment name and segment_criteria (requires single-string escaped JSON).
public PHPFUI\ConstantContact\Base::success() : bool
Properties
protected PHPFUI\ConstantContact\Client PHPFUI\ConstantContact\Base::$client
protected string PHPFUI\ConstantContact\Base::$urlPath
Methods
protected PHPFUI\ConstantContact\Base::doDelete(array $parameters) : bool
protected PHPFUI\ConstantContact\Base::doGet(array $parameters) : array
protected PHPFUI\ConstantContact\Base::doPatch(array $parameters) : array
protected PHPFUI\ConstantContact\Base::doPost(array $parameters) : array
protected PHPFUI\ConstantContact\Base::doPut(array $parameters) : array
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration