Skip to main content

Misleading API documentation for /api/v2/search/tickets


I'm looking at the API documentation for filtering tickets here: https://developer.freshdesk.com/api/#filter_tickets


Under the highlighted 'notes' section, it states:


1. Archived tickets will not be included in the results
2. The query must be URL encoded
3. Query can be framed using the name of the ticket fields, which can be obtained from Ticket Fields endpoint. Ticket Fields are case sensitive


If I look at the Ticket Fields endpoint as suggested, I see that 'description' is listed as a valid ticket field. However, if I try the following query I get an invalid field error:


curl -v -u "${API_KEY}":X -X GET 'https://bitx.freshdesk.com/api/v2/search/tickets?query="description:%27Test%27"'


{"description":"Validation failed","errors":[{"field":"description","message":"Unexpected/invalid field in request","code":"invalid_field"}]}

Did this topic help you find an answer to your question?

10 replies

  • Contributor
  • 11 replies
  • February 21, 2019

I have the same problem with our custom ticket field Project that according to /ticket_fields would be 'project'. When I add this field to the query it gives me the same error


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12

@Guy Description is not supported in the Filter tickets API as a query param. Right below the Note section, you'll find the list of supported default fields.


@Allard Using custom ticket fields should work as intended. Can you please share the query that you're trying to use?


Cheers!


  • Contributor
  • 11 replies
  • February 21, 2019

aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12

@Allard Can you please change the query to include cf_project (to indicate that it's a custom field) and see if this works?


Cheers!


  • Contributor
  • 11 replies
  • February 21, 2019

I already tried that before. I get the same error:

{ field: 'cf_project',

  message: 'Unexpected/invalid field in request',

  code: 'invalid_field' }


aravind.sundararajan
Skilled Expert
Forum|alt.badge.img+12

@Allard Seems like a bug with the usage of single line text field in the filter tickets API. We can do a quick fix to make this work for your account.


Cheers!


Forum|alt.badge.img+2
  • Contributor
  • 9 replies
  • March 2, 2019

Hello - Arravind, can you please make a quick fix on my account.  I'm experiencing the same issue.


Thank you

Jeffrey


  • Community Debut
  • 1 reply
  • September 26, 2019

Hello @Arravind has this been fixed to all accounts?


  • Contributor
  • 3 replies
  • December 4, 2019

I am having the same problem on my account.  I am trying to search for a field called cf_orderid, I have also tried a customer number field and it does not work either.


CAN YOU PLEASE ENABLE FOR MY ACCOUNT???


  • Community Debut
  • 2 replies
  • April 22, 2020

@allardis this currently working for you?



Reply