GetLists

Calls up all the Lists that this user either owns or has access to.

Parametres

This method does not have any parameters.

Returns:

On success:

<Array> Lists details

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Users/GetLists?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN"

$parser→GetLists();

CreateList

This method creates a List based on current class variables.

Parametres:

CreateList(listName, descriptiveName, mobilePrefix, contactFields)
$ http POST https://api.mailmailmail.net/v1.1/Lists/CreateList --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listName=value&descriptiveName=value&mobile_prefix=value&contactFields=value"

Returns:

On success:

<Integer> listid

On failure:

<Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Lists/CreateList --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listName=List%name&descriptiveName=List%description&mobile_prefix=389&contactFields[0]=1&$contactFields[1]=2"
$listName = "List name";
$descriptiveName = "List description";
$mobilePrefix = "389";
$contactFields = array(1, 2);

$result = $parser→CreateList($listName, $descriptiveName, $mobilePrefix, $contactFields);

UpdateList

Updates a current List based on the current class variables.

Parametres:

 UpdateList(listid, listName, descriptiveName, mobilePrefix);
$ http POST https://api.mailmailmail.net/v1.1/Lists/UpdateList --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&listName=value&descriptiveName=value&mobile_prefix=value"

Returns:

On success:

<Boolean> true

On failure:

<Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Lists/UpdateList --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=12&listName=List%new%name&descriptiveName=New%Description"
$listid = 12;
$listName = "List new name";
$descriptiveName = "New Description";

$parser->UpdateList($listid, $listName, $descriptiveName);

CopyList

Copy List details including contact fields.

Parametres:

CopyList(listid);
$ http POST https://api.mailmailmail.net/v1.1/Lists/CopyList --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value"

Returns:

On success:

<Array> array(true, new id)

On failure:

<Array> array(false, message)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Lists/CopyList --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=12"
$listid = 12;

$result = $parser->CopyList($listid);

DeleteList

Delete a List from the database.

Parametres:

 DeleteList(listid);
$ http DELETE 'https://api.mailmailmail.net/v1.1/Lists/DeleteList' -d 'listid=value&Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN'

Returns:

On success:

<Boolean> true

On failure:

<Boolean> false

Examples:

$ http DELETE 'https://api.mailmailmail.net/v1.1/Lists/DeleteList' -d 'listid=12&Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN'
$listid = 12;

$result = $parser→DeleteList($listid);

CreateCustomField

Create new custom field.

Parametres:

CreateCustomField(fieldName, fieldType, fieldSettings, listids);
$ http POST https://api.mailmailmail.net/v1.1/CustomFields/CreateCustomField --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&name=value&fieldtype=value&fieldsettings=value&listids=value"

Returns:

On success:

 <Integer> Return id of new custom field.

On failure:

<Array> (false, message)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/CustomFields/CreateCustomField --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&name=Text%field&fieldtype=text&fieldsettings[FieldLength]=500&fieldsettings[MaxLength]=502&fieldsettings[MinLength]=10"
$fieldName = "Text field";
$fieldType = "text";
$fieldSettings = array(
    'FieldLength' => 500,
    'MaxLength' => 502,
    'MinLength' => 10
);
$result = $parser→CreateCustomField($fieldName, $fieldType, $fieldSettings);
$fieldName = "Text Area";
$fieldType = "textarea";
$listids = array(41,89);
$fieldSettings = array(
    'Rows' => 50,
    'Columns' => 10
);
$result = $parser→CreateCustomField($fieldName, $fieldType, $fieldSettings, $listids);
$fieldName = "Number";
$fieldType = "number";
$listids = array(50);
$fieldSettings = array(
    'FieldLength' => 500,
    'MaxLength' => 502,
    'MinLength' => 10
);

$result = $parser→CreateCustomField($fieldName, $fieldType, $fieldSettings, $listids);
$fieldName = "Gender";
$fieldType = "radiobutton";
$fieldSettings = array(
     'Key' => array(
     'male','female'
     ),
     'Value' => array(
     'male','female'
     )
     );
$result = $parser→CreateCustomField($fieldName, $fieldType, $fieldSettings);
$fieldName = "Countries";
$fieldType = "dropdown";
$fieldSettings = array(
     'Key' => array(
     'MK','DK'
     ),
     'Value' => array(
     'Macedonia','Denmark'
     )
     );
$result = $parser→CreateCustomField($fieldName, $fieldType, $fieldSettings);
$fieldName = "Colors";
$fieldType = "checkbox";
$fieldSettings = array(
     'Key' => array(
     'green','blue'
     ),
     'Value' => array(
     'green','blue'
     )
     );
$result = $parser→CreateCustomField($fieldName, $fieldType, $fieldSettings);
$fieldName = "Birth date";
$fieldType = "date";
$fieldSettings = array (
        'format_1' => 'day',
        'format_2' => 'month',
        'format_3' => 'year'
    );
$result = $parser→CreateCustomField($fieldName, $fieldType, $fieldSettings);
$fieldName = "Birth date";
$fieldType = "date";

$result = $parser→CreateCustomField($fieldName, $fieldType);
$fieldName = "Birth date";
$fieldType = "date";
$fieldSettings = array (
        'format_1' => 'month',
        'format_2' => 'day',
        'format_3' => 'year',
        'start_year' => 2012,
        'end_year' => 2087
    );
$result = $parser→CreateCustomField($fieldName, $fieldType, $fieldSettings);
$fieldName = "Birth date";
$fieldType = "date";
$fieldSettings = array (
        'format_1' => 'year',
        'format_2' => 'month',
        'format_3' => 'day',
    );
$result = $parser→CreateCustomField($fieldName, $fieldType, $fieldSettings);

LoadCustomField

Loads up the customfield and sets the appropriate class variables.

Parametres:

 LoadCustomField(fieldid, returnOptions, makeInstance);
$ http GET "https://api.mailmailmail.net/v1.1/CustomFields/LoadCustomField?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&fieldid=value&return_options=value&makeInstance=value"

Returns:

On success:

 <Array> Returns custom field.

On failure:

<Boolean> false.

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/CustomFields/LoadCustomField?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&fieldid=12"
$fieldid = 12;

$result = $parser→LoadCustomField($fieldid);

GetCustomFields

Fetches Contact Fields for the specified List.

Parametres:

 GetCustomFields(listids);
$ http GET "https://api.mailmailmail.net/v1.1/Lists/GetCustomFields?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listids=value"

Returns:

On success:

 <Array> Returns the List of Contact Fields.

On failure:

<Array> Empty array.

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Lists/GetCustomFields?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listids[0]=1&listids[1]=2&listids[2]=3"
$listids = array(1, 2, 3);

$result = $parser→GetCustomFields($listids);

GetSampleDataForOTM

Get sample data for OtM field.

Parametres:

GetSampleDataForOTM(fieldid);
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSampleDataForOTM?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&fieldid=value"

Returns:

On success:

<Array> Returns sample data.

On failure:

<Boolean> false.

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSampleDataForOTM?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&fieldid=78"
$fieldid = 78;

$result = $parser→GetSampleDataForOTM($fieldid);

AddSubscriberToList

This method adds subscriber to contact List.

Parametres:

