Official PHP SDK for the BambooHR API. https://documentation.bamboohr.com

Installs: 93 700

Dependents: 1

Suggesters: 0

Security: 0

Stars: 32

Watchers: 8

Forks: 22

Open Issues: 1

pkg:composer/bamboohr/api

2.0.1 2025-12-09 17:23 UTC

README

Official PHP SDK for the BambooHR API. For complete API documentation, visit https://documentation.bamboohr.com/

Installation & Usage

Requirements

PHP 8.1 and later.

Composer

To install the bindings via Composer, simply run:

composer require bamboohr/api

This will install the latest version of the SDK from Packagist, the main Composer repository.

Manual Installation

Download the files and include autoload.php:

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

Changelog

For a detailed list of changes and version history, see CHANGELOG.md.

Getting Started using the Fluent API Client (Recommended)

The SDK provides a modern, fluent interface for easier configuration and usage:

Quick Start with Fluent Interface

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

use BhrSdk\Client\ApiClient;

// Simple setup with OAuth authentication
$client = (new ApiClient())
    ->withOAuth('your-oauth-token')
    ->forCompany('your-company-subdomain')
    ->build();

// Use convenience methods to access APIs
$employee = $client->employees()->getEmployee('firstName,lastName', '123');
$timeOffRequests = $client->timeOff()->getTimeOffRequests();

Authentication Methods

OAuth (Recommended)

$client = (new ApiClient())
    ->withOAuth('your-oauth-token')
    ->forCompany('acme')
    ->build();

API Key

$client = (new ApiClient())
    ->withApiKey('your-api-key')
    ->forCompany('acme')
    ->build();

Also refer to the getting started docs found here: https://documentation.bamboohr.com/docs/getting-started

Convenience Methods

Access commonly used APIs with simple method calls:

$client->employees()           // EmployeesApi
$client->timeOff()             // TimeOffApi
$client->benefits()            // BenefitsApi
$client->reports()             // ReportsApi
$client->goals()               // GoalsApi
$client->training()            // TrainingApi
$client->timeTracking()        // TimeTrackingApi
$client->photos()              // PhotosApi
$client->webhooks()            // WebhooksApi
$client->tabularData()         // TabularDataApi
$client->accountInformation()  // AccountInformationApi
$client->applicantTracking()   // ApplicantTrackingApi
$client->companyFiles()        // CompanyFilesApi
$client->employeeFiles()       // EmployeeFilesApi
$client->ats()                 // ATSApi
$client->customReports()       // CustomReportsApi
$client->datasets()            // DatasetsApi
$client->hours()               // HoursApi
$client->lastChangeInformation() // LastChangeInformationApi
$client->login()               // LoginApi
$client->manual()              // ManualApi

Advanced Configuration

$client = (new ApiClient())
    ->withOAuth('your-oauth-token')
    ->forCompany('acme')
    ->withRetries(3)                    // Configure retry attempts
    ->withDebug(true)                   // Enable debug mode
    ->withLogging(null, 'debug')        // Enable secure logging
    ->withHostIndex(1)                  // Set custom host index
    ->build();

Secure Logging

The SDK includes secure logging with automatic sensitive data redaction:

use BhrSdk\Client\Logger\SecureLogger;

// Enable logging with default settings
$client = (new ApiClient())
    ->withOAuth('your-oauth-token')
    ->forCompany('acme')
    ->withLogging()  // Defaults to 'info' level
    ->build();

// Custom log level
$client->withLogging(null, 'debug');  // debug, info, warning, or error

// Custom logger
$customLogger = new SecureLogger(true, 'debug');
$client->withLogging($customLogger);

Note: Sensitive data (API keys, tokens, passwords) is automatically masked in logs.

Complete Example

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

use BhrSdk\Client\ApiClient;

// Configure the client
$client = (new ApiClient())
    ->withOAuth('your-oauth-token')
    ->forCompany('acme')
    ->withLogging(null, 'info')
    ->withRetries(3)
    ->build();

