PHPackages                             dominservice/ceidg-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. dominservice/ceidg-api

AbandonedArchivedLibrary[API Development](/categories/api)

dominservice/ceidg-api
======================

PHP CEIDG API library

2.0.1(4y ago)0131MITPHPPHP &gt;=7.3

Since Aug 22Pushed 4y agoCompare

[ Source](https://github.com/dominservice/ceidg-api)[ Packagist](https://packagist.org/packages/dominservice/ceidg-api)[ RSS](/packages/dominservice-ceidg-api/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (5)Versions (9)Used By (0)

[![Latest Version](https://camo.githubusercontent.com/bce68f96dd2a0c66d5cc449a0997f48ff49e3c474e60032b4398663ef2e18fee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f646f6d696e736572766963652f63656964672d6170692e7376673f7374796c653d666c61742d737175617265)](https://github.com/dominservice/ceidg-api/releases)[![Total Downloads](https://camo.githubusercontent.com/91eb3c6a3c02e54fc4fbd48900a77f88777e24bed1e0585523ad3f22915d3bdf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646f6d696e736572766963652f63656964672d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dominservice/ceidg-api)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

PHP CEIDG API library
=====================

[](#php-ceidg-api-library)

We proudly present a PHP library to connect with CEIDG (Polish registry on businesses) API, using SOAP protocol.

Our library is capable of parsing querying result into well-formatted object or array of objects, validating inputted data (such as VAT number). Build atop the SOLID, DRY, and KISS principles, it provides a comprehensive tool to communicate with CEIDG API.

Please refer to the official API documentation, available at the CEIDG system website at  (you should be logged in to view documentation files). Our library reflects their idea wholly.

Usage
-----

[](#usage)

### Installation

[](#installation)

As simple as it can be:

```
composer require dominservice/ceidg-api
```

### Declaring API client

[](#declaring-api-client)

To declare API client, create new client class, with authorization token and (optionally) sandbox flag as arguments:

```
use Dominservice\CeidgApi;

$authToken = 'secret';

// To connect with the production environment
$ceidgProductionApi = new CeidgApi($authToken);

// To connect with the sandbox environment
$ceidgSandboxApi = new CeidgApi($authToken, true);
```

### Declaring requested function

[](#declaring-requested-function)

CEIDG API provides two SOAP functions - *GetId* and *GetMigrationData201901*. The first returns only companies' unique IDs, whereas the second one - full data on the companies.

```
$getId = $ceidgProductionApi->getId();

$getMigrationData = $ceidgProductionApi->getMigrationData();
// or
$getMigrationData = $ceidgProductionApi->getMigrationData201901();
```

### Setting query parameters with a simple chain of responsibility pattern

[](#setting-query-parameters-with-a-simple-chain-of-responsibility-pattern)

We've implemented a simple chain of responsibility pattern, enabling easy setting up querying params.

```
// To get IDs of all companies modified or created on August 5th, 2019
$result = $getId->setMigrationDateFrom('2019-08-05')->setMigrationDateTo('2019-08-05')->send();

// To get IDs of all companies having postcode '02-662'
$result = $getId->setPostcode('02-662')->send();
```

### Parsing of response

[](#parsing-of-response)

You can demand on-the-fly parsing of the result. Depending on the number of retrieved entries, you will receive either a single object or an array of them. `send()` method has a `$parse` argument, default set to `true`.

An example (abbreviated) of parsed response looks as following:

```
{
  "IdentyfikatorWpisu": "ff83fff2fc2ab947f78fb6069f1767df",
  "DanePodstawowe": {
    "Imie": "Ryszard",
    "Nazwisko": "Petru",
    "NIP": "8991999655",
    "REGON": "147022306",
    "Firma": "Ryszard Petru Consulting"
  }
}
```

### Single line of code

[](#single-line-of-code)

You can do everything mentioned above, within a single line of code:

```
$result = (new CeidgApi($authToken))->getId()->setMigrationDateFrom('2019-08-05')->setMigrationDateTo('2019-08-05')->send();
```

### Available params

[](#available-params)

Available query params are compliant with those described in the official API documentation. A 'UniqueId' param can be set using the 'setUniqueId' method, a 'NIP' param - using the 'setNIP' method, etc.

### Removing param from query

[](#removing-param-from-query)

To remove a param from query params array, you can call a method with 'null' as its only argument, like 'SetUniqueId(null)'. There's no difference between method names starting with a capital letter or not.

#### GetMigrationData

[](#getmigrationdata)

ParamQuery functionsSetter methodTypeHas validator?DateToGetId, GetMigrationDataSetDateToString ('Y-m-d')not yetDateFromGetId, GetMigrationDataSetDateFromString ('Y-m-d')not yetMigrationDateToGetId, GetMigrationDataSetMigrationDateToString ('Y-m-d')not yetMigrationDateFromGetId, GetMigrationDataSetMigrationDateFromString ('Y-m-d')not yetUniqueIdGetMigrationDataSetUniqueIdArray of stringsnot yetNIPGetMigrationDataSetNIPArray of stringsyesREGONGetMigrationDataSetREGONArray of stringsyesNIP\_SCGetMigrationDataSetNIP\_SCArray of stringsyesREGON\_SCGetMigrationDataSetREGON\_SCArray of stringsyesNameGetMigrationDataSetNameArray of stringsnoProvinceGetMigrationDataSetProvinceArray of stringsnoCountyGetMigrationDataSetCountyArray of stringsnoCommuneGetMigrationDataSetCommuneArray of stringsnoCityGetMigrationDataSetCityArray of stringsnoStreetGetMigrationDataSetStreetArray of stringsnoPostcodeGetMigrationDataSetPostcodeArray of stringsyesPKDGetMigrationDataSetPKDArray of stringsyesStatusGetMigrationDataSetStatusArray of integers within \[1,2,3,4,9\]yesWhen a SOAP request envelope is sent, all previously set params are cleared.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% 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 ~150 days

Recently: every ~225 days

Total

7

Last Release

1550d ago

Major Versions

v1.1.0.x-dev → 2.0.02022-02-08

PHP version history (2 changes)1.0.0PHP &gt;=7.2

2.0.0PHP &gt;=7.3

### Community

Maintainers

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

---

Top Contributors

[![mognicki](https://avatars.githubusercontent.com/u/62215181?v=4)](https://github.com/mognicki "mognicki (28 commits)")[![sigrundev](https://avatars.githubusercontent.com/u/48810115?v=4)](https://github.com/sigrundev "sigrundev (7 commits)")[![tatarysh](https://avatars.githubusercontent.com/u/6283074?v=4)](https://github.com/tatarysh "tatarysh (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dominservice-ceidg-api/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

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

GitHub API v3 client

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

PHP SDK for Facebook Business

90121.9M33](/packages/facebook-php-business-sdk)[microsoft/microsoft-graph

The Microsoft Graph SDK for PHP

65723.5M95](/packages/microsoft-microsoft-graph)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)

PHPackages © 2026

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