Vision 6

countAutoresponders

Counts the number of Autoresponders that match the search criteria.

countAutoresponders

Counts the number of Autoresponders that match the search criteria.

Top ↑

Syntax

int countAutoresponders( string api_key [, array search_criteria ] );

Parameters

api_key (string)

The key required to access the API. See Getting Started for more information.

search_criteria (array - optional)

An array of search criteria that selects the Autoresponders to be counted. See searchAutoresponders for a description of the values that can be searched on.

Return Value

The number of Autoresponders that match the search criteria.

Examples

PHP

$search_criteria = array(
    array('list_id', 'exactly', 123456),
    array('event_type', 'exactly', 'subscribe'),
);

// API Call
$api = new Api($url, 'YOURAPIKEY');
$count_autoresponders = $api->invokeMethod('countAutoresponders', array($search_criteria));

JSON Request

{
    "id": 1,
    "method": "countAutoresponders",
    "params": [
        "YOURAPIKEY",
        [
            [
                [
                    "list_id",
                    "exactly",
                    "123456"
                ],
                [
                    "event_type",
                    "exactly",
                    "subscribe"
                ]
            ]
        ]
    ]
}

JSON Response

{
    "id": 1,
    "result": 1,
    "error": null
}

Error Codes

This method may return the following error code in addition to the standard error codes:

Code Error Description
311 Invalid Search Parameter Format search_criteria is not valid

See Also