ascentis

a client library for the Ascentis Web API

Ascentis Client Library

A node library for consuming Ascentis Web APIs.

npm install ascentis

Ascentis 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
ascentis.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

ascentis.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'
};
 
ascentis.getEmployees(criteria, function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});

http://www.ascentis.com/api/attachments.asp

http://www.ascentis.com/api/benefitsenrollment.asp

http://www.ascentis.com/api/FindPlan.asp

http://www.ascentis.com/api/custom.asp

ascentis.getFields(function (err, data) {
  if (!err) {
    // we haz teh datas
  }
});

http://www.ascentis.com/api/compensation.asp

http://www.ascentis.com/api/employee.asp

http://www.ascentis.com/api/employeebenefits.asp

http://www.ascentis.com/api/job.asp

http://www.ascentis.com/api/newhire.asp

http://www.ascentis.com/api/directdep.asp

http://www.ascentis.com/api/changelog.asp

http://www.ascentis.com/api/cobra.asp

http://www.ascentis.com/api/econtact.asp

var employeeId = 101;
 
ascentis.getEmergencyContacts(employeeId, function (err, data) {
  if (!err) {
    // emergency contacts!
  }
});

http://www.ascentis.com/api/jobs.asp

ascentis.getJobs(function (err, data) {
  if (!err) {
    // we haz teh jobs
  }
});

If you would like to retrieve a specific job, provide a job ID:

var jobId = 101;
 
ascentis.getJobs(jobId, function (err, data) {
  if (!err) {
    // we haz teh specific job
  }
});

http://www.ascentis.com/api/location.asp

ascentis.getLocations(function (err, data) {
  if (!err) {
    // we haz teh locations
  }
});

If you would like to retrieve a specific location, provide a location ID:

var locationId = 101;
 
ascentis.getLocations(locationId, function (err, data) {
  if (!err) {
    // we haz teh specific location
  }
});

http://www.ascentis.com/api/rawdata.asp

ascentis.getRawData(function (err, data) {
  if (!err) {
    // we haz teh raw datas
  }
});

MIT, see LICENSE