KSeF icon

KSeF

Connect to KSeF (Krajowy System e-Faktur)

Invoice → Get Invoice

AI-generated

Summary

Retrieves an invoice from KSeF using its reference number and access token. Optionally includes the invoice XML as binary data and uses search-result metadata for verification.

Inputs

  • Access Token (required) — Access token from the Start Session response (accessToken.token).
  • KSeF Reference Number (required) — Reference number of the invoice to retrieve.
  • Invoice Hash — Invoice hash from Search Invoices, used for the verification URL.
  • Acquisition Timestamp — Acquisition timestamp from Search Invoices.
  • Return XML as Binary — When enabled, attaches the raw invoice XML as binary data. Defaults to false.
  • Binary Property — Name of the binary property for the XML file when binary output is enabled. Defaults to data.

Output shape

An invoice result, optionally with the raw invoice XML attached as binary data.

The source pack contains only an obfuscated stub, so the returned JSON fields and exact binary output behavior cannot be determined from the supplied implementation. The properties indicate that Invoice Hash and Acquisition Timestamp are optional metadata inputs.

Examples

Example 1: retrieve invoice

Provide the access token and KSeF reference number; optionally pass search-result metadata and enable binary XML output.

Links

Discussion