PHPackages                             sypher/keez - 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. sypher/keez

ActiveLibrary[API Development](/categories/api)

sypher/keez
===========

A simple Keez.ro integration

v0.3.0(1y ago)252MITPHPPHP &gt;=7.3.0

Since Mar 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/syphereu/keez)[ Packagist](https://packagist.org/packages/sypher/keez)[ Docs](https://sypher.eu/)[ RSS](/packages/sypher-keez/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

A simple keez.ro library
========================

[](#a-simple-keezro-library)

[![MIT Licensed](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

The Keez PHP library provides convenient access to the Keez.ro API from applications written in the PHP language. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses which makes it compatible with a wide range of versions of the Keez API.

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

[](#requirements)

PHP 7.3 and later.

Composer
--------

[](#composer)

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```
composer require sypher/keez
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```
require_once('vendor/autoload.php');
```

Dependencies
------------

[](#dependencies)

The bindings require the following extensions in order to work properly:

- [`curl`](https://secure.php.net/manual/en/book.curl.php)
- [`json`](https://secure.php.net/manual/en/book.json.php)
- [`mbstring`](https://secure.php.net/manual/en/book.mbstring.php) (Multibyte String)

If you use Composer, these dependencies should be handled automatically.

Getting Started
---------------

[](#getting-started)

Simple usage looks like:

```
use sypher\keez\KeezSDK;

$keez = new KeezSDK([
   "client_id" => "a1b2c3d4e5f6g7h8i9j10k11l12m13n1",
   "app_id"    => "vendor-abcdefghijklmnopqrtuvxz",
   "secret"    => "abcdefghijklmnopqrstuvxzw"
 ], $devmode);
```

Use devmode true for staging environment and false for the production environment.

Several entities are used to work this Keez. These entities contain all properties included in the documentation.

- [Article](https://app.keez.ro/help/api/data_models_item.html)
- [Invoice](https://app.keez.ro/help/api/data_models_invoice_header.html)
- [InvoiceLineItem](https://app.keez.ro/help/api/data_models_invoice_details.html)
- [Partner](https://app.keez.ro/help/api/data_models_legal_partner.html)
- [Person](https://app.keez.ro/help/api/data_models_nonlegal_partner.html)

To get the response in case of an error, use function getLastError. This returns a string with the response, which normally is a JSON.

```
$error = $keez->getLastError();
```

Functions index
---------------

[](#functions-index)

#### Articles

[](#articles)

- [createArticle($Article)](#createarticle)
- [getArticle($articleId)](#getarticle)
- [updateArticle($Article)](#updatearticle)
- [getArticles($filter, $order, $count, $offset)](#getarticles)

#### Invoices

[](#invoices)

- [createInvoice($Invoice)](#createinvoice)
- [updateInvoice($Invoice)](#updateinvoice)
- [getInvoice($invoiceId)](#getinvoice)
- [getInvoices($filter, $order, $count, $offset)](#getinvoices)
- [deleteInvoice($invoiceId)](#deleteinvoice)
- [validateInvoice($invoiceId)](#validateinvoice)
- [eFacturaInvoice($invoiceId)](#efacturainvoice)

---

Functions
---------

[](#functions)

### createArticle

[](#createarticle)

- createArticle - Receives an entity of type `Article` as input and returns an entity of the same type `Article` on success, or false on failure. The returned entity will contain all full properties of the object, including properties which were not set on the input article, plus the `externalId`.

```
use sypher\keez\entity\Article;

$article = new Article();
$article->name = "Sample Product";
$article->code = "SKY_SAMPLE_PROD";
$article->currencyCode = "RON";
$article->measureUnitId = 1;
$article->categoryExternalId = "MISCSRV";
$article->isActive = true;

$this->keez->createArticle($article);
```

### getArticle

[](#getarticle)

- getArticle - Receives the externalId of an `Article` and returns an entity of type `Article`on success or false on failure.

```
$article = $keez->getArticle("articleId");
```

### updateArticle

[](#updatearticle)

- updateArticle - Receives as input an entity of type `Article` with full or partial properties and returns an entity of the type `Article` on success, with all full properties of the object, or false on failure. If partial properties are sent, only those properties will be updated. In all cases, externalId must be included in the input object.

Partial update:

```
$article = new stdClass();
$article->externalId = "abcdefg";
$article->name = "Sample Product Xtra Large";
$article = $keez->updateArticle($article);
```

Full update:

```
$article = $keez->getArticle("articleId");
$article->name = "Sample Product Xtra Large";
$article = $keez->updateArticle($article);
```

### getArticles

[](#getarticles)

- getArticles(`$filter`, `$order`, `$count`, `$offset`) - Performs a search for Articles with specific filters, in the given `order`. Returns an array of `Article` objects, or `false` on failure. All parameters are optional. See [Working with filters](#working-with-filters) for an overview of how to pass filters.

```
$keezProducts = $keez->getArticles();
```

### createInvoice

[](#createinvoice)

- createInvoice - Receives an entity of type `Invoice` as input and returns an entity of the same type `Invoice` on success, or false on failure. The returned entity will contain all full properties of the object, including properties which were not set on the input article, plus the `externalId`.

```
$savedInvoice = $this->keez->createInvoice($invoice);
```

### updateInvoice

[](#updateinvoice)

- updateInvoice(`$invoice`) - Receives an entity of type `Invoice` as input and returns an entity of the same type `Invoice` on success, or false on failure. The returned entity will contain all full properties of the object, including properties which were not set on the input article.

```
$updatedInvoice = $this->keez->updateInvoice($invoice);
```

### getInvoice

[](#getinvoice)

- getInvoice(`$invoiceId`) - Receives the externalId of an `Invoice` and returns an entity of type `Invoice`, or false on failure.

```
$invoice = $keez->getInvoice("3f066d8a330a4313ad02bdfd537d2c79");
```

### getInvoices

[](#getinvoices)

- getInvoices(`$filter`, `$order`, `$count`, `$offset`) - Performs a search for invoices with specific filters, in the given order. Returns an array of `Invoice` objects, or false on failure. All parameters are optional. See [Working with filters](#working-with-filters) for an overview of how to pass filters.

### deleteInvoice

[](#deleteinvoice)

- deleteInvoice(`$invoiceId`) - Receives the externalId of an `Invoice` and returns true on success or false on failure.

```
$keez->deleteInvoice("3f066d8a330a4313ad02bdfd537d2c79");
```

### validateInvoice

[](#validateinvoice)

- validateInvoice(`$invoiceId`) - Receives the externalId of an `Invoice` and returns true on success or false on failure.

```
$keez->validateInvoice("3f066d8a330a4313ad02bdfd537d2c79");
```

### eFacturaInvoice

[](#efacturainvoice)

- eFacturaInvoice(`$invoiceId`) - Receives the externalId of an `Invoice` and returns true on success or false on failure.

```
$keez->eFacturaInvoice("3f066d8a330a4313ad02bdfd537d2c79");
```

Working with filters
--------------------

[](#working-with-filters)

`filter` can be either an array with the conditions or a string with the exact syntax supported by Keez API.

If sending the filter as an array, the array values can be arrays with two or three items. Two items assumes the operation is equal.

- \['searchForVariable', 'operation', 'searchForValue'\]
- \['searchForVariable', 'searchForValue'\]

Supported operations are all comparisons like =, !=, &lt;=, &gt;=, &lt;, &gt; and special operations like %% (equivalent of SQL LIKE) and % (string starts with).

Example:

```
// searching for an Invoice with a specific serie and number, using array
$filter = [["series", "=", "SERIE"], ["number", 106]];
// searching for an Invoice with a specific serie and number, using string
$filter = "series[eq]:SERIE AND number[eq]:106";
// both versions have the same effect

$invoice = $keez->getInvoices($filter);

// searching for a specific Article by code
$filter = [["code", 'MY_SKU']];
$articles = $keez->getArticles($filter);
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

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

Every ~102 days

Total

3

Last Release

600d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

apiAccountingkeezcontabilitate

### Embed Badge

![Health badge](/badges/sypher-keez/health.svg)

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

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.0k](/packages/m165437-laravel-blueprint-docs)[exlo89/laravel-sevdesk-api

A helpful Sevdesk API client for Laravel.

1116.5k](/packages/exlo89-laravel-sevdesk-api)

PHPackages © 2026

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