PHPackages                             webleit/revisoapi - 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. webleit/revisoapi

ActiveLibrary[API Development](/categories/api)

webleit/revisoapi
=================

Reviso Api - PHP SDK

2.0.0(4y ago)5833[2 issues](https://github.com/Weble/RevisoApi/issues)[2 PRs](https://github.com/Weble/RevisoApi/pulls)MITPHPPHP ^8.0

Since Oct 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Weble/RevisoApi)[ Packagist](https://packagist.org/packages/webleit/revisoapi)[ RSS](/packages/webleit-revisoapi/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (15)Versions (13)Used By (0)

Reviso REST Api - PHP SDK
=========================

[](#reviso-rest-api---php-sdk)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0c94caf79ae6639878a5c28644d02920e53137755a2b2fffab6ecd019901a816/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7765626c6569742f72657669736f6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webleit/revisoapi)[![GitHub Tests Action Status](https://camo.githubusercontent.com/dff24a72b33ec73ff92efe698e6b87526be7854e012734ac4dda24bc158b943b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f5765626c652f52657669736f4170692f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/webleit/revisoapi/actions?query=workflow%3Arun-tests+branch%3Amaster)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/bb5756ea9c7d5852c2a5a09e0604e25fe386e84a002f661374c1148af4dd9315/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f5765626c652f52657669736f4170692f7068702d63732d66697865723f6c6162656c3d636f64652532307374796c65)](https://github.com/weble/revisoapi/actions?query=workflow%3A%22php-cs-fixer%22+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/e1327878140e8e369ab4c7287562d8476a8fe9f562eb0f7ec2ca6a9399cc4b41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7765626c6569742f72657669736f6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/webleit/revisoapi)

---

This Library is a SDK in PHP that simplifies the usage of the Reviso REST API ()

It provides both an interface to ease the interaction with the APIs without bothering with the actual REST request, while packaging the various responses using very simple Model classes that can be then uses with any other library or framework.

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

[](#installation)

```
composer require webleit/revisoapi

```

### HTTP Clients

[](#http-clients)

In order to talk to Reviso APIs, you need an HTTP Client library. Since v2 of this package, the HTTP Client is not included, allowing you to choose the one you like the best, and avoiding any potential dependency conflict.

You can use any library to send HTTP messages that implements [php-http/client-implementation](https://packagist.org/providers/php-http/client-implementation).

Here is a list of all officially supported clients and adapters:

You can read more on the [HTTPlug docs](http://docs.php-http.org/en/latest/httplug/users.html).

Usage
-----

[](#usage)

In order to use the library, just require the composer autoload file, and then fire up the library itself.

```
require './vendor/autoload.php';
$reviso = new \Webleit\RevisoApi\Reviso($appSecretToken, $agreementGrantToken);
```

This way, the library will try to find any HTTP Client implementation that you may already have. If you want, you can pass a specific Http Client instance to the library like this:

```
require './vendor/autoload.php';
$reviso = new \Webleit\RevisoApi\Reviso($appSecretToken, $agreementGrantToken, $yourHttpClient);
```

If you want to use the demo account, just don't specify the auth parameters, and you'll be able to use any GET request.

```
$reviso = new \Webleit\RevisoApi\Reviso();
```

API calls
---------

[](#api-calls)

To call any Api, just use the same name reported in the api docs. You can get the list of supported apis using the getEndpoints() method

```
$reviso->getEndpoints();
```

You can, for example, get the list of customers by using:

```
$customers = $reviso->customers->get();
```

or the list of customer groups

```
$groups = $reviso->customerGroups->get();
```

### List calls

[](#list-calls)

To get a list of resources from a module, use the get() method

```
$customers = $reviso->customers->get();
```

In order to navigate the pages, just use the "page" and "perPage" methods

```
$customers = $reviso->customers->page(1)->perPage(100)->get();
```

### Filters

[](#filters)

To filter a list of resources from a module, use the `where()` method before calling `get()`

```
$customers = $reviso->customers->where('corporateIdentificationNumber', '=', '123456789')->get();
```

In order to navigate the pages, just use the "page" and "perPage" methods

```
$customers = $reviso->customers->page(1)->perPage(100)->get();
```

Return Types
------------

[](#return-types)

Any "list" api call returns a Collection object, which contains information on the list itself, allows for further pagination, and stores the list of items in a Laravel Collection package (`Illuminate\Support\Collection`). You can therefore use the result as Collection, which allows mapping, reducing, serializing, etc

```
$customers = $reviso->customers->get();

$data = $customers->toArray();
$json = $customers->toJson();

// After fetch filtering in php
$filtered = $customers->where('accountNumber', '>', 200);

// Grouping
$filtered = $customers->groupBy('country');
```

Any "resource" api call returns a Model object of a class dedicated to the single resource you're fetching. For example, calling

```
$customer = $reviso->customers->get($accuntNumber);
$data = $customer->toArray();
$name = $customer->name;
```

will return a `\Weble\RevisoApi\Model` object, which is Arrayable and Jsonable, and that can be therefore used in many ways.

CRUD
----

[](#crud)

You can create / Read / Update / Delete a resource from the Endpoint class or on the model itself.

### Create

[](#create)

```
$data = [
    /** Data of the customer */
];
$customer = $reviso->customers->create($data);
```

### Read

[](#read)

```
$customer = $reviso->customers->find($accountNumber);
```

### Update

[](#update)

```
$data = [
    /** Data of the customer */
];
$customer = $reviso->customers->find($accountNumber);
$customer->save($data);
```

### Delete

[](#delete)

```
$data = [
    /** Data of the customer */
];
$customer = $reviso->customers->find($accountNumber);
$customer->delete();
```

Test
----

[](#test)

This package contains some tests to test the basic functionalities of the package. In order to run the tests also on the "CRUD" methods, you need to create a `config.json` file in the`"tests/` directory, with the authentication details of an app you want to use as a test base. You may copy if from the `config.example.json` in the same directory.

```
composer test
```

Upgrade from V1 to V2
---------------------

[](#upgrade-from-v1-to-v2)

[See the upgrade docs](UPGRADE.md)

Contributing
------------

[](#contributing)

Finding bugs, sending pull requests or improving the docs - any contribution is welcome and highly appreciated

Versioning
----------

[](#versioning)

Semantic Versioning Specification (SemVer) is used.

Copyright and License
---------------------

[](#copyright-and-license)

Copyright Weble Srl under the MIT license.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 52.1% 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 ~149 days

Recently: every ~212 days

Total

9

Last Release

1568d ago

Major Versions

1.2.2 → 2.0.02022-01-28

PHP version history (3 changes)1.0.0PHP &gt;=7.0.0

1.2.0PHP &gt;=7.2.0

2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fe88932c3280467c9a30f79205c0f2c85aecd28dae3a9e8b035d773ef6218ef?d=identicon)[Skullbock](/maintainers/Skullbock)

---

Top Contributors

[![Skullbock](https://avatars.githubusercontent.com/u/1104083?v=4)](https://github.com/Skullbock "Skullbock (25 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (11 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")[![mdds2314](https://avatars.githubusercontent.com/u/28119071?v=4)](https://github.com/mdds2314 "mdds2314 (1 commits)")

---

Tags

apirevisocontabilità in cloudteamsystem

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/webleit-revisoapi/health.svg)

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

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)

PHPackages © 2026

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