Manage List

LIST

  1. Creating New List

    [[API:Function]] – goAddList

    • This application is used to create new List. Newly created list belongs to user that authenticated a request.

     

    Mandatory parameters from “postfields variables:

    • goUser- Username. String

    • goPass- Password. String

    • goAction- Action performed by the [[API:Functions]]. String

    • list_id- list id. Integer

    • list_name- Name for the list. String

    • list_description- Description for the list. String

    • campaign_id- Assign the list id to a specific campaign id. String

    • active- List status, values are Y or N. String

       

    Returns:

    result – “success” means that list has been created. String

     

    result – “error” means that list has not been created, containing the error occurred. String

    • Special characters found in list name/list description

    • Default value for active is Y or N only.

    • List ID must be a number or combination of number

    • There is already a LIST ID in the system with this ID.

    • Invalid Campaign ID

     

    list_id – created list id. Integer

     

    Sample Code:

     

    <?php

     

    $url = "https://YOUR_URL/goAPI/goLists/goAPI.php"; #URL to GoAutoDial API. (required)

    $postfields["goUser"] = ""; #Username goes here. (required)

    $postfields["goPass"] = ""; #Password goes here. (required)

    $postfields["goAction"] = ""; #action performed by the [[API:Functions]]

    $postfields["responsetype"] = "json"; #json. (required)

    $postfields["list_id"] = ""; #Desired list id. (required)

    $postfields["list_name"] = ""; #Desired name. (required)

    $postfields["list_description"] = ""; #Desired description. (required)

    $postfields["campaign_id"] = ""; #Assign to campaign. (required)

    $postfields["active"] = ""; #Y or N (required)

    $postfields["hostname"] = $_SERVER['REMOTE_ADDR']; #Default value

     

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);

    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

    curl_setopt($ch, CURLOPT_POST, 1);

    curl_setopt($ch, CURLOPT_TIMEOUT, 100);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);

    $data = curl_exec($ch);

    curl_close($ch);

    $output = json_decode($data);

     

    // print_r($data);

     

    if ($output->result=="success") {

    # Result was OK!

    echo "Added New List ID ";

    } else {

    # An error occured

    echo $output->result;

    }

     

    ?>


  2. Updating List

    [[API:Function]] – goEditList

    • This application is used to update a List. Only list that belongs to authenticated user can be updated.

     

    Mandatory parameters from “postfields variables:

    • goUser- Username. String

    • goPass- Password. String

    • goAction- Action performed by the [[API:Functions]]. String

    • list_id- list id. Integer

     

    Returns:

    result – “success” means that list has been updated successfully. String

     

    result – “error” means that list has not been updated, containing the error occurred. String

    • Error: Set a value for List ID.

    • Error: Default value for active is Y or N only.

    • Error: Default value for reset_list is Y or N only

    • Error: Special characters found in list_name/ list_description/reset_time/xferconf_a_number/ xferconf_b_number/ xferconf_c_number/ xferconf_d_number/xferconf_e_number/ agent_script_override/ drop_inbound_group_override/ campaign_cid_override/ web_form_address.

    • Error: Campaign doesn't exist.

    • Error: List doesn't exist.

     

    list_id – Updated list id. Integer

     

    Sample Code:

     

    <?php

     

    $url = "https://jameshv.goautodial.com/goAPI/goLists/goAPI.php"; # URL to GoAutoDial API file

    $postfields["goUser"] = ""; #Username goes here. (required)

    $postfields["goPass"] = ""; #Password goes here. (required)

    $postfields["goAction"] = ""; #action performed by the [[API:Functions]]

    $postfields["responsetype"] = "json"; #json (required)

    $postfields["list_id"] = ""; #Desired list id. (required)

    $postfields["hostname"] = $_SERVER['REMOTE_ADDR']; #Default value

     

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);

    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

    curl_setopt($ch, CURLOPT_POST, 1);

    curl_setopt($ch, CURLOPT_TIMEOUT, 100);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);

    $data = curl_exec($ch);

    curl_close($ch);

    $output = json_decode($data);

     

     

    if ($output->result=="success") {

    # Result was OK!

    echo "Update Success";

    } else {

    # An error occured

    echo $output->result;

    }

    ?>

  3. Deleting List

    [[API:Function]] – goDeleteList

    • This application is used to delete a list. Only list that belongs to authenticated user can be delete.

     

    Mandatory parameters from “postfields variables:

    • goUser- Username. String

    • goPass- Password. String

    • goAction- Action performed by the [[API:Functions]]. String

    • list_id – list id. Integer

     

    Returns:

    result – “success” means that list has been deleted successfully. String

     

    result – “error” means that list has not been deleted, containing the error occurred. String

    • Error: Set a value for List ID.

    • Error: List doesn't exist.

     

    list_id – deleted list id. Integer


    Sample Code:

    <?php

     

    $url = "https://YOUR_URL/goAPI/goLists/goAPI.php"; #URL to GoAutoDial API. (required)

    $postfields["goUser"] = ""; #Username goes here. (required)

    $postfields["goPass"] = ""; #Password goes here. (required)

    $postfields["goAction"] = ""; #action performed by the [[API:Functions]]. (required)

    $postfields["responsetype"] = "json"; #json. (required)

    $postfields["list_id"] = ""; #Desired list id. (required)

    $postfields["hostname"] = $_SERVER['REMOTE_ADDR']; #Default value

      

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);

    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

    curl_setopt($ch, CURLOPT_POST, 1);

    curl_setopt($ch, CURLOPT_TIMEOUT, 100);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);

    $data = curl_exec($ch);

    curl_close($ch);

    $output = json_decode($data);

     

    if ($output->result=="success") {

    # Result was OK!

    echo "List deleted successfully";

    } else {

    # An error occured

    echo $output->result;

    }

     

    ?>


  4. Displaying List

    [[API:Function]] – goGetAllLists

    • This application is used to get list of Lists belongs to user.

     

    Mandatory parameters from “postfields variables:

    • goUser- Username. String

    • goPass- Password. String

    • goAction- Action performed by the [[API:Functions]]. String

     

    Returns:

    result – “success” means that query was successful. String

     

    result – “error” means that query was not successful. , containing the error occurred. String

     

    list_id – list id. Integer

    list_name – name of list. String

    active – status of list. String

    list_lastcalldate – last call date of list. Date Time

    tallyInteger

    campaign_idcampaign id of list. String

     

    Sample Code:

     

    <?php

     

    $url = "https://YOUR_URL/goAPI/goLists/goAPI.php"; #URL to GoAutoDial API. (required)

    $postfields["goUser"] = ""; #Username goes here. (required)

    $postfields["goPass"] = ""; #Password goes here. (required)

    $postfields["goAction"] = ""; #action performed by the [[API:Functions]]. (required)

    $postfields["responsetype"] = "json"; #json. (required)

     

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);

    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

    curl_setopt($ch, CURLOPT_POST, 1);

    curl_setopt($ch, CURLOPT_TIMEOUT, 100);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);

    $data = curl_exec($ch);

    curl_close($ch);

    $output = json_decode($data);

     

    if ($output->result=="success") {

    # Result was OK!

    for($i=0;$i<count($output->list_id);$i++){

    echo $output->list_id[$i]."</br>";

    echo $output->list_name[$i]."</br>";

    echo $output->active[$i]."</br>";

    echo $output->list_lastcalldate[$i]."</br>";

    echo $output->tally[$i]."</br>";

    echo $output->campaign_id[$i]."</br>";

    }

    } else {

    # An error occured

    echo "The following error occured: ".$results["message"];

    }

     

    ?>


  5. Displaying List Information

    [[API:Function]] – goGetListInfo

    • Allows to retrieve some attributes of a given list. List should belong to the user that authenticated the request.

     

    Mandatory parameters from “postfields variables:

    • goUser- Username. String

    • goPass- Password. String

    • goAction- Action performed by the [[API:Functions]]. String

    • list_id – list id. Integer

     

    Returns:

    result – “success” means that query was successful. String

     

    result – “error” means that query was not successful. , containing the error occurred. String

    • Error: Set a value for List ID.

    • Error: List doesn't exist.

     

    list_id – list id. Integer

    list_name – name of list. String

    active – status of list. String

    list_lastcalldate – last call date of list. Date Time

    tallyInteger

    campaign_idcampaign id of list. String

     

    Sample Code:

     

    <?php

     

    $url = "https://YOUR_URL/goAPI/goLists/goAPI.php"; #URL to GoAutoDial API. (required)

    $postfields["goUser"] = ""; #Username goes here. (required)

    $postfields["goPass"] = ""; #Password goes here. (required)

    $postfields["goAction"] = ""; #action performed by the [[API:Functions]]. (required)

    $postfields["responsetype"] = "json"; #json. (required)

    $postfields["list_id"] = ""; #Desired list id. (required)

     

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_URL, $url);

    curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

    curl_setopt($ch, CURLOPT_POST, 1);

    curl_setopt($ch, CURLOPT_TIMEOUT, 100);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);

    $data = curl_exec($ch);

    curl_close($ch);

    $output = json_decode($data);

      

    if ($output->result=="success") {

    # Result was OK!

    for($i=0;$i<count($output->list_id);$i++){

    echo $output->list_id[$i]."</br>";

    echo $output->list_name[$i]."</br>";

    echo $output->active[$i]."</br>";

    echo $output->list_lastcalldate[$i]."</br>";

    echo $output->tally[$i]."</br>";

    echo $output->campaign_id[$i]."</br>";

    }

    } else {

    # An error occured

    echo $output->result;

    }

     

    ?>


  • 1089 Users Found This Useful
Was this answer helpful?

Related Articles

Manage Campaign

CAMPAIGN Creating New Campaign [[API:Function]] – goAddCampaign This application is used...

Manage Phone

PHONES Creating New Phone [[API:Function]] – goAddPhones This application is used to...

Manage User Group

USER GROUP Creating New User Group [[API:Function]] – goAddUserGroup This application is...

Manage Call Recording

CALL RECORDING Displaying Call Recording [[API:Function]] – goGetCallRecordingList This...

Manage Tenant

TENANT Creating New Tenant [[API:Function]] – goAddMultiTenant This application is used...