How to Retrieve Ticket List via API
You can use an API to retrieve a list of tickets by specifying properties in the Help Desk.
Endpoint URL:
The endpoint URL given below is used to call the REST API. POST will be used as the request method. JSON will be your request format.
Note:
-
The endpoint URL is case-sensitive and has a forward slash ( / ) at the end.
-
The start and end dates for creation and last modification should fall within a 3-month range.
- Start Date Only: If only a start date is provided in the filter, the results should include all data from the start date to three months forward. However, if the current date is earlier than three months from the start date, the results should include data from the start date up to the current date.
- End Date Only: If only an end date is provided in the filter, the results should include all data from three months before the end date up to the end date itself.
-
The start date must always be earlier than the end date.
-
The ticket ID of the starting record must be smaller than the ticket ID of the ending record.
-
If no filters are applied, the API will default return data from the past three months.
-
If the account has a global time zone set, the "created_date_time," "modified_date_time," and "messages->created" fields will return times according to the specified time zone. Otherwise, they will default to the America/Chicago time zone.
-
The endpoint URL will return a list of up to 25 ticket details at a time. If more than 25 tickets are available based on the search parameters, the response will include links to help you navigate the additional results.
-
first_page_link: Link of the first page.
-
previous_page_link: Link of the previous page of the current page.
-
next_page_link: Link of the next page of the current page.
-
last_page_link: Link of the last page.
-
total_tickets: The total number of tickets available across all pages. In this case, it indicates that there is one ticket in total.
-
page: The current page being viewed. Here, it shows that the user is on page 1.
-
total_tickets_on_page: The number of tickets displayed on the current page. This example shows that there is one ticket on the current page.
-
ticket_per_page: The maximum number of tickets displayed on a single page. In this case, up to 25 tickets can be shown per page.
-
Sample JSON
Accept: application/json
Content-Type: application/json
{
"account_email" : "a****@b*****.com",
"token" : "6fea********d6144d********9",
"start_ticket_id" : 4023,
"end_ticket_id" : 5643,
"inbox" : “IB008-20700”,
"status" : "new",
"start_created_date" : "2024-08-24 04:17:51",
"end_created_date" : "2024-09-18 04:17:51",
"start_last_modified_date" : "2024-08-25 10:17:51",
"end_last_modified_date" : "2024-08-22 10:17:51"
"created_date" : "2024-08-22 04:17:51",
"last_modified_date" : "2024-08-25 10:17:51"
}
Request Parameters
Parameter | Required | Type | Description |
---|---|---|---|
account_email | Yes | string | The ProProfs account email you used to register the Help Desk account. |
token | Yes | string | Unique ProProfs API key. It is usually available on your 'My Account' page of the Help Desk. |
start_ticket_id | No | integer | The unique Ticket ID of the first ticket in the list |
end_ticket_id | No | integer | The unique Ticket ID of the last ticket in the list |
inbox | No | string | The ID of the inbox that has the ticket. The ID is associated with every inbox available in the account. |
status | No | string | The status of the ticket in ProProfs Help Desk(usually : Closed, Open, Hold, Pending, Resolved, New) |
start_created_date | No | string | The lower date limit for the creation of tickets |
end_created_date | No | string | The upper date limit for the creation of tickets |
start_last_modified_date | No | string | The lower date limit of the modifications to the tickets |
last_modified_date | No | string | The upper date limit of the modifications to the tickets |
Response Format
JSON
Example Response [Success]
Accept: application/json
Content-Type: application/json
{
"status": "success",
"ticket_data": {
"first_page_link": "https://www.proprofsdesk.com/app/api/v1/list/ticket/",
"previous_page_link": "",
"next_page_link": "https://www.proprofsdesk.com/app/api/v1/list/ticket/?page=2",
"last_page_link": "https://www.proprofsdesk.com/app/api/v1/list/ticket/?page=3",
"total_tickets": "1",
"page": 1,
"total_tickets_on_page": 1,
"ticket_per_page": 25,
"tickets": [
{
"ticket_id": "231000",
"customer_email": "a***@p*****.com",
"customer_name": "John",
"customer_phone": "12345667687",
"ticket_subject": "The ticket subject",
"messages": [
{
"message_plain_text": "The ticket messagern",
"created": "2024-08-21 04:07:24",
"from": "Ashu Sharma <a***@p*****.com>",
"to": "ProProfs <support_a***@p*****.com>"
},
{
"message_plain_text": "The ticket message second.n",
"created": "2024-08-26 06:32:59",
"from": "helpdesk@smith.com",
"to": "John <a***@p*****.com>",
"reply_by": {
"id": "SF008-10650",
"name": "John Smith",
"email": "a***@b****.com"
}
}
],
"staff": {
"id": "SF008-10650",
"name": "John Smith",
"email": "a***@b****.com"
},
"priority": "normal",
"ticket_due_date": "",
"inbox": {
"id": "IB008-20700",
"name": "Support",
"email": "a***@b****.com"
},
"custom_fields": [
{
"id": "CF008-104",
"name": "City",
"value": "Delhi"
},
{
"id": "CF008-323",
"name": "Preference",
"value": ""
},
{
"id": "CF008-367",
"name": "Train",
"value": ""
}
],
"labels": [
{
"id": "LB008-338",
"name": "Important"
},
{
"id": "LB008-394",
"name": "New label"
}
],
"ticket_status": "pending",
"deleted": "0",
"created_date_time": "2024-08-23 04:07:24",
"modified_date_time": "2024-08-29 06:32:59"
}
]
}
}
Response Field |
Description |
status |
Success |
ticket_data |
Ticket details based on parameters passed |
Example Response [Failed]
Accept : application/json
Content-Type : application/json
{
"status" : "error",
"description" : "Unable to authenticate request using account email and token"
}
Response Field |
Description |
status |
Error when the operation failed. |
description |
The error text describes the error. |