Workflow Max API Client
http://www.workflowmax.com/api/overview
//Create a new Client
var host = 'api.workflowmax.com'
var apiKey = 'your-api-key';
var accountKey = 'your-account-key';
var WFMClient = require('wfm-client');
var wfm = WFMClient(
host,
apiKey,
accountKey
);
//Create a new task on a job
wfm.createTask(
'J0001', //Job ID
'944815', //Task ID (system wide task type)
'description',
'30', //estimatedMinutes
function (err, data) {
if (err) return console.log(err);
console.log(data);
//Prints string of XML data from WFM API
});
Use a library such as xml2json for processing the WFM response
All API methods take a list of parameters followed by a callback function 'done'. done is called with (err, data) where err is an error if one occurred and data is the string XML response from WFM.
See http://www.workflowmax.com/api/overview
wfm.createTimesheet(jobId, taskId, staffId, date, minutes, note, done)
wfm.updateTimesheet(id, jobId, taskId, staffId, date, minutes, note, done)
wfm.deleteTimesheet(id, done)
wfm.createTask(jobId, taskId, description, estimatedMinutes, done)
wfm.getCurrentJobs(done)
wfm.getStaff(done)
Library is currently in minimal state for creating tasks and timesheets.
Will be expanded as further API methods are required.