Ticket APIs

Ticket data are as described in the following table:

Subject Subject of the ticket
Content Content of the ticket
Status Ticket statuses including:
{0: new, 1: open, 2; pending, 3: solved, 4: closed}
Agent_id ID of the agent in charge/assigned
Group_id ID of the group in charge/assigned
Requester_id ID of the requester
Cc_agents IDs of agents in the CC list
[{id1},{id2},…]
Type Ticket types including:
{1: question, 2: incident, 3: problem, 4: task}
Priority Ticket priorities including:
{1: low, 2: normal, 3: high, 4: urgent}
Tags Ticket tags
[{tag1},{tag2},…]
Fields Ticket fields
{field_key1:value1, field_key2:value2,…}

CREATE TICKET API
POST https://{sub_domain}.izihelp.com/api/ticket/detail

  • Required fields: subject, comment,status
  • agent_id is a required field when the creating ticket has the status of “solved”.
  • Ticket cannot be created with status “closed” (must use trigger or automation to close tickets).

Example:

 "comment":{
   "content":"Product inquiry: SKU 1000"
   }, 
 "ticket":{
   "subject": "Product inquiry: SKU 1000", 
   "status": 1, 
   "fields": { 
       "source_url": "https://example.com/vi/pricing/",
       "date": 1510825200000,
       "Tickey_type": "1stPriority_Change information",
       "phone_no": "0908936859",
       "Root_Cause": "N/A",
       "Customer_ID": "A90T1",
       "Contact_Operations": ["Dist 6","Dist 3"] 
      },
  "priority": 2,
  "type": 1, 
  "agent_id": "57680286ef6d3f8f081e6bc7",
  "group_id": "57680287ef6d3f8f081e6c35",
  "requester_id": "578d9a7bee0cedea5d651bbe", 
  "tags": [
     "product",
     "sale",
     "info" 
     ],
  "cc_agents": [
     "577f144171fe9b5b5ff364b4", 
     "5780a7f303bf588e1afc9b89", 
     "578350137ea90fe266a5a8d8"
    ]
  } 
}

UPDATE TICKET API

PUT https://{sub_domain}.izihelp.com/api/ticket/detail/{ticket_id}

  • To append data to the existing data {“:mode”: “mix-data”}
  • To reset/delete data, use “delete” key with value {“field”:true}

Example:


{

  "comment":{

      "content":"is this item still in stock?"

    },

 "update":{

      "status":2,

      "tags":[

         {":mode": "mix-data"},

         "color"

      ] },

"delete":{

    "type":true,

    "fields":{

      "Root_Cause": true

      }

 }

 }

DELETE TICKET API

DELETE https://{sub_domain}.izihelp.com/api/tickets/{ticket_id}

GET TICKET API

GET https://{sub_domain}.izihelp.com/api/tickets/{ticket_id}

GET TICKET’S FIRST COMMENT (Mô tả)

GET https://{sub_domain}.izihelp.com/api/ticket/detail/{ticket_id}/first-comment

GET ALL TICKET’S COMMENTS

GET https://{sub_domain}.izihelp.com/api/ticket/detail/{ticket_id}/comments