Multiple Ticket Details using Custom fields | Community
Skip to main content

Multiple Ticket Details using Custom fields

  • July 23, 2021
  • 2 replies
  • 0 views

Hi Experts,

I want to fetch multiple ticket details in single "Get" call using custom fields.

Is it possible to do it ?  

Is there any way to use custom fields while searching tickets ? 

Ticket  "Show_many" API  only uses standard fields. Is there a way to use custom fields in it.

for e.g. 

api/v2/tickets/show_many.json?ids=1,2,3,4,5

In Similar way , is it possible to use custom fields?

Kindly provide examples for better understanding.

Thanks in advance.

Thanks 

Sameer

2 replies

Dan32
  • July 23, 2021

Hey Sameer,

You can't search a specific custom field ID via the API but if they're fields that have a value backed by a tag, you can do an API search for the selected value by the tag.  Something like:

https://DOMAIN.zendesk.com/api/v2/search.json?query=tags:training

that will return all the tickets (including their ID) with the tag 'training' included on the ticket, as well as the values of all custom fields on those tickets. You can of course replaced 'training' with the tag value for any custom field you want to search for

API search docs are found here


  • Author
  • July 24, 2021

Thanks for reply.

Even if I use tags , I'll get only 100 records per call. But that is not my requirement.

I should get list of tickets based on array of custom field values.  

Something like "api/v2/tickets/show_many.json?Custom_field_id=1,2,3,4,5"

But I guess that is not possible or limitation of Zendesk API.

Kindly guide me.

Thanks

Sameer