try {
    // Get employee information
    // Note: getEmployee returns array<string,mixed>, use array access
    $employee = $client->employees()->getEmployee('firstName,lastName', '123');
    echo "Employee: {$employee['firstName']} {$employee['lastName']}\n";
    
    // Get time off requests
    $requests = $client->timeOff()->getTimeOffRequests();
    echo "Time off requests: " . count($requests) . "\n";
    
    // Get employee photo
    $photo = $client->photos()->getEmployeePhoto('123', 'small');
    
    // Access any API using getApi()
    $customApi = $client->getApi(\BhrSdk\Api\CustomReportsApi::class);
    
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage() . PHP_EOL;
}

Backward Compatibility

The traditional approach still works if you prefer it:

$config = BhrSdk\Configuration::getDefaultConfiguration()
    ->setUsername('YOUR_API_KEY')
    ->setPassword('x');

$apiInstance = new BhrSdk\Api\EmployeesApi(
    new GuzzleHttp\Client(),
    $config
);

Migration Guide

If you're upgrading from an older version of the SDK or transitioning from direct API calls:

⚠️ Critical: Return Types

Returns are arrays, not objects:

// ✓ Correct - use array access
$employee = $api->getEmployee('firstName,lastName', '123');
echo $employee['firstName'];

// ✗ Wrong - will cause fatal error
echo $employee->getFirstName();

Method name changes:

$client->employeeFiles()  // ✓ Correct
$client->files()          // ✗ Doesn't exist

For detailed migration steps and troubleshooting, see MIGRATION.md.

OAuth Token Refresh

The SDK supports automatic OAuth token refresh when using BambooHR's OAuth 2.0 flow:

$client = (new ApiClient())
    ->withOAuthRefresh(
        accessToken: 'your-access-token',
        refreshToken: 'your-refresh-token',
        clientId: 'your-oauth-client-id',
        clientSecret: 'your-oauth-client-secret',
        expiresIn: 3600  // Optional: seconds until token expires
    )
    ->forCompany('acme')
    ->build();

// SDK automatically refreshes the token when:
// 1. The token is about to expire (proactive refresh)
// 2. A 401 Unauthorized response is received (reactive refresh)

Persisting Refreshed Tokens:

When tokens are refreshed, you'll need to save the new tokens. Use the callback:

$client = (new ApiClient())
    ->withOAuthRefresh(
        accessToken: $accessToken,
        refreshToken: $refreshToken,
        clientId: $clientId,
        clientSecret: $clientSecret
    )
    ->onTokenRefresh(function($newAccessToken, $newRefreshToken, $oldAccessToken, $oldRefreshToken) {
        // Save to database, session, cache, etc.
        saveUserTokens($userId, $newAccessToken, $newRefreshToken);
    })
    ->forCompany('acme')
    ->build();

Note: Token refresh only activates when both accessToken AND refreshToken are provided via withOAuthRefresh(). Using the standard withOAuth() method will not enable automatic refresh.

API Endpoints

All URIs are relative to https://companySubDomain.bamboohr.com

