Creating and updating tickets

Submitted 3/21/2011 by Level 2 Support

With the eStreamDesk API your application can create or update tickets in easy to parse and use XML format. This functionality can be used to import your existing support requests or to integrate ticket editing with your own application.

The create a ticket you need to make a POST request to your Tickets API url:

http(s)://yourcompany.estreamdesk.com/api/tickets

There are two ways to authenticate with the Tickets API:

  • "apikey" header or get parameter
  • "email" and "password" headers or get parameters - with this authentication the system add or edit tickets on behalf of the authorized agent

To create a ticket you need to post the ticket details in XML format which is the same as the one used when retrieving tickets.

Here's a sample request in XML:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Ticket>
  <Subject>test</Subject>
  <Labels />
  <Status>Closed</Status>
  <Type>Question</Type>
  <Priority>Normal</Priority>
  <Requester>
    <Name>John Doe</Name>
    <Email>johndoe@mail.com</Email>
  </Requester>
  <Assignee />
  <Department />
  <Fields />
  <Comments>
    <Comment>
      <Email>johndoe@mail.com</Email>
      <Date>2009-07-27T02:25:29.217Z</Date>
      <Text>This is a test ticket!</Text>
      <IsPrivate>false</IsPrivate>
    </Comment>
  </Comments>
</Ticket>






The required fields when creating a ticket are: Subject, Requester and at least one Comment.

To update a ticket you need to pass an "id" parameter or header and then include the tags only for the properties that you would like to change. For example assigning a ticket with ID 5 to someone would look like this:

POST http(s)://yourcompany.estreamdesk.com/api/tickets?id=5

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Ticket>
  <Assignee>
    <Email>someagent@mail.com</Email>
  </Assignee>
</Ticket>