You are here

function MCAPI::listInterestGroupingAdd in Mailchimp 6.2

Add a new Interest Grouping - if interest groups for the List are not yet enabled, adding the first grouping will automatically turn them on.

Related

@example xml-rpc_listInterestGroupingAdd.php

Parameters

string $id the list id to connect to. Get by calling lists():

string $name the interest grouping to add - grouping names must be unique:

string $type The type of the grouping to add - one of "checkboxes", "hidden", "dropdown", "radio":

array $groups The lists of initial group names to be added - at least 1 is required and the names must be unique within a grouping. If the number takes you over the 60 group limit, an error will be thrown.:

Return value

int the new grouping id if the request succeeds, otherwise an error will be thrown

File

./MCAPI.class.php, line 1220

Class

MCAPI

Code

function listInterestGroupingAdd($id, $name, $type, $groups) {
  $params = array();
  $params["id"] = $id;
  $params["name"] = $name;
  $params["type"] = $type;
  $params["groups"] = $groups;
  return $this
    ->callServer("listInterestGroupingAdd", $params);
}