PHPackages                             bigbank/omniva - 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. bigbank/omniva

ActiveLibrary[API Development](/categories/api)

bigbank/omniva
==============

Library to interface with Omniva web API-s

0.2.0(8y ago)42.9k1Apache-2.0PHPPHP &gt;=5.6

Since Jan 27Pushed 8y ago4 watchersCompare

[ Source](https://github.com/bigbank-as/omniva)[ Packagist](https://packagist.org/packages/bigbank/omniva)[ Docs](https://github.com/bigbank-as/omniva)[ RSS](/packages/bigbank-omniva/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (5)Versions (4)Used By (0)

PHP Library for Omniva API-s
============================

[](#php-library-for-omniva-api-s)

[![Latest Stable Version on Packagist](https://camo.githubusercontent.com/84ffd79f8c208677ea0c7dcfcf3714cf77df93682b5d56ee55933111b58dbaf3/68747470733a2f2f706f7365722e707567782e6f72672f62696762616e6b2f6f6d6e6976612f762f737461626c65)](https://packagist.org/packages/bigbank/omniva)[![Software License](https://camo.githubusercontent.com/d45e5e93f4dbbfdea513f851bb671a65084173bef782ffd95a6c436bc3a8ea52/68747470733a2f2f706f7365722e707567782e6f72672f62696762616e6b2f6f6d6e6976612f6c6963656e7365)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/1da65c915b1ff51b75d495278b26226abdd04739f9b581b3b684593a57359d1c/68747470733a2f2f6170692e7472617669732d63692e6f72672f62696762616e6b2d61732f6f6d6e6976612e737667)](https://travis-ci.org/bigbank-as/omniva)[![Total Downloads](https://camo.githubusercontent.com/fb765f465dbd0d7e9381a7ae26ef9f9397439005ceb43fdf4e5546720b6241e9/68747470733a2f2f706f7365722e707567782e6f72672f62696762616e6b2f6f6d6e6976612f646f776e6c6f616473)](https://packagist.org/packages/bigbank/omniva)

A PHP library for interfacing with [Omniva](https://www.omniva.ee) (former Estonian Postal Service) web API-s without dealing with SOAP (too much).

Install
-------

[](#install)

Via Composer

```
$ composer require bigbank/omniva
```

The library requires PHP `>=5.6`, `curl`, `soap` and `openssl` extensions.

Usage
-----

[](#usage)

```
// Instantiate the main class
$omniva = new Omniva;

// Ask for a service (see: Services)
$addressSearchService = $omniva->getService(AddressSearchInterface::class)
    ->setApiKey(getenv('OMNIVA_PASSWORD'));

// Get a list of all matching addresses for a partial input
$addresses = $addressSearchService->findAddresses('Tartu mnt 18');

print_r($addresses);
```

Example implementation in [examples/search-address.php](examples/search-address.php) can be run with

```
$ OMNIVA_PASSWORD="" php examples/search-address.php
```

To use a HTTP proxy, set `HTTP_PROXY` environment variable.

Services
--------

[](#services)

The library provides access to the following services:

### Address Search

[](#address-search)

Get a list of physical addresses based on a partial input. Useful for applications like address auto-complete.

- Interface name: `AddressSearchInterface`
- Omniva service name: `ANDMETEENUSED AADRESSKOMPONENTIDE PÄRIMISE TEENUS 2 SISEND 5_1 (VERS.1)`
- WSDL: [https://otseturundus.post.ee/aadressid/ws/singleAddress2\_5\_1.wsdl](https://otseturundus.post.ee/aadressid/ws/singleAddress2_5_1.wsdl)

#### Usage

[](#usage-1)

```
$addressSearchService = $omniva->getService(AddressSearchInterface::class)
    ->setApiKey(getenv('OMNIVA_PASSWORD'))
    ->findAddresses('Tartu mnt 18');
```

You can change the URL of the Omniva API endpoint by manually instantiating `AddressSearch`:

```
$addressSearchService = new AddressSearch(
    new SingleAddress2_5_1PortTypeService($soapOptions, $wsdlUrl),
    new SingleAddress2_5_1Request
);
```

#### Sample Output

[](#sample-output)

```
Array
(
    [0] => Array
        (
            [address] => Eesti Vabariik, Tartu maakond, Elva linn, Tartu maantee 18
            [addressNumber] => 18
            [county] => Tartu maakond
            [countyId] => 0078
            [designation] =>
            [flatNumber] =>
            [latitude] => 641443.84
            [level] => A7
            [longitude] => 6457217.29
            [mailboxType] =>
            [mainAddress] =>
            [municipality] => Elva linn
            [municipalityId] => 0170
            [municipalityType] => linn
            [nationalAddressId] => 7817000000000002H000019HC00000000
            [omnivaAddressId] => 3702034
            [postalIndex] => 61505
            [postOfficeBoxNumber] =>
            [settlement] =>
            [settlementId] => 0000
            [settlementType] =>
            [status] => Kontrollitud, kehtiv
            [territorialAddress] =>
            [territorialAddressType] =>
            [trafficSurface] => Tartu maantee
            [trafficSurfaceType] => tee
        )
)

```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Development
-----------

[](#development)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Definitions

[](#definitions)

Definitions for terms used by Omniva API-s (in Estonian):

- **EHAK** - Eesti haldus- ja asustusjaotuse klassifikaator
- **ADS** - Aadressiandmete süsteem
- **Põhiaadress** - See on vajalik juhul kui objektil on küll mitu aadressi kuid aktiivselt kasutatakse ühte nendest ja teine on varuks. Näiteks kui on tegu tänava nurgal oleva majaga, millel on kaks aadressi. Hoone peasissekäik on ühelt tänavalt ja see aadress oleks sel juhul põhiaadress.

### Related Materials

[](#related-materials)

These materials (in Estonian) help to understand the address domain.

- [Kohanimed Aadressiandmete Süsteemis, Maa-Amet 2008](http://geoportaal.maaamet.ee/docs/aadress/Koh_pv.ppt)
- [L-EST97 Eesti Geodeetiline süsteem](https://www.ria.ee/public/Avaliku_teabe_s._seminar_23.1.2008/Kokkuv_te_Geodeetiline_s_steem.pdf)
- [ADS kontseptsioon](https://www.maaamet.ee/docs/ADS/ADSkontsep2007.doc)

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Bigbank's developers](https://github.com/orgs/bigbank-as/people)
- [All Contributors](../../contributors)

License
-------

[](#license)

The Apache 2.0 License (Apache-2.0). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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 ~487 days

Total

2

Last Release

3268d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bf4faf3916fe670192ed4355e97b6704d0dbb58dfb483a5e284131296a64ca0?d=identicon)[anroots](/maintainers/anroots)

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

---

Top Contributors

[![mihkel-vunk-bb](https://avatars.githubusercontent.com/u/13520324?v=4)](https://github.com/mihkel-vunk-bb "mihkel-vunk-bb (7 commits)")[![mihkelvunk](https://avatars.githubusercontent.com/u/4209675?v=4)](https://github.com/mihkelvunk "mihkelvunk (2 commits)")[![karmenk-zz](https://avatars.githubusercontent.com/u/12150757?v=4)](https://github.com/karmenk-zz "karmenk-zz (1 commits)")

---

Tags

bigbankomnivaeesti post

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bigbank-omniva/health.svg)

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

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)

PHPackages © 2026

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