To view the status of a ticket, you need to make an API call to the endpoint: yourcompanyname.freshdesk.com/api/v2/tickets/[ticket-id]. Replace [ticket-id] with the actual ID of the ticket you want to retrieve.
The API documentation can be found here: https://developers.freshdesk.com/api/#view_a_ticket
To fetch the status of a ticket via API, you can either use the address bar in your web browser (if you are logged in to your Freshdesk account) or use a tool specifically designed for triggering API calls.
Fetching details via address bar:
Fetching details via Postman:
The API response will contain various attributes related to the ticket, including the "status" attribute, which represents the current status of the ticket. The status attribute will have a numerical value.
The default status mapping is as follows:
Open: 2
Pending: 3
Resolved: 4
Closed: 5
However, if you have custom status values, you can retrieve the mapping by using the "View a Ticket Field" endpoint. You need to pass the backend ticket field ID for the status field to fetch the data. This link explains this process in more detail.
Fetching the custom status field mapping:
a) Fetch the backend ticket field ID for the status field using the “List All Ticket Fields” API:
Callback URL: yourcompanyname.freshdesk.com/api/v2/admin/ticket_fields
b) Pass the value under the “id” attribute in the Status field in the “View a Ticket Field API” call:
Callback URL: yourcompanyname.freshdesk.com/api/v2/admin/ticket_fields/[backend ticket field-id]
Please note that to access the Freshdesk API, you may need appropriate authentication credentials and permissions. Make sure you have the necessary access and authorization to retrieve ticket data via the API.