Performing Ticket Approvals via API - HALO

Performing Ticket Approvals via API

1. Get Ticket Information

First, retrieve the ticket details by making a GET request to:

/api/tickets/{ticket_id}

The response will contain an approvers array. Each approver entry contains:

  • name – The approver's display name
  • emailaddress – The approver's email
  • user_id – The approver's user ID
  • seq – Required for approval submission
  • actionnumber – Required for approval submission

Example approver entry:

{
    "name": "Halo Admin",
    "emailaddress": "example@halo.com",
    "user_id": 23,
    "seq": 8,
    "actionnumber": 17
}

2. Submit the Approval

Make a POST request to:

/api/ticketapproval

Using this JSON structure:

[
    {
        "ticket_id": YOUR_TICKET_ID,
        "seq": APPROVER_SEQ,
        "actionnumber": APPROVER_ACTIONNUMBER,
        "result": APPROVAL_RESULT
    }
]

Where:

  • ticket_id – The ID of the ticket being approved
  • seq – The seq value from the chosen approver
  • actionnumber – The actionnumber value from the chosen approver
  • result– Your approval decision:
    • 1 = Approve
    • 2 = Reject