merge-api/merge-hris-php

The unified API for building rich integrations with multiple HR Information System platforms.

dev-main 2024-03-13 18:14 UTC

README

The unified API for building rich integrations with multiple HR Information System platforms.

For more information, please visit https://www.merge.dev/.

Installation & Usage

Requirements

  • PHP 7.2 and later.
  • guzzlehttp/guzzle 6.X OR 7.X.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/merge-api/merge-hris-php.git"
    }
  ],
  "require": {
    "merge-api/merge-hris-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/MergeHRISClient/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: tokenAuth
$config = MergeHRISClient\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = MergeHRISClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new MergeHRISClient\Api\AccountDetailsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_account_token = 'x_account_token_example'; // string | Token identifying the end user.

try {
    $result = $apiInstance->accountDetailsRetrieve($x_account_token);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountDetailsApi->accountDetailsRetrieve: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.merge.dev/api/hris/v1

Class Method HTTP request Description
AccountDetailsApi accountDetailsRetrieve GET /account-details
AccountTokenApi accountTokenRetrieve GET /account-token/{public_token}
AsyncPassthroughApi asyncPassthroughCreate POST /async-passthrough
AsyncPassthroughApi asyncPassthroughRetrieve GET /async-passthrough/{async_passthrough_receipt_id}
AuditTrailApi auditTrailList GET /audit-trail
AvailableActionsApi availableActionsRetrieve GET /available-actions
BankInfoApi bankInfoList GET /bank-info
BankInfoApi bankInfoRetrieve GET /bank-info/{id}
BenefitsApi benefitsList GET /benefits
BenefitsApi benefitsRetrieve GET /benefits/{id}
CompaniesApi companiesList GET /companies
CompaniesApi companiesRetrieve GET /companies/{id}
DeleteAccountApi deleteAccountDelete POST /delete-account
DependentsApi dependentsList GET /dependents
DependentsApi dependentsRetrieve GET /dependents/{id}
EmployeePayrollRunsApi employeePayrollRunsList GET /employee-payroll-runs
EmployeePayrollRunsApi employeePayrollRunsRetrieve GET /employee-payroll-runs/{id}
EmployeesApi employeesCreate POST /employees
EmployeesApi employeesIgnoreCreate POST /employees/ignore/{model_id}
EmployeesApi employeesList GET /employees
EmployeesApi employeesMetaPostRetrieve GET /employees/meta/post
EmployeesApi employeesRetrieve GET /employees/{id}
EmployerBenefitsApi employerBenefitsList GET /employer-benefits
EmployerBenefitsApi employerBenefitsRetrieve GET /employer-benefits/{id}
EmploymentsApi employmentsList GET /employments
EmploymentsApi employmentsRetrieve GET /employments/{id}
FieldMappingApi fieldMappingsCreate POST /field-mappings
FieldMappingApi fieldMappingsDestroy DELETE /field-mappings/{field_mapping_id}
FieldMappingApi fieldMappingsPartialUpdate PATCH /field-mappings/{field_mapping_id}
FieldMappingApi fieldMappingsRetrieve GET /field-mappings
FieldMappingApi remoteFieldsRetrieve GET /remote-fields
FieldMappingApi targetFieldsRetrieve GET /target-fields
ForceResyncApi syncStatusResyncCreate POST /sync-status/resync
GenerateKeyApi generateKeyCreate POST /generate-key
GroupsApi groupsList GET /groups
GroupsApi groupsRetrieve GET /groups/{id}
IssuesApi issuesList GET /issues
IssuesApi issuesRetrieve GET /issues/{id}
LinkTokenApi linkTokenCreate POST /link-token
LinkedAccountsApi linkedAccountsList GET /linked-accounts
LocationsApi locationsList GET /locations
LocationsApi locationsRetrieve GET /locations/{id}
PassthroughApi passthroughCreate POST /passthrough
PayGroupsApi payGroupsList GET /pay-groups
PayGroupsApi payGroupsRetrieve GET /pay-groups/{id}
PayrollRunsApi payrollRunsList GET /payroll-runs
PayrollRunsApi payrollRunsRetrieve GET /payroll-runs/{id}
RegenerateKeyApi regenerateKeyCreate POST /regenerate-key
ScopesApi defaultScopesRetrieve GET /default-scopes
ScopesApi linkedAccountScopesCreate POST /linked-account-scopes
ScopesApi linkedAccountScopesRetrieve GET /linked-account-scopes
SelectiveSyncApi selectiveSyncConfigurationsList GET /selective-sync/configurations
SelectiveSyncApi selectiveSyncConfigurationsUpdate PUT /selective-sync/configurations
SelectiveSyncApi selectiveSyncMetaList GET /selective-sync/meta
SyncStatusApi syncStatusList GET /sync-status
TeamsApi teamsList GET /teams
TeamsApi teamsRetrieve GET /teams/{id}
TimeOffApi timeOffCreate POST /time-off
TimeOffApi timeOffList GET /time-off
TimeOffApi timeOffMetaPostRetrieve GET /time-off/meta/post
TimeOffApi timeOffRetrieve GET /time-off/{id}
TimeOffBalancesApi timeOffBalancesList GET /time-off-balances
TimeOffBalancesApi timeOffBalancesRetrieve GET /time-off-balances/{id}
TimesheetEntriesApi timesheetEntriesCreate POST /timesheet-entries
TimesheetEntriesApi timesheetEntriesList GET /timesheet-entries
TimesheetEntriesApi timesheetEntriesMetaPostRetrieve GET /timesheet-entries/meta/post
TimesheetEntriesApi timesheetEntriesRetrieve GET /timesheet-entries/{id}
WebhookReceiversApi webhookReceiversCreate POST /webhook-receivers
WebhookReceiversApi webhookReceiversList GET /webhook-receivers

Models

Authorization

tokenAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

hello@merge.dev

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
    • Package version: 2.0.3
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen