PHPackages                             openpublicmedia/roisolutions-php - 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. openpublicmedia/roisolutions-php

ActiveLibrary[API Development](/categories/api)

openpublicmedia/roisolutions-php
================================

PHP client for ROI Solutions APIs.

0.9.1(2y ago)0283Apache-2.0PHPPHP ^8.1

Since Aug 18Pushed 2y ago6 watchersCompare

[ Source](https://github.com/OpenPublicMedia/roisolutions-php)[ Packagist](https://packagist.org/packages/openpublicmedia/roisolutions-php)[ RSS](/packages/openpublicmedia-roisolutions-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (8)Used By (0)

ROI Solutions PHP Library
=========================

[](#roi-solutions-php-library)

This library abstracts interactions with ROI Solutions APIs.

Implemented APIs:
-----------------

[](#implemented-apis)

- [REST API](https://secure2.roisolutions.net/api/help/)

Installation
------------

[](#installation)

Install via composer:

```
composer require openpublicmedia/roisolutions-php
```

Use
---

[](#use)

### REST API

[](#rest-api)

The `OpenPublicMedia\RoiSolutions\Rest\Client` queries the REST API.

### Examples

[](#examples)

#### Creating a client

[](#creating-a-client)

```
use OpenPublicMedia\RoiSolutions\Rest\Client;

$userId = 'USER_ID';
$password = 'pAsSw0rD';
$clientCode = 'CLIENTCODE';

$client = new Client($userId, $password, $clientCode);
```

Providing a cache service is also supported (and recommended) when creating the client. If the client has a cache service it will be used to cache the authentication token provided by the API across multiple requests for the lifetime of the token.

A PSR-16 compliant interface is preferred but any class providing `set($key, $value)` and `get($key, $default)` methods will suffice.

```
use OpenPublicMedia\RoiSolutions\Rest\Client;
use Tochka\Cache\ArrayFileCache;

$userId = 'USER_ID';
$password = 'pAsSw0rD';
$clientCode = 'CLIENTCODE';
$cache = new ArrayFileCache('.', 'my_awesome_cache');

$client = new Client($userId, $password, $clientCode, cache: $cache);
```

#### Handling exceptions

[](#handling-exceptions)

Custom exceptions are provided for 404 response and general errors. Additional information from the API response is captured in these exceptions.

```
use OpenPublicMedia\RoiSolutions\Rest\Exception\RequestException;

try {
    $results = $client->request('get', 'donors');
} catch (RequestException $e) {
    var_dump(get_class($e));
    var_dump($e->getMessage());
    var_dump($e->getCode());
    var_dump($e->getStatusCodeReported());
    var_dump($e->getTitle());
    var_dump($e->getDetail());
    var_dump($e->getInstanceCode());
    var_dump($e->getHelpLink());
}
```

Development goals
-----------------

[](#development-goals)

See [CONTRIBUTING](CONTRIBUTING.md) for information about contributing to this project.

### v1

[](#v1)

- REST API client (`\OpenPublicMedia\RoiSolutions\Rest\Client`)
- API direct querying (`$client->request()`)
- Result/error handling
- System
    - [Logon](https://secure2.roisolutions.net/api/help/#/system/post-logon)
    - [Ping](https://secure2.roisolutions.net/api/help/#/system/get-ping)
    - [Get time](https://secure2.roisolutions.net/api/help/#/system/get-time)
- Donors
    - [Search donors](https://secure2.roisolutions.net/api/help/#/donors/get-donors)
        - Account flags support
        - Sub-resources support
    - [Get donor](https://secure2.roisolutions.net/api/help/#/donors/get-donor)
        - Support for advanced query parameters (`include`, `summary.*`, `donations.*`)
        - [Get flags](https://secure2.roisolutions.net/api/help/#/BETA%20TESTING/get-donor-accountflags) (BETA)
        - [Get emails](https://secure2.roisolutions.net/api/help/#/contact/get-donor-emails)
        - [Get Passport memberships](https://secure2.roisolutions.net/api/help/#/BETA%20TESTING/get-donor-mvault) (BETA)
            - Membership ID property
            - Other properties (once finalized)
    - [Create donor](https://secure2.roisolutions.net/api/help/#/BETA%20TESTING/post-donor) (BETA)
        - [Add email](https://secure2.roisolutions.net/api/help/#/BETA%20TESTING/post-donor-email)
        - [Add account flag](https://secure2.roisolutions.net/api/help/#/BETA%20TESTING/post-donor-accountflags)
        - [Add primary address](https://secure2.roisolutions.net/api/help/#/BETA%20TESTING/post-donor-address-primary)
        - [Add phone](https://secure2.roisolutions.net/api/help/#/BETA%20TESTING/post-donor-phone)
    - [Update donor](https://secure2.roisolutions.net/api/help/#/BETA%20TESTING/patch-donors) (BETA)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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 ~44 days

Recently: every ~65 days

Total

7

Last Release

737d ago

### Community

Maintainers

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

---

Top Contributors

[![cdubz](https://avatars.githubusercontent.com/u/10456740?v=4)](https://github.com/cdubz "cdubz (15 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/openpublicmedia-roisolutions-php/health.svg)

```
[![Health](https://phpackages.com/badges/openpublicmedia-roisolutions-php/health.svg)](https://phpackages.com/packages/openpublicmedia-roisolutions-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-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)
