Introduction

The nip24.pl system provides selected entrepreneurs' data using, among others: network services, programming libraries and dedicated plugins for e-commerce stores. Thanks to the provided software (libraries and plug-ins), your customers will be able to fill out the form with invoice data in the fastest possible way, download company details, update address and contact details, download information about the contractor from the VIES system and check the contractor in the VAT register. .

This document describes in detail what activities must be performed to ensure proper integration with the nip24.pl system.


ATTENTION! You can check the full functionality of all shared libraries using the shared library Test API. Thanks to the test API, it is possible to check all functions (except KRS) offered in paid plans without having to create an account.


Follow the steps below to access the production API.

The first stage is to register in the system and create an account, thanks to which it will be possible to download the software and further configure it for proper communication with the REST web services provided by the nip24.pl system (more on direct connection with the REST API can be found here).

Registration

Registration is required for the entity that wants to use the functionality of the nip24.pl system. To do this, please visit the website Registration and complete the appropriate form. A necessary condition for using the nip24.pl system is acceptance of the regulations. Complete the form correctly and click the button Register causes the creation of an account in the nip24.pl system and its automatic activation.

Login

Logging in to an activated account is possible by visiting the tab Account and providing the e-mail address and password defined during registration. After correct authentication, you can manage your account. The user can generate identifiers and access keys on his account, which are used to authenticate himself to the system.

During the first login, an ID and the corresponding key are generated automatically. The identifier is public and does not require protection, while the key is private and should not be made available to third parties. Additionally, to increase security, the user can enter the IP address from which requests may come. This may be, for example, the IP address of an online store. There is no limit to the number of generated key and identifier pairs. If the user no longer wants to use a certain identifier-key pair, he or she can disable it by changing its status.

faktury ksef api vat vies

Saving the token of the National e-Invoice System (KSeF)

To save the KSeF token, go to the "Klucze API" and then check the box in the KSEF column. Then paste the one generated according to the procedure generating an access token in KSeF, token (random string) into the field Token. Field NIP should be completed only if the main account at nip24.pl is an Integrator account and individual API keys are to be assigned to individual Integrator clients. Typed in the box Token the random string of characters must be associated either with the NIP number of the main account (tab Informacje), or with the Tax Identification Number of the Integrator's client and then it must be entered in the field NIP. Currently, integration is only possible with the KSeF test environment. Of course, eventually it will be possible to configure API keys so that they work properly with the KSeF production environment.

token KSeF konfiguracja

GUI interface

An interface enabling the search for entrepreneurs' data based on the entered NIP number is available on the website Company search.

After entering the NIP, REGON or KRS number in the appropriate field, it is necessary to select the security box I'm not a robot acting as a CAPTCHA and clicking the button Search. In the NIP field you can enter the 10-digit NIP number of the company you are looking for. You can enter the REGON number in the REGON field. When searching by KRS number, enter the full KRS number. If a company is found in the website's database, its basic data is displayed:

  • Full name of the company
  • Number nip
  • Business address:
    • Street name
    • Building number and apartment number
    • Town
    • Zip code with mail
  • Phone number*
  • E-mail adress*
  • Web address*

* Data is not available for all companies

Additionally, a website has been created to enable checking the entity in VAT. After entering the NIP, REGON or KRS number, the website queries the Ministry of Finance system directly and returns information allowing to determine whether:

  • The entity with the given tax identification number NIP is not registered as a VAT payer.
  • The entity with the given tax identification number NIP is registered as an active VAT payer.
  • The entity with the given tax identification number NIP is registered as a VAT-exempt taxpayer.

Using the website, you can compare the identity of the answers provided by the Ministry of Finance Tax Portal and our API.

API

