Tickets
Get a ticket
GET
/
tickets
/
{id}
Get a ticket
curl --request GET \
--url https://shortext.ny-corp.io/api/v2.0/tickets/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://shortext.ny-corp.io/api/v2.0/tickets/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://shortext.ny-corp.io/api/v2.0/tickets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://shortext.ny-corp.io/api/v2.0/tickets/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"code": 1000,
"message": "Request success.",
"body": {
"id": "STT-XXXXX",
"subject": "<string>",
"description": "<string>",
"status": {
"code": "in_progress",
"name": "In progress",
"position": 123,
"active": true,
"resolved": true,
"terminal": true
},
"priority": {
"priority": "high",
"label": "High",
"response_time": 60,
"resolve_time": 480
},
"agent": {
"id": "<string>",
"name": "<string>"
},
"conversation_id": "<string>",
"contact": {},
"response_due_at": "2023-11-07T05:31:56Z",
"resolve_due_at": "2023-11-07T05:31:56Z",
"responded_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"response_breached": true,
"resolve_breached": true,
"satisfaction_rating": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"token": "<string>",
"trace_id": "<string>"
}Autorisations
Company API key, sent as Authorization: Bearer <key>. Create it in the dashboard (Developer > API Keys) with the permissions the integration needs.
Paramètres de chemin
Exemple:
"STT-XXXXX"
Réponse
200 - application/json
Always HTTP 200: the outcome is in success and code (absolute value of the response code).
⌘I
Get a ticket
curl --request GET \
--url https://shortext.ny-corp.io/api/v2.0/tickets/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://shortext.ny-corp.io/api/v2.0/tickets/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://shortext.ny-corp.io/api/v2.0/tickets/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://shortext.ny-corp.io/api/v2.0/tickets/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"code": 1000,
"message": "Request success.",
"body": {
"id": "STT-XXXXX",
"subject": "<string>",
"description": "<string>",
"status": {
"code": "in_progress",
"name": "In progress",
"position": 123,
"active": true,
"resolved": true,
"terminal": true
},
"priority": {
"priority": "high",
"label": "High",
"response_time": 60,
"resolve_time": 480
},
"agent": {
"id": "<string>",
"name": "<string>"
},
"conversation_id": "<string>",
"contact": {},
"response_due_at": "2023-11-07T05:31:56Z",
"resolve_due_at": "2023-11-07T05:31:56Z",
"responded_at": "2023-11-07T05:31:56Z",
"resolved_at": "2023-11-07T05:31:56Z",
"closed_at": "2023-11-07T05:31:56Z",
"response_breached": true,
"resolve_breached": true,
"satisfaction_rating": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"token": "<string>",
"trace_id": "<string>"
}