PHPackages                             develart-projects/olza-logisctic-api-client - 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. develart-projects/olza-logisctic-api-client

ActiveLibrary

develart-projects/olza-logisctic-api-client
===========================================

Client for Olza Logistic system API

1.7.0(1y ago)218.6k↓45.8%31MITPHPPHP &gt;=7.1CI passing

Since Jun 27Pushed 2mo agoCompare

[ Source](https://github.com/develart-projects/olza-logisctic-api-client)[ Packagist](https://packagist.org/packages/develart-projects/olza-logisctic-api-client)[ RSS](/packages/develart-projects-olza-logisctic-api-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (18)Used By (1)

OlzaLogistic API PHP Client
===========================

[](#olzalogistic-api-php-client)

[![Unit Tests](https://github.com/develart-projects/olza-logisctic-api-client/actions/workflows/phpunit.yml/badge.svg)](https://github.com/develart-projects/olza-logisctic-api-client/actions/workflows/phpunit.yml)

Olza Logistic PHP API client is a useful PHP helper for developers who want to integrate basic API actions into their e-shop/application. It covers most of the needed possibilities, but programmers are free to use the API directly, if they need a special functionality that is not provided by the client.

For additional information please contact your dedicated Olza Logistic manager.

Important notices
-----------------

[](#important-notices)

It's recommended to lock client minor version in composer to avoid unintended client interface changes, which can occur in between the minor versions.

```
"require" : {
      "develart-projects/olza-logisctic-api-client": "~1.5.0"
    }
```

**!! Breaking change from version 1.6.0 !!**From version 1.6.0 http client is decoupled and Guzzle is not provided by default. You have to either install it by yourself or you are free to use any PSR-18 client instead. Instantination of the client has also changed.

Features
--------

[](#features)

- client provides standard interface for preparing requests, including entities for each API call
- client automatically checks and validates returned results
- results are hydrated into prepared lists and entities for easier manipulation
- different types of exceptions are thrown/returned, based on the occurred event
- included support for Composer

Structure of client
-------------------

[](#structure-of-client)

The client is documented using DocBlock, so feel free to read the description of functions/classes provided. You can find following types of files within the client’s structure:

- **examples** - every API call has its own client usage example in this folder, please start here.
- **src/entities/helpers** - data structures to prepare request data. Fill structure using setters/methods to prepare request.
- **src/entities/request** - request helper. Feed these classes with helper objects (or use direct array feed) to get correct API request structure.
- **src/entities/response** - classes, which hold returned results. Client sorts all response types into provided classes. Whole response is accessible by ApiBatchResponse object
- **exception** - all exception types by API event. Read class description to get meaning of an exception.

Basic usage example (using Guzzle client)
-----------------------------------------

[](#basic-usage-example-using-guzzle-client)

More verbose usage examples are located in the **examples** folder. Contact your dedicated Olza Logistic manager to gain access to API and URLs.

The client has only one mandatory constructor parameter: Transport object. This object covers all needs for HTTP communication and it's part or the package. By setting up Transport object, you are telling to client how to communicate. **In this example Guzzle client has to be installed before client is used.**

Example of getting shipments statuses:

```
// Setup autoloading
include '../vendor/autoload.php';

use OlzaApiClient\Client as ApiClient;
use OlzaApiClient\Services\Transport;

use OlzaApiClient\Entities\Helpers\HeaderEntity;
use OlzaApiClient\Entities\Helpers\GetStatusesEntity;

use OlzaApiClient\Entities\Request\ApiBatchRequest;

// YOUR SPECIFIC DATA
$apiUser = 'XXX';
$apiPassword = 'XXX';
$apiUrl = 'http://XXX';
// SPECIFIC DATA END

// build header using included helper
$header = new HeaderEntity();
$header->setApiUser($apiUser)
       ->setApiPassword($apiPassword)
       ->setLanguage( HeaderEntity::LANG_CS );

// build new shipment using inluded helper
$shipments = new GetStatusesEntity();
$shipments->addShipmentId(487)
          ->addShipmentId(486);

// build API request object
$apiRequest = new ApiBatchRequest();
$apiRequest->setHeaderFromHelper($header)
           ->setPayloadFromHelper($shipments);

// prepare Transport object
$transportService = new Transport($apiUrl); // getStatuses($apiRequest);

echo '';
print_r($apiResponse);
echo '';
```

Advanced usage example (using any PSR-18 client)
------------------------------------------------

[](#advanced-usage-example-using-any-psr-18-client)

This is really handy, when Guzzle can't be used, because of version clashes, or if you preffer any other http client. Http client has to follow PSR-18 interface and you will need PSR-17 factories as well. Implementation details are your choice.

Example of setting up client using PSR-18 http client. This example is using Symfony PSR-18 http client (symfony/http-client) and Http Soft PSR-17 factories (httpsoft/http-message).

```
// Setup autoloading
include '../vendor/autoload.php';

use OlzaApiClient\Client as ApiClient;
use OlzaApiClient\Services\Transport;

// your custom PSR-17 packages
use HttpSoft\Message\RequestFactory;
use HttpSoft\Message\ResponseFactory;
use HttpSoft\Message\StreamFactory;

// prepare HTTP client
$httpClient = new \Symfony\Component\HttpClient\Psr18Client(null, new ResponseFactory, new StreamFactory);

// prepare transport object with your custom packages
$transportService = new Transport($apiUrl, $httpClient, new RequestFactory, new StreamFactory);

// now you can use the client
$apiClient = new ApiClient($transportService);
```

You can combine all 3 additional params of the Transport object as you wish.

Installing the client
---------------------

[](#installing-the-client)

The recommended way to install Olza Logistic API client is through [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest stable version of Client:

```
php composer.phar require develart-projects/olza-logisctic-api-client
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

You can then later update Client using composer:

```
composer.phar update
```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance64

Regular maintenance activity

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 73.5% 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 ~151 days

Recently: every ~84 days

Total

16

Last Release

606d ago

Major Versions

0.9.1 → 1.0.02019-01-31

PHP version history (2 changes)0.9.0PHP &gt;=5.4

1.6.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/163c5311c29d8aab1c98806231b76906ceddd56c24958870556762d0255ff105?d=identicon)[develart-projects](/maintainers/develart-projects)

---

Top Contributors

[![develart-projects](https://avatars.githubusercontent.com/u/40641524?v=4)](https://github.com/develart-projects "develart-projects (75 commits)")[![JFox-sk](https://avatars.githubusercontent.com/u/2402129?v=4)](https://github.com/JFox-sk "JFox-sk (27 commits)")

---

Tags

api clientOlzaOlzaLogisticOlza API clientDevelArt

### Embed Badge

![Health badge](/badges/develart-projects-olza-logisctic-api-client/health.svg)

```
[![Health](https://phpackages.com/badges/develart-projects-olza-logisctic-api-client/health.svg)](https://phpackages.com/packages/develart-projects-olza-logisctic-api-client)
```

###  Alternatives

[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)[smsapi/php-client

SMSAPI API PHP Client

652.1M17](/packages/smsapi-php-client)[smsapi.pl/php-client

SMSAPI API PHP Client

6581.4k1](/packages/smsapipl-php-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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