LiveZilla Live Chat
EN  DE Please sign in or register Hi
WOW!! I just installed your livezilla about 2 days ago. Cool information. It is like I can spy on my...
Evan Toder
Show all reviews


LiveZilla API V2




TicketEditor
TicketEditor Object Format
TicketEditor is represented as JSON objects having the following keys:


JSON Key Type Required Read only Comment Example
EditorstringYesNoEditor (=Operator) IDjohn_doe
StatusintNoNo
Ticket Status

[0] = Open
[1] = In Progress
[2] = Closed
[3] = Deleted
[4] = Pending
Read more
SubStatusstringNoNoTicket Sub-StatusSub-Status Name
IdstringYesNoTicket ID11123


TicketEditor Functions


Assign Ticket Editor
Function
As of version 5.2.5.0


POST /api/v2/api.php p_ticketeditor_assign=1


Filters


Name POST Key Type Required Comment Example  


CURL Example


curl {yourdomain}{livezilla_folder}/api/v2/api.php
-d {authenthication}
-d p_ticketeditor_assign=1
-d p_data={ "TicketEditor": { "SubStatus": "Sub-Status Name", "Id": "11123", "Editor": "john_doe", "Status": "0" } } -X POST

Response


200 Ok: {
    "TicketEditor": {
        "SubStatus": "Sub-Status Name",
        "Id": "11123",
        "Editor": "john_doe",
        "Status": "0"
    }
}

Error Codes


                            403 Forbidden: Invalid or no user authentication data sent (see General API Authentication)
400 Bad Data: Invalid or missing POST parameters (see required fields/filters and data types)
                        


Example: PHP code to assign an operator to a ticket


    <?php
            $livezillaURL = "http(s)://{yourdomain}/livezilla/";
            $apiURL = $livezillaURL . "api/v2/api.php";

            // authentication parameters
            $postd["p_user"]='{user_id}';
            $postd["p_pass"]=md5('{user_password}');

            // function parameter
            $postd["p_ticketeditor_assign"]=1;
            $postd["p_json_pretty"]=1;

            class TicketEditor
            {
                public $Id = "11967";
                public $Editor = "john_doe";
            }

            $neweditor = new TicketEditor();
            $postd["p_data"]= json_encode(array("TicketEditor"=>$neweditor));
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL,$apiURL);
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($postd));
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            $server_output = curl_exec($ch);

            if($server_output === false)
                exit(curl_error($ch));

            echo $server_output;
            curl_close($ch);
    ?>





Something missing?


If you find anything missing please let us know and we will add the missing structures right away. Thanks.