### Get CEIDG Activity Report (XML)
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Retrieves detailed business activity information for natural persons registered in CEIDG using the BIR12OsFizycznaDzialalnoscCeidg report. Requires a REGON number and provides data on business name, addresses, and registration details.
```xml
123456789
BIR12OsFizycznaDzialalnoscCeidg
123456789
JAN KOWALSKI FIRMA USLUGOWA
JK FIRMA
2010-05-15
2010-06-01
2010-05-20
2023-02-15
PL
14
65
018
00-001
Warszawa
ul. Marszalkowska
100
5
kontakt@firma.pl
www.firma.pl
2010-05-15
123456
094100000
MINISTER GOSPODARKI
151
CENTRALNA EWIDENCJA I INFORMACJA O DZIALALNOSCI GOSPODARCZEJ
false
```
--------------------------------
### Get Civil Partnership Partners Report (XML)
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Requests and displays information about partners of a civil law partnership. It includes the request format and example response structures for both successful data retrieval and error scenarios (entity not a civil partnership, or no partners found).
```xml
012345678
BIR12OsPrawnaSpCywilnaWspolnicy
111111111
JAN
ADAM
KOWALSKI
222222222
ANNA
NOWAK
333333333
SPÓLKA XYZ SP. Z O.O.
21
999999999
Podmiot nie jest spolka cywilna
The entity is not a civil law partnership
22
002003735
W rejestrze REGON brak jest wprowadzonych wspolnikow dla tej SC
In the REGON register there are no entered partners on this SC
```
--------------------------------
### POST /wsBIR/UslugaBIRzewnPubl.svc - Get Full Report
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Retrieves detailed information about an entity using its REGON number and a specific report type. Different report types are available for legal persons (P), natural persons (F), and local units (LP, LF).
```APIDOC
## POST /wsBIR/UslugaBIRzewnPubl.svc - Get Full Report
### Description
Retrieves detailed information about an entity using its REGON number and a specific report type. Different report types are available for legal persons (P), natural persons (F), and local units (LP, LF).
### Method
POST
### Endpoint
https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc
### Headers
- **Content-Type** (string) - Required - `application/soap+xml; charset=utf-8`
- **sid** (string) - Required - Session ID obtained from authentication.
### Request Body
- **pRegon** (string) - Required - The REGON number of the entity.
- **pNazwaRaportu** (string) - Required - The name of the report to retrieve. Examples include `BIR12OsPrawna` (Legal person full data), `BIR12OsFizycznaDaneOgolne` (Natural person general data), `BIR12JednLokalnaOsPrawnej` (Local unit details - legal person).
### Request Example
```xml
https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc
http://CIS/BIR/PUBL/2014/07/IUslugaBIRzewnPubl/DanePobierzPelnyRaport
012100010
BIR12OsPrawna
```
### Response
#### Success Response (200)
- **DanePobierzPelnyRaportResult** (string) - Contains the report data in XML format, wrapped in CDATA.
#### Response Example
```xml
012100010
5261040828
GLOWNY URZAD STATYSTYCZNY
GUS
1975-12-16
PL
14
65
018
00-925
Warszawa
ul. Test-Krucza
208
226083000
dane@stat.gov.pl
www.stat.gov.pl
2
01
111
16
]]>
```
```
--------------------------------
### Get Natural Person General Data (XML)
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Requests general information about a natural person (sole proprietor) using the BIR12OsFizycznaDaneOgolne report. Requires a REGON number as input and returns various personal and registration details.
```xml
123456789
BIR12OsFizycznaDaneOgolne
123456789
9876543210
KOWALSKI
JAN
ADAM
2010-05-15
2023-01-10
9
99
2
214
OSOBA FIZYCZNA
OSOBY FIZYCZNE PROWADZACE DZIALALNOSC
POZOSTALE
WLASNOSC PRYWATNA KRAJOWA
1
0
0
0
2
```
--------------------------------
### SOAP Request to Get Full Entity Report (XML)
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
This snippet demonstrates the SOAP request structure to retrieve a full report for a legal entity using its REGON number. It requires a valid session ID and specifies the target action and report type. The response contains the entity's detailed information within a CDATA section.
```xml
POST https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
sid: abcd1234567890sessionid
https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc
http://CIS/BIR/PUBL/2014/07/IUslugaBIRzewnPubl/DanePobierzPelnyRaport
012100010
BIR12OsPrawna
012100010
5261040828
GLOWNY URZAD STATYSTYCZNY
GUS
1975-12-16
1975-12-16
1999-09-01
PL
14
65
018
00-925
Warszawa
ul. Test-Krucza
208
226083000
dane@stat.gov.pl
www.stat.gov.pl
2
01
111
16
]]>
```
--------------------------------
### Get Entity Type Identifier (XML)
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Retrieves the entity type code for a given REGON number. This code is crucial for determining the appropriate report types to use for fetching detailed information about the entity. The response structure and possible entity type values are provided.
```xml
012100010
BIR12TypPodmiotu
P
```
--------------------------------
### Authentication Login (Zaloguj)
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Authenticates the client with the GUS REGON BIR service and obtains a session ID (SID). This SID is mandatory for all subsequent API calls.
```APIDOC
## POST /wsBIR/UslugaBIRzewnPubl.svc - Zaloguj
### Description
Authenticates the client and obtains a session ID (SID) required for all subsequent API calls. The session must be established before making any data queries to the REGON service.
### Method
POST
### Endpoint
https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc
### Parameters
#### Request Body
- **pKluczUzytkownika** (string) - Required - Your API key for authentication.
### Request Example
```xml
https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc
http://CIS/BIR/PUBL/2014/07/IUslugaBIRzewnPubl/Zaloguj
your-api-key-here
```
### Response
#### Success Response (200)
- **ZalogujResult** (string) - The obtained session ID (SID).
#### Response Example
```xml
abcd1234567890sessionid
```
```
--------------------------------
### Search GUS REGON BIR API Entities (SOAP)
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Searches for Polish business entities using identifiers like REGON, NIP, or KRS. Requires an active session ID obtained from the 'Zaloguj' method. Returns basic entity information for up to 100 matching records.
```xml
POST https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
sid: abcd1234567890sessionid
https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc
http://CIS/BIR/PUBL/2014/07/IUslugaBIRzewnPubl/DaneSzukajPodmioty
5261040828
012100010
012100010,000331501,001130884
0000028860
012100010
5261040828
GLOWNY URZAD STATYSTYCZNY
MAZOWIECKIE
m. st. Warszawa
Srodmiescie
Warszawa
00-925
ul. Test-Krucza
208
P
6
Warszawa
]]>
```
--------------------------------
### Authenticate with GUS REGON BIR API (SOAP)
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Authenticates with the GUS REGON BIR API to obtain a session ID (SID). This is a prerequisite for all subsequent API calls. The request includes the API key, and the response contains the session ID.
```xml
POST https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc
http://CIS/BIR/PUBL/2014/07/IUslugaBIRzewnPubl/Zaloguj
your-api-key-here
abcd1234567890sessionid
```
--------------------------------
### Search Entities (DaneSzukajPodmioty)
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Searches for business entities using various identifiers such as REGON, NIP, or KRS. Returns basic information for matching records.
```APIDOC
## POST /wsBIR/UslugaBIRzewnPubl.svc - DaneSzukajPodmioty
### Description
Searches for business entities using various identifiers including REGON (9 or 14 digit), NIP (tax ID), KRS (court registry number), or by name/address combinations. Returns basic entity information for up to 100 matching records.
### Method
POST
### Endpoint
https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc
### Headers
- **sid**: (string) - Required - The session ID obtained from the `Zaloguj` endpoint.
### Parameters
#### Request Body
- **pParametryWyszukiwania** (object) - Required - Object containing search criteria.
- **Nip** (string) - Optional - Polish Tax Identification Number (NIP).
- **Regon** (string) - Optional - REGON number (9 or 14 digits).
- **Regony9zn** (string) - Optional - Comma-separated list of 9-digit REGON numbers (max 100).
- **Krs** (string) - Optional - Polish National Court Register number (KRS).
### Request Example
```xml
https://wyszukiwarkaregon.stat.gov.pl/wsBIR/UslugaBIRzewnPubl.svc
http://CIS/BIR/PUBL/2014/07/IUslugaBIRzewnPubl/DaneSzukajPodmioty
5261040828
012100010
012100010,000331501,001130884
0000028860
```
### Response
#### Success Response (200)
- **DaneSzukajPodmiotyResult** (string) - XML string containing the search results. The structure includes a `root` element with `dane` elements for each matching entity.
#### Response Example
```xml
012100010
5261040828
GLOWNY URZAD STATYSTYCZNY
MAZOWIECKIE
m. st. Warszawa
Srodmiescie
Warszawa
00-925
ul. Test-Krucza
208
P
6
Warszawa
]]>
```
```
--------------------------------
### Error Handling
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
Details on how the API returns error codes and common error scenarios.
```APIDOC
## Error Handling
### Description
The API returns error codes embedded in the response XML when operations fail. Common error codes include search failures, invalid parameters, and data availability issues.
### Common Error Codes
- **4** - No data found for search criteria
- **5** - Invalid or empty report name / invalid identifier
- **7** - Invalid session (re-authenticate required)
- **11** - PKD data not available for entities deleted before 2014-11-08
- **21** - Entity is not a civil law partnership
- **22** - No partners found for civil partnership
### Error Response Example (Error Code 4)
```xml
4
Nie znaleziono wpisu dla podanych kryteriow wyszukiwania.
No data found for the specified search criteria.
999999999
BIR12OsFizycznaDaneOgolne
]]>
```
```
--------------------------------
### Handle API Error Codes in XML Responses
Source: https://context7.com/karszo-pp/gus-regon-uslugabir/llms.txt
This snippet demonstrates how to interpret common error codes returned by the API within the response XML. It covers errors related to search failures, invalid parameters, and data availability issues, providing specific error codes and their meanings.
```xml
4
Nie znaleziono wpisu dla podanych kryteriow wyszukiwania.
No data found for the specified search criteria.
999999999
BIR12OsFizycznaDaneOgolne
]]>
5
Nieprawidlowa lub pusta nazwa raportu lub nieprawidlowy identyfikator.
Invalid or empty report name or invalid identifier.
99999999900099
BIR1.2JednLokalnaOsFizycznej
11
Dla podmiotow skreshlonych przed 2014-11-08 dzialalnosci PKD nie sa udostepniane.
For entities deleted before 2014-11-08, the PKDs are not made available.
021625560
F
BIR12OsFizycznaPkd
```