PHPackages                             tamkeen-tms/rest-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. tamkeen-tms/rest-client

ActiveLibrary[HTTP &amp; Networking](/categories/http)

tamkeen-tms/rest-client
=======================

PHP REST client for Tamkeen's API (tamkeentms.com)

v2.1(4y ago)121[2 PRs](https://github.com/tamkeen-tms/rest-client/pulls)MITPHP

Since Apr 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tamkeen-tms/rest-client)[ Packagist](https://packagist.org/packages/tamkeen-tms/rest-client)[ Docs](https://tamkeentms.com)[ RSS](/packages/tamkeen-tms-rest-client/feed)WikiDiscussions master Synced yesterday

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

Tamkeen REST API PHP client
===========================

[](#tamkeen-rest-api-php-client)

What is this?
-------------

[](#what-is-this)

This is the official PHP client for Tamkeen's REST API. You can use this in your PHP applications to communicate with Tamkeen. Before you start you need to acquire an the "Tenant id" and the secret auth "key"; you can find this info under Administration &gt; API.

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

[](#installation)

You can require this library into your project using `composer`, via the following command:

```
composer require tamkeen-tms/rest-client
```

Next, you will be able to use it inside your project through the namespace `Tamkeen`

How it works
------------

[](#how-it-works)

This library merely sends requests to Tamkeen's API endpoints. So, you need to know what endpoints are available and how to pick the correct one! A list of the endpoints are available on Tamkeen's website.

### Creating a client

[](#creating-a-client)

Before sending requests you need to initiate a new "Client" instance, and pass it the "Tenant" and authorization key. Through this client you will be able to make the requests. Each "Request" must be made through a "Client". You can instantiate multiple clients to make requests to multiple copies of the application!

```
$client = new Tamkeen\Client([tenant], [secret key]) // New client instance
```

### Sending a request

[](#sending-a-request)

Using the created client you can now send new requests, for example:

```
$request = new Tamkeen\Request($client, 'GET', 'branches'); // Create the request
$response = $request->send();
```

You need to call `->send()`, which will send the request to the application and return the response. The response will be in JSON format.

Examples:
---------

[](#examples)

Here is an example for fetching the branches list:

```
try{
    $request = $client->request('get', 'branches'); // Create the request
    $response = $request->send(); // Send it, returns the response

}catch(RequestException $e){
    /**
    * Possible error messages include:
    * tenant_not_identified: The tenant id was not provided, or invalid
    * api_disabled: API is disabled for the tenant. (Contact the support team to enable it).
    * api_key_missing: The authentication key missing.
    * api_key_invalid: The authentication key is invalid.
    * api_error: An error happened at the API's level; server error (500).
    **/
}
```

The `$response` in this case would return:

```
{
    "branches": [{
        "id": 1,
        "name": "Headquarters",
        "code": "HQ"
        "currency": "USD"
    }]
}
```

For any further questions please feel free to create a new issue here.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

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

Total

3

Last Release

1797d ago

Major Versions

1.0.0 → v2.02021-05-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/14ecb819a0fdf95d56d35460349971bf915cd324294229d94c3da02219ec3a00?d=identicon)[TamkeenLMS](/maintainers/TamkeenLMS)

---

Top Contributors

[![tamkeen-tms](https://avatars.githubusercontent.com/u/13228056?v=4)](https://github.com/tamkeen-tms "tamkeen-tms (11 commits)")

---

Tags

phpapiresttmslms

### Embed Badge

![Health badge](/badges/tamkeen-tms-rest-client/health.svg)

```
[![Health](https://phpackages.com/badges/tamkeen-tms-rest-client/health.svg)](https://phpackages.com/packages/tamkeen-tms-rest-client)
```

###  Alternatives

[xeroapi/xero-php-oauth2

Xero official PHP SDK for oAuth2 generated with OpenAPI spec 3

1054.3M14](/packages/xeroapi-xero-php-oauth2)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[zenditplatform/zendit-php-sdk

PHP client for Zendit API

1204.3k](/packages/zenditplatform-zendit-php-sdk)[huaweicloud/huaweicloud-sdk-php

Huawei Cloud SDK for PHP

1829.2k2](/packages/huaweicloud-huaweicloud-sdk-php)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

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