Support Ticket

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.
Request
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access token
Response
200: OK
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

var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/get/support-ticket/catogory-list/',
'headers': {
'apikey': '<apikey>',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

PHP

<?php
​
$curl = curl_init();
​
curl_setopt_array($curl, array(
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/get/support-ticket/catogory-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>",
),
));
​
$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
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access-token
Body Parameters
subject
required
string
ticket subject
priority
required
string
priority id - Possible values are 1(Low), 2(Medium),or 3(High)
comment
required
string
ticket comment
category
required
string
category id - Get possible values through Support Ticket Category List API endpoint.
attachment
optional
object
attachment file - Upload a attachment file (maximum size 2Mib).
Response
200: OK
​​​​​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}

Sample Code

Node

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

<?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

Status Code

Error Type

Field

Description

400

Validation Error

subject, comment

This field is required.

400

Validation Error

subject

Ensure this field has no more than 500 characters.

400

Validation Error

priority

"\"priority\" is not a valid choice.

400

Validation Error

category

Invalid pk"\"category\" - object does not exist.

400

Validation Error

attachment

File is too big. Max filesize: 2MiB.

401

Request Failed

​

Currenly Open Ticket Limit Exceed.

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.
Request
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access-token
Query Parameters
offset
optional
string
offset value
limit
optional
string
limit value
subject
optional
string
ticket subject
category
optional
string
category id - Get possible values through Support Ticket Category List API endpoint.
status
optional
string
status id - Possible values are 1(Open), 2(Processing),or 3(Closed)
Response
200: OK
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

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

<?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

Status Code

Error Type

Field

Description

400

Validation Error

category

Catogory id is not valid numeric

400

Validation Error

status

Status id is not valid numeric

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.
Request
Response
Request
Headers
apikey
required
string
Bearer access token
Authorization
required
string
apikey
Response
200: OK
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

var request = require('request');
var options = {
'method': 'GET',
'url': 'https://<domain>/<api prefix>/<version>/get/ticket/tags/',
'headers': {
'apikey': '<apikey>',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
​

PHP

<?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>",
),
));
$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
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access-token
Body Parameters
ticket_id
required
string
Id of ticket which wants to update
priority
optional
string
priority id - Possible values are 1(Low), 2(Medium),or 3(High)
tags
required
string
tag id - Get possible values through Support Ticket Tag List API endpoint.
Response
200: OK
​​​​​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}

Sample Code

Node

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

<?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

Status Code

Error Type

Field

Description

400

Invalid Input

ticket

You are not the owner of the requested ticket,

Ticket id is not valid,

Ticket id is required and this may not be blank.

400

Validation Error

priority

"\"priority\" is not a valid choice.

400

Validation Error

tags

This list may not be empty.

Incorrect type. Expected pk value, received str.

Invalid pk \"tags\" - object does not exist.

Get Ticket Detaild View

get
​

β€Žhttps://<domain>/<api prefix>/<version>/support/ticket/detailed-view/
This API endpoint will provide a detailed view of support ticket.
Request
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access-token
Body Parameters
ticket_id
required
string
ticket id
Response
200: OK
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

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

<?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

Status Code

Error Type

Field

Description

400

Invalid Input

ticket

You are not the owner of the requested ticket,

Ticket id is not valid.

Ticket id is required and this may not be blank.

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.
Request
Response
Request
Headers
apikey
required
string
Apikey
Authorization
required
string
Bearer access token
Response
200: OK
Get HTTP Response of attachment file.

Sample Code

Node

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

<?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
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access-token
Body Parameters
ticket
required
string
ticket id
comment
required
string
conversation comment
attachment
optional
string
Upload a attachment file (maximum size 2Mib).
Response
200: OK
​​​​​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}

Sample Code

Node

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

<?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

Status Code

Error Type

Field

Description

400

Validation Error

ticket

This field is required.

You are not the owner of the requested ticket.

Incorrect type. Expected pk value, received str.

Invalid pk \"ticket\" - object does not exist.

This field may not be null.

400

Validation Error

comment

This field is required.

This field may not be blank.

400

Validation Error

attachment

File is too big. Max filesize: 2MiB.

Change Ticket Status

post
​

β€Žhttps://<domain>/<api prefix>/<version>/β€Žsupport/ticket/status/
This API endpoint will change status of support ticket.
Request
Response
Request
Headers
apikey
required
string
apikey
Authorization
required
string
Bearer access-token
Body Parameters
ticket
required
string
ticket id
status
required
string
status id - Possible values are 2(to open) and 3(to close)
Response
200: OK
​​​​​HTTP/1.1 200 OK
Content-Type: application/json
​
Body:
{
"status_code": 200,
"errors": {},
"data": {}
}

Sample Code

Node

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

<?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

Status Code

Error Type

Field

Description

400

Validation Error

ticket

You Can't open or close this Ticket,

Ticket id is not valid

Ticket is already closed,

Ticket is already processing, Ticket is already open,

Ticket id is required and this may not be blank.

400

Validation Error

status

"\"status\" is not a valid choice.

Status id is required and this may not be blank.