Skip to content

Company

Brian Tully edited this page Nov 29, 2017 · 6 revisions

First you must have a company object

var company;
Paychex.Companies.get('XXXXXX').then(function(comp){
  company = comp;
  return company;
});

company.payPeriods()

Returns an array of pay periods for the company

company.payPeriods().then(function(payPeriods){
  console.log(payPeriods);
});

company.payComponents()

Returns an array of pay components that are configured for a company. Pay components are earnings and deductions which are used for payroll

company.payComponents().then(function(payComponents){
  console.log(payComponents);
});

company.organizations()

Returns an array of organizations set up for company

company.organizations().then(function(organizations){
  console.log(organizations);
});

company.organization(organizationId)

Returns an organization by organizationId

company.organization('XXXXXX').then(function(organization){
  console.log(organization);
});

company.jobTitles()

Returns an array of job titles set up for company

company.jobTitles().then(function(jobTitles){
  console.log(jobTitles);
});

company.jobTitle(jobTitleId)

Returns a job title by jobTitleId

company.jobTitle('XXXXXX').then(function(jobTitle){
  console.log(jobTitle);
});

company.workStatuses()

Returns an array of work statuses set up for company

company.workStatuses().then(function(workStatuses){
  console.log(workStatuses);
});

company.workStatus(workStatusId)

Returns a work status by workStatusId

company.workStatus('XXXXXX').then(function(workStatus){
  console.log(workStatus);
});

company.workers(query)

Returns an array of Worker objects for company

company.workers().then(function(workers){
  console.log(workers);
});

Optional query parameters

  • givenName
  • familyName
  • legalLastFour
  • searchStartDate
  • searchEndDate
company.workers({familyName : 'Jones'}).then(function(workers){
  console.log(workers);
});

Clone this wiki locally