AddSubscriberToList(listid, emailaddress, mobile, mobilePrefix, contactFields, addToAutoresponders, skipListCheck, confirmed);
$ http POST https://api.mailmailmail.net/v1.1/Subscribers/AddSubscriberToList --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&emailaddress=value&mobile=value&mobilePrefix=value&contactFields=value&add_to_autoresponders=value&skip_listcheck=value&confirmed=value"

Returns:

On success:

<Integer> System ID of the Subscriber.

On failure:

<Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Subscribers/AddSubscriberToList --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=110&emailaddress=test@mail.net"
$listid = 110;
$emailaddress = "test@mail.net";

$parser->AddSubscriberToList($listid, $emailaddress);
$listid = 110;
$mobile = "070444555";
$mobilePrefix = "389";

$result = $parser->AddSubscriberToList($listid, "", $mobile, $mobilePrefix);
$listid = 110;
$emailaddress = "test@mail.net";
$mobile = "070444555";
$mobilePrefix = "389";
$contactFields = array(
    array(
        'fieldid' => 11,
        'value' => "MKD"
    ),
    array(
        'fieldid' => 8,
        'value' => "Kumanovo"
    )
);
$addToAutoresponders = true;
$skipListCheck = false;
$confirmed = false;

$parser->AddSubscriberToList($listid, $emailaddress, $mobile, $mobilePrefix, $contactFields, $addToAutoresponders, $skipListCheck, $confirmed);

Contact fields for checkbox:


$contactFields = array(
    array(
        'fieldid' => 11,
        'value' => array("Monday", "Friday")
    )
);

$result = $parser->AddSubscriberToList($listid, $emailaddress, $mobile, $mobilePrefix, $contactFields, $addToAutoresponders, $skipListCheck);

Contact fields for one-to-many:

$contactFields = array(
	array(
				'fieldid' => 1094,
				'value' => array(
						'Date' => '12-07-2017',
						'Number' => 1,
						'Text' => "Ajde ajde ajde OTM"
				)
		)
);

$result = $parser->AddSubscriberToList($listid, $emailaddress, $mobile, $mobilePrefix, $contactFields, $addToAutoresponders, $skipListCheck);
Field structure:
Field structure

Add OTM data.

$listid = 110;
$emailaddress = "test@mail.net";
$mobile = "070444555";
$mobilePrefix = "389";
$addToAutoresponders = true;
$skipListCheck = false;
$confirmed = false;

$contactFields => array(
    'fieldid' => 20,
    'value' = array (
            "Movie" => array(
                array(
                    "Title" => "Bohemian Rhapsody",
                    "ReleaseDate" => "02.11.2018",
                    "Actors" => array (
                        array (
                            'FirstName' => "Rami",
                            'LastName' => "Malek",
                            'BirthDate' => "12.05.1981",
                            'emp_trigger' => 1
                        ),
                        array (
                            'FirstName' => "Lucy",
                            'LastName' => "Boynton",
                            'BirthDate' => "17.01.1994",
                            'emp_trigger' => 1
                        )
                    ),
                    "Oscar" => false,
                    "Rating" => 8.4,
                    "Premiere" => array (
                        array (
                            'Country' => "Denmark",
                            'Cinema' => "Cineplexx",
                            'PremiereDate' => "21.11.2018",
                            'emp_trigger' => 1
                        ),
                        array (
                            'Country' => "Macedonia",
                            'Cinema' => "Cineplexx",
                            'PremiereDate' => "01.11.2018",
                            'emp_trigger' => 1
                        )
                    ),
                    'emp_trigger' => 1
                )
            ),
        "emp_trigger" => 1
    )
);

$result = $parser->AddSubscriberToList($listid, $emailaddress, $mobile, $mobilePrefix, $contactFields, $addToAutoresponders, $skipListCheck);

GetSubscribers

Get a List of Subscriber information based on search criteria.

Parametres:

GetSubscribers(searchinfo, countOnly, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscribers?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&searchinfo=value&countonly=value&limit=value&offset=value"

Returns:

On success:

<Array>  array(List of Subscribers with respective information)
If countOnly specified:
<Integer> Number of Subscribers

On failure:

<Array> array(false, message)

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscribers?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&searchinfo[List]=any&searchinfo[Status]=unconfirmed"

All subscribers:

$searchinfo['Status'] = "all";            
$result = $parser->GetSubscribers($searchinfo);

All active subscribers:

$result = $parser->GetSubscribers();

All unconfirmed subscribers in lists:

$searchinfo['List'] = "any";
$searchinfo['Status'] = "unconfirmed";

$result = $parser->GetSubscribers($searchinfo);

Count unsubscribed subscribers in list:

$searchinfo['List'] = 19;
$searchinfo['Status'] = "unsubscribed";
$countOnly = true;

$result = $parser->GetSubscribers($searchinfo, $countOnly);

Subscribers in specific list(s):

$searchinfo['List'] = array(12);

$result = $parser->GetSubscribers($searchinfo);

Subscribers added today:

$searchinfo['DateSearch']['type'] = "after";
$searchinfo['DateSearch']['StartDate'] = "today";

$result = $parser->GetSubscribers($searchinfo);

Subscribers added in last 24 hours:

$searchinfo['DateSearch']['type'] = "after";
$searchinfo['DateSearch']['StartDate'] = "-1 day";

$result = $parser->GetSubscribers($searchinfo);
$searchinfo['DateSearch']['StartDate'] = "-24 hours";

$result = $parser->GetSubscribers($searchinfo);

Subscribers added in last week [in last 7 days, not from Monday]:

$searchinfo['DateSearch']['type'] = "after";
$searchinfo['DateSearch']['StartDate'] = "tomorrow -1 week";

$result = $parser->GetSubscribers($searchinfo);

Subscribers added before specific date:

$searchinfo['DateSearch']['type'] = "before";
$searchinfo['DateSearch']['StartDate'] = "17-05-2016";

$result = $parser->GetSubscribers($searchinfo);

Subscribers added on specific date:

$searchinfo['DateSearch']['type'] = "exactly";
$searchinfo['DateSearch']['StartDate'] = "19 May 2017";

$result = $parser->GetSubscribers($searchinfo);

Subscribers added between 2 dates:

$searchinfo['DateSearch']['type'] = "between";
$searchinfo['DateSearch']['StartDate'] = "10 May 2017";
$searchinfo['DateSearch']['EndDate'] = "20-May-2017";

$result = $parser->GetSubscribers($searchinfo);

Subscribers in specific list(s) added today:

$searchinfo['List'] =12;
$searchinfo['DateSearch']['type'] = "after";
$searchinfo['DateSearch']['StartDate'] = "today";

$result = $parser->GetSubscribers($searchinfo);

GetSubscribersByCustomField

Get a List of Subscriber information based on custom field.

Parametres:

GetSubscribersByCustomField(listid, data, activeOnly, countOnly, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscribersByCustomField?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&data=value&activeonly=value&countonly=value&limit=value&offset=value"

Returns:

On success:

<Array>  array(List of Subscribers with respective information)
If countOnly specified:
<Integer> Number of Subscribers

On failure:

<Array> array(false, message)

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscribersByCustomField?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=55&data[0][fieldid]=150&data[0][fieldvalue]=Name&data[0][operator]=OR&data[1][fieldid]=151&data[1][fieldvalue]=Last Name"
$listid = 55;
$data = array (
    array ( 'fieldid' => 150,
            'fieldValue' => 'Name',
            'operator' => 'OR'
          ),
    array ( 'fieldid' => 151,
            'fieldValue' => 'Last Name',
          )
    )
);
$limit = 10;
$activeOnly = true;
$countOnly = false;

$result = $parser->GetSubscribersByCustomField($listid, $data, $activeOnly, $countOnly, $limit);
$listid = 55;
$data = array (
    array ( 'fieldid' => 180,
            'fieldValue' => '05-07-2018',
            'type' => 'after',
            'operator' => 'OR'
          ),
    array (
            'fieldid' => 180,
            'fieldValue' => '05-12-2018',
            'type' => 'before'
          )
);

$result = $parser->GetSubscribersByCustomField($listid, $data);
$listid = 55;
$data = array (
    array ( 'fieldid' => 152,
            'fieldValue' => 'Blue',
            'operator' => 'AND'
          ),
    array ( 'fieldid' => 153,
            'fieldValue' => 155,
          )
    )
);

