Vision 6

getBatchById

Returns details for a specific Batch.

getBatchById

Returns details for a specific Batch.

Top ↑

Syntax

array getBatchById( string api_key, int batch_id );

API Key Access Level required: Report access

Parameters

api_key (string)

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

batch_id (int)

The ID of the Batch.

Return Value

Returns an array containing a single associative array of Batch details. See searchBatches for a description of the values returned.

Examples

PHP

$batch_id = 287394;

$api = new Api($url, 'YOURAPIKEY');
$batch_details = $api->invokeMethod('getBatchById', array($batch_id));

JSON Request

{
    "id": 1,
    "method": "getBatchById",
    "params": [
        "YOURAPIKEY",
        287394
    ]
}

JSON Response

{
    "id": 1,
    "result": [
        {
            "id": 287394,
            "list_ids": [
                315847,
                41347,
                315975,
            ],
            "creator_user_id": 25907,
            "creation_time": 1362621303,
            "message_id": 895730,
            "message_type": "email",
            "is_scheduled": false,
            "is_populated": true,
            "send_status": "completed",
            "send_time": 1362621313,
            "first_sent_time": 1362621338,
            "last_sent_time": 1362621338,
            "send_contact_count": 32,
            "send_current_count": 32,
            "is_test": false,
            "type": "manual",
            "creator_name": "Lee Le"
        }
    ],
    "error": null
}

Error Codes

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

Code Error Description
308 Unable to load Batch batch_id is not a valid Batch

See Also