PHPackages                             obliosoftware/oblio-api - 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. obliosoftware/oblio-api

ActiveLibrary[API Development](/categories/api)

obliosoftware/oblio-api
=======================

Oblio.eu API implementation for PHP

v1.0.3(6mo ago)1415.7k↓27.9%[7 issues](https://github.com/OblioSoftware/OblioApi/issues)MITPHPCI passing

Since Apr 28Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/OblioSoftware/OblioApi)[ Packagist](https://packagist.org/packages/obliosoftware/oblio-api)[ RSS](/packages/obliosoftware-oblio-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

OblioApi
========

[](#oblioapi)

[![test workflow](https://github.com/OblioSoftware/OblioApi/actions/workflows/php.yml/badge.svg)](https://github.com/OblioSoftware/OblioApi/actions/workflows/php.yml/badge.svg)[![Latest Version on Packagist](https://camo.githubusercontent.com/12b8ebc9aad40f27e9b92b225d24997a5b2e315e2c22ad2becaf7e8fbbc237d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f626c696f736f6674776172652f6f626c696f2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/obliosoftware/oblio-api)[![Total Downloads](https://camo.githubusercontent.com/679f3c38513ceb448eab85bcdcaab01cb109a1a987612e8bddcab8c115b3dc58/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f626c696f736f6674776172652f6f626c696f2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/obliosoftware/oblio-api)

Oblio.eu API implementation for PHP

Install using composer

```
composer require obliosoftware/oblio-api

```

Create invoice
--------------

[](#create-invoice)

```
$defaultData = array(
    'cif'                => '',
    'client'             => [
        'cif'           => '',
        'name'          => '',
        'rc'            => '',
        'code'          => '',
        'address'       => '',
        'state'         => '',
        'city'          => '',
        'country'       => '',
        'iban'          => '',
        'bank'          => '',
        'email'         => '',
        'phone'         => '',
        'contact'       => '',
        'vatPayer'      => '',
    ],
    // 'idempotencyKey'     => $orderId, // used to avoid double invoicing
    'issueDate'          => 'yyyy-mm-dd',
    'dueDate'            => '',
    'deliveryDate'       => '',
    'collectDate'        => '',
    'seriesName'         => '',
    'collect'            => [],
    'referenceDocument'  => [],
    'language'           => 'RO',
    'precision'          => 2,
    'currency'           => 'RON',
    'products'           => [
        [
            'name'          => 'Abonament',
            'code'          => '',
            'description'   => '',
            'price'         => '100',
            'measuringUnit' => 'buc',
            'currency'      => 'RON',
            'vatName'       => 'Normala',
            'vatPercentage' => 21,
            'vatIncluded'   => true,
            'quantity'      => 2,
            'productType'   => 'Serviciu',
        ]
    ],
    'issuerName'         => '',
    'issuerId'           => '',
    'noticeNumber'       => '',
    'internalNote'       => '',
    'deputyName'         => '',
    'deputyIdentityCard' => '',
    'deputyAuto'         => '',
    'selesAgent'         => '',
    'mentions'           => '',
    'value'              => 0,
    'workStation'        => 'Sediu',
    'useStock'           => 0,
);
try {
    $api = new OblioSoftware\Api($email, $secret);
    // create invoice:
    $result = $api->createInvoice($defaultData);
} catch (Exception $e) {
    // error handle
}
```

Cancel invoice
--------------

[](#cancel-invoice)

```
try {
    $issuerCif = ''; // your company CIF
    $api = new OblioSoftware\Api($email, $secret);
    // cancel/restore document:
    $api->setCif($issuerCif);
    $result = $api->cancel('invoice', $seriesName, $number, true/false);
} catch (Exception $e) {
    // error handle
}
```

Nomenclature
------------

[](#nomenclature)

```
try {
    $issuerCif = ''; // your company CIF
    $type = 'products'; // companies, vat_rates, products, clients, series, languages, management
    $name = '';
    $filters = [
        'workStation'  => '',
        'management'   => '',
        'limitPerPage' => 250,
        'offset'       => 0,
    ];
    $api = new OblioSoftware\Api($email, $secret);
    $api->setCif($issuerCif);
    $result = $api->nomenclature($type, $name, $filters);
} catch (Exception $e) {
    // error handle
}
```

Collect invoice
---------------

[](#collect-invoice)

```
try {
    $issuerCif = ''; // your company CIF
    $seriesName = '';
    $number = '';
    $collect = [
        'type'                => 'Ordin de plata',
        'documentNumber'      => 'OP 7001',
    ];
    $api = new OblioSoftware\Api($email, $secret);
    $api->setCif($issuerCif);
    $result = $api->collect($seriesName, $number, $collect);
} catch (Exception $e) {
    // error handle
}
```

Create custom AccessTokenHandler example
----------------------------------------

[](#create-custom-accesstokenhandler-example)

```
use OblioSoftware\AccessToken;
use OblioSoftware\AccessTokenHandlerInterface;

class CustomAccessTokenHandler implements AccessTokenHandlerInterface {
    private $cacheKey = 'oblio_access_token';

    public function get(): ?AccessToken
    {
        $data = Cache::get($this->cacheKey);
        if ($data !== null) {
            $accessToken = new AccessToken($data);
            if ($accessToken && $accessToken->request_time + $accessToken->expires_in > time()) {
                return $accessToken;
            }
        }
        return null;
    }

    public function set(AccessToken $accessToken): void
    {
        Cache::set($this->cacheKey, $accessToken->toArray());
    }
}
```

List invoices
-------------

[](#list-invoices)

[API list docs](https://www.oblio.eu/api#docs_list)

```
try {
    $api = new OblioSoftware\Api(getenv('OBLIO_API_EMAIL'), getenv('OBLIO_API_SECRET'));
    $api->setCif(getenv('OBLIO_API_CIF'));
    $result = $api->list('invoice', [
        // 'id'            => '',
        'issuedAfter'   => date('Y-m-d', time() - 3600 * 24 * 7),
        'issuedBefore'  => date('Y-m-d'),
        'limitPerPage'  => '100',
        'offset'        => '0',
        'orderBy'       => 'id',
        'orderDir'      => 'desc',
    ]);
} catch (Exception $e) {
    // error handle
}
```

Create webhook
--------------

[](#create-webhook)

```
use OblioSoftware\Request\WebhookCreate;

try {
    $issuerCif = ''; // your company CIF
    $endpoint = ''; // a valid webhook endpoint
    $api = new OblioSoftware\Api($email, $secret);
    $response = $api->createRequest(
        new WebhookCreate([
            'cif'       => $issuerCif,
            'topic'     => 'stock',
            'endpoint'  => $endpoint,
        ])
    );
    $result = json_decode($response->getBody()->getContents(), true);
} catch (Exception $e) {
    // error handle
}
```

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance66

Regular maintenance activity

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.4% 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 ~302 days

Total

4

Last Release

208d ago

### Community

Maintainers

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

---

Top Contributors

[![MihaiCraciun88](https://avatars.githubusercontent.com/u/31093928?v=4)](https://github.com/MihaiCraciun88 "MihaiCraciun88 (26 commits)")[![OblioSoftware](https://avatars.githubusercontent.com/u/73876738?v=4)](https://github.com/OblioSoftware "OblioSoftware (12 commits)")

---

Tags

apifacturareoblio

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/obliosoftware-oblio-api/health.svg)

```
[![Health](https://phpackages.com/badges/obliosoftware-oblio-api/health.svg)](https://phpackages.com/packages/obliosoftware-oblio-api)
```

###  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)
