I am using the REST API to create tickets but before I make a ticket, I am checking the existing tickets for a match. My match criteria are a specific set of Custom Fields. If I find a match, I do not make a new ticket. If I do not find a match, I make a ticket. All pretty straight forward.
Except … when I search for a ticket that has been merged into another ticket, I get “No results found.” as the result of the REST API search. The result of this query showing no results would be my code would then create the ticket as before, resulting in a duplicate which an analyst has already dealt with.
In further checking, If I search RT for the merged ticket, I get referred to the ticket it was merged INTO and that works fine in the web browser. But, that is not the result in the REST API. I would have expected something to say it was merged into another ticket, or even just bringing me back the ticket itself.
How can I deal with this in the REST API to find a ticket by search criteria when it has been merged?
Thanks in advance.