Support Ticket Category List
GET
‎https://<domain>/<api prefix>/<version>/support/get/category-list/
This API endpoint will give a list of Category which was chosen when creating a support ticket.
200
Copy HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {
"CategoryList": [
{
"id": <Category-id>,
"category": "<Category-name>",
"description": "<Description>"
},
...
]
}
}
Sample Code
Node
Copy var request = require ( 'request' );
var options = {
'method' : 'GET' ,
'url' : 'https://<domain>/<api prefix>/<version>/support/get/category-list/' ,
'headers' : {
'apikey' : '<apikey>' ,
'Authorization' : 'Bearer <access-token>'
}
};
request (options , function (error , response) {
if (error) throw new Error (error);
console .log ( response .body);
});
PHP
Copy <? php
$curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/support/get/category-list/" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "GET" ,
CURLOPT_HTTPHEADER => array(
"apikey: <apikey>" ,
"Authorization: Bearer <access-token>" ,
) ,
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Create Support Ticket
POST
‎https://<domain>/<api prefix>/<version>/support/create/ticket/
This API endpoint will create a support ticket.
Request Body
200
Copy ​​​​​HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
Copy var request = require ( 'request' );
var fs = require ( 'fs' );
var options = {
'method' : 'POST' ,
'url' : 'https://<domain>/<api prefix>/<version>/creat/support/ticket/' ,
'headers' : {
'apikey' : '<apikey>' ,
'Authorization' : 'Bearer <access-token>' ,
} ,
formData : {
'subject' : '<subject>' ,
'priority' : '<priority-id>' ,
'comment' : '<comment>' ,
'category' : '<category-id>' ,
'attachment' : {
'value' : fs .createReadStream ( '<file_path>' ) ,
'options' : {
'filename' : '<file_name>' ,
'contentType' : null
}
}
}
};
request (options , function (error , response) {
if (error) throw new Error (error);
console .log ( response .body);
});
PHP
Copy <? php
$curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/creat/support/ticket/" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "POST" ,
CURLOPT_POSTFIELDS => array('subject' => '<subject>','priority' => '<priority-id>','comment' => '<comment>','category' => '<category>','attachment'=> new CURLFILE('<file_path>')),
CURLOPT_HTTPHEADER => array(
"apikey: <apikey>" ,
"Authorization: Bearer <access-token>" ,
) ,
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Error Responses
Support Ticket History
GET
‎https://<domain>/<api prefix>/<version>/support/get/ticket/history/
This API endpoint will provide a history of support tickets. A request without query params provides details of last created 50 tickets.
To get a range of ticket history provide offset and limit values in query params.
Also provides filtered details of ticket history when a request with a possible query params. Ticket subject, ticket category, and ticket status are the possible query params.
Query Parameters
200
Copy HTTP/1.1 200 OK
Content-Type: application/json
Body:
{
"status_code": 200,
"errors": {},
"data": {
"TicketList": [
{
"id": <ticket_id>,
"subject": "<ticket_subject>",
"priority": "<ticket_priority_id>",
"category": <ticket_category_id>,
"category_title": "<ticket_category_title>",
"comment": "<ticket_comment>",
"status": "<ticket_status_id>"
}
...
]
}
}
------------------------
priority_options = (
('1', 'Low'),
('2', 'Medium'),
('3', 'High'),
)
status_options = (
('1', 'Open'),
('2', 'Processing'),
('3', 'Closed'),
)
Sample code
Node
Copy var request = require ( 'request' );
var options = {
'method' : 'GET' ,
'url' : 'https://<domain>/<api prefix>/<version>/get/ticket/history/' ,
'headers' : {
'apikey' : '<apikey>' ,
'Authorization' : 'Bearer <access-token>' ,
} ,
formData: {}
};
request ( options , function (error , response) {
if (error) throw new Error (error);
console . log ( response . body ) ;
} ) ;
PHP
Copy <? php
$curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/get/ticket/history/" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "GET" ,
CURLOPT_HTTPHEADER => array(
"apikey: <apikey>" ,
"Authorization: Bearer <access-token>"
) ,
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Error Responses
Support Ticket Tag List
GET
‎https://<domain>/<api prefix>/<version>/support/get/ticket/tags/
This API endpoint will give a list of Tags which was chosen when updating a support ticket.
200
Copy HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {
"TicketTagList": [
{
"id": <tag_id>,
"tag": "<tag_name>",
"keyword": "<tag_keyword>"
},
...
]
}
}
Sample Code
Node
Copy var request = require ( 'request' );
var options = {
'method' : 'GET' ,
'url' : 'https://<domain>/<api prefix>/<version>/get/ticket/tags/' ,
'headers' : {
'apikey' : '<apikey>' ,
'Authorization' : 'Bearer <access-token>'
}
};
request (options , function (error , response) {
if (error) throw new Error (error);
console .log ( response .body);
});
PHP
Copy <? php
$curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/get/ticket/tags/" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "GET" ,
CURLOPT_HTTPHEADER => array(
"apikey: <apikey>" ,
"Authorization: Bearer <access-token>"
) ,
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Update Support Ticket
POST
‎https://<domain>/<api prefix>/<version>/support/update/ticket/
This API endpoint will update a support ticket.
Request Body
200
Copy ​​​​​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
Copy var request = require ( 'request' );
var options = {
'method' : 'POST' ,
'url' : 'https://<domain>/<api prefix>/<version>/update/support/ticket/' ,
'headers' : {
'apikey' : '<apikey>' ,
'Authorization' : 'Bearer <access-token>'
} ,
formData: {
'ticket_id' : '<ticket id>' ,
'priority' : '<priority id>' ,
'tags' : '<tag id>'
}
};
request ( options , function (error , response) {
if (error) throw new Error (error);
console . log ( response . body ) ;
} ) ;
PHP
Copy <? php
$curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/update/support/ticket/" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "POST" ,
CURLOPT_POSTFIELDS => array( 'ticket_id' => '<ticket id>' , 'priority' => '<ticket id>' , 'tags' => '<tag id>' ) ,
CURLOPT_HTTPHEADER => array(
"apikey: <apikey>" ,
"Authorization: Bearer <accsess-token>" ,
) ,
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Error Responses
Get Ticket Detailed View
GET
‎https://<domain>/<api prefix>/<version>/support/ticket/detailed-view/
This API endpoint will provide a detailed view of support ticket.
Request Body
200
Copy HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {
"ticket": {
"id": < ticket id >,
"subject": "< subject >",
"priority": "< priority_id >",
"category": < category_id >,
"comment": " < comment > ",
"status": "< status_id >",
"tags": [
tag id
]
},
"author": "< author_email >",
"conversations": [
{
"id": < conversations_id >,
"ticket": < ticket_id >,
"comment": " < comment > ",
"author":"< conversation_author_email >"
},
...
],
"attachments": [
{
"id": < attachments id >,
"conversation_id": < conversation id >
},
...
]
}
}
Sample Code
Node
Copy var request = require ( 'request' );
var options = {
'method' : 'GET' ,
'url' : 'https://<domain>/<api prefix>/<version>/support/ticket/detailed-view/' ,
'headers' : {
'apikey' : '<apikey>' ,
'Authorization' : 'Bearer <access token>' ,
} ,
formData: {
'ticket_id' : '<ticket id>'
}
};
request ( options , function (error , response) {
if (error) throw new Error (error);
console . log ( response . body ) ;
} ) ;
PHP
Copy <? php
$curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => "" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "https://<domain>/<api prefix>/<version>/support/ticket/detailed-view/" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "GET" ,
CURLOPT_POSTFIELDS => array( 'ticket_id' => '<ticket id>' ) ,
CURLOPT_HTTPHEADER => arra (
"apikey: <apikey>" ,
"Authorization: Bearer <access token>" ,
),
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Error Responses
Get Attachment
GET
‎https://<domain>/<api prefix>/<version>/support/ticket/download/<attachment_id>/
This API endpoint will return an HTTP Response of the attachment file.
200
Copy Get HTTP Response of attachment file.
Sample Code
Node
Copy var request = require ( 'request' );
var options = {
'method' : 'GET' ,
'url' : 'https://<domain>/<api prefix>/<version>/support/ticket/download/<attachment_id>/' ,
'headers' : {
'apikey' : '<apikey>' ,
'Authorization' : 'Bearer <access token>' ,
}
};
request ( options , function (error , response) {
if (error) throw new Error (error);
console . log ( response . body ) ;
} ) ;
PHP
Copy <? php
$curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/support/ticket/download/<attachment_id>/' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => '' ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => 'GET' ,
CURLOPT_HTTPHEADER => array(
'apikey: <apikey>' ,
'Authorization: Bearer <access token>' ,
) ,
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Ticket Add Conversation
POST
‎https://<domain>/<api prefix>/<version>/support/ticket/conversation/
This API endpoint will add a conversation to support ticket.
Request Body
200
Copy ​​​​​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
Copy var request = require ( 'request' );
var fs = require ( 'fs' );
var options = {
'method' : 'POST' ,
'url' : 'https://<domain>/<api prefix>/<version>/support/ticket/conversation/' ,
'headers' : {
'apikey' : '<apikey>' ,
'Authorization' : 'Bearer <access token>' ,
} ,
formData: {
'ticket' : '<ticket id>' ,
'comment' : '<comment>' ,
'attachment' : {
'value' : fs . createReadStream ( 'file path' ),
'options' : {
'filename' : '<filename>' ,
'contentType' : null
}
}
}
};
request ( options , function (error , response) {
if (error) throw new Error (error);
console . log ( response . body ) ;
} ) ;
PHP
Copy <? php
$curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/support/ticket/conversation/" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "POST" ,
CURLOPT_POSTFIELDS => array('ticket' => '<ticket id>','comment' => '<comment>','attachment'=> new CURLFILE('file path')),
CURLOPT_HTTPHEADER => array(
"apikey: <apikey>" ,
"Authorization: Bearer <access token>" ,
) ,
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Error Responses
Change Ticket Status
POST
‎https://<domain>/<api prefix>/<version>/‎support/ticket/status/
This API endpoint will change status of support ticket.
Request Body
200
Copy ​​​​​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}
Sample Code
Node
Copy var request = require ( 'request' );
var options = {
'method' : 'POST' ,
'url' : 'https://<domain>/<api prefix>/<version>/‎support/ticket/status/' ,
'headers' : {
'apikey' : '<apikey>' ,
'Authorization' : 'Bearer <access token>' ,
} ,
formData: {
'ticket' : '<ticket id>' ,
'status' : '<status id>'
}
};
request ( options , function (error , response) {
if (error) throw new Error (error);
console . log ( response . body ) ;
} ) ;
PHP
Copy <? php
$curl = curl_init () ;
curl_setopt_array ( $curl , array(
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/‎support/ticket/status/" ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_ENCODING => "" ,
CURLOPT_MAXREDIRS => 10 ,
CURLOPT_TIMEOUT => 0 ,
CURLOPT_FOLLOWLOCATION => true ,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1 ,
CURLOPT_CUSTOMREQUEST => "POST" ,
CURLOPT_POSTFIELDS => array( 'ticket' => '<ticket id>' , 'status' => '<status id>' ) ,
CURLOPT_HTTPHEADER => array(
"apikey:<apikey>" ,
"Authorization: Bearer <access token>" ,
) ,
) ) ;
$response = curl_exec ( $curl ) ;
curl_close ( $curl ) ;
echo $response;
Error Responses