Ascentis Client Library
A node library for consuming Ascentis Web APIs.
Features
Install
npm install ascentis
Usage
Ascentis Web API documentation: http://www.ascentis.com/api/Documentation.asp
var ascentis = require('ascentis');
var client = ascentis.initialize({
account : 'company',
clientKey : 'clientKey',
host : 'selfservice2.ascentis.com',
secretKey : 'secretKey'
});
client.getEmployees(function (err, data) {
if (!err) {
}
});
Authentication
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.
Find Employees
http://www.ascentis.com/api/finder.asp
client.getEmployees(function (err, data) {
if (!err) {
}
});
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) {
}
});
Attach Files to Employee
http://www.ascentis.com/api/attachments.asp
Retrieve Benefit Plan Enrollment Information
http://www.ascentis.com/api/benefitsenrollment.asp
Find Benefit Plans
http://www.ascentis.com/api/FindPlan.asp
client.getBenefitPlans(function (err, data) {
if (!err) {
}
});
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) {
}
});
Access User Defined Employee Fields
http://www.ascentis.com/api/custom.asp
client.getFields(function (err, data) {
if (!err) {
}
});
Work With Compensation Data
http://www.ascentis.com/api/compensation.asp
Work With Existing Employee
http://www.ascentis.com/api/employee.asp
Retrieve Employee Benefits
http://www.ascentis.com/api/employeebenefits.asp
var criteria = {
employeeId : 1,
asof : '2013-01-01'
};
client.getEmployeeBenefits(criteria, function (err, data) {
if (!err) {
}
});
Retrieve Job Information for Employee
http://www.ascentis.com/api/job.asp
var criteria = {
employeeId : 1,
asof : '2013-01-01'
};
client.getEmployeeJobDetails(criteria, function (err, data) {
if (!err) {
}
});
Create New Hire
http://www.ascentis.com/api/newhire.asp
Retrieve Direct Deposit Information for Employee
http://www.ascentis.com/api/directdep.asp
var criteria = {
employeeId : 1
};
client.getDirectDeposits(criteria, function (err, data) {
if (!err) {
}
});
Retrieve HR Change Log
http://www.ascentis.com/api/changelog.asp
var criteria = {
from : '01/01/2013'
};
client.getChanges(criteria, function (err, data) {
if (!err) {
}
});
Find COBRA Eligible Employees
http://www.ascentis.com/api/cobra.asp
var criteria = {
from : '01/01/2013'
};
client.getCOBRAEligibleEmployees(criteria, function (err, data) {
if (!err) {
}
});
Find Emergency Contacts for Employee
http://www.ascentis.com/api/econtact.asp
var criteria = {
employeeId : 101
};
client.getEmergencyContacts(criteria, function (err, data) {
if (!err) {
}
});
Retrieve All Jobs in Company
http://www.ascentis.com/api/jobs.asp
client.getJobs(function (err, data) {
if (!err) {
}
});
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) {
}
});
Retrieve All Locations in Company
http://www.ascentis.com/api/location.asp
client.getLocations(function (err, data) {
if (!err) {
}
});
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) {
}
});
Bulk Data Retrieval
http://www.ascentis.com/api/rawdata.asp
client.getRawData(function (err, data) {
if (!err) {
}
});
License
MIT, see LICENSE