How to get ticket description data in Json format instead on plain text using ? | Community
Skip to main content

How to get ticket description data in Json format instead on plain text using ?

  • October 13, 2023
  • 2 replies
  • 0 views

Rajani11

When we get ticket data using "api/v2/tickets/:ticket_id" we get the following JSON response in the description.


"description": "= ABC Business =\n\n== Get a Quote ==\n\nQuote Submitted \n\n== Entry Details ==\n\nNameJohn BrownPhone(123)\n888-999Emailabctest@gmail.comYear2011MakeFordModelTransit connect\nxlOrigin (Pickup City or Zipcode)43452Destination (Delivery City or\nZipcode)70555",

Is there any way to get this description data in JSON format instead of plain text?

2 replies

Amie11
  • October 16, 2023

Heya, 

You might need to use the ticket comments API which does allow you to pull the comment in HTML or plain text. 

https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/

Hope this helps. :)

Best,

Amie


Rajani11
  • Author
  • October 20, 2023

Thank you for the suggestions Amie Brennan.

I want to receive formatting data instead of HTML or plain text because our requirement is to fetch ticket descriptions and store them in the system database.

For example.

Name: John Brown,
Phone : (123) 888-999,
Email: abctest@gmail.com,
Year: 2011,
Make: Ford,
Model: Transit connect,
Origin (Pickup City or Zipcode): 43452
Destination (Delivery City or Zipcode): 70555

Than you.