-
Notifications
You must be signed in to change notification settings - Fork 2
Ticket Endpoints
Below are the currently supported ticket endpoints.
Requires a valid channel name.
$webSettings = $api->getTicketApi()->getChannelSettings('web');$customfields = $api->getTicketApi()->getCustomFields();You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#ticket-custom-field-get
$customfields = $api->getTicketApi()->getCustomFields(['department_id' => 1]);$customfield = $api->getTicketApi()->getCustomField(1);$departments = $api->getTicketApi()->getDepartments();You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#ticket-department-get
$departments = $api->getTicketApi()->getDepartments(['department_id' => 1, 'public' => 1]);$department = $api->getTicketApi()->getDepartment(1);$priorities = $api->getTicketApi()->getPriorities();You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#ticket-priority-get
$priorities = $api->getTicketApi()->getPriorities(['department_id' => 1]);$priority = $api->getTicketApi()->getPriority(1);$settings = $api->getTicketApi()->getSettings();$status = $api->getTicketApi()->getStatuses();You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#ticket-status-get
$statuses = $api->getTicketApi()->getStatuses(['order_column' => 'name']);$status = $api->getTicketApi()->getStatus(1);$tickets = $api->getTicketApi()->getTickets();You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#ticket-ticket-get
$tickets = $api->getTicketApi()->getTickets(['status' => '1,3,4']);$ticket = $api->getTicketApi()->getTicket(1);$createTicket = new \SupportPal\ApiClient\Model\Ticket\Request\CreateTicket([
'user' => 1,
'department' => 1,
'status' => 1,
'priority' => 1,
'subject' => 'Subject',
'text' => 'Message'
]);
$ticket = $api->getTicketApi()->createTicket($createTicket);For a full list of parameters, see https://api.supportpal.com/api.html#ticket-ticket-post
$updateTicket = new \SupportPal\ApiClient\Model\Ticket\Request\UpdateTicket(['status' => 2]);
$ticket = $api->getTicketApi()->updateTicket($id, $updateTicket);For a full list of parameters, see https://api.supportpal.com/api.html#ticket-ticket-put
$api->getTicketApi()->deleteTicket($id);$attachments = $api->getTicketApi()->getAttachments();You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#ticket-attachment-get
$attachments = $api->getTicketApi()->getAttachments(['ticket_id' => 1]);$attachment = $api->getTicketApi()->getAttachment(1);$stream = $api->getTicketApi()->downloadAttachment(1);A StreamInterface is returned.
$messages = $api->getTicketApi()->getMessages();You can filter the results as shown below. For a full list of supported filtering options, see https://api.supportpal.com/api.html#ticket-message-get
$messages = $api->getTicketApi()->getMessages(['ticket_id' => 1, 'by' => 0]);$message = $api->getTicketApi()->getMessage(1);$createMessage = new \SupportPal\ApiClient\Model\Ticket\Request\CreateMessage([
'ticket_id' => 1,
'user_id' => 1,
'text' => 'Message'
]);
$message = $api->getTicketApi()->createMessage($createMessage);For a full list of parameters, see https://api.supportpal.com/api.html#ticket-message-post
$updateMessage = new \SupportPal\ApiClient\Model\Ticket\Request\UpdateMessage(['text' => 'New Text']);
$message = $api->getTicketApi()->updateMessage($id, $updateMessage);For a full list of parameters, see https://api.supportpal.com/api.html#ticket-message-put
$api->getTicketApi()->deleteMessage($id);