Browse Guides

Performing Ticket Approvals via API
Reading mode
Copy Link
Link Copied!
Print
Feedback
This guide has multiple versions available:
<style>p { margin: 0; }span.fr-emoticon.fr-emoticon-img { background-repeat: no-repeat !important; font-size: inherit; height: 1em; width: 1em; min-height: 20px; min-width: 20px; display: inline-block; margin: -0.1em 0.1em 0.1em; line-height: 1; vertical-align: middle; } span.fr-emoticon { font-weight: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "NotoColorEmoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; display: inline; line-height: 0; } blockquote { border-left: solid 2px #5e35b1; color: #5e35b1; margin-left:0; padding-left:5px;}blockquote blockquote{ border-color: #00bcd4; color: #00bcd4;}blockquote blockquote blockquote{ border-color: #43a047; color: #43a047;} table.grid{ border-collapse: collapse;} table.grid td, table.grid th { border: 1px solid #ddd;} .fr-fic.fr-dib{ display: block; margin: 5px auto;}.fr-fic.fr-dib.fr-fir{ text-align: right; margin: 5px 0 5px auto;}.fr-fic.fr-dib.fr-fil{ text-align: left; margin: 5px auto 5px 0;}.fr-fic.fr-dii{ float: none; margin: 5px auto;}.fr-fic.fr-dii.fr-fil{ float: left; margin: 5px auto;}.fr-fic.fr-dii.fr-fir{ float: right; margin: 5px auto;}img.fr-dib.fr-fir { margin-right: 0; text-align: right;}img.fr-dib.fr-fil { margin-left: 0; text-align: left;}img.fr-dib { margin: 5px auto; display: block; float: none;}img.fr-bordered { box-sizing: content-box; border: solid 5px #CCC;}img.fr-shadow { box-shadow: 10px 10px 5px 0px #cccccc;}img.fr-rounded { border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;}</style><div class="guide-container"><div class="section guide-bubble"><h3>1. Get Ticket Information</h3><p>First, retrieve the ticket details by making a GET request to:</p><pre><code>/api/tickets/{ticket_id}</code></pre><p>The response will contain an <code>approvers</code> array. Each approver entry contains:</p><ul><li><code>name</code> - The approver&#39;s display name</li><li><code>emailaddress</code> - The approver&#39;s email</li><li><code>user_id</code> - The approver&#39;s user ID</li><li><code>seq</code> - Required for approval submission</li><li><code>actionnumber</code> - Required for approval submission</li></ul><p>Example approver entry:</p><pre><code>{ &quot;name&quot;: &quot;Halo Admin&quot;,     &quot;emailaddress&quot;: &quot;example@halo.com&quot;,     &quot;user_id&quot;: 23,     &quot;seq&quot;: 8,     &quot;actionnumber&quot;: 17 }</code></pre></div><div class="section guide-bubble"><h3>2. Submit the Approval</h3><p>Make a POST request to:</p><pre><code>/api/ticketapproval</code></pre><p>Using this JSON structure:</p><pre><code>[ { &quot;ticket_id&quot;: YOUR_TICKET_ID, &quot;seq&quot;: APPROVER_SEQ, &quot;actionnumber&quot;: APPROVER_ACTIONNUMBER, &quot;result&quot;: APPROVAL_RESULT } ]</code></pre><p>Where:</p><ul><li><code>ticket_id</code> - The ID of the ticket being approved</li><li><code>seq</code> - The seq value from the chosen approver</li><li><code>actionnumber</code> - The actionnumber value from the chosen approver</li><li><code>result</code>- Your approval decision:<ul><li><code>1</code> = Approve</li><li><code>2</code> = Reject</li></ul></li></ul></div><div class="section guide-bubble"><h3>Related Guides</h3><ul><li style="font-weight: bold;"><a href="https://usehalo.com/haloitsm/guides/1823/" target="_blank" rel="noopener noreferrer"><strong>Creating a New Application for API Connections</strong></a></li><li style="font-weight: bold;"><a href="https://usehalo.com/haloitsm/guides/1737/" target="_blank" rel="noopener noreferrer"><strong>How to start using the Halo API</strong></a></li><li style="font-weight: bold;"><a href="https://usehalo.com/haloitsm/guides/1566/" target="_blank" rel="noopener noreferrer"><strong>Setting up an API Agent</strong></a></li></ul></div></div><style> .guide-container { max-width: 800px; margin: 0 auto; padding: 20px; } .guide-bubble { background-color: #f8f9fa; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); } .guide-bubble h3 { color: #2c3e50; margin-top: 0; } .guide-bubble pre { background-color: #ffffff; border: 1px solid #e9ecef; border-radius: 4px; padding: 15px; overflow-x: auto; } .guide-bubble code { color: #e83e8c; background-color: #f8f9fa; padding: 2px 4px; border-radius: 3px; } .guide-bubble ul { padding-left: 20px; } .guide-bubble li { margin-bottom: 8px; } .guide-bubble a { color: #0066cc; text-decoration: none; } .guide-bubble a:hover { text-decoration: underline; } </style>
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.