KSeF REST API – integration documentation for
National e-Invoice System

This documentation describes the REST API interface enabling comprehensive implementation of structured invoice handling in the KSeF system.

The detailed API definition is available in an OpenAPI-compatible format and can be downloaded as a file YAML.

The API is also available in the form of a client interface Swagger UI.

Functionalities implemented by KSeF API

Below we present llist of currently available and future functionalities enabling full integration with National e-Invoice System:

  • Sending and receiving e-Invoices and UPO from the KSeF system
  • Generating e-Invoices in XML format
  • Generating a preview (visualization) of e-Invoices (PDF or HTML)
  • Search and download sales and expense invoices
  • Support for bulk sending of e-invoices (coming soon)
  • Notifications about receiving a new e-invoice (coming soon)

Available integration tools and methods

Currently available and future tools for sending invoices to KSeF:

  • Direct call to REST API
  • Programming libraries in languages: PHP (JAVA, C# coming soon)

Depending on your needs, you can use our communication tools directly from your system (On-premise) or through our architecture (SaaS), which ensures the highest level of availability. Interested? Maybe you have additional questions? Please contact us!

Registration and account creation

To be able to test the possibilities REST KSEF API it is necessary to complete the registration process, i.e. create a dedicated account on the website. To do this, please visit the website Registration and complete the appropriate form. Acceptance is a necessary condition for using the website system Regulations. Complete the form correctly and click the button Register creates an account in the system and automatically activates it.

During the first login, an ID and the corresponding key are generated automatically. The ID and key can be found after logging in to your account in the tab API keys. The identifier is public and does not require protection, while the key is private and should not be made available to third parties.

Attention! To use the operations provided in REST KSEF API, you should save the access token generated for the KSeF production or test environment, respectively, and activate access to the given type of environment.

We encourage you to read the entries on our website BLOG, To learn:

Environment

To facilitate integration for our clients in the area of KSeF invoices, we have prepared two identical environments: test and production, which are connected to the KSeF test and production environments.

Testing environment

Full functionality of all shared operations in the interface REST KSEF API and libraries (coming soon), you can check using the provided test environment.

Testing environment REST KSEF API is integrated with the environment test National e-Invoice System and is available at: https://nip24.pl.pl/api-test/

Attention! Thanks to the test environment REST KSEF API it is possible to check all operations offered in paid KSeF packages, without having to buy them.

Attention! To benefit from surgery REST KSEF API in a test environment, just save the access token generated in the KSeF test environment and activate access to this type of environment.

Production environment

Production environment REST KSEF API is integrated with the environment production National e-Invoice System and is available at: https://nip24.pl/api/

Attention! To benefit from surgery REST KSEF API in a production environment, you must save the access token generated in the KSeF production environment, activate access to this type of environment and purchase any KSeF package.

Click HERE to go to the KSeF REST API documentation
which was made available on a dedicated website

en_GBEnglish (UK)