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

Introduction

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.

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)