Skip to main content

Adding this to this particluar forum even though this is for Freshservice and not Freshdesk.  There doesn’t appear to be an API subforum for API in Freshservice?

But anyway, I’m trying to update old tickets with summarized resolutions notes via API (yes, without Freddy) but haven’t had any success.  Has anyone had luck using API to update Resolution Notes in a ticket?  In Freshservice’ defense I don’t see any documentation about using the API in this way.  But I was hoping it’d be a simple matter of generating a body/json that looks like: 

{
     “ticket”: {
           “resolution_notes” : In order to fix this we had to use this 3 step guide”,
           “resolution_notes_html” : <div dir="ltr">In order to fix this, we had to use this 3 step guide."</div>
     }
}

The error I’m getting back indicates that it’s not an expected field saying “Validadtion failed” and listing the “resolution_notes”    I’ve tried with bypass mandatory and without.  Am I overlooking something simple in the JSON?  Context gets me regularly.  

I like to first use a GET call on one to see what it looks like when made on Freshservice’s end, for example viewing a ticket that already has the information that I want to put in to a PUT call https://api.freshservice.com/#view_a_ticket

I tried it out on my end, and I keep getting an error when trying to update the “resolution_notes_html” , but have no trouble changing just the “resolution_notes” in a ticket update API call.

The body can be as simple as

{“resolution_notes”:”note_here”}

so for yours:

{“resolution_notes” : “In order to fix this we had to use this 3 step guide”}

note - you missed a quotation mark before the word “In” in your example.


Thank you nick_marko.  I was just coming back to explain this as well.  I wish I could send the HTML because we would like to format things a certain way.  But it looks like the <br> tag works just fine in my first sample, so that’s good enough.  

And I appreciate the correction on what I posted.  Thank you very much for taking the time to sort this out.

 


Reply