{"id":43600092,"url":"https://github.com/sigrundev/ceidg-api","last_synced_at":"2026-02-04T05:50:08.242Z","repository":{"id":35074388,"uuid":"203665408","full_name":"sigrundev/ceidg-api","owner":"sigrundev","description":"PHP CEIDG API library","archived":false,"fork":false,"pushed_at":"2022-02-08T14:50:32.000Z","size":56,"stargazers_count":9,"open_issues_count":4,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-06T19:58:05.206Z","etag":null,"topics":["api","ceidg","php","soap"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sigrundev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-21T21:14:32.000Z","updated_at":"2025-05-20T17:44:54.000Z","dependencies_parsed_at":"2022-08-08T04:16:16.705Z","dependency_job_id":null,"html_url":"https://github.com/sigrundev/ceidg-api","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/sigrundev/ceidg-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigrundev%2Fceidg-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigrundev%2Fceidg-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigrundev%2Fceidg-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigrundev%2Fceidg-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigrundev","download_url":"https://codeload.github.com/sigrundev/ceidg-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigrundev%2Fceidg-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29071922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","ceidg","php","soap"],"created_at":"2026-02-04T05:50:07.588Z","updated_at":"2026-02-04T05:50:08.235Z","avatar_url":"https://github.com/sigrundev.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/sigrundev/ceidg-api.svg?branch=master)](https://travis-ci.org/sigrundev/ceidg-api) [![Coverage Status](https://coveralls.io/repos/github/sigrundev/ceidg-api/badge.svg?branch=master)](https://coveralls.io/github/sigrundev/ceidg-api?branch=master)\n[![StyleCI](https://github.styleci.io/repos/203665408/shield?branch=master)](https://github.styleci.io/repos/203665408)\n[![Maintainability](https://api.codeclimate.com/v1/badges/e2e75fb45810272e7bf0/maintainability)](https://codeclimate.com/github/sigrundev/ceidg-api/maintainability)\n\n# PHP CEIDG API library\nWe proudly present a PHP library to connect with CEIDG (Polish registry on businesses) API, using SOAP protocol.\n\nOur 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.\n\nPlease 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.\n\n## Usage\n\n### Installation\n\nAs simple as it can be:\n```bash\ncomposer require sigrun/ceidg-api\n```\n\n### Declaring API client\n\nTo declare API client, create new client class, with authorization token and (optionally) sandbox flag as arguments:\n\n```php\nuse CeidgApi\\CeidgApi;\n\n$authToken = 'secret';\n\n// To connect with the production environment\n$ceidgProductionApi = new CeidgApi($authToken);\n\n// To connect with the sandbox environment\n$ceidgSandboxApi = new CeidgApi($authToken, true);\n```\n\n### Declaring requested function\n\nCEIDG API provides two SOAP functions - _GetId_ and _GetMigrationData201901_. The first returns only companies' unique IDs, whereas the second one - full data on the companies.\n\n```php\n$getId = $ceidgProductionApi-\u003egetId();\n\n$getMigrationData = $ceidgProductionApi-\u003egetMigrationData();\n// or\n$getMigrationData = $ceidgProductionApi-\u003egetMigrationData201901();\n```\n\n### Setting query parameters with a simple chain of responsibility pattern\n\nWe've implemented a simple chain of responsibility pattern, enabling easy setting up querying params.\n\n```php\n\n// To get IDs of all companies modified or created on August 5th, 2019\n$result = $getId-\u003esetMigrationDateFrom('2019-08-05')-\u003esetMigrationDateTo('2019-08-05')-\u003esend();\n\n// To get IDs of all companies having postcode '02-662'\n$result = $getId-\u003esetPostcode('02-662')-\u003esend();\n```\n\n### Parsing of response\n\nYou 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```.\n\nAn example (abbreviated) of parsed response looks as following:\n\n```json\n{\n  \"IdentyfikatorWpisu\": \"ff83fff2fc2ab947f78fb6069f1767df\",\n  \"DanePodstawowe\": {\n    \"Imie\": \"Ryszard\",\n    \"Nazwisko\": \"Petru\",\n    \"NIP\": \"8991999655\",\n    \"REGON\": \"147022306\",\n    \"Firma\": \"Ryszard Petru Consulting\"\n  }\n}\n```\n### Single line of code\n\nYou can do everything mentioned above, within a single line of code:\n\n```php\n$result = (new CeidgApi($authToken))-\u003egetId()-\u003esetMigrationDateFrom('2019-08-05')-\u003esetMigrationDateTo('2019-08-05')-\u003esend();\n```\n\n### Available params\n\nAvailable 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.\n\n### Removing param from query\n\nTo 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.\n\n#### GetMigrationData\n\n|       Param       | Query functions         |     Setter method    |                 Type                 | Has validator? |\n|:-----------------:|-------------------------|:--------------------:|:------------------------------------:|----------------|\n| DateTo            | GetId, GetMigrationData | SetDateTo            | String ('Y-m-d')                     | not yet        |\n| DateFrom          | GetId, GetMigrationData | SetDateFrom          | String ('Y-m-d')                     | not yet        |\n| MigrationDateTo   | GetId, GetMigrationData | SetMigrationDateTo   | String ('Y-m-d')                     | not yet        |\n| MigrationDateFrom | GetId, GetMigrationData | SetMigrationDateFrom | String ('Y-m-d')                     | not yet        |\n| UniqueId          | GetMigrationData        | SetUniqueId          | Array of strings                     | not yet        |\n| NIP               | GetMigrationData        | SetNIP               | Array of strings                     | yes            |\n| REGON             | GetMigrationData        | SetREGON             | Array of strings                     | yes            |\n| NIP_SC            | GetMigrationData        | SetNIP_SC            | Array of strings                     | yes            |\n| REGON_SC          | GetMigrationData        | SetREGON_SC          | Array of strings                     | yes            |\n| Name              | GetMigrationData        | SetName              | Array of strings                     | no             |\n| Province          | GetMigrationData        | SetProvince          | Array of strings                     | no             |\n| County            | GetMigrationData        | SetCounty            | Array of strings                     | no             |\n| Commune           | GetMigrationData        | SetCommune           | Array of strings                     | no             |\n| City              | GetMigrationData        | SetCity              | Array of strings                     | no             |\n| Street            | GetMigrationData        | SetStreet            | Array of strings                     | no             |\n| Postcode          | GetMigrationData        | SetPostcode          | Array of strings                     | yes            |\n| PKD               | GetMigrationData        | SetPKD               | Array of strings                     | yes            |\n| Status            | GetMigrationData        | SetStatus            | Array of integers within [1,2,3,4,9] | yes            |\n\nWhen a SOAP request envelope is sent, all previously set params are cleared.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigrundev%2Fceidg-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigrundev%2Fceidg-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigrundev%2Fceidg-api/lists"}