Get List ID

Get List ID by List Name.


Function

  • getListId()

Parameters

  • username: String
    • Account login name.
  • password: String
    • Account password.
  • listname: String
    • list name to be searched.

Return

  • int:
    • list id corresponding to the list name

Exception

  • Exception

Documentation

  • Retrieves the list id for the given list name.
  • If multiple lists exist with the same name, the first list's id is returned.

Examples

public void getListIdSample() throws java.lang.Exception {

        Puresend p = new Puresend();
        PuresendPortType ppt = p.getPuresendHttpsSoap12Endpoint();

        String username = "XXX";
        String password = "XXX";
        String listName = "A List Name";

        int listId = ppt.getListId(username, password, listName);

        System.out.println(listId);
}
<?php
include 'puresend.php';

$p = new Puresend();

$getListIdData = new getListId();
$getListIdData->username = 'XXX';
$getListIdData->password = 'XXX';
$getListIdData->listname = 'A List Name';

$response = $p->getListId($getListIdData);
var_dump($response);

?>