Vision 6

getListById

Returns details for a specific List.

getListById

Returns details for a specific List.

Top ↑

Syntax

array getListById( string api_key, int list_id );

API Key Access Level required: Limited access

Parameters

api_key (string)

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

list_id (int)

The ID of the List to retrieve.

Return Value

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

Examples

PHP

$list_id = 1234567;

$api = new Api($url, 'YOURAPIKEY');
$lists = $api->invokeMethod('getListById', $list_id);

// result is an array with a single associative array of List details
print "Retrieved details for ". $lists[0]['name'] ."\n";

JSON Request

{
    "id": 1,
    "method": "getListById",
    "params": [
        "YOURAPIKEY",
        1234567
    ]
}

JSON Response

{
    "id":1,
    "result": [
        {
            "id": 1234567,
            "creator_user_id": 456789,
            "name": "Example List",
            "creation_time": 1360106654,
            "last_modified_time": 1360106886,
            "on_register_address": "alice@example.com",
            "on_update_address": "bob@example.com",
            "on_unsubscribe_address": "alice@example.com",
            "disallow_duplicate_contacts": false,
            "folder_id": 345678,
            "contact_count": 1,
            "country_code": 61,
            "virtual_number": 0,
            "sms_stop_words": "REMOVE ME,UNSUBSCRIBE",
            "sms_response_action": "do_nothing",
            "sms_response_field_ids": "",
            "folder_name": "Default",
            "address_types": "email,mobile",
            "creator_name": "Example User",
            "is_gdpr_compliant": true,
            "allow_send_to_duplicates": false
        }
    ],
    "error": null
}

Error Codes

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

Code Error Description
303 Unable to Load List list_id is not a valid List

See Also