PHPackages                             abhisingh159/inflow-cloud-php-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. [API Development](/categories/api)
4. /
5. abhisingh159/inflow-cloud-php-sdk

ActiveLibrary[API Development](/categories/api)

abhisingh159/inflow-cloud-php-sdk
=================================

Standalone PHP SDK for the inFlow Cloud API (products, customers, sales orders, inventory, vendors).

v0.1.2(1mo ago)00MITPHPPHP &gt;=8.1

Since May 27Pushed 1mo agoCompare

[ Source](https://github.com/abhisingh159/inflow-cloud-php-sdk)[ Packagist](https://packagist.org/packages/abhisingh159/inflow-cloud-php-sdk)[ Docs](https://github.com/abhisingh159/inflow-cloud-php-sdk)[ RSS](/packages/abhisingh159-inflow-cloud-php-sdk/feed)WikiDiscussions main Synced 1w ago

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

inFlow Cloud PHP SDK
====================

[](#inflow-cloud-php-sdk)

Standalone PHP SDK for the [inFlow Cloud API](https://cloudapi.inflowinventory.com/docs/index.html).

Framework-agnostic — drop it into any PHP 8.1+ project: vanilla PHP scripts, Laravel, Symfony, Slim, CLI tools, cron workers, AWS Lambda, or any CMS/e-commerce platform (WordPress, Magento, Drupal, …). The SDK has zero knowledge of any framework; it only knows HTTP and the inFlow API.

Requirements
------------

[](#requirements)

- PHP 8.1+
- [Guzzle](https://github.com/guzzle/guzzle) 7.8+

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

[](#installation)

```
composer require abhimanev/inflow-cloud-php-sdk
```

Configuration
-------------

[](#configuration)

The SDK reads credentials from a `Config` object. Do **not** hardcode credentials in your application — load them from environment variables or your framework's config store.

You'll need:

- an active inFlow account with the API access add-on (or a trial)
- administrator rights
- an **API key** and your **companyId** — generate both at [app.inflowinventory.com/options/integrations](https://app.inflowinventory.com/options/integrations)

The SDK handles the URL structure (`/{companyId}/...`), auth header (`Authorization: Bearer {key}`), and the versioned `Accept` header for you. You only ever pass the resource path (e.g. `/products`).

```
use Abhimanev\Inflow\Config;
use Abhimanev\Inflow\Inflow;

$config = new Config(
    apiKey:    getenv('INFLOW_API_KEY'),
    companyId: getenv('INFLOW_COMPANY_ID'),
    baseUrl:   'https://cloudapi.inflowinventory.com' // optional
);

$inflow = new Inflow($config);
```

Usage
-----

[](#usage)

### Get products

[](#get-products)

```
$products = $inflow->products()->list([
    'limit' => 50,
]);

foreach ($products as $product) {
    echo $product['name'] ?? '', PHP_EOL;
}
```

### Find a single product

[](#find-a-single-product)

```
$product = $inflow->products()->find('product-id-here');
```

### Create a sales order

[](#create-a-sales-order)

```
$order = $inflow->salesOrders()->create([
    'customerId' => 'customer-id-here',
    'orderNumber' => 'SO-1042',
    'lines' => [
        [
            'productId' => 'product-id-here',
            'quantity'  => 2,
            'unitPrice' => 19.99,
        ],
    ],
]);

echo 'Created sales order: ', $order['id'] ?? '(no id)', PHP_EOL;
```

> Field names above are illustrative. Confirm exact field names against the [inFlow Cloud API reference](https://cloudapi.inflowinventory.com/docs/index.html).

### Inventory

[](#inventory)

```
$levels = $inflow->inventory()->stockLevels([
    'productId' => 'product-id-here',
]);
```

### Customers and vendors

[](#customers-and-vendors)

```
$customer = $inflow->customers()->create([
    'name'  => 'Acme Inc.',
    'email' => 'orders@acme.test',
]);

$vendors = $inflow->vendors()->list();
```

Error handling
--------------

[](#error-handling)

The SDK throws `Abhimanev\Inflow\Exception\ApiException` for any non-2xx HTTP response, and `Abhimanev\Inflow\Exception\InflowException` for configuration or transport issues. `ApiException` extends `InflowException`, so catching the latter handles both.

```
use Abhimanev\Inflow\Exception\ApiException;
use Abhimanev\Inflow\Exception\InflowException;

try {
    $inflow->salesOrders()->create($payload);
} catch (ApiException $e) {
    error_log(sprintf(
        'inFlow API failed [%d]: %s — body: %s',
        $e->getStatusCode(),
        $e->getMessage(),
        $e->getResponseBody()
    ));
} catch (InflowException $e) {
    error_log('inFlow transport error: ' . $e->getMessage());
}
```

Advanced: custom HTTP client
----------------------------

[](#advanced-custom-http-client)

`Client` accepts any PSR-18 / Guzzle `ClientInterface`. This is useful for testing (mock responses) or for plugging in a shared HTTP client with retries / middleware / logging:

```
use Abhimanev\Inflow\Client;
use Abhimanev\Inflow\Config;
use Abhimanev\Inflow\Inflow;
use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\HandlerStack;

$stack = HandlerStack::create();
// $stack->push(your_retry_middleware());

$http = new GuzzleClient([
    'base_uri'    => 'https://cloudapi.inflowinventory.com/',
    'timeout'     => 30,
    'http_errors' => false,
    'handler'     => $stack,
]);

$config = new Config($apiKey, $companyId);
$inflow = new Inflow($config, new Client($config, $http));
```

Available resources
-------------------

[](#available-resources)

MethodResourceEndpoints`products()``ProductResource``/products`, `/products/{id}``customers()``CustomerResource``/customers`, `/customers/{id}``salesOrders()``SalesOrderResource``/sales-orders`, `/sales-orders/{id}``inventory()``InventoryResource``/products/summary`, `/products/{id}/summary` (read-only — see note below)`vendors()``VendorResource``/vendors`, `/vendors/{id}`Each resource exposes `list()`, `find()`, `create()`, `update()`, `delete()` — **except `inventory()`**, which is read-only. inFlow has no direct "set stock" endpoint; stock changes go through stock-adjustments / stock-counts / stock-transfers (planned for a future SDK release). Calling `inventory()->create/update/delete()` throws `BadMethodCallException` with an actionable message.

License
-------

[](#license)

MIT.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance89

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

Total

3

Last Release

57d ago

### Community

Maintainers

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

---

Tags

apisdkecommerceapi clientinventoryinflowinflow-cloudinflow-inventory

### Embed Badge

![Health badge](/badges/abhisingh159-inflow-cloud-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/abhisingh159-inflow-cloud-php-sdk/health.svg)](https://phpackages.com/packages/abhisingh159-inflow-cloud-php-sdk)
```

###  Alternatives

[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

293.1k](/packages/eslazarev-wildberries-sdk)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[resend/resend-php

Resend PHP library.

607.2M44](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

563.6M13](/packages/checkout-checkout-sdk-php)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

621.7M5](/packages/crowdin-crowdin-api-client)[files.com/files-php-sdk

Files.com PHP SDK

2481.1k](/packages/filescom-files-php-sdk)

PHPackages © 2026

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