Class Method HTTP request Description
AccountInformationApi getCountriesOptions GET /api/v1/meta/countries/options Get Countries
AccountInformationApi getListOfUsers GET /api/v1/meta/users Get Users
AccountInformationApi getStatesByCountryId GET /api/v1/meta/provinces/{countryId} Get States by Country ID
AccountInformationApi metadataAddOrUpdateValuesForListFields PUT /api/v1/meta/lists/{listFieldId} Create or Update List Field Values
AccountInformationApi metadataGetAListOfFields GET /api/v1/meta/fields Get Fields
AccountInformationApi metadataGetAListOfTabularFields GET /api/v1/meta/tables Get Tabular Fields
AccountInformationApi metadataGetDetailsForListFields GET /api/v1/meta/lists Get List Field Details
ApplicantTrackingApi addNewCandidate POST /api/v1/applicant_tracking/application Create Candidate
ApplicantTrackingApi addNewJobOpening POST /api/v1/applicant_tracking/job_opening Create Job Opening
ApplicantTrackingApi getApplicationDetails GET /api/v1/applicant_tracking/applications/{applicationId} Get Job Application Details
ApplicantTrackingApi getApplications GET /api/v1/applicant_tracking/applications Get Job Applications
ApplicantTrackingApi getCompanyLocations GET /api/v1/applicant_tracking/locations Get Company Locations
ApplicantTrackingApi getHiringLeads GET /api/v1/applicant_tracking/hiring_leads Get Hiring Leads
ApplicantTrackingApi getJobSummaries GET /api/v1/applicant_tracking/jobs Get Job Summaries
ApplicantTrackingApi getStatuses GET /api/v1/applicant_tracking/statuses Get Applicant Statuses
ApplicantTrackingApi postApplicantStatus POST /api/v1/applicant_tracking/applications/{applicationId}/status Update Applicant Status
ApplicantTrackingApi postApplicationComment POST /api/v1/applicant_tracking/applications/{applicationId}/comments Create Job Application Comment
BenefitsApi addEmployeeDependent POST /api/v1/employeedependents Create Employee Dependent
BenefitsApi getBenefitCoverages GET /api/v1/benefitcoverages Get Benefit Coverages
BenefitsApi getBenefitDeductionTypes GET /api/v1/benefits/settings/deduction_types/all Get Benefit Deduction Types
BenefitsApi getEmployeeDependent GET /api/v1/employeedependents/{id} Get Employee Dependent
BenefitsApi getEmployeeDependents GET /api/v1/employeedependents Get Employee Dependents
BenefitsApi getMemberBenefit GET /api/v1/benefit/member_benefit Get Member Benefit Events
BenefitsApi updateEmployeeDependent PUT /api/v1/employeedependents/{id} Update Employee Dependent
CompanyFilesApi addCompanyFileCategory POST /api/v1/files/categories Create Company File Category
CompanyFilesApi deleteCompanyFile DELETE /api/v1/files/{fileId} Delete Company File
CompanyFilesApi getCompanyFile GET /api/v1/files/{fileId} Get Company File
CompanyFilesApi listCompanyFiles GET /api/v1/files/view Get Company Files and Categories
CompanyFilesApi updateCompanyFile POST /api/v1/files/{fileId} Update Company File
CompanyFilesApi uploadCompanyFile POST /api/v1/files Upload Company File
CustomReportsApi getByReportId GET /api/v1/custom-reports/{reportId} Get Report by ID
CustomReportsApi listReports GET /api/v1/custom-reports Get Reports
DatasetsApi getDataFromDataset POST /api/v1/datasets/{datasetName} Get Data from Dataset
DatasetsApi getDatasets GET /api/v1/datasets Get Datasets
DatasetsApi getFieldOptions POST /api/v1/datasets/{datasetName}/field-options Get Field Options
DatasetsApi getFieldsFromDataset GET /api/v1/datasets/{datasetName}/fields Get Fields from Dataset
EmployeeFilesApi addEmployeeFileCategory POST /api/v1/employees/files/categories Create Employee File Category
EmployeeFilesApi deleteEmployeeFile DELETE /api/v1/employees/{id}/files/{fileId} Delete Employee File
EmployeeFilesApi getEmployeeFile GET /api/v1/employees/{id}/files/{fileId} Get Employee File
EmployeeFilesApi listEmployeeFiles GET /api/v1/employees/{id}/files/view Get Employee Files and Categories
EmployeeFilesApi updateEmployeeFile POST /api/v1/employees/{id}/files/{fileId} Update Employee File
EmployeeFilesApi uploadEmployeeFile POST /api/v1/employees/{id}/files Upload Employee File
EmployeesApi addEmployee POST /api/v1/employees Create Employee
EmployeesApi getCompanyInformation GET /api/v1/company_information Get Company Information
EmployeesApi getEmployee GET /api/v1/employees/{id} Get Employee
EmployeesApi getEmployeesDirectory GET /api/v1/employees/directory Get Employee Directory
EmployeesApi getEmployeesList GET /api/v1/employees Get Employees
EmployeesApi updateEmployee POST /api/v1/employees/{id} Update Employee
GoalsApi deleteGoal DELETE /api/v1/performance/employees/{employeeId}/goals/{goalId} Delete Goal
GoalsApi deleteGoalComment DELETE /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} Delete Goal Comment
GoalsApi getCanCreateGoal GET /api/v1/performance/employees/{employeeId}/goals/canCreateGoals Check Goal Creation Permission
GoalsApi getGoalAggregate GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/aggregate Get Goal Aggregate
GoalsApi getGoalComments GET /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments Get Goal Comments
GoalsApi getGoals GET /api/v1/performance/employees/{employeeId}/goals Get Goals
GoalsApi getGoalsAggregateV1 GET /api/v1/performance/employees/{employeeId}/goals/aggregate Get Goals Aggregate
GoalsApi getGoalsAggregateV11 GET /api/v1_1/performance/employees/{employeeId}/goals/aggregate Get Goals Aggregate v1.1
GoalsApi getGoalsAggregateV12 GET /api/v1_2/performance/employees/{employeeId}/goals/aggregate Get Goals Aggregate v1.2
GoalsApi getGoalsAlignmentOptions GET /api/v1/performance/employees/{employeeId}/goals/alignmentOptions Get Alignable Goal Options
GoalsApi getGoalsFiltersV1 GET /api/v1/performance/employees/{employeeId}/goals/filters Get Goal Filters
GoalsApi getGoalsFiltersV11 GET /api/v1_1/performance/employees/{employeeId}/goals/filters Get Goal Filters v1.1
GoalsApi getGoalsFiltersV12 GET /api/v1_2/performance/employees/{employeeId}/goals/filters Get Goal Status Counts v1.2
GoalsApi getGoalsShareOptions GET /api/v1/performance/employees/{employeeId}/goals/shareOptions Get Available Goal Sharing Options
GoalsApi postCloseGoal POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/close Close Goal
GoalsApi postGoal POST /api/v1/performance/employees/{employeeId}/goals Create Goal
GoalsApi postGoalComment POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments Create Goal Comment
GoalsApi postReopenGoal POST /api/v1/performance/employees/{employeeId}/goals/{goalId}/reopen Reopen Goal
GoalsApi putGoalComment PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/comments/{commentId} Update Goal Comment
GoalsApi putGoalMilestoneProgress PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/milestones/{milestoneId}/progress Update Milestone Progress
GoalsApi putGoalProgress PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/progress Update Goal Progress
GoalsApi putGoalSharedWith PUT /api/v1/performance/employees/{employeeId}/goals/{goalId}/sharedWith Update Goal Sharing
GoalsApi putGoalV1 PUT /api/v1/performance/employees/{employeeId}/goals/{goalId} Update Goal
GoalsApi putGoalV11 PUT /api/v1_1/performance/employees/{employeeId}/goals/{goalId} Update Goal v1.1
HoursApi addTimeTrackingBulk POST /api/v1/timetracking/record Create or Update Hour Records
HoursApi addTimeTrackingHourRecord POST /api/v1/timetracking/add Create Hour Record
HoursApi deleteTimeTrackingById DELETE /api/v1/timetracking/delete/{id} Delete Hour Record
HoursApi editTimeTrackingRecord PUT /api/v1/timetracking/adjust Update Hour Record
HoursApi getTimeTrackingRecord GET /api/v1/timetracking/record/{id} Get Hour Record
LastChangeInformationApi getChangedEmployeeIds GET /api/v1/employees/changed Get Updated Employee IDs
LoginApi login POST /api/v1/login User Login
PhotosApi getEmployeePhoto GET /api/v1/employees/{employeeId}/photo/{size} Get Employee Photo
PhotosApi uploadEmployeePhoto POST /api/v1/employees/{employeeId}/photo Upload Employee Photo
ReportsApi getCompanyReport GET /api/v1/reports/{id} Get Company Report
ReportsApi requestCustomReport POST /api/v1/reports/custom Request Custom Report
TabularDataApi addEmployeeTableRow POST /api/v1/employees/{id}/tables/{table} Create Table Row
TabularDataApi addEmployeeTableRowV1 POST /api/v1_1/employees/{id}/tables/{table} Create Table Row v1.1
TabularDataApi deleteEmployeeTableRowV1 DELETE /api/v1/employees/{id}/tables/{table}/{rowId} Delete Table Row
TabularDataApi getChangedEmployeeTableData GET /api/v1/employees/changed/tables/{table} Get Changed Employee Table Data
TabularDataApi getEmployeeTableRow GET /api/v1/employees/{id}/tables/{table} Get Employee Table Rows
TabularDataApi updateEmployeeTableRow POST /api/v1/employees/{id}/tables/{table}/{rowId} Update Table Row
TabularDataApi updateEmployeeTableRowV POST /api/v1_1/employees/{id}/tables/{table}/{rowId} Update Table Row v1.1
TimeOffApi getAListOfWhoIsOut GET /api/v1/time_off/whos_out Get Who’s Out
TimeOffApi getTimeOffPolicies GET /api/v1/meta/time_off/policies Get Time Off Policies
TimeOffApi getTimeOffTypes GET /api/v1/meta/time_off/types Get Time Off Types
TimeOffApi timeOffAddATimeOffHistoryItemForTimeOffRequest PUT /api/v1/employees/{employeeId}/time_off/history Create Time Off Request History Item
TimeOffApi timeOffAddATimeOffRequest PUT /api/v1/employees/{employeeId}/time_off/request Create Time Off Request
TimeOffApi timeOffAdjustTimeOffBalance PUT /api/v1/employees/{employeeId}/time_off/balance_adjustment Update Time Off Balance
TimeOffApi timeOffAssignTimeOffPoliciesForAnEmployee PUT /api/v1/employees/{employeeId}/time_off/policies Assign Time Off Policies
TimeOffApi timeOffAssignTimeOffPoliciesForAnEmployeeV11 PUT /api/v1_1/employees/{employeeId}/time_off/policies Assign Time Off Policies v1.1
TimeOffApi timeOffChangeARequestStatus PUT /api/v1/time_off/requests/{requestId}/status Update Time Off Request Status
TimeOffApi timeOffEstimateFutureTimeOffBalances GET /api/v1/employees/{employeeId}/time_off/calculator Estimate Future Time Off Balances
TimeOffApi timeOffGetTimeOffRequests GET /api/v1/time_off/requests Get Time Off Requests
TimeOffApi timeOffListTimeOffPoliciesForEmployee GET /api/v1/employees/{employeeId}/time_off/policies Get Time Off Policies for Employee
TimeOffApi timeOffListTimeOffPoliciesForEmployeeV11 GET /api/v1_1/employees/{employeeId}/time_off/policies Get Time Off Policies for Employee v1.1
TimeTrackingApi addEditTimesheetClockEntries POST /api/v1/time_tracking/clock_entries/store Create or Update Timesheet Clock Entries
TimeTrackingApi addEditTimesheetHourEntries POST /api/v1/time_tracking/hour_entries/store Create or Update Timesheet Hour Entries
TimeTrackingApi addTimesheetClockInEntry POST /api/v1/time_tracking/employees/{employeeId}/clock_in Create Timesheet Clock-In Entry
TimeTrackingApi addTimesheetClockOutEntry POST /api/v1/time_tracking/employees/{employeeId}/clock_out Create Timesheet Clock-Out Entry
TimeTrackingApi createTimeTrackingProject POST /api/v1/time_tracking/projects Create Time Tracking Project
TimeTrackingApi deleteTimesheetClockEntriesViaPost POST /api/v1/time_tracking/clock_entries/delete Delete Timesheet Clock Entries
TimeTrackingApi deleteTimesheetHourEntriesViaPost POST /api/v1/time_tracking/hour_entries/delete Delete Timesheet Hour Entries
TimeTrackingApi getTimesheetEntries GET /api/v1/time_tracking/timesheet_entries Get Timesheet Entries
TrainingApi addNewEmployeeTrainingRecord POST /api/v1/training/record/employee/{employeeId} Create Employee Training Record
TrainingApi addTrainingCategory POST /api/v1/training/category Create Training Category
TrainingApi addTrainingType POST /api/v1/training/type Create Training Type
TrainingApi deleteEmployeeTrainingRecord DELETE /api/v1/training/record/{employeeTrainingRecordId} Delete Employee Training Record
TrainingApi deleteTrainingCategory DELETE /api/v1/training/category/{trainingCategoryId} Delete Training Category
TrainingApi deleteTrainingType DELETE /api/v1/training/type/{trainingTypeId} Delete Training Type
TrainingApi listEmployeeTrainings GET /api/v1/training/record/employee/{employeeId} Get Employee Trainings
TrainingApi listTrainingCategories GET /api/v1/training/category Get Training Categories
TrainingApi listTrainingTypes GET /api/v1/training/type Get Training Types
TrainingApi updateEmployeeTrainingRecord PUT /api/v1/training/record/{employeeTrainingRecordId} Update Employee Training Record
TrainingApi updateTrainingCategory PUT /api/v1/training/category/{trainingCategoryId} Update Training Category
TrainingApi updateTrainingType PUT /api/v1/training/type/{trainingTypeId} Update Training Type
WebhooksApi deleteWebhook DELETE /api/v1/webhooks/{id} Delete Webhook
WebhooksApi getMonitorFields GET /api/v1/webhooks/monitor_fields Get Monitor Fields
WebhooksApi getWebhook GET /api/v1/webhooks/{id} Get Webhook
WebhooksApi getWebhookList GET /api/v1/webhooks Get Webhooks
WebhooksApi getWebhookLogs GET /api/v1/webhooks/{id}/log Get Webhook Logs
WebhooksApi postWebhook POST /api/v1/webhooks Create Webhook
WebhooksApi putWebhook PUT /api/v1/webhooks/{id} Update Webhook

