PHPackages                             novica89/erply - 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. novica89/erply

ActiveLibrary[API Development](/categories/api)

novica89/erply
==============

Laravel 5 package for interaction with Erply service API

19.2k↓46.7%1PHP

Since Mar 29Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Novica89/erply
==============

[](#novica89erply)

Manage Erply API calls to retrieve or create / update resources from and to Erply service

Compatibility
=============

[](#compatibility)

This package has been used on a project based on Laravel 5.1. However, there should be no issue using it on newer versions of this framework. It has been tested by making couple of calls using this package on Laravel 5.3 and it does work on it as well. Happy coding!

Installation
============

[](#installation)

Run `composer require novica89/erply dev-master` in root of your application

Then, add service provider to `config/app.php`

```
'providers' => [
    Novica89\Erply\ErplyServiceProvider::class,
];
```

After adding service provider, add alias as well to `config/app.php`

```
'aliases' => [
    'ErplyClient' => Novica89\Erply\ErplyClient::class,
];
```

Publish this package config file by running `php artisan vendor:publish`

This will copy `\vendor\novica89\erply\config\erply.php` config file to `config\erply.php` with default Erply credentials set to Erply demo credentials.

You can edit this config file and your own desired Erply credentials, or edit `.env` file and add these lines to it:

- ERPLY\_USER=your\_erply\_user
- ERPLY\_PASS=your\_erply\_pass
- ERPLY\_CLIENT\_CODE=your\_erply\_client\_code

Usage
=====

[](#usage)

Making a request to Erply service
---------------------------------

[](#making-a-request-to-erply-service)

As you can see in Erply developers documentation, you can retrieve records by using `getRecordName` calls. Ex: `getCustomers` which would retrieve your Erply customers list.

You can do this call by using this package in the following way:

```
$customers = ErplyClient::getCustomers(['getBalanceInfo' => 1, 'getAddresses' => 1]);
```

OR by doing

```
$customers = ErplyClient::request('getCustomers', ['getBalanceInfo' => 1, 'getAddresses' => 1]);
```

Use whichever method you prefer. Note that, if using the first method, just use the method name on `ErplyClient` facade that corresponds to whichever call you want to make to Erply ( in this case it is `getCustomers` method ).

> [You can see all the supported calls on Erply developer documentation](http://erply.com/api/)

Getting a request status after making a request
-----------------------------------------------

[](#getting-a-request-status-after-making-a-request)

So, you've made a call to Erply but how can you know if it was successfull or not ? Fear not, this is as easy as learning maths. Just kidding...

```
// making a call to get all invoices from Erply and storing response in $invoices variable
$invoices = ErplyClient::getSalesDocuments(['getRowsForAllInvoices' => 1]);

// checking if a request that we just made to Erply to retrieve all the invoices was successfull
if($invoices->wasSuccess()) {
    // happy dance
}
```

Getting whole response object
-----------------------------

[](#getting-whole-response-object)

Now, your Erply request was a success, but how do you retrieve response data? This is how

```
// making a call to get all invoices from Erply and storing response in $invoices variable
$invoices = ErplyClient::getSalesDocuments(['getRowsForAllInvoices' => 1]);

// checking if a request that we just made to Erply to retrieve all the invoices was successfull
if($invoices->wasSuccess()) {
    // instead of happy dance, let's try to be a bit more productive this time and get the whole response object back
    $response = $invoices->response();

    // HINT: do a dd($response); here to see your response and it's structure
}
```

Getting only status object from response
----------------------------------------

[](#getting-only-status-object-from-response)

You can return only part of the response, like only a status object that holds information about your request and the response that you got back after a successfull request to Erply.

```
// making a call to get all invoices from Erply and storing response in $invoices variable
$invoices = ErplyClient::getSalesDocuments(['getRowsForAllInvoices' => 1]);

// checking if a request that we just made to Erply to retrieve all the invoices was successfull
if($invoices->wasSuccess()) {
    // instead of whole response object, let's say we are only interested in response status section of response data
    $responseStatus = $invoices->responseStatus();

    // HINT: do a dd($responseStatus); here to see your response status object only and it's data
}
```

Getting only records object from response
-----------------------------------------

[](#getting-only-records-object-from-response)

Just like returning only response status part of the Erply response after making a successfull call to Erply, you can retrieve only records returned to you by Erply service. This will return an array of record objects.

```
// making a call to get all invoices from Erply and storing response in $invoices variable
$invoices = ErplyClient::getSalesDocuments(['getRowsForAllInvoices' => 1]);

// checking if a request that we just made to Erply to retrieve all the invoices was successfull
if($invoices->wasSuccess()) {
    // instead of whole response object, let's say we are only interested in response status section of response data
    $responseRecords = $invoices->records();

    // HINT: do a dd($responseRecords); here to see your array of response records objects and their data
}
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

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

---

Top Contributors

[![Novica89](https://avatars.githubusercontent.com/u/7903326?v=4)](https://github.com/Novica89 "Novica89 (16 commits)")

### Embed Badge

![Health badge](/badges/novica89-erply/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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