# API: Get tickets

# getTickets

Get list of tickets.

TIP

This API call uses pagination for results.

# Optional parameters

Parameter Description
page Which page to return
dept Departament ID to get ticket by
filter[tag] Tag that tickets in list should contain
filter[list] Status of tickets to list, possible values: all, open, client-reply, in-progress, answered, closed
filter[request_type] Type of tickets to list, possible values: [General, Problem, Incident, Task, Question]
filter[name] Filter by submiter name
filter[dept_id] Filter by department id
filter[ticket_number] Filter by ticket number
filter[body] Filter by ticket message
filter[email] Filter by email
filter[tags] Filter by tags
filter[owner_id] Filter by owner id
filter[date] Filter by ticket date
filter[admin_read] Filter by admin read status
filter[flags] Flags used in ticket, possible values:Flags used in ticket, possible values:
  • FLAG_HAS_NOTE - With notes,
  • FLAG_HAS_BILLS - With bills,
  • FLAG_HAS_REPLY_DRAFT - With draft reply,
  • FLAG_IS_INTERNAL - Internal ticket,
  • FLAG_REPORTED_REPLY - Reported reply,
  • FLAG_IS_PUBLIC - Is public,
  • FLAG_REPORTED_TICKET - Is reported,
  • FLAG_PENDING_REVIEW - Has pending review,
  • FLAG_OVERWRITE_CC - Has overwrite cc,
  • FLAG_REPLY_HAS_LOCK - Reply has lock,
  • FLAG_ENCRYPTED - Is encrypted,
  • FLAG_WAS_PUBLIC - Was public,
  • FLAG_DISABLE_CLIENT_REOPEN - Has disable client reopen,
  • FLAG_IMPORTED - Is imported,
  • FLAG_PENDING_REPLY_REVIEW - Has pending reply review
filter[flagsop] Flags operator, set to NOT to negate (ie list all tickets but NOT with certain flag)

# Request

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=getTickets

# PHP Samples

# Response

{
    "success": true,
    "tickets": [
        {
            "admin_read": "1",
            "id": "7",
            "type": "Client",
            "firstname": "Jack",
            "lastname": "Black",
            "date": "2011-12-12 06:28:00",
            "lastreply": "1 day ago",
            "dept_id": "1",
            "name": "Jack Black",
            "client_id": "8",
            "status": "Open",
            "ticket_number": "713456",
            "tsubject": "#713456 - test",
            "deptname": "Billing",
            "priority": "0",
            "notes": "0"
        },
        {
            "admin_read": "1",
            "id": "6",
            "type": "Client",
            "firstname": "Random",
            "lastname": "Customer",
            "date": "2011-10-28 23:53:01",
            "lastreply": "Nov 16th",
            "dept_id": "2",
            "name": "first customer",
            "client_id": "2",
            "status": "In-Progress",
            "ticket_number": "342777",
            "tsubject": "#342777 - test support ticket",
            "deptname": "Tech",
            "priority": "0",
            "notes": "1"
        }
    ],
    "call": "getTickets",
    "server_time": 1323790009
}
Last Updated: 10/21/2024, 2:17:27 PM