PHPackages                             fortisx/sdk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. fortisx/sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

fortisx/sdk
===========

Fortisx PHP SDK

v0.1.0(6mo ago)00MITPHPPHP &gt;=8.0

Since Nov 8Pushed 6mo agoCompare

[ Source](https://github.com/fortisx/php-sdk)[ Packagist](https://packagist.org/packages/fortisx/sdk)[ RSS](/packages/fortisx-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

FortisX PHP SDK
===============

[](#fortisx-php-sdk)

This guide explains how to interact with the API using the PHP client.

---

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

[](#installation)

```
composer require fortisx/sdk
```

---

Initialization
--------------

[](#initialization)

```
require 'vendor/autoload.php';

use FortisX\SDK\API;

$api = new API('YOUR_API_KEY');
```

**Constructor options**

NameTypeDefaultDescription`$apiKey`string–API key used for authorization`$baseUrl`string`https://api.fortisx.fi/v1`Override if using a custom environment`$timeout`int`10`Request timeout in seconds---

Methods
-------

[](#methods)

MethodArgumentsReturnsDescription`get(string $endpoint, array $params = [])`endpoint path, optional paramsarrayPerforms a GET request`post(string $endpoint, array $data = [])`endpoint path, optional dataarrayPerforms a POST request`put(string $endpoint, array $data = [])`endpoint path, optional dataarrayPerforms a PUT request`delete(string $endpoint)`endpoint patharrayPerforms a DELETE request> All requests use `GuzzleHttp\Client` and automatically include the following headers:
>
> ```
> [
>   'Authorization' => "Bearer {$apiKey}",
>   'Accept' => 'application/json'
> ]
> ```

---

Error Handling
--------------

[](#error-handling)

When a network or server error occurs, an exception of type `APIError` is thrown.

```
namespace FortisX\SDK;

class APIError extends \Exception {
    public int $status;
    public array $details;

    public function __construct(string $message, int $status = 0, array $details = []) {
        parent::__construct($message);
        $this->status = $status;
        $this->details = $details;
    }
}
```

FieldTypeDescription`$message`stringShort description of the error`$status`intHTTP status code`$details`arrayFull response body if available**Example:**

```
use FortisX\SDK\API;
use FortisX\SDK\APIError;

$api = new API('demo-key');

try {
    $res = $api->get('ping');
    print_r($res);
} catch (APIError $err) {
    echo "API error [{$err->status}]: {$err->getMessage()}";
} catch (Exception $e) {
    echo "Unexpected error: {$e->getMessage()}";
}
```

---

Example: `/ping` Endpoint
-------------------------

[](#example-ping-endpoint)

```
require 'vendor/autoload.php';

use FortisX\SDK\API;

$api = new API('demo-key');
$response = $api->get('ping');

print_r($response); // ['status' => 'ok']
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance67

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

191d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/09bfaa699fe5f762cc888779e19046787316fb43c3c705da2efdf158eefd1449?d=identicon)[fortisx](/maintainers/fortisx)

---

Top Contributors

[![fortisx](https://avatars.githubusercontent.com/u/27451304?v=4)](https://github.com/fortisx "fortisx (1 commits)")

### Embed Badge

![Health badge](/badges/fortisx-sdk/health.svg)

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

###  Alternatives

[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[dhlparcel/magento2-plugin

DHL Parcel plugin for Magento 2

11180.5k2](/packages/dhlparcel-magento2-plugin)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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