getTicket
Some tooltip text!
• 1 minute to read
• 1 minute to read
Description
Gets data contained in a ticket/request. A set of fields that you wish to retrieve must be supplied.
Valid fields to retrieve:
- ticket.id
- ticket.title
- ticket.created_at
- ticket.category
- ticket.status
- ticket.replied_at
- ticket.closed_at
- ticket.priority
- ticket.read_by_customer
- ticket.has_attachment
- ticket.last_changed
- ticket.cust_id
- and any extra field.
In parameters
| Parameter | Description |
|---|---|
| sessionKey | A valid session key |
| ticketId | The ticket ID |
| ticketFields | A list of the fields you wish to retrieve. |
Out parameters
| Parameter | Description |
|---|---|
| errorCode | See list of codes |
| ticketResult | An array containing these fields: field, type, value |
| messageIds | A list of IDs to all messages on this ticket |
Example
ticket.ticketService ticketService = new * ticket.ticketService();
string sessionKey;
string errorCode = ticketService.login("egon", "norges bank", out sessionKey);
if (errorCode.Equals("0"))
{
string[] ticketFields = new string[1];
ticketFields[0] = "ticket.title";
ticket.ResultStruct[] ticketInfo;
int[] messageIds;
getTicket(sessionKey,"10",ticketFields, out ticketInfo, out messageIds);
foreach(ticket.ResultStruct i in ticketInfo)
{
cout << "field:" << i.field << " value:" << i.value << endl;
}
}