$result = $parser->GetSubscribersByCustomField($listid, $data);
$listid = 55;
$data = array (
    array (
            'fieldid' => 180,
            'fieldValue' => '05-05-2018',
            'fieldValueEndDate' => '05-11-2018',
            'type' => 'between'
    )
);

$result = $parser->GetSubscribersByCustomField($listid, $data);

GetSubscriberDetails

Gets subscriber data including last events and bounces.

Parametres:

GetSubscriberDetails(listid, subscriberid, emailaddress, mobile, mobilePrefix);
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscriberDetails?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&subscriberid=value&emailaddress=value&mobile=value&mobile_prefix=value"

Returns:

On success:

<Array> Subscriber details.

On failure:

<Array> array(false, message)

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscriberDetails?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=12&subscriberid=0&emailaddress=test@mail.net"
$listid = 12; 
$emailaddress = "test@mail.net";

$result = $parser->GetSubscriberDetails($listid, 0, $emailaddress);
$listid = 12;
$mobile = "72589985"
$mobilePrefix = “389”;

$result = parser->GetSubscriberDetails($listid, 0, "", $mobile, $mobilePrefix);
$listid = 12;
$subscriberid = 62;

$result = parser->GetSubscriberDetails($listid, $subscriberid);

GetSubscriberEvents

Gets subscriber events.

Parametres:

