CMD_API_TICKET & CMD_API_TICKET_MANAGE

Version 1.244

Feature
Finished

Api for the ticket system. CMD_API_TICKET By itself, will produce a url encoded array. Element names will be the ticket #. Element values will be another encoded array. The value array will contain: from=bob username who sent it. lastmessage=Today at 14:11 Time of the message in a string. name=Bob Smith new=yes or no depending if the message has been viewed or not. priority=10|20|30 (doesnt do anything, just something included by the sender) status=open|closed subject=subject of the ticket time=1124309478 unix timestamp of the message (non string version of lastmessage) type=ticket|message|request tickets are recieved from users (anyone lower), messages are recieved by any type, requests are sent to resellers (anyone higher). user=creator|multiple|username who it's sent to. creator means it was sent to whoever made this user account. Multiple is when a message is sent to many users, username is when it's targeted to one person (normally for messages) CMD_API_TICKET?action=view&number=000001217&type=ticket (type=ticket is require, but doen't do anything for the api). This is the function to view a particular ticket. Also sent in a multi level url encoded arrays. Top array names will be message numbers, 0, 1, 3, etc. Element values wil be a url encoded array consisting of: from=bob message=the actual message data name=Bob Smith priority=none (ignore this value) status=open|closed (This should be ignored, except for message 0 of the ticket.. each message will have a stutus, but they are not ever changed/used.) time=unix timestamp of this message type=ticket|message|request|reply (most will be replies .. #1 and up) CMD_API_TICKET_CREATE Used by everyone to create tickets requets and messages. method must be "POST". action=create type=request user=creator|all|realusername|multiple priority=10|20|30 subject=your subject message=your message email_only=yes (optional, used for messages) if user=multiple, then specify your user list with: user0=bob (user1=fred) etc.. CMD_API_TICKET used to reply to a ticket. method must be "POST" action=reply type=reply number=000001544 (ticket number) user=creator subject=your reply subject priority=10|20|30 .. this value is ignored. message=your reply message CMD_API_TICKET deletes messages. You can specify multpiled ticket # at once. method: POST action=multiple select0=12345 (select1=12346) delete=anything you want CMD_API_TICKET sets the ticket system email address. method: POST action=email email=bob@bob.com ON=yes (don't pass ON at all for 'no') CMD_API_TICKET_MANAGE Note, you can use CMD_API_TICKET to view all tickets, even the tickets recieved by your users.. they're "type=ticket". This function will just show the ticket system settings for this reseller. returns: active=yes|no html=html link for when active is no. new_closed=# (the number of new messages in closed tickets) CMD_API_TICKET_MANAGE Sets the status of the ticket system for that resller. method: POST action=active active=yes (else don't pass it for no) html=html link. CMD_API_TICKET_MANAGE to reply to a user's ticket, as reseller/admin. method: POST action=reply type=reply number=12345 user=bob (who to) subject=your subject line priority=none (not important) status=open|closed message=your message CMD_API_TICKET_MANAGE to change the status of a message without a reply. method: POST action=status number=12345 status=open|closed

Interested to try DirectAdmin? Get a 30-day Free Trial!