PHPackages                             myoutdesk/prismapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. myoutdesk/prismapi

ActiveLibrary[API Development](/categories/api)

myoutdesk/prismapi
==================

API for PrismHR

1.1.1(5y ago)1116MITPHP

Since Jan 19Pushed 5y ago3 watchersCompare

[ Source](https://github.com/MyOutDeskLLC/PrismAPI)[ Packagist](https://packagist.org/packages/myoutdesk/prismapi)[ RSS](/packages/myoutdesk-prismapi/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (10)Dependencies (2)Versions (15)Used By (0)

PrismHR API
===========

[](#prismhr-api)

A temporary repo for PrismHR API. The following is a guide.

### Initial Requirements

[](#initial-requirements)

The following information:

1. `PEO ID` Get this from the system parameters page (`back office -> System -> Change -> System Parameters`)
2. `Web Service User` System -&gt; Change -&gt; System Parameters -&gt; Action Menu -&gt; "Web Service Users". These credentials will be used when calling the API.
3. `ClientID (Company Id)` This is needed from the frontend. Can be found on the My Company dashboard. All employees must be under this company.

#### Authenticating

[](#authenticating)

```
$api = new \Myoutdesk\PrismApi\PrismApi();
// Throws Authentication Exception if failure occurs
$api->authenticate('WEB_USER_USERNAME','WEB_USER_PASSWORD','PEO_ID');
$api->getSession();
```

#### Getting All Employees

[](#getting-all-employees)

```
$api = new \Myoutdesk\PrismApi\PrismApi();
// Authenticate here...
$employees = $api->getAllEmployees('1111');
```

#### Getting One Or More Employees

[](#getting-one-or-more-employees)

```
$api = new \Myoutdesk\PrismApi\PrismApi();
// Authenticate here...
$employee = $api->getEmployee('F72609', '1111');
// Or get multiple
$arrayOfEmployee = $api->getEmployees(['F72609','D68213'], '1111');
```

#### Creating Payroll Batch

[](#creating-payroll-batch)

A payroll batch is needed to upload timesheets. Use the findOrCreatePayrollBatch to do this. A list of employees MUST be set.

```
$api = new \Myoutdesk\PrismApi\PrismApi();
// Create a payroll batch for a list of employees
$api->findOrCreatePayrollBatch(new \DateTime('now', new \DateTimeZone('UTC')), 'COMPANY_ID', ['EMPLOYEE_ID']);
```

### Creating MyTimeIn Payroll Import Definition

[](#creating-mytimein-payroll-import-definition)

In order to upload timesheets, a payroll import definition must be specified via the backend menu `System` - `Change` - `Pay Import Definition`. The following must be set:

`Definition ID:` MyTimeIn

`Description:` MyTimeIn Import

`File Format:` Delimited

`Delimiter:` Comma

**Import Field Definitions**Configure the import field definitions like so:

Field # or Start,End POSField NameConversion Mask1$EMPID = Employee ID2$DATE = Date Worked Or Period End Date3$HOURSPOS4$CODEPOSMyTimeIn will communicate with Prism using REG or OT in for the CODE column.

**The company used to configure MyTimeIn must have access to this pay import definition**

### Uploading Timesheets

[](#uploading-timesheets)

Uploading timesheets has a particular flow to it in order to function. The following must be done, in order:

#### Building CSV Data

[](#building-csv-data)

Built out data to send to Prism with: EMPID, DATE (MM/DD/YYYY), HRS, "REG" or "OT" in CSV format. A CSV helper is bundled to assist with this process:

```
$api = new \Myoutdesk\PrismApi\PrismApi();
$csv = $api->getCsvService();
// Example Data
$dataToWrite =[
  ['X1', "12/07/2020", 8, "REG"],
  ['X2', "12/06/2020", 8, "REG"],
  ['X3', "12/05/2020", 8, "REG"],
  ['X4', "12/08/2020", 8, "REG"]
];
// Make a string version
$timesheetData = $csv->createFromData($dataToWrite);
```

#### Make a Payroll Batch

[](#make-a-payroll-batch)

```
$api = new \Myoutdesk\PrismApi\PrismApi();
// authenticate here
$now = new DateTime('now', new DateTimeZone('UTC'));
$payrollBatchId = $api->findOrCreatePayrollBatch($now, 'COMPANY_ID', ['X1', 'X2', 'X3', 'X4']);
```

#### Upload Timesheets Into Batch

[](#upload-timesheets-into-batch)

```
$api = new \Myoutdesk\PrismApi\PrismApi();
// auth, etc...
// Process the upload
$timesheetUpload = $api->uploadTimesheets('BATCHID', 'COMPANY_ID', 'USERNAME', 'CSV_STRING_OF_DATA_HERE');
// Make sure to store the key aka the uploadId
$uploadId = $timesheetUpload->getUploadKey();
// If you don't, fetch it from here as it is in progress and will be in the array of batches
$pendingBatches = $api->getTimesheetParamData('COMPANY_ID');
// If there are any errors, handle them here and keep retrying this step of uploading timesheets
if($timesheetUpload->hasErrors()) {
    return json_encode($timesheetUpload->getErrors());
}
```

#### Approve Upload

[](#approve-upload)

Once the timesheets response is error free, then you can approve the upload.

```
$api = new \Myoutdesk\PrismApi\PrismApi();
// auth, etc...
$api->approveTimesheetUpload('TIMESHEETUPLOAD_KEY', '1111', 'username', 'TIMESHEET_UPLOAD_KEY');
```

#### After Approval

[](#after-approval)

After approving the upload of the batch, the entries will appear under `Payroll`-`Action`-`Time Sheet Entry` in PrismHR for an approval from the end user.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

14

Last Release

1912d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc3e4304e117f1a73791b42d80edb079b90724d7a3078850041874124be1d54d?d=identicon)[WalrusSoup](/maintainers/WalrusSoup)

---

Top Contributors

[![WalrusSoup](https://avatars.githubusercontent.com/u/5719851?v=4)](https://github.com/WalrusSoup "WalrusSoup (13 commits)")

### Embed Badge

![Health badge](/badges/myoutdesk-prismapi/health.svg)

```
[![Health](https://phpackages.com/badges/myoutdesk-prismapi/health.svg)](https://phpackages.com/packages/myoutdesk-prismapi)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[myoutdeskllc/salesforce-php

salesforce library for php8+

1560.8k](/packages/myoutdeskllc-salesforce-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