GetSubscriberEvents(listid, subscriberid, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscriberEvents?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&subscriberid=value&limit=value&offset=value"

Returns:

On success:

<Array> Subscriber events.

On failure:

<Array> array(false, message)

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscriberEvents?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=12&subscriberid=62"
$listid = 12;
$subscriberid = 62;

$result = parser->GetSubscriberEvents($listid, $subscriberid);
$listid = 12;
$subscriberid = 62;
$limit = 50;
$offset = 5;

$result = parser->GetSubscriberEvents($listid, $subscriberid, $limit, $offset);

GetSubscribersUpdatedSince

Get a List of Subscribers updated after the specified date.

Parametres:

GetSubscribersUpdatedSince(date, listid, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscribersUpdatedSince?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&date=value&listid=value&limit=value&offset=value"

Returns:

On success:

<Array> array(List of Subscribers with respective information)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscribersUpdatedSince?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&date=23.01.2018&listid=19&limit=10&offset=0"
$date = "23.01.2018";
$listid = 19;
$limit = 10;
$offset = 0;

$result = $parser->GetSubscribersUpdatedSince($date, $listid, $limit, $offset);

GetSubscribersFromSegment

Get a list of subscribers from segment.

Parametres:

GetSubscribersFromSegment(segmentid, countOnly, activeOnly, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscribersFromSegment?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&segmentid=value&countonly=value&activeonly=value&limit=value&offset=value"

Returns:

On success:

<Array> array(List of Subscribers with respective information)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetSubscribersFromSegment?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&segmentid=56"
$segmentid = 56;

$result = $parser->GetSubscribersFromSegment($segmentid);
$segmentid = 56;
$countOnly = true;

$result = $parser->GetSubscribersFromSegment($segmentid,$countOnly);
$segmentid = 56;
$countOnly = false;
$activeOnly = true;
$limit = 20;

$result = $parser->GetSubscribersFromSegment($segmentid,$countOnly, $activeOnly, $limit);

GetTriggers

Get a list of triggers for list or all triggers.

Parametres:

GetTriggers(listid, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Triggers/GetTriggers?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&limit=value&offset=value"

Returns:

On success:

<Array> array(List of triggers with respective information)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Triggers/GetTriggers?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=56"
$listid = 56;

$result = $parser->GetTriggers($listid);
$listid = 56;
$limit = 10;

$result = $parser->GetTriggers($listid, $limit);

GetTriggersForSegment

Get a list of triggers for segment.

Parametres:

GetTriggersForSegment(segmentid);
$ http GET "https://api.mailmailmail.net/v1.1/Segments/GetTriggersForSegment?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&segmentid=value"

Returns:

On success:

<Array> array(List of triggers with respective information)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Segments/GetTriggersForSegment?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&segmentid=56"
$segmentid = 56;

$result = $parser->GetTriggersForSegment($segmentid);

GetSegments

Get a list of segments for list or all segments.

Parametres:

GetSegments(listid, countSubscribers, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Segments/GetSegments?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&count_subscribers=value&limit=value&offset=value"

Returns:

On success:

<Array> array(List of segments with respective information)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Segments/GetSegments?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=56"
$listid = 56;

$result = $parser->GetSegments($listid);
$listid = 56;
$countSubscribers = true;
$limit = 10;

$result = $parser->GetSegments($listid, $countSubscribers, $limit);

GetSegmentSummary

Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens, Forwards and Link Clicks for Segment

Parametres:

GetSegmentSummary(segmentid, from, to);
$ http GET "https://api.mailmailmail.net/v1.1/Segments/GetSegmentSummary?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&segmentid=value&from=value&to=value"

Returns:

On success:

<Array> array(Details about the Statistics entry.)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Segments/GetSegmentSummary?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&segmentid=56"
$segmentid = 56;

$result = $parser->GetSegmentSummary($segmentid);
$segmentid = 56;
$from = "30-05-2017";

$result = $parser->GetSegmentSummary($segmentid, $from);
$segmentid = 56;
$to = "15-08-2018";

$result = $parser->GetSegmentSummary($segmentid, false, $to);

GetRulesForSegment

Get all rules for Segment

Parametres:

GetRulesForSegment(segmentid);
$ http GET "https://api.mailmailmail.net/v1.1/Segments/GetRulesForSegment?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&segmentid=value"

Returns:

On success:

<Array> array(rules for segment)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Segments/GetRulesForSegment?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&segmentid=56"
$segmentid = 56;

$result = $parser->GetRulesForSegment($segmentid);

UpdateSubscriber

Updates Subscriber information.

Parametres:

UpdateSubscriber(listid, subscriberid, emailaddress, mobile, mobilePrefix, contactFields);
$ http POST https://api.mailmailmail.net/v1.1/Subscribers/UpdateSubscriber --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&subscriberid=value&emailaddress=value&mobile=value&mobilePrefix=value&customfields=value"

Returns:

On success:

<Array> arrary(true, “Subscriber has been updated”)

On failure:

<Array> array(false, “Unable to query the database”)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Subscribers/UpdateSubscriber --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=113&subscriberid=319&emailaddress=update@subscriber.net&mobile=70569358&mobilePrefix=389&customfields[0][fieldid]=11&customfields[0][value]=MKD&customfields[1][fieldid]=8&customfields[1][value]=Kumanovo&customfields[2][fieldid]=52&customfields[2][value][0]=Mon&customfields[2][value][1]=Sat&customfields[2][value][2]=Sun"
$listid = 113;
$subscriberid = 319;
$emailaddress = "update@subscriber.net";
$mobile = “70569358”;
$mobilePrefix = “389”;
$contactFields = array(
    array(
        'fieldid' => 11,
        'value' => "MKD"
    ),
    array(
        'fieldid' => 8,
        'value' => "Kumanovo"

    ),
    array(
        'fieldid' => 52,
        'value' => array("Mon", "Sat", "Sun")
    )
);

$result = $parser->UpdateSubscriber($listid, $subscriberid, $emailaddress, $mobile, $mobilePrefix, $contactFields);

Contact fields for one-to-many:

$contactFields = array(
    array(
        'fieldid' => 1094,
        'value' => array(
            'Date' => '9-11-2017',
            'Number' => 1,
            'Text' => "Ajde ajde ajde OTM"
        )
    )
);

$result = $parser->UpdateSubscriber($listid, $subscriberid, $emailaddress, $mobile, $mobilePrefix, $contactFields);
Field structure:
Field structure

Add OTM data.

$listid = 110;
$emailaddress = "test@mail.net";
$mobile = "070444555";
$mobilePrefix = "389";
$subscriberid = 120;

$contactFields => array(
    'fieldid' => 20,
    'value' = array (
            "Movie" => array(
                array(
                    "Title" => "Bohemian Rhapsody",
                    "ReleaseDate" => "02.11.2018",
                    "Actors" => array (
                        array (
                            'FirstName' => "Rami",
                            'LastName' => "Malek",
                            'BirthDate' => "12.05.1981",
                            'emp_trigger' => 1
                        ),
                        array (
                            'FirstName' => "Lucy",
                            'LastName' => "Boynton",
                            'BirthDate' => "17.01.1994",
                            'emp_trigger' => 1
                        )
                    ),
                    "Oscar" => false,
                    "Rating" => 8.4,
                    "Premiere" => array (
                        array (
                            'Country' => "Denmark",
                            'Cinema' => "Cineplexx",
                            'PremiereDate' => "21.11.2018",
                            'emp_trigger' => 1
                        ),
                        array (
                            'Country' => "Macedonia",
                            'Cinema' => "Cineplexx",
                            'PremiereDate' => "01.11.2018",
                            'emp_trigger' => 1
                        )
                    ),
                    'emp_trigger' => 1
                )
            ),
        "emp_trigger" => 1
    )
);

$result = $parser->UpdateSubscriber($listid, $subscriberid, $emailaddress, $mobile, $mobilePrefix, $contactFields);

RequestUpdateEmail

Request to change current email address.

Parametres:

RequestUpdateEmail(subscriberid, listid, currentEmail, newEmail, contactFields);
$ http POST https://api.mailmailmail.net/v1.1/Subscribers/RequestUpdateEmail --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&subscriberid=value&listid=value&oldemail=value&newemail=value&contactFields=value"

Returns:

On success:

<Boolean> true

On failure:

<Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Subscribers/RequestUpdateEmail --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&subscriberid=319&listid=113&oldemail=oldemail@requestupdate.net&newemail=newemail@requestupdate.net&contactFields[0][fieldid]=8&contactFields[0][value]=Skopje"
$subscriberid = 319;
$listid = 113;
$currentEmail = "currentEmail@requestupdate.net";
$newEmail = "newemail@requestupdate.net";

$contactFields = array(
     array(
             'fieldid' => 8,
             'value' => 'Skopje'
         )
);

$result = $parser->RequestUpdateEmail($subscriberid, $listid, $currentEmail, $newEmail, $contactFields);

ChangeMobile

Change subscriber mobile.

Parametres:

ChangeMobile(listid, subscriberid, mobile, mobilePrefix);
$ http POST https://api.mailmailmail.net/v1.1/Subscribers/ChangeMobile --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&subscriberid=value&mobile=value&mobilePrefix=value"

Returns:

On success:

<Array> arrary(true, “Mobile Number has been changed”)

On failure:

<Array> array(false, “Unable to query the database”)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Subscribers/ChangeMobile --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=113&subscriberid=319&mobile=70569358&mobilePrefix=389"
$listid = 113;
$subscriberid = 319;
$mobile = “70569358”;
$mobilePrefix = “389”;

$result = $parser->ChangeMobile($listid, $subscriberid, $mobile, $mobilePrefix);
$listid = 113;
$subscriberid = 319;
$mobile = “70569358”;

$result = $parser->ChangeMobile($listid, $subscriberid, $mobile);

SaveSubscriberCustomField

Saves contact field information for particular Subscriber, particular List and particular Field.

Parametres:

SaveSubscriberCustomField(subscriberid, fieldid, fieldValue, skipEmptyData);
$ http POST https://api.mailmailmail.net/v1.1/Subscribers/SaveSubscriberCustomField --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&subscriberid=value&fieldid=value&value=value&skipEmptyData=value"

Returns:

On success:

<Boolean> true

On failure:

<Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Subscribers/SaveSubscriberCustomField --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&subscriberid=1&fieldid=8&fieldValue=Bergen&skipEmptyData=true"
$subscriberid = 1;
$fieldid = 8; // (8 => City)
$fieldValue = "Bergen";
$skipEmptyData = true;

$result = $parser->SaveSubscriberCustomField($subscriberid, $fieldid, $fieldValue, $skipEmptyData);
Field structure:
Field structure

Add OTM data.


$fieldid = 20;
$subscriberid = 120;
$skipEmptyData = true;

$fieldValue => array(
            "Movie" => array(
                array(
                    "Title" => "Bohemian Rhapsody",
                    "ReleaseDate" => "02.11.2018",
                    "Actors" => array (
                        array (
                            'FirstName' => "Rami",
                            'LastName' => "Malek",
                            'BirthDate' => "12.05.1981",
                            'emp_trigger' => 1
                        ),
                        array (
                            'FirstName' => "Lucy",
                            'LastName' => "Boynton",
                            'BirthDate' => "17.01.1994",
                            'emp_trigger' => 1
                        )
                    ),
                    "Oscar" => false,
                    "Rating" => 8.4,
                    "Premiere" => array (
                        array (
                            'Country' => "Denmark",
                            'Cinema' => "Cineplexx",
                            'PremiereDate' => "21.11.2018",
                            'emp_trigger' => 1
                        ),
                        array (
                            'Country' => "Macedonia",
                            'Cinema' => "Cineplexx",
                            'PremiereDate' => "01.11.2018",
                            'emp_trigger' => 1
                        )
                    ),
                    'emp_trigger' => 1
                )
            ),
        "emp_trigger" => 1
);

$result = $parser->SaveSubscriberCustomField($subscriberid, $fieldid, $fieldValue, $skipEmptyData);

AddToOTMDocument

Saves partial One-To-Many data for particular Subscriber

Parametres:

AddToOTMDocument(listid, subscriberid, emailaddress, mobile, mobilePrefix, fieldid, values, path);
$ http POST https://api.mailmailmail.net/v1.1/Subscribers/AddToOTMDocument --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&subscriberid=value&emailaddress=value&mobile=value&mobilePrefix=value&fieldid=value&values=value&path=value"

Returns:

On success:

<Boolean> true

On failure:

<Array> array(false, "Message")

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Subscribers/AddToOTMDocument --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=1&subscriberid=1&emailaddress=false&mobile=false&mobilePrefix=false&fieldid=18&path=Bergen&values[FirstName]=FirstName&values[LastName]=LastName&values[BirthDate]=30.11.2018&"

Field structure:
Field structure

Add new Actor into first movie.

$listid = 1;
$subscriberid = 1;
$fieldid = 18;
$path = "Movie[0].Actors";
$values = array (
    'FirstName' => 'First name',
    'LastName' => 'Last name',
    'BirthDate' => '30.11.2018',
    'emp_trigger' => 1
);

$result = $parser->AddToOTMDocument($listid, $subscriberid, false, false, false, $fieldid, $values, $path);

Add new Premiere into second movie.

$listid = 1;
$emailaddress = "test@dev.com";
$fieldid = 18;
$path = "Movie[1].Premiere";
$values = array (
    'Country' => 'Denmark',
    'Cinema' => 'Cineplexx',
    'PremiereDate' => '30.11.2018',
    'emp_trigger' => 1
);

$result = $parser->AddToOTMDocument($listid, false, $emailaddress, false, false, $fieldid, $values, $path);

Add new Movie.

$listid = 1;
$mobile = "20121212";
$mobilePrefix = "45";
$fieldid = 18;
$path = "Movie";
$values = array (
    "Title" => "Bohemian Rhapsody",
    "ReleaseDate" => "02.11.2018",
    "Actors" => array (
        array (
            'FirstName' => "Rami",
            'LastName' => "Malek",
            'BirthDate' => "12.05.1981",
            'emp_trigger' => 1
        ),
        array (
            'FirstName' => "Lucy",
            'LastName' => "Boynton",
            'BirthDate' => "17.01.1994",
            'emp_trigger' => 1
        )
    ),
    "Oscar" => false,
    "Rating" => 8.4,
    "Premiere" => array (
        array (
            'Country' => "Denmark",
            'Cinema' => "Cineplexx",
            'PremiereDate' => "21.11.2018",
            'emp_trigger' => 1
        ),
        array (
            'Country' => "Macedonia",
            'Cinema' => "Cineplexx",
            'PremiereDate' => "01.11.2018",
            'emp_trigger' => 1
        )
    ),
    'emp_trigger' => 1
);

$result = $parser->AddToOTMDocument($listid, false, false, $mobile, $mobilePrefix, $fieldid, $values, $path);

ResubscribeContact

Resubscribe subscriber if subscribed is deleted.

Parametres:

ResubscribeContact(listid, emailaddress, mobile, mobilePrefix, addToAutoresponders, contactFields);
$ http POST https://api.mailmailmail.net/v1.1/Subscribers/ResubscribeContact --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&emailaddress=value&mobileNumber=value&mobilePrefix=value&add_to_autoresponders=value&contactFields=value"

Returns:

On success:

<String> message

On failure:

<String> message

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Subscribers/ResubscribeContact --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=23&emailaddress=test@dev.com"
$listid = 23;
$emailaddress = "test@dev.com";

$result = $parser->ResubscribeContact(listid, $emailaddress);
$listid = 23;
$mobile = "20111222";
$mobilePrefix = "45";

$result = $parser->ResubscribeContact(listid, false, $mobile, $mobilePrefix);
$listid = 23;
$mobile = "20111222";
$mobilePrefix = "45";
$contactFields = array(
    array(
        'fieldid' => 11,
        'value' => "MKD"
    ),
    array(
        'fieldid' => 8,
        'value' => "Kumanovo"
    )
);

$result = $parser->ResubscribeContact(listid, false, $mobile, $mobilePrefix, false, contactFields);

IsSubscriberOnList

Checks whether a Subscriber is on a particular List based on their Email Address or subscriberid and whether you are checking only for active Subscribers.

Parametres:

IsSubscriberOnList(listsids, emailaddress, mobile, mobilePrefix, subscriberid, activeOnly, notBounced, return_listid);
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/IsSubscriberOnList?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listids=value&emailaddress=value&mobile=value&mobilePrefix=value&subscriberid=value&activeonly=value¬_bounced=value&return_listid=value"

Returns:

On success:

<Array> array(integers)

On failure:

<Array> empty

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/IsSubscriberOnList?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listids[0]=1&listids[1]=2&listids[2]=3&emailaddress=test@asp.net&mobile=72123456&mobilePrefix=389&subscriberid=22&activeonly=false¬_bounced=false&return_listid=false"
$listids = array( 1, 2, 3 );
$emailaddress = "test@asp.net"; 
$mobile = "72123456" ; 
$mobilePrefix = "389";
$subscriberid = 22; 
$activeOnly = false; 
$notBounced = false;
$returnListid = false; 

$result = $parser->IsSubscriberOnList($listids, $emailaddress, $mobile, $mobilePrefix, $subscriberid, $activeOnly, $notBounced, $returnListid);

IsUnSubscriber

Checks whether an email address is an 'unsubscriber'.

Parametres:

IsUnsubscriber(listid, emailaddress, mobile, mobilePrefix, subscriberid, service)
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/IsUnSubscriber?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&emailaddress=value&mobile=value&mobilePrefix=value&subscriberid=value&service=value"

Returns:

On success:

<Integer> Subscriber ID

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/IsUnSubscriber?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=12&emailaddress=test@asp.net&mobile=75987654&mobilePrefix=389&subscriberid=22&service=email"
$listid = 12;   
$emailaddress = "test@asp.net"; 
$mobile = "75987654";
$mobilePrefix = "389"; 
$subscriberid = 22; 
$service = "email"; or "smscampaign"; // Depends on whether you want to check Unsubscribe for Email or SMS Campaigns

$result = $parser->IsUnSubscriber($listid, $emailaddress, $mobile, $mobilePrefix, $subscriberid, $service);

UnsubscribeSubscriberEmail

Unsubscribes an Email Address from a specific List.

Parametres:

UnsubscribeSubscriberEmail(listid, emailaddress, subscriberid, skipCheck, statid);
$ http POST https://api.mailmailmail.net/v1.1/Subscribers/UnsubscribeSubscriberEmail --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&emailaddress=value&subscriberid=value&skipcheck=value&statid=value"

Returns:

On success:

<Boolean> true

On failure:

<Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Subscribers/UnsubscribeSubscriberEmail --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=12&emailaddress=test@mail.net"
$listid = 12;
$emailaddress = "test@mail.net";

$result = $parser->UnsubscribeSubscriberEmail($listid, $emailaddress);
$subscriberid = 267;

$result = $parser->UnsubscribeSubscriberEmail($listid, "", $subscriberid);
$listid = 12;
$emailaddress = "test@mail.net";
$skipCheck = false;
$statid = 32;

$result = $parser->UnsubscribeSubscriberEmail($listid, $emailaddress, 0, $skipCheck, $statid);

UnsubscribeSubsriberMobile

UUnsubscribes an Email Address from a specific List.

Parametres:

UnsubscribeSubscriberMobile(listid, mobile, mobilePrefix, subscriberid, skipCheck, statid);
$ http POST https://api.mailmailmail.net/v1.1/Subscribers/UnsubscribeSubscriberMobile --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&mobile=value&mobilePrefix=value&subscriberid=value&skipcheck=value&statid=value"

Returns:

On success:

<Boolean> true

On failure:

<Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Subscribers/UnsubscribeSubscriberMobile --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=12&mobile=72445865&mobilePrefix=389&subscriberid=value"
$listid = 12;
$mobile = "72445865";
$mobilePrefix = "389";

string result = parser.UnsubscribeSubscriberMobile($listid, $mobile, $mobilePrefix);
int listid = 12;
int subscriberid = 267;

string result = $parser.UnsubscribeSubscriberMobile($listid, "", "", $subscriberid);
$listid = 12;
$mobile = "72445865";
$mobilePrefix = "389";
$skipCheck = false;
$statid = 32;

string result = parser.UnsubscribeSubscriberMobile($listid, $mobile, $mobilePrefix, 0, $skipCheck, $statid);

GetAllListForEmailAddress

Gets all subscriberids, listids for a particular email address and returns an array of them.

Parametres:

GetAllListsForEmailAddress(emailaddress, listids, mainListid, activeOnly, includeDeleted);
$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetAllListsForEmailAddress?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&emailaddress=value&listids=value&main_listid=value&activeonly=value&include_deleted=value"

Returns:

On success:

<Array> Multidimensional array containing both subscriberid and listid

On failure:

<Array> empty

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Subscribers/GetAllListsForEmailAddress?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&emailaddress=test@mail.net&listids[0]=1&listids[1]=2&listids[2]=3"
$emailaddress = "test@mail.net";
$listids = array( 1, 2, 3 );

$result = $parser->GetAllListsForEmailAddress($emailaddress, $listids);
$emailaddress = "test@mail.net";
$listids = array( 1, 2, 3 );
$mainListid = 2;
$activeOnly = true;
$deleted = false;

$result = $parser->GetAllListsForEmailAddress($emailaddress, $listids, $mainListid, $activeOnly, $deleted);

DeleteSubscriber

Deletes a Subscriber and their information from a specific List.

Parametres:

DeleteSubscriber(listid, emailaddress, mobile, mobilePrefix, subscriberid);
$ http DELETE "https://api.mailmailmail.net/v1.1/Subscribers/DeleteSubscriber' -d 'Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&emailaddress=value&mobile=value&mobilePrefix=value&subscriberid=value"

Returns:

On success:

<Boolean> true

On failure:

<Array> array(false, message)

Examples:

$ http DELETE "https://api.mailmailmail.net/v1.1/Subscribers/DeleteSubscriber' -d 'Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid[0]=1&listid[1]=2&listid[2]=3&emailaddress=test@mail.net&mobile=70123456&mobilePrefix=389&subscriberid=22"
$listid = array( 1, 2, 3 );
$emailaddress = "test@mail.net";
$mobile = "70123456"; 
$mobilePrefix = "389"; 
$subscriberid = 22; 

$result = $parser->DeleteSubscriber($listid, $emailaddress, $mobile, $mobilePrefix, $subscriberid);

FetchStats

Fetches the details of a Newsletter or Autoresponder statistics entry.

Parametres:

FetchStats(statid, statsType);
$ http GET "https://api.mailmailmail.net/v1.1/Stats/FetchStats?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&statid=value&statstype=value"

Returns:

On success:

 <Array> Array of details about the Statistics entry.

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Stats/FetchStats?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&statid=11&statstype=newsletter"
$statid = 11;
$statsType = "newsletter";

$result = $parser->FetchStats($statid, $statsType);

GetStatids

Get all statids.

Parametres:

GetStatids(listid, segmentid, newsletterid,from, to, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetStatids?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&segmentid=value&campaignid=value&from=value&to=value&limit=value&offset=value"

Returns:

On success:

 <Array> Array of statids.

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetStatids?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=11"
$listid = 11;

$result = $parser->GetStatids($listid);
$listid = 11;
$from = "10-01-2019";

$result = $parser->GetStatids($listid, false, false, $from);
$listid = 11;
$from = "10-01-2019";
$newsletterid = 102;
$limit = 50;

$result = $parser->GetStatids($listid, false, $newsletterid, $from, false, $limit);

GetListSummary

Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens, Forwards and Link Clicks for a List.

Parametres:

GetListSummary(listid, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Stats/FetchStats?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&limit=value&offset=value"

Returns:

On success:

 <Array> Details about the Statistics entry.

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Stats/FetchStats?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=11"
$listid = 11;

$result = parser->GetListSummary($listid);
$listid = 11;
$limit = 30;

$result = parser->GetListSummary($listid, $limit);
$listid = 11;
$limit = 30;
$offset = 5;

$result = parser->GetListSummary($listid, $limit, $offset);

GetBouncesByList

Fetches a List of Bounced Emails.

Parametres:

GetBouncesByList(listid, countOnly, bounceType, searchType, searchStartDate, searchEndDate);
$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetBouncesByList?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&count_only=value&bounce_type=value&searchType=value&searchStartDate=value&searchEndDate=value"

Returns:

On success:

<Array> Array of bounces

For count only:
<Integer> Number of bounces

On failure:

<Array> array(false, message)

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetBouncesByList?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=11&count_only=false&bounce_type=any&searchType=between&searchStartDate=24-05-2017&searchEndDate=01.06.2017"
$listid = 11;
$countOnly = false;
$bounceType = "any";
$searchType = "between";
$searchStartDate = "24-05-2017";
$searchEndDate = "01.06.2017";

$result = parser->GetBouncesByList($listid, $countOnly, $bounceType, $searchType, $searchStartDate, $searchEndDate);
$listid = 11;
$countOnly = true;

$result = parser->GetBouncesByList($listid, $countOnly);

GetUnsubscribesByList

Fetches a List of Subscribers who Unsubscribed from a Campaign.

Parametres:

GetunsubscribesByList(listid, countOnly, searchType, searchStartDate, searchEndDate);
$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetUnsubscribesByList?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=value&count_only=value&searchType=value&searchStartDate=value&searchEndDate=value"

Returns:

On success:

<Array> Array of unsubscribed contacts

For count only:
<Integer> Number of unsubscribed contacts

On failure:

 <Array> array(false, message)

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetUnsubscribesByList?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&listid=11&count_only=true"
$listid = 11;
$countOnly = true;

$result = $parser->GetUnsubscribesByList($listid, $countOnly);

GetOpens

Return the openers of email campaign.

Parametres:

GetOpens(statid, countOnly, uniqueOnly);
$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetOpens?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&statid=value&count_only=value&only_unique=value"

Returns:

On success:

<Array> Returns dump of Email Addresses that have opened a specific Campaign, or it only counts the number of openers.

On failure:

<Array> Empty array.

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetOpens?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&statid=11"
$statid = 11;

$result = $parser->GetOpens($statid);

Counts the number of opens:

$statid = 11;
$countOnly = true;
 
$result = $parser->GetOpens($statid, $countOnly);

Counts the number of unique opens:

$statid = 11;
$countOnly = true;
$uniqueOnly = true;
 
$result = $parser->GetOpens($statid, $countOnly, $uniqueOnly);

Details for unique opens:

$statid = 11;
$countOnly = false;
$uniqueOnly = true;
 
$result = $parser->GetOpens($statid, $countOnly, $uniqueOnly);

GetRecipients

Return the Recipients of Autoresponder.

Parametres:

GetRecipients(statid, countOnly);
$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetRecipients?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&statid=value&count_only=value"

Returns:

On success:

<Array> Array of Recipients.

For count only:
<Integer> Total number of Recipients.

On failure:

<Array> Empty array.

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetRecipients?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&statid=11"
$statid = 11;

$result = $parser->GetRecipients($statid);

Counts the number of Recipients:

$statid = 11;
$countOnly = false;
 
$result = $parser->GetRecipients($statid, $countOnly);

GetLatestStats

Get latest newsletter statistics.

Parametres:

GetLatestStats(newsletterid, limit);
$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetLatestStats?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&campaignid=value&limit=value"

Returns:

On success:

<Array> Newsletter statistic.

On failure:

<Boolean> false.

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetLatestStats?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&campaignid=11"
$newsletterid = 11;

$result = $parser->GetLatestStats($newsletterid);
$newsletterid = 14;
$limit = 10;

$result = $parser->GetLatestStats($newsletterid, $limit);

ScheduleSendNewsletter

Schedule newsletter campaign for sending.

Parametres:

ScheduleSendNewsletter(campaignid, timeToSend);
$ http POST https://api.mailmailmail.net/v1.1/Sends/ScheduleSend --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&campaignid=value&hours=value"

Returns:

On success:

<Array> array(true, "Campaign has be scheduled")

On failure:

<Array> array(false, message)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Sends/ScheduleSend --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&campaignid=30&hours=1"
$campaignid = 30;
$timeToSend = 1; //Time in hours, 0.5 = 30 minutes
 
$result = $parser->ScheduleSendNewsletter($campaignid, $timeToSend);

ScheduleSendSMS

Schedule SMS campaign for sending.

Parametres:

ScheduleSendSMS(campaignid, listsToSend, timeToSend);
$ http POST https://api.mailmailmail.net/v1.1/SMSSends/ScheduleSend --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&campaignid=value&lists=value&hours=value"

Returns:

On success:

<Array> array(true, "Campaign has be scheduled")

On failure:

 <Array> array(false, message)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/SMSSends/ScheduleSend --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&campaignid=30&lists[0]=1&lists[1]=2&lists[2]=3&hours=1"
$campaignid = 30;
$timeToSend = 1; //Time in hours, 0.5 = 30 minutes
$listsToSend = array(1, 2, 3);

$result = $parser->ScheduleSendSMS($campaignid, $listsToSend, $timeToSend);

SendNewsletter

Attempts to send a newsletter to specific subscriber or seeks for subscriber with given email address.

Parametres:

SendNewsletter(newsletterid, subscriberid, emailaddress, senderEmail, senderName, replyEmail);
$ http POST https://api.mailmailmail.net/v1.1/Messaging/SendNewsletter --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&newsletterid=value&subscriberid=value&email=value&fromaddress=value&fromname=value&replyaddress=value"

Returns:

On success:

<Array> (true, message)

On failure:

<Array> (false, message)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Messaging/SendNewsletter --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&newsletterid=56&subscriberid=21"
$newsletterid = 56;
$subscriberid = 21;

$result = $parser->SendNewsletter($newsletterid, $subscriberid);
$newsletterid = 47;
$emailaddress = "test@mail.net";

$result = $parser->SendNewsletter($newsletterid, false, $emailaddress);

SendSMS

Attempts to send a sms to specific subscriber or seeks for subscriber with given mobile number

Parametres:

SendSMS(campaignid, smsSubject, textMessage,subscriberid, listid, mobile, mobilePrefix);
$ http POST https://api.mailmailmail.net/v1.1/SMS/Send --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&campaignid=value&subject=value&text=value&subscriberid=value&listid=value&mobile=value&mobilePrefix=value"

Returns:

On success:

<Array> (true, message)

On failure:

<Array> (false, message)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/SMS/Send --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&campaignid=false&subject=Subject&text=text&subscriberid=65"
$smsSubject = "Subject";
$textMessage = "text";
$subscriberid = 65;

$result = $parser->SendSMS(false, $smsSubject, $textMessage, $subscriberid, false, false, false);
$smsSubject = "Subject";
$textMessage = "text https://www.google.com/";
$listid = 61;
$mobile = "78368994";
$mobilePrefix = "389";

$result = $parser->SendSMS(false, $smsSubject, $textMessage, false, $listid, $mobile, $mobilePrefix);
$campaignid = 12;
$listid = 61;
$mobile = "78368994";
$mobilePrefix = "389";

$result = $parser->SendSMS($campaignid, false, false, false, $listid, $mobile, $mobilePrefix);

GetSnapshots

Get snapshot links for sent campaign, trigger and autoresponder

Parametres:

GetSnapshots(subscriberid, triggerid, autoresponderid,newsletterid, groupBy)
$ http POST https://api.mailmailmail.net/v1.1/Stats/GetSnapshots --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&subscriberid=value&triggerid=value&autoresponderid=value&newsletterid=value&groupby=value"

Returns:

On success:

<Array> List of snapshots

On failure:

<Array> (false, message)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Stats/GetSnapshots --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&subscriberid=65"
$subscriberid = 65;

$result = $parser->GetSnapshots($subscriberid);
$subscriberid = 65;
$newsletterid = 120;

$result = $parser->GetSnapshots($subscriberid, false, false, $newsletterid);
$subscriberid = 65;
$newsletterid = 120;
$groupBy = "type";

$result = $parser->GetSnapshots($subscriberid, false, false, $newsletterid, $groupBy);

GetNewsletters

Get a List of Newsletters based on the criteria passed in.

Parametres:

GetNewsletters(countOnly, getLastSendDetails, content, afterCreateDate, newsletterNameLike, limit, offset);
$ http GET "https://api.mailmailmail.net/v1.1/Newsletters/GetNewsletters?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&countOnly=value&getLastSentDetails=value&content=value&afterCreateDate=value&newsletterNameLike=value&limit=value&offset=value"

Returns:

On success:

 <Array> Array of Newsletters.
For CountOnly:
 <Integer> Number of Newsletters.

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Newsletters/GetNewsletters?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&countOnly=false&getLastSentDetails=true&content=false&afterCreateDate=28-05-2017"

Get all newsletters:

$result = $parser->GetNewsletters();

Count newsletters:

$countOnly = false;

$result = $parser->GetNewsletters($countOnly);

Get newsletters created after 28 May 2017:

$countOnly = false;
$getLastSendDetails = true;
$content = false;
$afterCreateDate = "28 May 2017"; // (28-05-2017; 28-May-2017)
 
$result = $parser->GetNewsletters($countOnly, $getLastSendDetails, $content, $afterCreateDate);

Count newsletters created after 28 May 2017:

$countOnly = false;
$getLastSendDetails = true;
$content = false;
$afterCreateDate = "28 May 2017"; // (28-05-2017; 28-May-2017)
 
$result = $parser->GetNewsletters($countOnly, $getLastSendDetails, $content, $afterCreateDate);

Get newsletters with name "Newsletter 12":

$newsletterNameLike = "Newsletter 12";
 
$result = $parser->GetNewsletters(false, true, true, false, $newsletterNameLike);

Get newsletters with limit and offset:

$limit = 20;
$offset = 5;
 
$result = $parser->GetNewsletters(false, true, true, false, false, $limit, $offset);

GetNewsletterSummary

Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens and Link Clicks for Newsletter

Parametres:

GetNewsletterSummary(newsletterid, statid, from, to);
$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetNewsletterSummary?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&newsletterid=value&statid=value&from=value&to=value"

Returns:

On success:

<Array> array(Details about the Statistics entry.)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Stats/GetNewsletterSummary?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&newsletterid=56"
$newsletterid = 56;

$result = $parser->GetNewsletterSummary($newsletterid);
$newsletterid = 56;
$from = "30-05-2017";

$result = $parser->GetNewsletterSummary($newsletterid, false, $from);
$newsletterid = 56;
$to = "15-08-2018";

$result = $parser->GetNewsletterSummary($newsletterid, false, false, $to);

ViewNewsletter

View newsletter data.

Parametres:

ViewNewsletter(newsletterid);
$ http GET "https://api.mailmailmail.net/v1.1/Newsletters/ViewNewsletter?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&newsletterid=value"

Returns:

On success:

<Array> Newsletter details.

On failure:

<Array> array(false, message)

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Newsletters/ViewNewsletter?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&newsletterid=12"
$newsletterid = 12; 

$result = $parser->ViewNewsletter($newsletterid);

EditNewsletter

Change newsletter name and subject

Parametres:

EditNewsletter(newsletterid, newsletterName, newsletterSubject);
$ http POST https://api.mailmailmail.net/v1.1/Newsletters/EditNewsletter --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&newsletterid=value&name=value&subject=value"

Returns:

On success:

 <Boolean> true

On failure:

 <Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Newsletters/EditNewsletter --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&newsletterid=15&name=Newsletter"
$newsletterid = 15;
$newsletterName = "Newsletter";
$result = $parser->EditNewsletter($newsletterid, $newsletterName);
$newsletterid = 15;
$newsletterName = "Newsletter";
$newsletterSubject = "Subject";
$result = $parser->EditNewsletter($newsletterid, $newsletterName, $newsletterSubject);

CopyNewsletter

Copy a newsletter along with attachments, images etc.

Parametres:

CopyNewsletter(newsletterid, newsletterName, newsletterSubject);
$ http POST https://api.mailmailmail.net/v1.1/Newsletters/CopyNewsletter --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&oldid=value&name=value&subject=value"

Returns:

On success:

 <Array> array(true, new id)

On failure:

 <Array> array(false, false)

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Newsletters/CopyNewsletter --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&oldid=15&name=Newsletter"
$newsletterid = 15;
$newsletterName = "Newsletter";
$result = $parser->CopyNewsletter($newsletterid, $newsletterName);
$newsletterid = 15;
$newsletterName = "Newsletter";
$newsletterSubject = "Subject";
$result = $parser->CopyNewsletter($newsletterid, $newsletterName, $newsletterSubject);
$newsletterid = 23;
$result = $parser->CopyNewsletter($newsletterid);

GetTriggerSummary

Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens, Forwards and Link Clicks for Trigger

Parametres:

GetTriggerSummary(triggerid, from, to);
$ http GET "https://api.mailmailmail.net/v1.1/Triggers/GetTriggerSummary?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&triggerid=value&from=value&to=value"

Returns:

On success:

<Array> array(Details about the Statistics entry.)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Triggers/GetTriggerSummary?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&triggerid=56&from=30-05-2017"
$triggerid = 56;

$result = $parser->GetTriggerSummary($triggerid);
$triggerid = 56;
$from = "30-05-2017";

$result = $parser->GetTriggerSummary($triggerid, $from);
$triggerid = 56;
$to = "15-08-2018";

$result = $parser->GetTriggerSummary($triggerid, false, $to);

SetTriggerStatus

Activate/Deactivate Trigger.

Parametres:

SetTriggerStatus(triggerid, status);
$ http POST https://api.mailmailmail.net/v1.1/Triggers/SetTriggerStatus --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&triggerid=value&status=value"

Returns:

On success:

 <Boolean> true

On failure:

 <Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Triggers/SetTriggerStatus --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&triggerid=15&status=true"
$triggerid = 15;
$status = true;
$result = $parser->SetTriggerStatus($triggerid, $status);
$triggerid = 15;
$status = false;
$result = $parser->SetTriggerStatus($triggerid, $status);

GetAutoresponderSummary

Calculates the total number of Emails sent, Bounces, Unsubscribes, Opens, Forwards and Link Clicks for Autoresponder

Parametres:

GetAutoresponderSummary(autoresponderid, from, to);
$ http GET "https://api.mailmailmail.net/v1.1/Autoresponders/GetAutoresponderSummary?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&autoresponderid=value&from=value&to=value"

Returns:

On success:

<Array> array(Details about the Statistics entry.)

On failure:

<Boolean> false

Examples:

$ http GET "https://api.mailmailmail.net/v1.1/Autoresponders/GetAutoresponderSummary?Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&autoresponderid=56&from=30-05-2017"
$autoresponderid = 56;

$result = $parser->GetAutoresponderSummary($autoresponderid);
$autoresponderid = 56;
$from = "30-05-2017";

$result = $parser->GetAutoresponderSummary($autoresponderid, $from);
$autoresponderid = 56;
$to = "15-08-2018";

$result = $parser->GetAutoresponderSummary($autoresponderid, false, $to);

SetAutoresponderStatus

Activate/Deactivate Autoresponder.

Parametres:

SetAutoresponderStatus(autoresponderid, status);
$ http POST https://api.mailmailmail.net/v1.1/Autoresponders/SetAutoresponderStatus --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&autoresponderid=value&status=value"

Returns:

On success:

 <Boolean> true

On failure:

 <Boolean> false

Examples:

$ http POST https://api.mailmailmail.net/v1.1/Autoresponders/SetAutoresponderStatus --data "Apiusername=YOUR_API_USERNAME&Apitoken=YOUR_API_TOKEN&autoresponderid=15&status=true"
$autoresponderid = 15;
$status = true;
$result = $parser->SetAutoresponderStatus($autoresponderid, $status);
$autoresponderid = 15;
$status = false;
$result = $parser->SetAutoresponderStatus($autoresponderid, $status);