Ticket List

NOTE: User must me logged in as agent or admin to access this API

URL : v3/api/agent/ticket-list

Method : GET

Query Parameters :

Parameter Type Possible Values Required/Optional Description
category String all, inbox, mytickets, closed, unassigned, followup, deleted, unapproved Required ‘all’ can be used to get all the tickets irrespective of which category they belongs. Rest of the category will give only tickets from that category
search-query String any Optional Search string given in the datatable.

By default its value is empty

limit Integer any Optional Number of tickets that are reuired to display on a partiular page.

By default its value is 10

page integer any Optional This is the current page in the ticket list.

By default its value is 1

sort-field String ticket_number, updated_at (for last_activity) Optional The field that is required to be sorted.

By default its value is updated_at (last_activity)

sort-order String asc, desc Optional The order in which field is required to be sorted

By default its value is desc

helptopic-ids Array Array of integers Optional The help topic Ids by which tickets needs to be filtered
dept-ids Array Array of integers Optional The department Ids by which tickets needs to be filtered
priority-ids Array Array of integers Optional The priority Ids by which tickets needs to be filtered
sla-plan-ids Array Array of integers Optional The SLA Ids by which tickets needs to be filtered
ticket-ids Array Array of integers Optional The ticket Ids by which tickets needs to be filtered
owner-ids Array Array of integers Optional The owner Ids by which tickets needs to be filtered
assignee-ids Array Array of integers Optional The assignee Ids by which tickets needs to be filtered
team-ids Array Array of integers Optional The team-ids by which ticket needs to be filtered
status-ids Array Array of integers Optional The status ids by which ticket is required to be filtered
type-ids Array Array of integers Optional The ticket type Ids by which tickets needs to be filtered
source-ids Array Array of integers Optional The source Ids by which tickets needs to be filtered
assigned boolean 0 or 1 Optional The value by which tickets filter based on assigned or unassigned
answered boolean 0 or 1 Optional The value by which tickets filter based on answered or unanswered
tag-ids Array Array of tag names Optional The tags by which ticket needs to be filtered
label-ids Array Array of label names Optional The labels by which ticket needs to be filtered
due-on String DateTime range for created_at in format start_date~end_date (YYYY-MM-DD HH:MM:SS) Optional The due date (time) by which tickets needs to be filtered
created-at String DateTime range for created_at in format start_date~end_date (YYYY-MM-DD HH:MM:SS) Optional The ticket created time by which ticket needs to be filtered.
updated-at String  DateTime range for created_at in format start_date~end_date (YYYY-MM-DD HH:MM:SS) Optional The ticket updated time by which ticket needs to be filtered.
organization-ids Array Array of organization ids Optional The organization ids of the users which are owners of the ticket
custom_id String Any String Optional Custom field param will have form field id after prefix ‘custom_’.

 

Response:

{

   "success": true,

   "data": {

   "current_page": 1,

   "from": 1,

   "last_page": 1,

   "per_page": 10,

   "total": 2,

   "tickets": [{

   "id": 10429,

"title": "TEST_TITLE",

   "updated_at": "2018-03-20 07:46:37",

   "status": {

   "id": 1,

   "name": "Open"

   },

   "ticket_number": "AAA-TICKET-NUMBER",

   "source": {

   "id": 1,

   "name": "Web",

   "css_class": "fa fa-internet-explorer"

   },

   "duedate": "2018-03-20 12:46:37",

   "is_overdue": "false",

"due_today": "true"

   "isanswered": "0",

   "thread_count": 1,

   "collaborator_count": null,

   "attachment_count": 0,

   "poster": "",

   "assigned": {

   "id": 1,

   "user_name": "demo_admin",

   "first_name": "Demo",

   "last_name": "Admin"

   },

   "priority": {

   "id": 1,

   "name": "Low",

   "priority_color": "#00a65a"

   },

   "collaborator_count_relation": [],

   "from": {

   "id": 1,

   "user_name": "demo_admin",

   "first_name": "Demo",

   "last_name": "Admin",

   "profile_pic": "http:\/\/localhost:8000\/lb-faveo\/media\/images\/system.png",

   "email": "Not available"

   }

   },//more tickets]

   }

}

 

Ticket Count

URL : api/agent/ticket-count

Method : GET

Query Parameters :

Parameter Type Possible Values Required/Optional Description
helptopic-ids Array Array of integers Optional The help topic Ids by which tickets needs to be filtered
dept-ids Array Array of integers Optional The department Ids by which tickets needs to be filtered
priority-ids Array Array of integers Optional The priority Ids by which tickets needs to be filtered
sla-plan-ids Array Array of integers Optional The SLA Ids by which tickets needs to be filtered
ticket-ids Array Array of integers Optional The ticket Ids by which tickets needs to be filtered
owner-ids Array Array of integers Optional The owner Ids by which tickets needs to be filtered
assignee-ids Array Array of integers Optional The assignee Ids by which tickets needs to be filtered
team-ids Array Array of integers Optional The team-ids by which ticket needs to be filtered
status-ids Array Array of integers Optional The status ids by which ticket is required to be filtered
type-ids Array Array of integers Optional The ticket type Ids by which tickets needs to be filtered
source-ids Array Array of integers Optional The source Ids by which tickets needs to be filtered
assigned boolean 0 or 1 Optional The value by which tickets filter based on assigned or unassigned
answered boolean 0 or 1 Optional The value by which tickets filter based on answered or unanswered
tag-ids Array Array of tag names Optional The tags by which ticket needs to be filtered
label-ids Array Array of label names Optional The labels by which ticket needs to be filtered
due-on String DateTime range for created_at in format start_date~end_date (YYYY-MM-DD HH:MM:SS) Optional The due date (time) by which tickets needs to be filtered
created-at String DateTime range for created_at in format start_date~end_date (YYYY-MM-DD HH:MM:SS) Optional The ticket created time by which ticket needs to be filtered.
updated-at String  DateTime range for created_at in format start_date~end_date (YYYY-MM-DD HH:MM:SS) Optional The ticket updated time by which ticket needs to be filtered.
organization-ids Array Array of organization ids Optional The organization ids of the users which are owners of the ticket
custom_id String Any String Optional Custom field param will have form field id after prefix ‘custom_’.

 

Response:

{
  "success": true,
  "data": {
    "open": 2,
    "closed": 3,
    "unapproved": 4
  }
}
Tagged:

Comments

  1. Rich Murray

    I am unable to get the created-at date range to work correctly.
    {
    “success”: false,
    “message”: “invalid parameter passed”
    }

    I have tried changing the date format in many different ways such as removing spaces, removing dashes and colons, etc. Could you provide an example of a working date range parameter?

    Thanks,
    Rich

Leave a Reply

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