getAllCurrentBatches

Returns a list of all Batches currently being sent.

getAllCurrentBatches

Returns a list of all Batches currently being sent.

Top ↑

Syntax

array getAllCurrentBatches( string api_key );

Parameters

api_key (string)

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

Return Value

Returns an array containing zero or more associative arrays of Batch send details. See the remarks section below for the list of values this method returns.

Examples

$api = new Api($url, 'YOURAPIKEY');
$batches = $api->invokeMethod('getAllCurrentBatches');
{
    "id": 1,
    "method": "getAllCurrentBatches",
    "params": [
        "YOURAPIKEY"
    ]
}
{
    "id": 1,
    "result": [
        {
            "id": 1857754,
            "message_id": 895779,
            "send_status": "pending",
            "send_time": 1363656000,
            "account_id": 8972,
            "send_current_count": 0,
            "send_contact_count": 139,
            "send_status_description": "Pending"
        },
        {
            "id": 1857755,
            "message_id": 895779,
            "send_status": "pending",
            "send_time": 1365988920,
            "account_id": 1234,
            "send_current_count": 0,
            "send_contact_count": 139,
            "send_status_description": "Pending"
        }
    ]
}

Remarks

This method is not available to all Accounts.

The following table shows the values that are returned.

Key Type Description
id int The ID of the Batch
account_id int The ID of the Account that created the Batch
message_id int The ID of the Message being sent
send_status string The current send status. Valid values are initializing, pending, sending, completed, failed, cancelled or paused
send_time int Timestamp indicating when the batch is scheduled to be sent
send_current_count int The number of Contacts that have been sent the Message
send_contact_count int Total number of contacts in the Batch

See Also