A node library for consuming Ascentis Web APIs.
npm install ascentisAscentis Web API documentation: http://www.ascentis.com/api/Documentation.asp
var ascentis = require('ascentis');
// initialize an API client
var client = ascentis.initialize({
account : 'company',
clientKey : 'clientKey',
host : 'selfservice2.ascentis.com',
secretKey : 'secretKey'
});
// make API calls
client.getEmployees(function (err, data) {
if (!err) {
// we haz teh datas
}
});http://www.ascentis.com/api/authentication.asp
Authentication is handled automatically for each API call provided that you supply the appropriate client key and secret key values.
http://www.ascentis.com/api/finder.asp
client.getEmployees(function (err, data) {
if (!err) {
// we haz teh datas
}
});If you would like to search for a specific employee, simply provide the search criteria when calling the method:
var criteria = {
firstname : 'Broseph',
lastname : 'McGee'
};
client.getEmployees(criteria, function (err, data) {
if (!err) {
// we haz teh datas
}
});http://www.ascentis.com/api/attachments.asp
- Not supported yet
http://www.ascentis.com/api/benefitsenrollment.asp
- Not supported yet
http://www.ascentis.com/api/FindPlan.asp
client.getBenefitPlans(function (err, data) {
if (!err) {
// we haz teh datas
}
});If you would like to search for a specific benefit plan, simply provide the search criteria when calling the method:
var criteria = {
benefitPlanId : 12
};
client.getBenefitPlans(criteria, function (err, data) {
if (!err) {
// we haz teh datas
}
});http://www.ascentis.com/api/custom.asp
client.getFields(function (err, data) {
if (!err) {
// we haz teh datas
}
});http://www.ascentis.com/api/compensation.asp
- Not supported yet
http://www.ascentis.com/api/employee.asp
- Not supported yet
http://www.ascentis.com/api/employeebenefits.asp
var criteria = {
employeeId : 1,
asof : '2013-01-01'
};
client.getEmployeeBenefits(criteria, function (err, data) {
if (!err) {
// we haz teh datas
}
});http://www.ascentis.com/api/job.asp
var criteria = {
employeeId : 1,
asof : '2013-01-01'
};
client.getEmployeeJobDetails(criteria, function (err, data) {
if (!err) {
// we haz teh datas
}
});http://www.ascentis.com/api/newhire.asp
- Not supported yet
http://www.ascentis.com/api/directdep.asp
var criteria = {
employeeId : 1
};
client.getDirectDeposits(criteria, function (err, data) {
if (!err) {
// we haz teh datas
}
});http://www.ascentis.com/api/changelog.asp
var criteria = {
from : '01/01/2013'
};
client.getChanges(criteria, function (err, data) {
if (!err) {
// we haz teh datas
}
});http://www.ascentis.com/api/cobra.asp
var criteria = {
from : '01/01/2013'
};
client.getCOBRAEligibleEmployees(criteria, function (err, data) {
if (!err) {
// we haz teh datas
}
});http://www.ascentis.com/api/econtact.asp
var criteria = {
employeeId : 101
};
client.getEmergencyContacts(criteria, function (err, data) {
if (!err) {
// emergency contacts!
}
});http://www.ascentis.com/api/jobs.asp
client.getJobs(function (err, data) {
if (!err) {
// we haz teh jobs
}
});If you would like to retrieve a specific job, provide a job ID:
var criteria = {
jobId : 101
};
client.getJobs(criteria, function (err, data) {
if (!err) {
// we haz teh specific job
}
});http://www.ascentis.com/api/location.asp
client.getLocations(function (err, data) {
if (!err) {
// we haz teh locations
}
});If you would like to retrieve a specific location, provide a location ID:
var criteria = {
locationId : 101
};
client.getLocations(criteria, function (err, data) {
if (!err) {
// we haz teh specific location
}
});http://www.ascentis.com/api/rawdata.asp
client.getRawData(function (err, data) {
if (!err) {
// we haz teh raw datas
}
});MIT, see LICENSE

