Download the PHP package dominservice/ceidg-api without Composer

On this page you can find all versions of the php package dominservice/ceidg-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ceidg-api

Latest Version Total Downloads

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 https://datastore.ceidg.gov.pl (you should be logged in to view documentation files). Our library reflects their idea wholly.

Usage

Installation

As simple as it can be:

Declaring API client

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

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.

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.

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. method has a argument, default set to .

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

Single line of code

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

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

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

Param Query functions Setter method Type Has validator?
DateTo GetId, GetMigrationData SetDateTo String ('Y-m-d') not yet
DateFrom GetId, GetMigrationData SetDateFrom String ('Y-m-d') not yet
MigrationDateTo GetId, GetMigrationData SetMigrationDateTo String ('Y-m-d') not yet
MigrationDateFrom GetId, GetMigrationData SetMigrationDateFrom String ('Y-m-d') not yet
UniqueId GetMigrationData SetUniqueId Array of strings not yet
NIP GetMigrationData SetNIP Array of strings yes
REGON GetMigrationData SetREGON Array of strings yes
NIP_SC GetMigrationData SetNIP_SC Array of strings yes
REGON_SC GetMigrationData SetREGON_SC Array of strings yes
Name GetMigrationData SetName Array of strings no
Province GetMigrationData SetProvince Array of strings no
County GetMigrationData SetCounty Array of strings no
Commune GetMigrationData SetCommune Array of strings no
City GetMigrationData SetCity Array of strings no
Street GetMigrationData SetStreet Array of strings no
Postcode GetMigrationData SetPostcode Array of strings yes
PKD GetMigrationData SetPKD Array of strings yes
Status GetMigrationData SetStatus Array of integers within [1,2,3,4,9] yes

When a SOAP request envelope is sent, all previously set params are cleared.


All versions of ceidg-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
ext-soap Version ^7|^8
ext-simplexml Version ^7|^8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dominservice/ceidg-api contains the following files

Loading the files please wait ....