Models

Exceptions

  • Exceptions - Information about exceptions, potential causes, and debugging tips

Authorization

Authentication schemes defined for the API:

oauth

  • Type: OAuth
  • Flow: client credentials
  • Authorization URL: https://{companyDomain}.bamboohr.com/authorize.php
  • Scopes: N/A

To authenticate with OAuth, use the withOAuth() method outlined in the Authentication Methods section.

Or use the withOAuthRefresh() method to enable automatic token refresh, as outlined in the OAuth Token Refresh section.

api key

  • Type: HTTP Basic Authentication
  • The API key is used as the username with a fixed password of 'x'
  • API keys provide full access to your BambooHR account
  • Generate API keys in your BambooHR account under Account > API Keys

To authenticate with an API key, use the withApiKey() method, as outlined in the Authentication Methods section.

Security Note: Store your API key securely and never expose it in client-side code.

Also refer to the getting started docs found here: https://documentation.bamboohr.com/docs/getting-started

Contributing

We welcome contributions to improve this SDK! Here's how you can help:

Bug Reports and Feature Requests

Please use the issue tracker to report any bugs or request features.

Pull Requests

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run the tests to ensure everything works
  5. Commit your changes (git commit -m 'Add some amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Guidelines

  • Follow the existing code style and conventions
  • Add/update tests for any new or changed functionality
  • Update documentation as needed (if updating this readme, update the mustache template and run make generate)
  • Keep pull requests focused on a single topic
  • Run code quality tools before submitting your code:
# Check code style with PHP_CodeSniffer
make phpcs

# Run static analysis with PHPStan
make phpstan

Testing

Before submitting a pull request, make sure all tests pass:

# First, install dependencies if you haven't already
composer install

# Then run the test suite
make test

# To run specific tests with phpunit directly
vendor/bin/phpunit tests/path/to/TestFile.php
vendor/bin/phpunit --filter=testMethodName

Generating SDK

NOTE: this requires a public OpenAPI spec file, which is only available to BambooHR developers. The path to the spec file is specified by the OPENAPI_SPEC_PATH environment variable.

To generate the SDK, run:

make generate

Manual changes to the auto-generated code

If you need to make manual changes to the auto-generated code, update the corresponding template in the templates-php directory and run make generate to regenerate the SDK. We have updated most of the templates fairly extensively to conform to our coding standards.

Nearly all files under lib and test are generated by the make generate command, with the following exceptions and notes:

  • lib/Api/ManualApi.php
  • lib/ApiErrorHelper.php
  • lib/ApiHelper.php
  • lib/Client/* (all files in this directory)
  • test/Client/* (all files in this directory)
  • test/ApiErrorHelperTest.php

Custom descriptions for some API docs are added in the scripts/add_custom_headers_to_api_docs.sh script, which is run as part of the make generate command.

Note: regeneration will not force an overwrite of tests in the test directory, unless tests are deleted first.

Generating Error Documentation

The error documentation is automatically generated from the error messages defined in ApiErrorHelper.php. To update the documentation when error messages are added or modified, run:

make generate-error-docs

Note that this script will also run as part of the make generate command.

This will:

  1. Regenerate the docs/Exceptions/Exceptions.md file with the latest error information
  2. Generate exception classes in lib/Exceptions/ for each error type
  3. Generate exception documentation in docs/Exceptions/Classes/

Support

If you encounter any issues or need assistance with this SDK, please contact us through one of these channels:

  • Documentation: Refer to the official documentation
  • Community: Check existing issues and discussions for similar problems
  • Issue Tracker: Submit bugs and feature requests through our GitHub issue tracker

About this package

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

  • API version: 1.0
    • Package version: 2.0.1
    • Generator version: 7.16.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen