Support Ticket

Support Ticket Category List

get
β€Ž
https://<domain>/<api prefix>/<version>/support/get/category-list/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://<domain>/<api prefix>/<version>/support/get/category-list/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access-token>'
8
}
9
};
10
request(options, function (error, response) {
11
if (error) throw new Error(error);
12
console.log(response.body);
13
});
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/support/get/category-list/",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "GET",
14
CURLOPT_HTTPHEADER => array(
15
"apikey: <apikey>",
16
"Authorization: Bearer <access-token>",
17
),
18
));
19
​
20
$response = curl_exec($curl);
21
​
22
curl_close($curl);
23
echo $response;
Copied!

Create Support Ticket

post
β€Ž
https://<domain>/<api prefix>/<version>/support/create/ticket/

Sample Code

Node
1
var request = require('request');
2
var fs = require('fs');
3
var options = {
4
'method': 'POST',
5
'url': 'https://<domain>/<api prefix>/<version>/creat/support/ticket/',
6
'headers': {
7
'apikey': '<apikey>',
8
'Authorization': 'Bearer <access-token>',
9
},
10
formData: {
11
'subject': '<subject>',
12
'priority': '<priority-id>',
13
'comment': '<comment>',
14
'category': '<category-id>',
15
'attachment': {
16
'value': fs.createReadStream('<file_path>'),
17
'options': {
18
'filename': '<file_name>',
19
'contentType': null
20
}
21
}
22
}
23
};
24
request(options, function (error, response) {
25
if (error) throw new Error(error);
26
console.log(response.body);
27
});
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/creat/support/ticket/",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "POST",
14
CURLOPT_POSTFIELDS => array('subject' => '<subject>','priority' => '<priority-id>','comment' => '<comment>','category' => '<category>','attachment'=> new CURLFILE('<file_path>')),
15
CURLOPT_HTTPHEADER => array(
16
"apikey: <apikey>",
17
"Authorization: Bearer <access-token>",
18
),
19
));
20
​
21
$response = curl_exec($curl);
22
​
23
curl_close($curl);
24
echo $response;
Copied!

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/

Sample code

Node
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://<domain>/<api prefix>/<version>/get/ticket/history/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access-token>',
8
},
9
formData: {}
10
};
11
request(options, function (error, response) {
12
if (error) throw new Error(error);
13
console.log(response.body);
14
});
15
​
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/get/ticket/history/",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "GET",
14
CURLOPT_HTTPHEADER => array(
15
"apikey: <apikey>",
16
"Authorization: Bearer <access-token>"
17
),
18
));
19
​
20
$response = curl_exec($curl);
21
​
22
curl_close($curl);
23
echo $response;
Copied!

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/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://<domain>/<api prefix>/<version>/get/ticket/tags/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access-token>'
8
}
9
};
10
request(options, function (error, response) {
11
if (error) throw new Error(error);
12
console.log(response.body);
13
});
14
​
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/get/ticket/tags/",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "GET",
14
CURLOPT_HTTPHEADER => array(
15
"apikey: <apikey>",
16
"Authorization: Bearer <access-token>"
17
),
18
));
19
$response = curl_exec($curl);
20
​
21
curl_close($curl);
22
echo $response;
Copied!

Update Support Ticket

post
β€Ž
https://<domain>/<api prefix>/<version>/support/update/ticket/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'POST',
4
'url': 'https://<domain>/<api prefix>/<version>/update/support/ticket/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access-token>'
8
},
9
formData: {
10
'ticket_id': '<ticket id>',
11
'priority': '<priority id>',
12
'tags': '<tag id>'
13
}
14
};
15
request(options, function (error, response) {
16
if (error) throw new Error(error);
17
console.log(response.body);
18
});
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/update/support/ticket/",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "POST",
14
CURLOPT_POSTFIELDS => array('ticket_id' => '<ticket id>','priority' => '<ticket id>','tags' => '<tag id>'),
15
CURLOPT_HTTPHEADER => array(
16
"apikey: <apikey>",
17
"Authorization: Bearer <accsess-token>",
18
),
19
));
20
​
21
$response = curl_exec($curl);
22
​
23
curl_close($curl);
24
echo $response;
25
​
Copied!

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 Detailed View

get
β€Ž
https://<domain>/<api prefix>/<version>/support/ticket/detailed-view/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://<domain>/<api prefix>/<version>/support/ticket/detailed-view/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access token>',
8
},
9
formData: {
10
'ticket_id': '<ticket id>'
11
}
12
};
13
request(options, function (error, response) {
14
if (error) throw new Error(error);
15
console.log(response.body);
16
});
17
​
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "https://<domain>/<api prefix>/<version>/support/ticket/detailed-view/",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "GET",
14
CURLOPT_POSTFIELDS => array('ticket_id' => '<ticket id>'),
15
CURLOPT_HTTPHEADER => arra(
16
"apikey: <apikey>",
17
"Authorization: Bearer <access token>",
18
),
19
));
20
​
21
$response = curl_exec($curl);
22
​
23
curl_close($curl);
24
echo $response;
25
​
26
​
Copied!

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

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'GET',
4
'url': 'https://<domain>/<api prefix>/<version>/support/ticket/download/<attachment_id>/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access token>',
8
}
9
};
10
request(options, function (error, response) {
11
if (error) throw new Error(error);
12
console.log(response.body);
13
});
14
​
Copied!

PHP

1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => 'https://<domain>/<api prefix>/<version>/support/ticket/download/<attachment_id>/',
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => '',
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => 'GET',
14
CURLOPT_HTTPHEADER => array(
15
'apikey: <apikey>',
16
'Authorization: Bearer <access token>',
17
),
18
));
19
​
20
$response = curl_exec($curl);
21
​
22
curl_close($curl);
23
echo $response;
Copied!

Ticket Add Conversation

post
β€Ž
https://<domain>/<api prefix>/<version>/support/ticket/conversation/

Sample Code

Node

1
var request = require('request');
2
var fs = require('fs');
3
var options = {
4
'method': 'POST',
5
'url': 'https://<domain>/<api prefix>/<version>/support/ticket/conversation/',
6
'headers': {
7
'apikey': '<apikey>',
8
'Authorization': 'Bearer <access token>',
9
},
10
formData: {
11
'ticket': '<ticket id>',
12
'comment': '<comment>',
13
'attachment': {
14
'value': fs.createReadStream('file path'),
15
'options': {
16
'filename': '<filename>',
17
'contentType': null
18
}
19
}
20
}
21
};
22
request(options, function (error, response) {
23
if (error) throw new Error(error);
24
console.log(response.body);
25
});
26
​
Copied!
PHP
1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/support/ticket/conversation/",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "POST",
14
CURLOPT_POSTFIELDS => array('ticket' => '<ticket id>','comment' => '<comment>','attachment'=> new CURLFILE('file path')),
15
CURLOPT_HTTPHEADER => array(
16
"apikey: <apikey>",
17
"Authorization: Bearer <access token>",
18
),
19
));
20
​
21
$response = curl_exec($curl);
22
​
23
curl_close($curl);
24
echo $response;
25
​
Copied!

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/

Sample Code

Node
1
var request = require('request');
2
var options = {
3
'method': 'POST',
4
'url': 'https://<domain>/<api prefix>/<version>/β€Žsupport/ticket/status/',
5
'headers': {
6
'apikey': '<apikey>',
7
'Authorization': 'Bearer <access token>',
8
},
9
formData: {
10
'ticket': '<ticket id>',
11
'status': '<status id>'
12
}
13
};
14
request(options, function (error, response) {
15
if (error) throw new Error(error);
16
console.log(response.body);
17
});
Copied!

PHP

1
<?php
2
​
3
$curl = curl_init();
4
​
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => "https://<domain>/<api prefix>/<version>/β€Žsupport/ticket/status/",
7
CURLOPT_RETURNTRANSFER => true,
8
CURLOPT_ENCODING => "",
9
CURLOPT_MAXREDIRS => 10,
10
CURLOPT_TIMEOUT => 0,
11
CURLOPT_FOLLOWLOCATION => true,
12
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
13
CURLOPT_CUSTOMREQUEST => "POST",
14
CURLOPT_POSTFIELDS => array('ticket' => '<ticket id>','status' => '<status id>'),
15
CURLOPT_HTTPHEADER => array(
16
"apikey:<apikey>",
17
"Authorization: Bearer <access token>",
18
),
19
));
20
​
21
$response = curl_exec($curl);
22
​
23
curl_close($curl);
24
echo $response;
25
​
Copied!

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.
Last modified 1mo ago