ascentis

a client library for the Ascentis Web API

Usage no npm install needed!

<script type="module">
  import ascentis from 'https://cdn.skypack.dev/ascentis';
</script>

README

Ascentis Client Library

A node library for consuming Ascentis Web APIs.

Build Status Coverage Status

Features

Install

npm install ascentis

Usage

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
  }
});

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

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
  }
});

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 Plan ID

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

Access User Defined Employee Fields

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

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

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

Retrieve Job Information for Employee

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

Create New Hire

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

Retrieve Direct Deposit Information for Employee

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

Retrieve HR Change Log

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

Find COBRA Eligible Employees

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

Find Emergency Contacts for Employee

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

var employeeId = 101;

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

Retrieve All Jobs in Company

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
  }
});

Retrieve All Locations in Company

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
  }
});

Bulk Data Retrieval

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

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

License

MIT, see LICENSE