This v1 API  will be deprecated from 15th March 2020

Description:

To fetch all threads of a ticket by ticket id.

URL : api/v1/helpdesk/ticket-thread      

           (Replace this URL with you helpdesk URL )

Parameters :

Name Data Type Required / Optional Description
api_key String Optional An alphanumeric code that can be used to authenticate your API calls
ip String Optional IP address of the Customer/location where API call is being made from
token String Required Token generated for a user
id integer Required Id of the ticket

 

HTTP Method : GET         

  •   URL Request Example:

https://www.stablehelpdesk.faveodemo.com/api/v1/helpdesk/ticket-thread ?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6Ly9wcm9kdWN0ZGVtb3VybC5jb20vc2FyZnJhei9wdWJsaWMvYXBpL3YxL2F1dGhlbnRpY2F0ZSIsImlhdCI6MTUzNDc1OTg5MiwiZXhwIjoxNTM0NzYwMTMyLCJuYmYiOjE1MzQ3NTk4OTIsImp0aSI6IlhBdzNrNGhwZXNUVWNFeVQifQ.TpuZ6Vwo9oMlt_LKRZYv2cU5UY8YBKqe06-66ioZA24&id=112

Response

  •   Response Format : JSON
  •   Returns JSON which contains below response

Sample JSON Success Response :

{

   "success": true,

   "data": {

       "threads": [

           {

               "id": 1421,

               "title": "",

               "body": "type set to <b>Question</b> from",

               "created_at": "2018-03-29 13:14:09",

               "updated_at": "2018-03-29 13:14:09",

               "ticket_id": 31,

               "is_internal": 1,

               "user": {

                   "id": 1,

                   "user_name": "demoadmin",

                   "first_name": "Saifu",

                   "last_name": "QA",

                   "email": "saifu@gmail.com",

                   "profile_pic": "https://secure.gravatar.com/avatar/b904e33fae6773197726e7e06bb2b0c0?s=80&r=g&d=identicon"

               },

               "attach": []

           },

           {

               "id": 1418,

               "title": "",

               "body": "This&nbsp;is&nbsp;sample&nbsp;reply&nbsp;to&nbsp;ticket.",

               "created_at": "2018-03-29 13:02:57",

               "updated_at": "2018-03-29 13:02:57",

               "ticket_id": 31,

               "is_internal": 0,

               "user": {

                   "id": 1,

                   "user_name": "demoadmin",

                   "first_name": "Saifu",

                   "last_name": "QA",

                   "email": "saifu@gmail.com",

                   "profile_pic": "https://secure.gravatar.com/avatar/b904e33fae6773197726e7e06bb2b0c0?s=80&r=g&d=identicon"

               },

               "attach": []

           },

           {

               "id": 1417,

               "title": "",

               "body": "This&nbsp;is&nbsp;sample&nbsp;reply&nbsp;to&nbsp;ticket.",

               "created_at": "2018-03-29 13:02:46",

               "updated_at": "2018-03-29 13:02:46",

               "ticket_id": 31,

               "is_internal": 0,

               "user": {

                   "id": 1,

                   "user_name": "demoadmin",

                   "first_name": "Saifu",

                   "last_name": "QA",

                   "email": "saifu@gmail.com",

                   "profile_pic": "https://secure.gravatar.com/avatar/b904e33fae6773197726e7e06bb2b0c0?s=80&r=g&d=identicon"

               },

               "attach": []

           },

           {

               "id": 1414,

               "title": "",

               "body": "This Ticket has been assigned to Mallikarjun H",

               "created_at": "2018-03-29 12:59:56",

               "updated_at": "2018-03-29 12:59:56",

               "ticket_id": 31,

               "is_internal": 1,

               "user": {

                   "id": 6,

                   "user_name": "mallikarjun.h@ladybirdweb.com",

                   "first_name": "Mallikarjun",

                   "last_name": "H",

                   "email": "mallikarjun.h@ladybirdweb.com",

                   "profile_pic": "https://secure.gravatar.com/avatar/7dd85150ea38e3248f719cf4a485e486?s=80&r=g&d=identicon"

               },

               "attach": []

           },

           {

               "id": 1413,

               "title": "After some work I will merge to new branch",

               "body": "Sample&nbsp;text&nbsp;message",

               "created_at": "2018-03-29 12:59:56",

               "updated_at": "2018-03-29 12:59:56",

               "ticket_id": 31,

               "is_internal": 0,

               "user": {

                   "id": 36,

                   "user_name": "ramesh.10@gmail.com",

                   "first_name": "Ramesh",

                   "last_name": "Rendulkar",

                   "email": "ramesh.10@gmail.com",

                   "profile_pic": "https://secure.gravatar.com/avatar/0301e6866d745011e6374e5206abefb3?s=80&r=g&d=identicon"

               },

               "attach": []

           }

       ]

   }

}

Response Description:

Parameter Description
threads It is an array of threads

threads: It is an array which contains the list of ticket threads

Parameter Description
id It on thread
title It is an title of the thread
body It is an message body of the thread
created_at It is the date at the thread is created
ticket_id It is unique id of current ticket
is_internal It is that this thread is an internal note or not (Example: If is_internal=1 then this is thread is internal note else it is replied)
attach It is an array which contains attachment details
user It returns JSON of user details (owner)

user: contains user details

Parameter Description
id It of the user
user_name It is the username of the user
first_name It is the first name of the user
last_name It is the last name of the user
email It is the email of the user
profile_pic It is the profile picture of the user

Possible Errors/Failures:

 Please check the responses for some common errors

Leave a Reply

Your email address will not be published. Required fields are marked *