new System(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:
Methods
addBannedIp(opts)
Adds an IP to the ban list. - https://developers.whmcs.com/api-reference/addbannedip/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
ip |
String
|
|
|
reason |
String
|
|
Admin only reason |
days |
Number
|
|
If passed, expires date is auto calculated |
expires |
String
|
<optional>
|
YYYY-MM-DD HH:MM:SS |
|
- Source:
decryptPassword(opts)
Decrypt an encrypted string - https://developers.whmcs.com/api-reference/decryptpassword/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
password2 |
String
|
The string to decrypt |
|
- Source:
encryptPassword(opts)
Encrypting the same string twice will return different values. You will need to decrypt an encrypted string to compare values. - https://developers.whmcs.com/api-reference/encryptpassword/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
password2 |
String
|
The string to encrypt |
|
- Source:
getActivityLog(opts)
Obtain the Activity Log that matches passed criteria - https://developers.whmcs.com/api-reference/getactivitylog/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
limitstart |
Number
|
<optional>
|
The offset for the returned log data (default: 0) |
limitnum |
Number
|
<optional>
|
The number of records to return (default: 25) |
userid |
Number
|
<optional>
|
The ID of the user to obtain the log for |
date |
String
|
<optional>
|
The date of the activity log to retrieve in localised format (eg 01/01/2016) |
user |
String
|
<optional>
|
The name of the user to retrieve the log entries for |
description |
String
|
<optional>
|
Search the log for a specific string |
ipaddress |
String
|
<optional>
|
The IP Address to search the activity log for |
|
- Source:
getAdminDetails(opts)
Obtain the details for the current Admin User - https://developers.whmcs.com/api-reference/getadmindetails/
Parameters:
Name |
Type |
Description |
opts |
Object
|
|
- Source:
getAdminUsers(opts)
Retrieve a list of administrator user accounts. - https://developers.whmcs.com/api-reference/getadminusers/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
roleid |
Number
|
<optional>
|
An administrative role ID to filter for. |
email |
String
|
<optional>
|
An email address to filter for. Partial matching supported. |
include_disabled |
Boolean
|
<optional>
|
Pass as true to include disabled administrator user accounts in response. |
|
- Source:
getAutomationLog(opts)
Get Automation Task Log. - https://developers.whmcs.com/api-reference/getautomationlog/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
startdate |
String
|
<optional>
|
Defaults to today |
enddate |
String
|
<optional>
|
Defaults to today |
namespace |
String
|
<optional>
|
Optional filter for a specific namespace |
|
- Source:
getConfigurationValue(opts)
Retrieve a System Configuration Value. - https://developers.whmcs.com/api-reference/getconfigurationvalue/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
setting |
String
|
The name of the setting to be obtained |
|
- Source:
getCurrencies(opts)
Obtain the Currencies configured in the System - https://developers.whmcs.com/api-reference/getcurrencies/
Parameters:
Name |
Type |
Description |
opts |
Object
|
|
- Source:
getEmailTemplates(opts)
Obtain a list of email templates from the system - https://developers.whmcs.com/api-reference/getemailtemplates/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
type |
String
|
<optional>
|
The type of email template to retrieve |
language |
String
|
<optional>
|
The language of the email template to retrieve, if none provided will return default language templates. |
|
- Source:
getPaymentMethods(opts)
Retrieve Activated Payment Methods - https://developers.whmcs.com/api-reference/getpaymentmethods/
Parameters:
Name |
Type |
Description |
opts |
Object
|
|
- Source:
getStaffOnline(opts)
Retrieve a list of currently logged in admin users. - https://developers.whmcs.com/api-reference/getstaffonline/
Parameters:
Name |
Type |
Description |
opts |
Object
|
|
- Source:
getStats(opts)
Get business performance metrics and statistics. - https://developers.whmcs.com/api-reference/getstats/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
timeline_days |
Number
|
<optional>
|
(Optional) The number of days to retrieve timeline values for (max 90). |
|
- Source:
getToDoItems(opts)
Get To-Do List Items. - https://developers.whmcs.com/api-reference/gettodoitems/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
limitstart |
Number
|
<optional>
|
The offset for the returned log data (default: 0) |
limitnum |
Number
|
<optional>
|
The number of records to return (default: 25) |
status |
String
|
<optional>
|
Status to filter for. Possible values include: Incomplete, New, Pending, In Progress, Completed |
|
- Source:
getToDoItemStatuses(opts)
Obtain To Do item statuses and counts - https://developers.whmcs.com/api-reference/gettodoitemstatuses/
Parameters:
Name |
Type |
Description |
opts |
Object
|
|
- Source:
logActivity(opts)
Creates an activity log entry. - https://developers.whmcs.com/api-reference/logactivity/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
userid |
Number
|
<optional>
|
|
description |
String
|
|
|
|
- Source:
sendAdminEmail(opts)
Send an Admin Email Notification - https://developers.whmcs.com/api-reference/sendadminemail/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
messagename |
String
|
<optional>
|
The name of the admin email template to send |
custommessage |
String
|
<optional>
|
The HTML message body to send for a custom email |
customsubject |
String
|
<optional>
|
The subject to send for a custom email |
type |
String
|
<optional>
|
Which type of admin notification will be send (‘system’, ‘account’, ‘support’) |
deptid |
Number
|
<optional>
|
The Id of the department the notification is for if ‘support’ $type |
mergefields |
Array
|
<optional>
|
The merge fields to be used in the email template |
|
- Source:
sendEmail(opts)
Send a client Email Notification. See more details and restrictions at: - https://developers.whmcs.com/api-reference/sendemail/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
messagename |
String
|
<optional>
|
The name of the client email template to send |
id |
Number
|
<optional>
|
The related id for the type of email template. Eg this should be the client id for a general type email |
customtype |
String
|
<optional>
|
The type of custom email template to send (‘general’, ‘product’, ‘domain’, ‘invoice’, ‘support’, ‘affiliate’) |
custommessage |
String
|
<optional>
|
The HTML message body to send for a custom email |
customsubject |
String
|
<optional>
|
The subject to send for a custom email |
customvars |
Array
|
<optional>
|
The custom variables to provide to the email template. Can be used for existing and custom emails. |
|
- Source:
setConfigurationValue(opts)
Set a System Configuration Value via the local API only. - https://developers.whmcs.com/api-reference/setconfigurationvalue/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
setting |
String
|
The setting name to change |
value |
String
|
The value to set. Leave value blank to unset. |
|
- Source:
triggerNotificationEvent(opts)
Trigger a Custom Notification Event. - https://developers.whmcs.com/api-reference/triggernotificationevent/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
notification_identifier |
String
|
<optional>
|
A unique identifier string, used as a condition when making a notification rule. |
title |
String
|
<optional>
|
The title for the notification |
message |
String
|
<optional>
|
The message body for the notification |
url |
String
|
<optional>
|
The follow up URL for the notification |
status |
String
|
<optional>
|
A status description for the notification |
statusStyle |
String
|
<optional>
|
A formatting style for the status of the notification, currently supports “success”, “danger”, and “info” |
attributes |
Array
|
<optional>
|
An array of Attributes to include in the notification. Requires at least label and value parameters. Other parameters are optional. See WHMCS\Notification\NotificationAttribute. |
|
- Source:
updateAdminNotes(opts)
Update the admin notes - https://developers.whmcs.com/api-reference/updateadminnotes/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Description |
notes |
String
|
The new value for the admin notes |
|
- Source:
updateAnnouncement(opts)
Update a specific announcement - https://developers.whmcs.com/api-reference/updateannouncement/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
announcementid |
String
|
|
The id of the announcement to update |
title |
String
|
<optional>
|
The title of the announcement (if required to change) |
announcement |
String
|
<optional>
|
The message of the announcement (if required to change) |
date |
String
|
<optional>
|
The date of the announcement (if required to change) (Y-m-d H:i:s) |
published |
Boolean
|
<optional>
|
Publish the announcement 1⁄0 (if required to change) |
|
- Source:
updateToDoItem(opts)
Update To-Do Item. - https://developers.whmcs.com/api-reference/updatetodoitem/
Parameters:
Name |
Type |
Description |
opts |
Object
|
Properties
Name |
Type |
Attributes |
Description |
itemid |
Number
|
<optional>
|
The id of the To-Do item to be updated. |
adminid |
Number
|
<optional>
|
The admin id performing the update. |
status |
String
|
<optional>
|
The status of the to-do item. |
|
- Source: