Constructor
new Tickets(config)
Parameters:
Name |
Type |
Description |
config |
Object
|
Object containing your API credentials.
Properties
Name |
Type |
Attributes |
Description |
serverUrl |
string
|
|
URL to your installation. Remember to point to /includes/api.php |
username |
string
|
<optional>
|
|
password |
string
|
<optional>
|
|
identifier |
string
|
<optional>
|
|
secret |
string
|
<optional>
|
|
|
- Source:
Extends
Methods
getSupportDepartments(opts)
Get the support departments and associated ticket counts - https://developers.whmcs.com/api-reference/getsupportdepartments/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
ignore_dept_assignments |
Boolean
|
<optional>
|
Pass as true to not adhere to the departments the API user is a member of. |
|
- Source:
getSupportStatuses(opts)
Get the support statuses and number of tickets in each status - https://developers.whmcs.com/api-reference/getsupportstatuses/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
deptid |
Number
|
<optional>
|
Obtain counts for a specific department id |
|
- Source:
getTicket(opts)
Obtain a specific ticket - https://developers.whmcs.com/api-reference/getticket/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
ticketnum |
String
|
<optional>
|
Obtain the ticket for the specific Client Ticket Number |
ticketid |
Number
|
<optional>
|
Obtain the ticket for the specific ticket id (Either $ticketnum or $ticketid is required) |
repliessort |
String
|
<optional>
|
ASC or DESC. Which order to organise the ticket replies |
|
- Source:
getTicketCounts(opts)
Get ticket counts. - https://developers.whmcs.com/api-reference/getticketcounts/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
ignoreDepartmentAssignments |
Boolean
|
<optional>
|
Pass as true to not adhere to the departments the API user is a member of. |
includeCountsByStatus |
Boolean
|
<optional>
|
Pass as true to not adhere to the departments the API user is a member of. |
|
- Source:
getTicketNotes(opts)
Obtain a specific ticket notes - https://developers.whmcs.com/api-reference/getticketnotes/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
ticketid |
Number
|
Obtain the ticket for the specific ticket id |
|
- Source:
getTicketPredefinedCats(opts)
Obtain the Predefined Ticket Reply Categories - https://developers.whmcs.com/api-reference/getticketpredefinedcats/
Parameters:
Name |
Type |
Description |
opts |
Object
|
|
- Source:
getTicketPredefinedReplies(opts)
Obtain the Predefined Ticket Replies - https://developers.whmcs.com/api-reference/getticketpredefinedreplies/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
catid |
Number
|
<optional>
|
Obtain predefined replies for a specific category id |
|
- Source:
getTickets(opts)
Obtain tickets matching the passed criteria - https://developers.whmcs.com/api-reference/gettickets/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
limitstart |
Number
|
<optional>
|
The offset for the returned quote data (default: 0) |
limitnum |
Number
|
<optional>
|
The number of records to return (default: 25) |
deptid |
Number
|
<optional>
|
Obtain tickets in a specific department |
clientid |
Number
|
<optional>
|
Find tickets for a specific client id |
email |
String
|
<optional>
|
Find tickets for a specific non-client email address |
status |
String
|
<optional>
|
Find tickets matching a specific status. Any configured status plus: Awaiting Reply, All Active Tickets, My Flagged Tickets |
subject |
String
|
<optional>
|
Find tickets containing a specific subject - uses approximate string matching. |
ignore_dept_assignments |
Boolean
|
<optional>
|
Pass as true to not adhere to the departments the API user is a member of. |
|
- Source: