Skip to content

Faveo tickets API with filters and order

Sayar Samanta edited this page Aug 29, 2018 · 10 revisions

Description : This API can be used for getting and filtering ticket. This api can replace all other APIs used for getting inbox, closed, answered, unassigned tickets etc.

  1. URL : api/v2/helpdesk/tickets

Parameters :

Name Data Type Required/Optional Description
api_key String Optional An alphanumeric code that can be used to authenticate your API calls
token String Required token generated for a user
api Integer Required 0 or 1
show String Required Available values for show :
inbox
mytickets
trash
followup
overdue
approval
closed
departments Array of comma separated string values Required *Must pass default value: All Or name of departments`
order String Optional ASC/DESC
sort-by String Optional Available values for sort-by :
id
ticket_title
ticket_number
priority
updated_at
created_at
due
status Array of comma separated string values Optional Name of status
types Array of comma separated string values Optional Name of types
tags Array of comma separated string values Optional Name of tags
labels Array of comma separated string values Optional Name of labels
sla Array of comma separated string values Optional Name of SLA
source Array of comma separated string values Optional Name of source
assigned Integer 0 or 1 Optional 0 for unassigned and 1 for assigned tickets
assigned-to Array of comma separated string values Optional Email/Username of agents or Name of Teams. ‘a-’ and ‘t-’ must be used as prefix with value of agents and teams respectively.
created-by Array of comma separated string values Optional email/username of the client. Each value must have ‘a-’ as a prefix
priority Array of comma separated string values Optional Name of priority
ticket-number Array of comma separated string values Optional Unique Id/Number of tickets
created String Optional Available values for sort-by :
5-minutes
10-minutes
15-minutes
30-minutes
1-hour
4-hours
8-hours
12-hours
24-hours
15-days
30-days
this-week
last-weekthis-month
last-month
last-2-months
last-3-months
last-6-months
this-year
last-year
today
yesterday
any-time
tomorrow
next-hour
next-4-hours
next-8-hours
next-12-hours
updated String Optional Available values for sort-by :
5-minutes
10-minutes
15-minutes
30-minutes
1-hour
4-hours
8-hours
12-hours
24-hours
15-days
30-days
this-week
last-weekthis-month
last-month
last-2-months
last-3-months
last-6-months
this-year
last-year
today
yesterday
any-time
tomorrow
next-hour
next-4-hours
next-8-hours
next-12-hours
due-on String Optional Available values for sort-by :
5-minutes
10-minutes
15-minutes
30-minutes
1-hour
4-hours
8-hours
12-hours
24-hours
15-days
30-days
this-week
last-weekthis-month
last-month
last-2-months
last-3-months
last-6-months
this-year
last-year
today
yesterday
any-time
tomorrow
next-hour
next-4-hours
next-8-hours
next-12-hours
last-response-by String Optional Available Values ‘Clients’ or ‘Agent’

HTTP Method : GET

Response Format : JSON

Response : Returns list of tickets based on the parameter.

http://www.stablehelpdeskc.faveodemo.com/api/v1/helpdesk/tickets?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOjEsImlzcyI6Imh0dHA6XC9cL2xvY2FsaG9zdFwvZm9ya3NcL3Byb1wvRmF2ZW8tSGVscGRlc2stUHJvXC9wdWJsaWNcL2FwaVwvdjFcL2F1dGhlbnRpY2F0ZSIsImlhdCI6MTQ5MzY0NDcwMiwiZXhwIjoxNDkzNjQ0OTQyLCJuYmYiOjE0OTM2NDQ3MDIsImp0aSI6IjU0ZWYzZDdlZDIzZTJiYzA0MTMxZDU5NmE0ZmMwYWJmIn0.E1zTScLVNIJEsfcep_wt6Mh4nOfRgi4AcQqWOXe08Mw&show=trash&departments=All&api=1&priority=low,high

JSON Response Example :

Success Response :

{
  "total": 1203,
  "per_page": 10,
  "current_page": 1,
  "last_page": 121,
  "next_page_url": "http://www.ladybirdweb.com/support/api/v1/helpdesk/tickets2?page=2",
  "prev_page_url": null,
  "from": 1,
  "to": 10,
  "data": [
    {
      "id": 3950,
      "title": "New Call",
      "ticket_number": "ADFY-2182-0003341",
      "priority": "Low",
      "c_uname": "08041216363",
      "a_uname": null,
      "updated_at": "2017-05-29 07:27:09",
      "created_at": "2017-05-29 07:18:13",
      "due": "2017-05-29 08:18:13",
      "c_uid": "2908",
      "c_fname": "08041216363",
      "c_lname": "",
      "a_uid": null,
      "a_fname": null,
      "a_lname": null,
      "verified": "1",
      "name": null,
      "assigned_to": null,
      "color": "#00a65a",
      "css": "fa fa-phone",
      "countattachment": "0",
      "countcollaborator": "0",
      "countthread": "3",
      "last_replier": "client",
      "ticket_title": "New Call",
      "duedate": "2017-05-29 13:48:13",
      "updated_at2": "2017-05-29 12:57:09",
      "created_at2": "2017-05-29 12:48:13"
    }

Please note : ‘total’ and ‘last_page’ will not be available if any of below args is passed in the request.
duo-on
created
updated
last-response-by

Some Common Error :

Error Response : If the token is expired

{
“error":"Token has expired"
}

If the token is not provided

 {
  "error": "token_not_provided"
}
Parameter Description
id id of the department
title title of the ticket
ticket_number ticket number
priority priority of the ticket
c_uname username of the user
a_uname username of the agent
updated_at ticket last updated date
created_at ticket creation date
due ticket due date
c_uid id of the user
c_fname first name of user
c_lname last name of user
a_uid id of the agent
a_fname first name of agent
a_lname last name of agent
verified id of the department
name name of the user
assigned_to assigned agent name
color priority color
countattachment total number of file attached to this ticket
countcollaborator total number of collaborator associated with this ticket
countthread total number of thread count
last_replier last replier to the ticket(Client or Agent)
ticket_title ticket title
duedate ticket due date
updated_at2 last updated date of the ticket
created_at2 ticket created date

Installation and Upgrade Guide

Administrator's Guide

Agent's Guide

Email Integration

Release & Upgrade Notes

Known Issues

Contribute & Feedback

Knowledge Base

Third Party Integration

Plugins

API

Clone this wiki locally