The API interface allows you to search for entrepreneurs' data based on the entered NIP, REGON, KRS or VAT EU number. API libraries are currently available for the following programming languages:

  • .NET (C#, Visual Basic)
  • C/C++
  • Java
  • JavaScript (Node.js)
  • PHP
  • Python

The API provides the following features:

  • isActive – function to check the current status of the company's operations,
  • getInvoiceData – function for downloading basic company data enabling correct invoicing,
  • getAllData – function for downloading detailed company data,
  • getVIESData – function to confirm the activity of the EU VAT number assigned by any of the European Union Member States,
  • getVATStatus – function for checking the status of an entity in the VAT register provided in Tax Portal Ministry of Finance,
  • getIBANStatus – function for checking the status of an entity's bank account in the list of VAT payers (the so-called VAT white list) using API,
  • getWhitelistStatus – function for checking the status of an entity's bank account in the list of VAT payers (the so-called VAT white list) using a flat file,
  • searchVATRegistry – function for searching and retrieving data in list of VAT taxpayers Ministry of Finance,
  • getKRSData – the function allows you to download a current extract containing full details of the entrepreneur or association provided by the National Court Register (Open KRS API). Attention! Feature available only in individual plans.
  • getKRSSection – the function allows you to download data from a specific section (1-6) from the current extract containing data of the entrepreneur or association made available via the Open API of the National Court Register (Open KRS API).
  • getAccountStatus – function for downloading current information regarding the user account.

Integration

All libraries and source codes are available for download on the website Download. Moreover, the source codes of the libraries are also available in our official repository on the portal Github.
The way the library is integrated depends on the selected programming language. For those languages that support library management based on a central repository, it is possible to use it.

// NuGet Gallery
// https://www.nuget.org/packages/NIP24.NIP24Client

PM> Install-Package NIP24.NIP24Client
// Brak wsparcia dla centralnego repozytorium
// Maven
// https://www.nip24.pl/maven/

<repository>
    <id>nip24</id>
    <url>https://www.nip24.pl/maven/releases</url>
</repository>

<dependency>
    <groupId>pl.nip24</groupId>
    <artifactId>nip24-client</artifactId>
    <version>1.4.1</version>
</dependency>
// NPM
// https://www.npmjs.com/package/nip24client

npm install nip24client
// Packagist (Composer)
// https://packagist.org/packages/nip24/client

composer require nip24/client
# Brak wsparcia dla centralnego repozytorium

pip install nip24-python-client-1.4.1.zip
' Brak wsparcia dla centralnego repozytorium

Authentication

In order to perform correct authentication, correct parameter values must be provided when constructing the client object id and key. Parameter id should contain the correct identifier of the authorization key. Parameter key should contain the correct value of the authorization key. The key identifier and the key are generated by the user after logging in to their account on the nip24.pl portal. The process of generating keys and IDs has been described in detail above.

The following example shows how to use the library functions.

using nip24Library.dll;

// Utworzenie obiektu klienta usługi serwisu produkcyjnego
// id – ciąg znaków reprezentujący identyfikator klucza API
// key – ciąg znaków reprezentujący klucz API
NIP24Client nip24 = new NIP24Client("id", "key");
#include "nip24.h"

// Utworzenie obiektu klienta usługi serwisu produkcyjnego
// id – ciąg znaków reprezentujący identyfikator klucza API
// key – ciąg znaków reprezentujący klucz API
NIP24Client* nip24 = NULL;
nip24_new_prod(&nip24, "id", "key");
import pl.nip24.client.*;

// Utworzenie obiektu klienta usługi serwisu produkcyjnego
// id – ciąg znaków reprezentujący identyfikator klucza API
// key – ciąg znaków reprezentujący klucz API
NIP24Client nip24 = new NIP24Client("id", "key");
var NIP24 = require('nip24client');

// Utworzenie obiektu klienta usługi serwisu produkcyjnego
// id – ciąg znaków reprezentujący identyfikator klucza API
// key – ciąg znaków reprezentujący klucz API
var nip24 = new NIP24.NIP24Client('id', 'key');
require_once 'NIP24/NIP24Client.php';

\NIP24\NIP24Client::registerAutoloader();

// Utworzenie obiektu klienta usługi serwisu produkcyjnego
// id – ciąg znaków reprezentujący identyfikator klucza API
// key – ciąg znaków reprezentujący klucz API
$nip24 = new \NIP24\NIP24Client('id', 'key');
from nip24 import *
from pprint import pprint

# Utworzenie obiektu klienta usługi serwisu produkcyjnego
# id – ciąg znaków reprezentujący identyfikator klucza API
# key – ciąg znaków reprezentujący klucz API
nip24 = NIP24Client('id', 'key')
' Utworzenie obiektu klienta usługi serwisu produkcyjnego
' id – ciąg znaków reprezentujący identyfikator klucza API
' key – ciąg znaków reprezentujący klucz API
Dim nip24 As New NIP24Client
nip24.URL = "https://www.nip24.pl/api"
nip24.Id = "id"
nip24.Key = "key"

Attention! During the authentication process, the current time of the client's computer is used, so in case of problems with authentication when trying to connect to the nip24.pl system, first make sure that the computer or server from which the connection is established has the current time and time zone set correctly. More information about the query authentication method used by the nip24.pl system can be found here.

Retrieving the current company status is done by calling the function isActive(), whose parameter is the NIP number you are looking for. The function returns a value true, if the company runs an active business, registered in the REGON register, which has not been suspended or terminated. Otherwise, a value is returned false.

The following example shows how to use the library functions.

// Sprawdzenie statusu firmy
bool active = nip24.IsActive(Number.NIP, "123-456-78-90");

if (active) {
	Console.WriteLine("Firma prowadzi aktywną działalność");
}
else {
	if (String.IsNullOrEmpty(nip24.LastError)) {
		Console.WriteLine("Firma zawiesiła lub zakończyła działalność");
	}
	else {
		Console.WriteLine("Błąd: " + nip24.LastError);
	}
}
// Sprawdzenie statusu firmy
BOOL active = nip24_is_active(nip24, NIP, "123-456-78-90");

if (active) {
	printf("Firma prowadzi aktywną działalność\n");
}
else {
	if (nip24_get_last_err(nip24) == NULL) {
		printf("Firma zawiesiła lub zakończyła działalność\n");
	}
	else {
		printf("Błąd: %s\n", nip24_get_last_err(nip24));
	}
}
// Sprawdzenie statusu firmy
boolean active = nip24.isActive(Number.NIP, "123-456-78-90");

if (active) {
	System.out.println("Firma prowadzi aktywną działalność");
}
else {
	if (nip24.getLastError() == null) {
		System.out.println("Firma zawiesiła lub zakończyła działalność");
	}
	else {
		System.err.println("Błąd: " + nip24.getLastError());
	}
}
// Sprawdzenie statusu firmy
nip24.isActiveExt(NIP24.Number.NIP, '123-456-78-90').then((active) => {
	console.log(active ? 'Firma prowadzi aktywną działalność' : 'Firma zawiesiła lub zakończyła działalność');
}).catch((e) => {
	console.log(e.message);
});
// Sprawdzenie statusu firmy
$active = $nip24->isActiveExt(\NIP24\Number::NIP, '123-456-78-90');

if ($active) {
	echo '<p>Firma prowadzi aktywną działalność</p>';
}
else {
	if (!$nip24->getLastError()) {
		echo ''<p>Firma zawiesiła lub zakończyła działalność</p>';
	}
	else {
		echo ''<p>Błąd: ' . $nip24->getLastError() . '</p>';
	}
}
# Sprawdzenie statusu firmy
active = nip24.isActiveExt(Number.NIP, '123-456-78-90')

if active:
	print u'Firma prowadzi aktywną działalność'
else:
    if not nip24.getLastError():
        print u'Firma zawiesiła lub zakończyła działalność'
    else:
        print u'Błąd: ' + nip24.getLastError()
' Sprawdzenie statusu firmy
Dim active As Boolean
Set active = nip24.IsActive(Number_NIP, "123-456-78-90")

If active Then
	Console.WriteLine("Firma prowadzi aktywną działalność")
Else
	If (String.IsNullOrEmpty(nip24.LastError)) Then
		Console.WriteLine("Firma zawiesiła lub zakończyła działalność")
	Else
		Console.WriteLine("Błąd: {0}", nip24.LastError)
	End If
End If

Retrieving the data necessary to issue an invoice is performed by calling the function getInvoiceData() or getInvoiceDataExt(), whose parameters are: the type of the searched number (NIP, REGON or KRS) and the value of the searched number. When calling the function, the system directly queries the reference database, which guarantees that the most up-to-date data is always downloaded.

The following example shows how to use the library functions.

// Wywołanie metody zwracającej dane do faktury
InvoiceData invoice = nip24.GetInvoiceData(Number.NIP, "123-456-78-90");

if (invoice != null) {
	Console.WriteLine("Nazwa: " + invoice.Name);
	Console.WriteLine("Imię i nazwisko: " + invoice.FirstName + " " + invoice.LastName);
	Console.WriteLine("Adres : " + invoice.PostCode + " " + invoice.PostCity + " " + invoice.Street
		+ " " + invoice.StreetNumber);
	Console.WriteLine("NIP: " + invoice.NIP);
}
else {
	Console.WriteLine("Błąd: " + nip24.LastError);
}
// Wywołanie metody zwracającej dane do faktury
InvoiceData* invoice = nip24_get_invoice_data(nip24, NIP, "123-456-78-90", TRUE);

if (invoice != NULL) {
	printf("Nazwa: %s\n", invoice->Name);
	printf("Imię i nazwisko: %s %s\n", invoice->FirstName, invoice->LastName);
	printf("Adres: %s %s %s %s\n", invoice->PostCode, invoice->PostCity, invoice->Street, invoice->StreetNumber);
	printf("NIP: %s\n", invoice->NIP);
}
else {
	printf("Błąd: %s\n", nip24_get_last_err(nip24));
}
// Wywołanie metody zwracającej dane do faktury
InvoiceData invoice = nip24.getInvoiceData(Number.NIP, "123-456-78-90");

if (invoice != null) {
	System.out.println("NIP: " + invoice.getNIP());
	System.out.println("Nazwa: " + invoice.getName());
	System.out.println("Imię i nazwisko: " + invoice.getFirstName() + " " + invoice.getLastName());
	System.out.println("Adres: " + invoice.getPostCode() + " " + invoice.getPostCity() + " "
		+ invoice.getStreet() + " " + invoice.getStreetNumber());
}
else {
	System.out.println("Błąd: " + nip24.getLastError());
}
// Wywołanie metody zwracającej dane do faktury
nip24.getInvoiceDataExt(NIP24.Number.NIP, '123-456-78-90').then((invoice) => {
	console.log(invoice.toString());
}).catch((e) => {
	console.log(e.message);
});
// Wywołanie metody zwracającej dane do faktury
$invoice = $nip24->getInvoiceDataExt(\NIP24\Number::NIP, '123-456-78-90');

if ($invoice) {
	echo '<p>NIP: ' . $invoice->nip . '</p>';
	echo '<p>Nazwa: ' . $invoice->name . '</p>';
	echo '<p>Imię i nazwisko: ' . $invoice->firstname . ' ' . $invoice->lastname . '</p>';
	echo '<p>Adres: ' . $invoice->postCode . ' ' . $invoice->postCity . ' ' . $invoice->street
		. ' ' . $invoice->streetNumber . '</p>';
}
else {
	echo '<p>Błąd: ' . $nip24->getLastError() . '</p>';
}
# Wywołanie metody zwracającej dane do faktury
invoice = nip24.getInvoiceDataExt(Number.NIP, '123-456-78-90')

if invoice:
    print u'NIP: ' + invoice.nip
    print u'Nazwa: ' + invoice.name
    print u'Imię i nazwisko: ' + invoice.firstname + ' ' + invoice.lastname
    print u'Adres: ' + invoice.postCode + ' ' + invoice.postCity + ' ' + invoice.street \
		+ ' ' + invoice.streetNumber
else:
	print u'Błąd: ' . nip24.getLastError()
' Wywołanie metody zwracającej dane do faktury
Dim invoice As InvoiceData
Set invoice = nip24.GetInvoiceData(Number_NIP, "123-456-78-90")

If invoice Is Nothing Then
	Console.WriteLine("Błąd: {0}", nip24.LastError)
Else
	Console.WriteLine(invoice.ToString())
End If

Detailed company data is retrieved by calling the function getAllData() or getAllDataExt(), whose parameters are: the type of the searched number (NIP, REGON or KRS) and the value of the searched number. Calling the function causes the system to directly query the reference database at the Central Statistical Office, which guarantees always up-to-date data.

The following example shows how to use the library functions.

// Wywołanie metody zwracającej szczegółowe dane firmy
AllData all = nip24.GetAllData(Number.NIP, "123-456-78-90");

if (all != null) {
	Console.WriteLine(all);
}
else {
	Console.WriteLine("Błąd: " + nip24.LastError);
}
// Wywołanie metody zwracającej szczegółowe dane firmy
AllData* all = nip24_get_all_data(nip24, NIP, "123-456-78-90", TRUE);

if (all != NULL) {
	printf("Nazwa: %s\n", all->Name);
	printf("Imię i nazwisko: %s %s\n", all->FirstName, all->LastName);
	printf("Adres: %s %s %s %s\n", all->PostCode, all->PostCity, all->Street, all->StreetNumber);
	printf("NIP: %s\n", all->NIP);
}
else {
	printf("Błąd: %s\n", nip24_get_last_err(nip24));
}
// Wywołanie metody zwracającej szczegółowe dane firmy
AllData all = nip24.getAllData(Number.NIP, "123-456-78-90");

if (all != null) {
	System.out.println(all);
}
else {
	System.out.println("Błąd: " + nip24.getLastError());
}
// Wywołanie metody zwracającej szczegółowe dane firmy
nip24.getAllDataExt(NIP24.Number.NIP, '123-456-78-90').then((all) => {
	console.log(all.toString());
}).catch((e) => {
	console.log(e.message);
});
// Wywołanie metody zwracającej szczegółowe dane firmy
$all = $nip24->getAllDataExt(\NIP24\Number::NIP, '123-456-78-90');

if ($all) {
	print_r($all);
}
else {
	echo '<p>Błąd: ' . $nip24->getLastError() . '</p>';
}
# Wywołanie metody zwracającej szczegółowe dane firmy
all = nip24.getAllDataExt(Number.NIP, '123-456-78-90')

if all:
	pprint(vars(all))
else:
	print u'Błąd: ' + nip24.getLastError()
' Wywołanie metody zwracającej szczegółowe dane firmy
Dim all As AllData
Set all = nip24.GetAllData(Number_NIP, "123-456-78-90")

If all Is Nothing Then
	Console.WriteLine("Błąd: {0}", nip24.LastError)
Else
	Console.WriteLine(all.ToString())
End If

The function returns the following data:

  • invoice data (Tax Identification Number, company name, company address),
  • short name of the company,
  • REGON number,
  • contact details (telephone, e-mail, website),
  • name of the voivodeship, poviat and commune of the company's headquarters,
  • TERYT codes for the voivodeship, poviat, commune, town and street name of the company's headquarters,
  • dates: entry in the register, commencement, suspension, resumption and termination of activity,
  • symbol and name of the registration authority (registryEntity),
  • symbol and name of the register or records (including CEIDG, KRS) (registry),
  • date of entry and number in the register or records (including KRS number) (record),
  • symbol and name of the basic legal form (basicLegalForm),
  • symbol and name of a specific legal form (specificLegalForm),
  • symbol and name of the ownership form (ownershipForm),
  • data of partners of civil partnerships (business partners)
  • list of PKD (Polish Classification of Activities) codes (PKDs).

Confirmation of the activity of the EU VAT number is carried out by calling the function getVIESData(), whose parameter is the EU VAT number that we want to verify. The function allows you to verify EU VAT numbers issued by all European Union member states.

Interpretation of return values:

  • uid – unique query identifier generated by nip24.pl,
  • countryCode – the country code in which the company is registered associated with the EU VAT number provided in the query,
  • vatNumber - EU VAT number of the verified company provided in the inquiry,
  • valid – response from VIES, informing about the current EU VAT status of the verified entity:
    • true – the EU VAT number provided in the query is valid,
    • false – the EU VAT number provided in the query is not valid,
  • traderName – trade name of the company,
  • traderCompanyType – always returned string '–',
  • traderAddress – company address under which the company is registered,
  • id – unique query identifier generated by the VIES system
  • date – date of query execution
  • source – data source

The following example shows how to use the library functions.

// Wywołanie metody zwracającej dane z systemu VIES
VIESData vies = nip24.GetVIESData("PL1234567890");

if (vies != null) {
	Console.WriteLine(vies);
}
else {
	Console.WriteLine("Błąd: " + nip24.LastError);
}
// Wywołanie metody zwracającej dane z systemu VIES
VIESData* vies = nip24_get_vies_data(nip24, "PL1234567890");

if (vies != NULL) {
	printf("Kraj: %s\n", vies->CountryCode);
	printf("VAT ID: %s\n", vies->VATNumber);
	printf("Aktywny: %d\n", vies->Valid);
}
else {
	printf("Błąd: %s\n", nip24_get_last_err(nip24));
}
// Wywołanie metody zwracającej dane z systemu VIES
VIESData vies = nip24.getVIESData("PL1234567890");

if (vies != null) {
	System.out.println(vies);
}
else {
	System.out.println("Błąd: " + nip24.getLastError());
}
// Wywołanie metody zwracającej dane z systemu VIES
nip24.getVIESData('PL1234567890').then((vies) => {
	console.log(vies.toString());
}).catch((e) => {
	console.log(e.message);
});
// Wywołanie metody zwracającej dane z systemu VIES
$vies = $nip24->getVIESData('PL1234567890');

if ($vies) {
	print_r($vies);
}
else {
	echo '<p>Błąd: ' . $nip24->getLastError() . '</p>';
}
# Wywołanie metody zwracającej dane z systemu VIES
vies = nip24.getVIESData('PL1234567890')

if vies:
    pprint(vars(vies))
else:
    print u'Błąd: ' + nip24.getLastError()
' Wywołanie metody zwracającej dane z systemu VIES
Dim vies As VIESData
Set vies = nip24.GetVIESData("PL1234567890")

If vies Is Nothing Then
	Console.WriteLine("Błąd: {0}", nip24.LastError)
Else
	Console.WriteLine(vies.ToString())
End If

The entity's status is checked by calling the function getVATStatus(), whose parameters are: the type of the searched number (NIP, REGON or KRS) and the value of the searched number. The data is being downloaded directly With Tax Portal Ministry of Finance. Calling the function with the NIP parameter causes the system to directly query the Tax Portal of the Ministry of Finance, which guarantees the fastest status check.

Interpretation of return values:

  • tax identification number – tax identification number of the company for which the inquiry was made,
  • REGON – company's REGON number,
  • name – company name associated with the provided Tax Identification Number,
  • status – current status of the checked entity:
    • status = 1, result = "The entity with the given tax identification number NIP is not registered as a VAT payer.",
    • status = 2, result = "The entity with the given tax identification number NIP is registered as an active VAT payer.",
    • status = 3, result = "The entity with the given tax identification number NIP is registered as a VAT-exempt taxpayer.",
  • id – response identifier (requestId) from the website of the Ministry of Finance – confirms the execution of the query,
  • date – date of query execution,
  • source – source of the answer (always: https://ppuslugi.mf.gov.pl).

The following example shows how to use the library functions.

// Sprawdzenie statusu firmy w rejestrze VAT
VATStatus vat = nip24.GetVATStatus(Number.NIP, "123-456-78-90");

if (vat != null) {
	Console.WriteLine("NIP: " + vat.NIP);
	Console.WriteLine("REGON: " + vat.REGON);
	Console.WriteLine("Nazwa firmy: " + vat.Name);
	Console.WriteLine("Status: " + vat.Status);
	Console.WriteLine("Wynik: " + vat.Result);
	Console.WriteLine("Data sprawdzenia: " + vat.Date);
	Console.WriteLine("Źródło: " + vat.Source);
}
else {
	Console.WriteLine("Błąd: " + nip24.LastError);
}
// Sprawdzenie statusu firmy w rejestrze VAT
VATStatus* vat = nip24_get_vat_status(nip24, NIP, "123-456-78-90", TRUE);

if (vat != NULL) {
	printf("NIP: %s\n", vat->NIP);
	printf("REGON: %s\n", vat->REGON);
	printf("Nazwa firmy: %s\n", vat->Name);
	printf("Status: %d\n", vat->Status);
	printf("Wynik: %s\n", vat->Result);
}
else {
	printf("Błąd: %s\n", nip24_get_last_err(nip24));
}
// Sprawdzenie statusu firmy w rejestrze VAT
VATStatus vat = nip24.getVATStatus(Number.NIP, "123-456-78-90");

if (vat != null) {
	System.out.println("NIP: " + vat.getNIP());
	System.out.println("REGON: " + vat.getREGON());
	System.out.println("Nazwa firmy: " + vat.getName());
	System.out.println("Status: " + vat.getStatus());
	System.out.println("Wynik: " + vat.getResult());
	System.out.println("Data sprawdzenia: " + vat.getDate());
	System.out.println("Źródło: " + vat.getSource());
}			
else {
	System.out.println("Błąd: " + nip24.getLastError());
}
// Sprawdzenie statusu firmy w rejestrze VAT
nip24.getVATStatusExt(NIP24.Number.NIP, '123-456-78-90').then((vat) => {
	console.log(vat.toString());
}).catch((e) => {
	console.log(e.message);
});
// Sprawdzenie statusu firmy w rejestrze VAT
$vat = $nip24->getVATStatusExt(\NIP24\Number::NIP, '123-456-78-90');

if ($vat) {
	echo '<p>NIP: ' . $vat->nip . '</p>';
	echo '<p>REGON: ' . $vat->regon . '</p>';
	echo '<p>Nazwa firmy: ' . $vat->name . '</p>';
	echo '<p>Status: ' . $vat->status . '</p>';
	echo '<p>Wynik: ' . $vat->result . '</p>';
	echo '<p>Data sprawdzenia: ' . $vat->date . '</p>';
	echo '<p>Źródło: ' . $vat->source . '</p>';
}
else {
	echo '<p>Błąd: ' . $nip24->getLastError() . '</p>';
}
# Sprawdzenie statusu firmy w rejestrze VAT
vat = nip24.getVATStatusExt(Number.NIP, '123-456-78-90')

if vat:
    print u'NIP: ' + vat.nip
    print u'REGON: ' + vat.regon
    print u'Nazwa firmy: ' + vat.name
    print u'Status: ' + vat.status
    print u'Wynik: ' + vat.result
    print u'Data sprawdzenia: ' + vat.date
    print u'Źródło: ' + vat.source
else:
    print u'Błąd: ' . nip24.getLastError()
' Sprawdzenie statusu firmy w rejestrze VAT
Dim vat As VATStatus
Set vat = nip24.GetVATStatus(Number_NIP, "123-456-78-90")

If vat Is Nothing Then
	Console.WriteLine("Błąd: {0}", nip24.LastError)
Else
	Console.WriteLine(vat.Result)
End If

The status of the entity's bank account is checked by calling the function getIBANStatus(), whose parameters are: the type of the number being searched for (NIP, REGON or KRS), the value of the number being searched, the bank account number to be checked and the date to be checked. The data is being downloaded directly With list of VAT payers (so-called white list of VAT taxpayers) of the Ministry of Finance. Calling the function with the NIP or REGON parameter causes the system to directly query the list of VAT taxpayers, which guarantees the fastest status check.

Interpretation of return values:

  • tax identification number – tax identification number of the company for which the inquiry was made,
  • REGON – company's REGON number,
  • iban - IBAN number of the checked bank account,
  • valid – response from the website of the Ministry of Finance, current status of the verified entity:
    • true – the NIP/REGON provided in the query matches the specified bank account,
    • false – the NIP/REGON provided in the query does not match the specified bank account,
  • id – response identifier (requestId) from the website of the Ministry of Finance – confirms the execution of the query,
  • date – date of checking the connection between the NIP/REGON number and the entity's bank account number,
  • source – The source of the response (MF API URL).

The following example shows how to use the library functions.

// Wywołanie metody zwracającej informacje o rachunku bankowym
IBANStatus iban = nip24.GetIBANStatus(Number.NIP, "123-456-78-90", "12 1234 1234 1234 1234 1234 1234",
	new DateTime(2019, 9, 1));

if (iban != null) {
	Console.WriteLine("NIP kontrahenta: " + iban.NIP);
	Console.WriteLine("Numer rachunku bankowego: " + iban.IBAN);
	Console.WriteLine("Status konta bankowego: " + iban.Valid);
	Console.WriteLine("Identyfikator MF (requestId): " + iban.ID);
	Console.WriteLine("Data sprawdzenia: " + iban.Date);
	Console.WriteLine("Źródło: " + iban.Source);
}
else {
	Console.WriteLine("Błąd: " + nip24.LastError);
}
// Wywołanie metody zwracającej informacje o rachunku bankowym
IBANStatus* iban = nip24_get_iban_status(nip24, NIP, "123-456-78-90", "12 1234 1234 1234 1234 1234 1234",
	time(NULL));

if (iban != NULL) {
	printf("NIP: %s\n", iban->NIP);
	printf("IBAN: %s\n", iban->IBAN);
	printf("Aktywny: %d\n", iban->Valid);
}
else {
	printf("Błąd: %s\n", nip24_get_last_err(nip24));
}
// Wywołanie metody zwracającej informacje o rachunku bankowym
IBANStatus iban = nip24.getIBANStatus(Number.NIP, "123-456-78-90", "12 1234 1234 1234 1234 1234 1234",
	new Date(2019, 9, 1));

if (iban != null) {
	System.out.println("NIP kontrahenta: " + iban.getNIP());
	System.out.println("Numer rachunku bankowego: " + iban.getIBAN());
	System.out.println("Status konta bankowego: " + iban.isValid());
	System.out.println("Identyfikator MF (requestId): " + iban.getID());
	System.out.println("Data sprawdzenia: " + iban.getDate());
	System.out.println("Źródło: " + iban.getSource());
}			
else {
	System.out.println("Błąd: " + nip24.getLastError());
}
// Wywołanie metody zwracającej informacje o rachunku bankowym
nip24.getIBANStatusExt(NIP24.Number.NIP, '123-456-78-90', '12 1234 1234 1234 1234 1234 1234',
	'2019-09-01').then((iban) => {
	
	console.log(iban.toString());
}).catch((e) => {
	console.log(e.message);
});
// Wywołanie metody zwracającej informacje o rachunku bankowym
$iban = $nip24->getIBANStatusExt(\NIP24\Number::NIP, '123-456-78-90', '12 1234 1234 1234 1234 1234 1234',
	'2019-09-01');

if ($iban) {
	echo '<p>IBAN: ' . print_r($iban, true) . '</p>';
}
else {
	echo '<p>Błąd: ' . $nip24->getLastError() . '</p>';
}
# Wywołanie metody zwracającej informacje o rachunku bankowym
iban = nip24.getIBANStatusExt(Number.NIP, '123-456-78-90', '12 1234 1234 1234 1234 1234 1234', '2019-09-01')

if iban:
    pprint(vars(iban))
else:
    print u'Błąd: ' + nip24.getLastError()
' Wywołanie metody zwracającej informacje o rachunku bankowym
Dim iban As IBANStatus
Set iban = nip24.GetIBANStatus(Number_NIP, "123-456-78-90", "12 1234 1234 1234 1234 1234 1234", "2019-09-01")

If iban Is Nothing Then
	Console.WriteLine("Błąd: {0}", nip24.LastError)
Else
	Console.WriteLine(iban.Valid)
End If

Unlike functions getIBANStatus(), which checks the status of the contractor's bank account using the API, function getWhitelistStatus() checks the correctness of the contractor's bank account number in the list of VAT payers (the so-called white list of VAT payers) using flat file published by the Ministry of Finance. Attention! The function has no call limits.

Interpretation of return values:

  • uid – query ID from the nip24.pl system,
  • tax identification number – tax identification number of the company for which the inquiry was made,
  • iban – standardized (without spaces) IBAN number of the contractor's bank account that was provided in the inquiry,
  • valid – information returned whether the bank account is included in the VAT list and is assigned to a given contractor:
    • true – the NIP provided in the query matches the specified bank account,
    • false – the NIP provided in the query does not match the specified bank account,
  • virtual – information about the type of bank account. Two possible values: virtual (true) or standard (false),
  • status – numerical VAT status of the taxpayer:
    • status = 1, the taxpayer is not on the VAT list (white list),
    • status = 2, the taxpayer is an active VAT payer,
    • status = 3, the taxpayer is exempt from VAT,
  • result – descriptive VAT status of the taxpayer:
    • The entity with the provided tax identification number NIP is not registered as a VAT payer or the provided bank account is not included in the VAT list (the so-called white list),
    • The entity with the given tax identification number NIP is registered as an active VAT payer,
    • The entity with the given tax identification number NIP is registered as a VAT-exempt taxpayer,
  • hashIndex – index (sequential number) of the found hash in the flat file,
  • maskIndex – index (sequential number) of the mask found in the flat file (only for virtual numbers),
  • date – date of checking the connection between the NIP number and the contractor's bank account number (in the format: yyyy-mm-dd), contractors can be verified for a maximum of 90 days back,
  • source – information about the URL address of the flat file used for verification.

The following example shows how to use the library functions.

// Wywołanie metody sprawdzającej status podmiotu na białej liście podatników VAT
WLStatus whitelist = nip24.GetWhitelistStatus(Number.NIP, "123-456-78-90", "12 1234 1234 1234 1234 1234 1234",
	new DateTime(2019, 9, 1));

if (whitelist != null) {
	Console.WriteLine("NIP kontrahenta: " + whitelist.NIP);
	Console.WriteLine("Numer rachunku bankowego: " + whitelist.IBAN);
	Console.WriteLine("Status konta bankowego: " + whitelist.Valid);
	Console.WriteLine("Status VAT: " + whitelist.Result);
	Console.WriteLine("Data sprawdzenia: " + whitelist.Date);
	Console.WriteLine("Źródło: " + whitelist.Source);
}
else {
	Console.WriteLine("Błąd: " + nip24.LastError);
}
// Wywołanie metody sprawdzającej status podmiotu na białej liście podatników VAT
WLStatus* whitelist = nip24_get_whitelist_status(nip24, NIP, "123-456-78-90", "12 1234 1234 1234 1234 1234 1234",
	time(NULL));

if (whitelist != NULL) {
	printf("NIP: %s\n", whitelist->NIP);
	printf("IBAN: %s\n", whitelist->IBAN);
	printf("Aktywny: %d\n", whitelist->Valid);
}
else {
	printf("Błąd: %s\n", nip24_get_last_err(nip24));
}
// Wywołanie metody sprawdzającej status podmiotu na białej liście podatników VAT
WLStatus whitelist = nip24.getWhitelistStatus(Number.NIP, "123-456-78-90", "12 1234 1234 1234 1234 1234 1234",
	new Date(2019, 9, 1));

if (whitelist != null) {
	System.out.println("NIP kontrahenta: " + whitelist.getNIP());
	System.out.println("Numer rachunku bankowego: " + whitelist.getIBAN());
	System.out.println("Status konta bankowego: " + whitelist.isValid());
	System.out.println("Status VAT: " + whitelist.getResult());
	System.out.println("Data sprawdzenia: " + whitelist.getDate());
	System.out.println("Źródło: " + whitelist.getSource());
}			
else {
	System.out.println("Błąd: " + nip24.getLastError());
}
// Wywołanie metody sprawdzającej status podmiotu na białej liście podatników VAT
nip24.getWhitelistStatusExt(NIP24.Number.NIP, '123-456-78-90', '12 1234 1234 1234 1234 1234 1234',
	'2019-09-01').then((whitelist) => {
	
	console.log(whitelist.toString());
}).catch((e) => {
	console.log(e.message);
});
// Wywołanie metody sprawdzającej status podmiotu na białej liście podatników VAT
$whitelist = $nip24->getWhitelistStatusExt(\NIP24\Number::NIP, '123-456-78-90',
	'12 1234 1234 1234 1234 1234 1234', '2019-09-01');

if ($whitelist) {
	echo '<p>IBAN: ' . print_r($whitelist, true) . '</p>';
}
else {
	echo '<p>Błąd: ' . $nip24->getLastError() . '</p>';
}
# Wywołanie metody sprawdzającej status podmiotu na białej liście podatników VAT
whitelist = nip24.getWhitelistStatusExt(Number.NIP, '123-456-78-90', '12 1234 1234 1234 1234 1234 1234',
	'2019-09-01')

if whitelist:
    pprint(vars(whitelist))
else:
    print u'Błąd: ' + nip24.getLastError()
' Wywołanie metody sprawdzającej status podmiotu na białej liście podatników VAT
Dim whitelist As WLStatus
Set whitelist = nip24.GetWhitelistStatus(Number_NIP, "123-456-78-90", "12 1234 1234 1234 1234 1234 1234",
	"2019-09-01")

If whitelist Is Nothing Then
	Console.WriteLine("Błąd: {0}", nip24.LastError)
Else
	Console.WriteLine(whitelist.Valid)
End If

Searching and downloading company data from the VAT register of the Ministry of Finance is carried out by calling the function searchVATRegistry(), whose input parameters are:

  • type – type of number (NIP, REGON, KRS, IBAN) by which the search will be performed,
  • number – number of a specific type,
  • date – date (optional, none – current day).

The data is being downloaded directly With list of VAT payers (so-called white list of VAT taxpayers) of the Ministry of Finance.

Interpretation of return values:

  • uid – unique query identifier assigned by nip24.pl,
  • name – company (name) or name and surname,
  • tax identification number (optional) – tax identification number of the company for which the inquiry was made,
  • REGON (optional) – REGON identification number,
  • KRS (optional) – KRS number, if assigned,
  • residenceAddress (optional) – full address of the registered office with postal code,
  • workingAddress (optional) – address of the permanent place of business or address of the place of residence if there is no address of the permanent place of business,
  • vatStatus – numerical VAT status of the taxpayer:
    • 1 – the taxpayer is not included in the VAT list (white list),
    • 2 – the taxpayer is an active VAT payer,
    • 3 – the taxpayer is exempt from VAT,
  • vatResult – descriptive VAT status of the taxpayer:
    • for vatStatus = 1 – text "Unregistered",
    • for vatStatus = 2 – text "Open",
    • for vatStatus = 3 – text "Exempt",
  • representatives (optional) – names and surnames of persons included in the body authorized to represent the entity and their NIP numbers,
  • authorizedClerks (optional) – names and surnames of proxies and their NIP numbers,
  • partners (optional) names and surnames or company name (name) of the partner and his NIP number,
  • registrationLegalDate (optional) – date of registration as a VAT payer,
  • registrationDenialDate (optional) – date of refusal to register as a VAT payer,
  • registrationDenialBasis (optional) – legal basis for refusal of registration,
  • restorationDate (optional) – date of restoration as a VAT payer,
  • restorationBasis (optional) – legal basis for reinstatement as a VAT payer,
  • removalDate (optional) – date of deletion of the refusal to register as a VAT payer,
  • removalBasis (optional) – legal basis for deleting the refusal to register as a VAT payer,
  • ibans - IBAN number(s) of bank accounts assigned to a given company, reported as company accounts to the VAT white list,
  • hasVirtualAccounts (optional) – the entity has virtual account masks,
  • id – response identifier (requestId) from the website of the Ministry of Finance – confirms the execution of the query,
  • date – date of checking the connection between the NIP/REGON number and the entity's bank account number,
  • source – The source of the response (MF API URL).

Attention! The use of the function may be limited due to the limits imposed by the Ministry of Finance on the VAT taxpayer list API.

The following example shows how to use the library functions.

// Wywołanie metody wyszukującej dane w rejestrze VAT
SearchResult result = nip24.SearchVATRegistry(Number.NIP, "123-456-78-90");

if (result != null) {
	Console.WriteLine(result);
}
else {
	Console.WriteLine("Błąd: " + nip24.LastError + " (kod: " + nip24.LastErrorCode + ")");
}
// Wywołanie metody wyszukującej dane w rejestrze VAT
SearchResult* result = nip24_search_vat_registry(nip24, NIP, "123-456-78-90", 0);

if (result != NULL) {
	printf("Wyniki: %d\n", result->ResultsCount);

	if (result->ResultsCount > 0) {
		printf("Nazwa: %s\n", result->Results.VATEntity[0]->Name);
		printf("NIP: %s\n", result->Results.VATEntity[0]->NIP);

		if (result->Results.VATEntity[0]->IBANsCount > 0) {
			printf("IBAN: %s\n", result->Results.VATEntity[0]->IBANs[0]);
		}

		printf("Status: %d\n", result->Results.VATEntity[0]->VATStatus);
		printf("Wynik: %s\n", result->Results.VATEntity[0]->VATResult);
	}
}
else {
	printf("Błąd: %s (kod: %d)\n", nip24_get_last_err(nip24), nip24_get_last_err_code(nip24));
}
// Wywołanie metody wyszukującej dane w rejestrze VAT
SearchResult result = nip24.searchVATRegistry(Number.NIP, "123-456-78-90");

if (result != null) {
	System.out.println(result);
}			
else {
	System.err.println("Błąd: " + nip24.getLastError() + " (kod: " + nip24.getLastErrorCode() + ")");
}
// Wywołanie metody wyszukującej dane w rejestrze VAT
$result = $nip24->searchVATRegistryExt(\NIP24\Number::NIP, '123-456-78-90');

if ($result) {
	echo '<pre>' . print_r($result, true) . '</pre>';
}
else {
	echo '<p>Błąd: ' . $nip24->getLastError() . ' (kod: ' . $nip24->getLastErrorCode() . ')</p>';
}

and

# Wywołanie metody wyszukującej dane w rejestrze VAT
result = nip24.searchVATRegistryExt(Number.NIP, '123-456-78-90')

if result:
    print(result)
else:
    print('Błąd: ' + nip24.getLastError() + ' (kod: ' + str(nip24.getLastErrorCode()) + ')')
' Wywołanie metody wyszukującej dane w rejestrze VAT
Dim result As SearchResult
Set result = nip24.SearchVATRegistry(Number_NIP, "123-456-78-90")

If result Is Nothing Then
	Console.WriteLine("Błąd: {0}", nip24.LastError)
Else
	Console.WriteLine(result.ToString())
End If

Downloading data from the National Court Register

The information scope of data made available from the National Court Register via API corresponds to the current extract issued by the Central Information of the National Court Register.

The data of natural persons disclosed in the register downloaded via API are anonymized in terms of names, surnames and their PESEL numbers, in accordance with the principles of processing this data resulting from the Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection natural persons in connection with the processing of personal data and on the free movement of such data and repealing Directive 95/46/EC (General Data Protection Regulation) (OJ EU L 119 of 04/05/2016, as amended)

Searching and downloading a current excerpt from the National Court Register of an entrepreneur or association Open API of the National Court Register, can be implemented using two functions: getKRSData() and getKRSSection().

Attention! The function is only available in Individual plans. However, the feature is available in standard plans getKRSSection(), which is described below.

Function getKRSData(type, number) allows you to download data recorded in all sections of the current KRS extract for a given entrepreneur or association. The input parameters of the function are:

  • type – type of number (NIP, REGON, KRS) by which the search will be performed,
  • number – a specific number of a specific type,

Interpretation of return values:

  • uid – query ID from the nip24.pl system,
  • date – date and time of returning the response,
  • source – data source as URL,
  • data – contains the Transcript object, this object contains the following attributes and classes:
    • type – information whether the copy is Current or Full. At the moment, the nip24.pl website allows you to inquire only about current transcripts
    • naglowekA – contains general information describing the transcript, such as: register, KRS number, date and time of generating the copy, status as of today, date of registration in the National Court Register and number and date the last entry, as well as the reference number of the case file regarding the last entry.
    • data - contains the Data object, this object contains attributes corresponding to each department, which may (individual classes and attributes are optional and depend, among others, on the legal form of the entity) contain the following classes and attributes:
      • Section1:
        • authority exercising supervision
          • AuthorityName
          • composition
            • last name
            • names
            • ID
            • functionWorgan
            • orSuspended
        • dataSubject
          • Legal form
          • name
          • whether it conducts business with other entities
          • Does it have OPP Status?
          • identifiers
          • previous registration data
        • headquarters and address
          • street
          • House number
          • Premises no
          • town
          • zip code
          • post
          • country
        • unitsFieldBranches
          • name
          • headquarters
          • address
        • contractStatute
          • information about the conclusion of a change to the agreement and the statute
        • Other information
          • timeAtwhichEntity wasCreated
          • informationOnumber of shares
          • Whether the Agreement and the Statute Grant Personal Rights
          • Do Obligors Have the Right to Share the Profit?
        • partnersSpzoo
          • last name
          • names
          • ID
          • ownedShares
          • whether it owns all the shares
        • soleShareholder
          • name
          • krs
          • whether it has all the action
          • ID
        • method of creation of the entity
          • circumstances of the uprising
          • description of the method of creation information about the resolution
          • No. Date of Decision of the President of the Office of Competition and Consumer Protection
          • entities
            • name
            • countryRegistryNameRecord
            • number in the Register or Records
            • name of the Court Authority Maintaining the Register
            • identifiers
        • capital
          • contributedContributions
          • totalNumberofShares
          • amount of share capital
          • valueOneAction
          • part of the paid-in capital
        • issuesActions
          • ActionSeriesName
          • numberActionSeries
          • whetherPrivilegedSharesNumberofSharesPrivilegeType
        • mention of the adoption of a resolution on the issuance of convertible bonds
          • dateAdoptionResolution
        • mention of the authorization to issue subscription warrants
          • whether the Management Board is authorized to issue subscription warrants
      • Section2:
        • AuthorityName
        • representation
          • AuthorityName
          • Way of Representation
          • composition
            • last name
            • names
            • ID
            • functionWorgan
            • orSuspended
        • proxies
          • typeProxies
          • person
            • last name
            • names
            • ID
      • Section3:
        • purpose of the organization's activities
        • informationFromtheendofthefiscalyear
        • core business
          • subject of predominant activity
          • itemOtherBusiness
        • subjectOPP activities
          • gratuitousPkd
          • paidPkd
        • reports of the Capital Group
          • mention of the submission of the Auditor's Opinion and Audit Report
          • mention of the submission of the Consolidated Annual Financial Statement
          • mention of the submission of a consolidated report on payments to public administration
          • mention of the submission of the report on the activities of the Parent Company
          • mention of the submission of the resolution and the approval of the consolidated annual financial statements
        • mentions of complex documents
          • mention of the submission of the Auditor's Opinion and Audit Report
          • mention of the submission of the Annual Financial Statement
          • mention of the submission of the resolution and the approval of the annual financial statements
          • mention of the submission of the activity report
      • Section4:
        • securing assets. Dismissal of the application. Bankruptcy
          • dismissal of the application and bankruptcy
          • continuing to perform functions after the completion of the restructuring proceedings
          • securing the debtor's assets in bankruptcy proceedings
        • arrears
          • natureDistance
          • endingExecution
          • initiation of execution
          • discontinuation of execution
          • heightDistance
      • Section 5:
        • curator
          • last name
          • names
          • ID
          • basisApplicationScopeOfaction
          • datePowolania
          • dateuntowhichitisacting
      • Section6:
        • Bankruptcy proceedings
          • method of conduct
          • information about the repeal of the system
          • information about bankruptcy announcement
            • issuing authority
            • signature
            • date
          • description of the end of the bankruptcy process
            • description of the way of ending the procedure
            • ProceedingEnd date
          • data of the trustee
            • last name
            • names
            • ID
            • subject
        • connectionDivisionTransformation
          • determining the circumstances
          • descriptionConnectionDivisionTransformation
          • entities Taken over
        • Liquidation
          • openingLiquidation
          • Method of Representation of the Entity by Liquidators
          • liquidators
        • dissolutionInvalidation
          • determining the circumstances
          • informationAboutSolutionInvalidation
        • suspensionResume
          • dateSuspension
          • resumptiondate
        • Composition proceedings
          • repeal of the Agreement
          • opening of arrangement proceedings
            • issuing authority
            • signature
            • date of granting the Enforceability Clause
          • termination of the arrangement proceedings
            • date
            • description
        • Restructuring and Recovery proceedings. Compulsory Restructuring
          • repeal of the Agreement
          • opening of restructuring and compulsory restructuring proceedings
            • issuing authority
            • signature
            • date of granting the Enforceability Clause
            • typeConduct
          • termination of the restructuring and compulsory restructuring proceedings
            • date
            • description

The following example shows how to use the library functions.

// Wywołanie metody pobierającej pełne dane z KRS
KRSData result = nip24.GetKRSData(Number.KRS, "0000966600");

if (result != null) {
	Console.WriteLine(result);
}
else {
	Console.WriteLine("Błąd: " + nip24.LastError + " (kod: " + nip24.LastErrorCode + ")");
}
// Wywołanie metody pobierającej pełne dane z KRS
KRSData* result = nip24_get_krs_data(nip24, KRS, "0000966600");

if (result != NULL) {
	printf("Numer KRS: %s\n", result->data->naglowekA->NumerKRS);
	printf("Nazwa: %s\n", result->data->danePodmiotu->Nazwa);
}
else {
	printf("Błąd: %s (kod: %d)\n", nip24_get_last_err(nip24), nip24_get_last_err_code(nip24));
}
// Wywołanie metody pobierającej pełne dane z KRS
KRSData result = nip24.getKRSData(Number.KRS, "0000966600");

if (result != null) {
	System.out.println(result);
}			
else {
	System.err.println("Błąd: " + nip24.getLastError() + " (kod: " + nip24.getLastErrorCode() + ")");
}
// Wywołanie metody pobierającej pełne dane z KRS
$result = $nip24->getKRSData(\NIP24\Number::KRS, '0000966600');

if ($result) {
	echo '<pre>' . print_r($result, true) . '</pre>';
}
else {
	echo '<p>Błąd: ' . $nip24->getLastError() . ' (kod: ' . $nip24->getLastErrorCode() . ')</p>';
}

Function getKRSSection() allows you to download data recorded in all sections of the current KRS extract for a given entrepreneur or association. The input parameters of the function are:

  • type – type of number (NIP, REGON, KRS) by which the search will be performed,
  • number – a specific number of a specific type,
  • section – section number, possible values in the range [1-6]

Attention! The description of individual fields returned when calling the function for a particular department is consistent with the description provided above (for the function getKRSData()).

The following example shows how to use the library functions.

// Wywołanie metody pobierającej dane konkretnego działu z aktualnego odpisu KRS (np. dział 1)
KRSData result = nip24.GetKRSSection(Number.KRS, "0000966600", 1);

if (result != null) {
	Console.WriteLine(result);
}
else {
	Console.WriteLine("Błąd: " + nip24.LastError + " (kod: " + nip24.LastErrorCode + ")");
}
// Wywołanie metody pobierającej dane konkretnego działu z aktualnego odpisu KRS (np. dział 1)
KRSSection* result = nip24_get_krs_section(nip24, KRS, "0000966600", 1);

if (result != NULL) {
	printf("Numer KRS: %s\n", result->data->naglowekA->NumerKRS);
	printf("Nazwa: %s\n", result->data->dane->dzial1.danePodmiotu->Nazwa);
}
else {
	printf("Błąd: %s (kod: %d)\n", nip24_get_last_err(nip24), nip24_get_last_err_code(nip24));
}
// Wywołanie metody pobierającej dane konkretnego działu z aktualnego odpisu KRS (np. dział 1)
KRSData result = nip24.getKRSSection(Number.KRS, "0000966600", 1);

if (result != null) {
	System.out.println(result);
}			
else {
	System.err.println("Błąd: " + nip24.getLastError() + " (kod: " + nip24.getLastErrorCode() + ")");
}
// Wywołanie metody pobierającej dane konkretnego działu z aktualnego odpisu KRS (np. dział 1)
$result = $nip24->getKRSSection(\NIP24\Number::KRS, '0000966600', 1);

if ($result) {
	echo '<pre>' . print_r($result, true) . '</pre>';
}
else {
	echo '<p>Błąd: ' . $nip24->getLastError() . ' (kod: ' . $nip24->getLastErrorCode() . ')</p>';
}

The function allows you to download all basic information about your user account, which is displayed after logging in to your account on the nip24.pl portal. The function also returns information about the maximum number of queries available under the selected plan (e.g. 5,000 for the Business plan) and the summed number of all queries performed in the current month on the user's account.

Attention! Function call does not increase number of queries performed.

The following example shows how to use the library functions.

// Sprawdzenie stanu konta
AccountStatus account = nip24.GetAccountStatus();

if (account != null) {
     Console.WriteLine(account);
}
else {
     Console.WriteLine("Błąd: " + nip24.LastError);
}
// Sprawdzenie stanu konta
AccountStatus* account = nip24_get_account_status(nip24);

if (account != NULL) {
	printf("Nazwa planu: %s\n", account->BillingPlanName);
	printf("Cena: %.2f\n", account->SubscriptionPrice);
	printf("Ilość zapytań: %d\n", account->TotalCount);
}
else {
	printf("Błąd: %s\n", nip24_get_last_err(nip24));
}
// Sprawdzenie stanu konta
AccountStatus account = nip24.getAccountStatus();

if (account != null) {
     System.out.println(account);
}
else {
     System.err.println("Błąd: " + nip24.getLastError());
}
// Sprawdzenie stanu konta
nip24.getAccountStatus().then((account) => {
	console.log(account.toString());
}).catch((e) => {
	console.log(e.message);
});
// Sprawdzenie stanu konta
$account = $nip24->getAccountStatus();

if ($account) {
     echo '<p>' . print_r($account, true) . '</p>';
}
else {
     echo '<p>Błąd: ' . $nip24->getLastError() . '</p>';
}
# Sprawdzenie stanu konta
account = nip24.getAccountStatus()

if account:
    pprint(vars(account))
else:
    print u'Błąd: ' + nip24.getLastError()
'Sprawdzenie stanu konta
Dim account As AccountStatus
Set account = nip24.GetAccountStatus()

If account Is Nothing Then
	Console.WriteLine("Błąd: {0}", nip24.LastError)
Else
	Console.WriteLine(account.ToString())
End If

The library nip24Library.dll can be registered in Windows as the so-called COM object. Then, the library functions can be referenced from many different programming languages and ready-made applications, including: Microsoft Excel, Access, SQL Server, Dynamics or Visual FoxPro.

To register a library as a COM object, perform the following steps:

  1. Download the .NET library archive and unpack it on your local disk to any location.
  2. Enter the directory with the unpacked library files and find the file com-register.bat.
  3. Select the file com-register.bat with the mouse and select a command from the context menu Run as administrator.

Library functions nip24Library.dll can be used in MS Excel to write your own functions and procedures in Visual Basic. To make this possible you need to:

  1. Register library nip24Library.dll as a COM object in Windows.
  2. Launch the Excel application. On the ribbon, select a tab DEVELOPER, and then click the Visual Basic button.
  3. In the Visual Basic for Application window, choose from the menu Tools, and then References. On list Available References find and select NIP24 Service Client for .NET Framework (C#). Confirm your selection with the OK button.
  4. From the menu Insert to choose Module and in the new window, paste the function code presented in the examples for Visual Basic.
  5. Finally, set the appropriate values for nip24.ID and nip24.Key. The method of obtaining the key and ID is described in the chapter Generating an ID and access key
en_GBEnglish (UK)