Section V - Tickets API

V1 - Raise Ticket

POST Method :

/api/v1/raise_ticket with the following POST data:

Input :

Argument Mandatory Value
type Yes String < Name of the ticket type >
subject Yes String < Name of the ticket subject >
priority No Text < low, medium, high, urgent>
userId Yes Numeric < Id of the user>
comments Yes String < Issue>
closeTicketImmediately No String keyword( “true” or “false”)
resolutionType No String ( Should not be empty if closeTicketImmediately is true)
resolutionSubject No String (Should not be empty if closeTicketImmediately is true)

Sample Output :

{
 "status": "success",
 "errorCode" = 200,
 "message": "Your ticket with the ID 91 has been raised. Please wait for the 
 response and note the ticket Id for future reference.",
 "ticketId": "91"
}

V2 - Get ticket by status

GET Method :

/api/v1/get_tickets/< userId>/< status>/< assigned_admin> with the following data:

Here the tickets are filtered based on the status.

Input :

Argument Mandatory Value
userId Yes Numeric < Id of the user> send it as 0 if you want all tickets
status No Text < unresolved, overdue, duetoday, open, onhold, unassigned, closed>
assigned_admin No Admin Username
fromDate No dd-mm-yyyy H:m , < change the method to post>
toDate No dd-mm-yyyy H:m , < change the method to post>

Sample Output :

{
 "status": "success",
 "errorCode" = 200,
 "data": [
 {
 "Ticket": {
 "id": "11",
 "account_id": "jazenetworks",
 "user": "6",
 "subject": "Unable to pay online",
 "type": "Payment",
 "priority": "medium",
 "due": "2016-11-22 05:01:51",
 "status": "unassigned",
 "assigned_to": "[email protected]",
 "group_name": "Payment",
 "created": "2016-11-21 17:01:51"
 }
 },
 {
 "Ticket": {
 "id": "12",
 "account_id": "jazenetworks",
 "user": "6",
 "subject": "Unable to pay online",
 "type": "Payment",
 "priority": "medium",
 "due": "2016-11-22 05:03:23",
 "status": "unassigned",
 "assigned_to": "NULL",
 "group_name": "Payment",
 "created": "2016-11-21 17:03:23"}}]}

V3 Send Message

POST Method :

/api/v1/send_message with the following POST data:

Input :

Argument Mandatory Value
ticketId Yes Numeric < Id of the ticket>
ticketMessage Yes String < reply for the ticket>
sender Yes Text < admin, user>
sender_name Yes Numeric
showToUser Yes Text < true, false>

Sample Output :

{
 "status": "success",
 "errorCode" = 200,
 "message": "The message has been sent to the <sender>"
}

V4 - Get ticket details by TicketID

GET Method :

/api/v1/get_ticket_details/< ticketId> with the following data:

Input :

Argument Mandatory Value
ticketId Yes Numeric < Id of the ticket>

Sample Output :

{
 "status": "success",
 "errorCode" = 200,
 "message": {
 "ticket_conversation": [
 {
 "sender": "user",
 "sender_name": "max",
 "ticket_message": "connection timeout",
 "created": "2016-11-16 13:07:26",
 "show_to_user": "0"
 },
 {
 "sender": "admin",
 "sender_name": "[email protected]",
 "ticket_message": "ok. Looking on it",
 "created": "2016-11-21 19:06:34",
 "show_to_user": "0"
 },
 {
 "sender": "admin",
 "sender_name": "[email protected]",
 "ticket_message": "issue is solved",
 "created": "2016-11-21 19:07:11",
 "show_to_user": "0"
 }
 ],
 "ticket_details": {
 "status": "closed",
 "assigned_to": "[email protected]",
 "created": "2016-11-21 19:36:54"
 }
 } }

V5 - Close ticket by ticketID

GET Method :

/api/v1/close_ticket/< ticketId> with the following data:

Input :

Argument Mandatory Value
ticketId Yes Numeric < Id of the ticket>

Sample Output :

{
 "status": "success",
 "errorCode" = 200,
 "message": "The ticket has been closed"
}

V6 - Assign ticke to admin

POST Method :

/api/v1/assign_ticket_to_admin with the following POST data:

Input :

Argument Mandatory Value
ticketId Yes Numeric < Id of the ticket>
admin Yes String < username of admin>

Sample Output :

{
 "status": "error",
 "errorCode": 200,
 "message": "Admin assigned to the ticket successfully"
}

V7 - Reopen ticket

POST Method :

/api/v1/reopen_ticket with the following

Input :

Argument Mandatory Value
ticketId Yes Numeric < Id of the ticket>
userId Yes Numeric < Id of the user>
comments Yes String < Reason for reopen>

Sample Output :

{
"status": "success",
"message": "Ticket has been reopened successfully",
"errorCode": 200
}

V8 - Ticket rating

POST Method :

/api/v1/ticket_rating with the following POST data:

Input :

Argument Mandatory Value
ticketId Yes Numeric < Id of the ticket>
userId Yes Numeric < Id of the user>
ratingValue Yes Numeric <'1' or '2' or '3' or '4' or '5'>

Sample Input :

{
"status": "success",
"message": "Thanks for your feedback, your rating has been saved for the 
ticket ID214",
"errorCode": 200
}