Class: ProjectManagement

ProjectManagement(config)

Allows you to manage your Project Management module in WHMCS.

Constructor

new ProjectManagement(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

  • WHMCS

Methods

addProjectMessage(opts)

Adds a Message to a project - https://developers.whmcs.com/api-reference/addprojectmessage/
Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
projectid Number The id of the project the message is for
message String The message to add to the project
adminid Number <optional>
Override the admin id for the message. Not passing will set to the adminid of the api request
Source:

addProjectTask(opts)

Adds a Task to a project - https://developers.whmcs.com/api-reference/addprojecttask/
Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
projectid Number The id of the project the task is for
duedate String The duedate for the task. Format YYYY-mm-dd
adminid Number <optional>
The admin id to associate the task with
task String <optional>
The task title
notes String <optional>
The notes for the task
completed Boolean <optional>
Has the task been completed
billed Boolean <optional>
Has the task been billed
Source:

createProject(opts)

Creates a new project - https://developers.whmcs.com/api-reference/createproject/
Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
title String The title of the new project
adminid Number The adminId the project will be associated with
userid Number <optional>
The user that the project is for
status String <optional>
The status of the project as defined in Project Management Settings
created String <optional>
The created date of the project in Y-m-d format
duedate String <optional>
The duedate date of the project in Y-m-d format
completed Boolean <optional>
Is the project completed
ticketids String <optional>
A comma separated list of ticket IDs to associate with the project
invoiceids String <optional>
A comma separated list of invoice IDs to associate with the project
Source:

deleteProjectTask(opts)

Removes a task from the system. This cannot be undone - https://developers.whmcs.com/api-reference/deleteprojecttask/
Parameters:
Name Type Description
opts Object
Properties
Name Type Description
projectid Number The project that owns the task being deleted
taskid Number The task to be deleted
Source:

endTaskTimer(opts)

Ends a started timer for a project - https://developers.whmcs.com/api-reference/endtasktimer/
Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
timerid Number The id of the task to be ended
projectid Number <optional>
The id of the project for the task timer
adminid Number <optional>
The admin id to associate the timer with
end_time Number <optional>
The end time as a unix time stamp. Defaults to time() if not provided
Source:

getProject(opts)

Retrieve a specific Project - https://developers.whmcs.com/api-reference/getproject/
Parameters:
Name Type Description
opts Object
Properties
Name Type Description
projectid Number The project id to obtain
Source:

getProjects(opts)

Obtain orders matching the passed criteria - https://developers.whmcs.com/api-reference/getprojects/
Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
limitstart Number <optional>
The offset for the returned project data (default: 0)
limitnum Number <optional>
The number of records to return (default: 25)
userid Number <optional>
Find projects for a specific client id
title String <optional>
Find projects with a specific title
ticketids String <optional>
Find projects with specific ticketids
invoiceids String <optional>
Find projects with specific invoiceids
notes String <optional>
Find projects with specific notes
adminid Number <optional>
Find projects assigned to a specific admin id
status String <optional>
Find projects with a specific status
created String <optional>
Find projects with a specific creation date
duedate String <optional>
Find projects with a specific due date
completed Boolean <optional>
Find projects that are/aren’t completed
lastmodified String <optional>
Find projects with a specific last modified date
Source:

startTaskTimer(opts)

Starts a timer for a project - https://developers.whmcs.com/api-reference/starttasktimer/
Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
timerid Number The id of the task to be ended
projectid Number The id of the project for the task timer
adminid Number <optional>
The admin id to associate the timer with
start_time Number <optional>
The start time as a unix time stamp. Defaults to time() if not provided
end_time Number <optional>
The start time as a unix time stamp.
Source:

updateProject(opts)

Updates a project - https://developers.whmcs.com/api-reference/updateproject/
Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
projectid Number The project ID to update
adminid Number <optional>
The adminId the project will be associated with
userid Number <optional>
The user that the project is for
status String <optional>
The status of the project as defined in Project Management Settings
created String <optional>
The created date of the project in Y-m-d format
duedate String <optional>
The due date of the project in Y-m-d format
completed Boolean <optional>
Is the project completed
title String <optional>
The title of the project
ticketids String <optional>
A comma separated list of ticket IDs to associate with the project
invoiceids String <optional>
A comma separated list of invoice IDs to associate with the project
notes String <optional>
The notes to associate with the project
Source:

updateProjectTask(opts)

Adds a Task to a project - https://developers.whmcs.com/api-reference/updateprojecttask/
Parameters:
Name Type Description
opts Object
Properties
Name Type Attributes Description
taskid Number The id of the project task to update
projectid Number <optional>
Change the project a task is assigned to
duedate String <optional>
The duedate for the task. Format YYYY-mm-dd
adminid Number <optional>
The admin id to associate the task with
task String <optional>
The task title
notes String <optional>
The notes for the task
completed Boolean <optional>
Has the task been completed
Source: