npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

e-invoice-codes

v0.1.0

Published

[![npm version](https://badge.fury.io/js/e-invoice-codes.svg)](https://badge.fury.io/js/e-invoice-codes) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Readme

E-Invoice code lists needed in EN16931, ZUGFeRD and XRechnung for JavaScript / TypeScript

npm version License: MIT

A convenient meta-package that bundles essential code lists for European e-invoicing standards like EN16931, ZUGFeRD, and XRechnung. It simplifies development by providing curated codes from various official sources in one place.

Why This Package?

When building applications that handle e-invoices, you often need several standardized code lists from different sources. Instead of installing and managing multiple individual packages, e-invoice-codes provides a single dependency for the most frequently required lists.

This package re-exports the latest, most common code lists from the following specialized packages, simplifying your project's dependency tree:

  • electronic-address-scheme: Provides the Electronic Address Scheme (EAS) codes.
  • un-ece-recommendation: Provides code lists for units of measure (Rec. 20) and packaging types (Rec. 21).
  • untdid: Provides various code lists from the United Nations Trade Data Interchange Directory.

RechnungsAPI

If you are looking for an API solution to generate German e-invoice documents, consider checking out RechnungsAPI, without which this package would not exist.

Installation

Install the package using your favorite package manager:

npm install e-invoice-codes

or

yarn add e-invoice-codes

Usage

You can import all the necessary code lists directly from the e-invoice-codes package. The exports are aliased for clarity and convenience.

import {
  EAS,
  REC_20,
  REC_21,
  UNTDID_1001,
  UNTDID_5305
} from 'e-invoice-codes';

// Example: Get the latest Electronic Address Scheme codes
console.log('EAS Codes:', EAS);
// [
//   {
//   	code: "0002",
//   	name: "System Information et Repertoire des Entreprise et des Etablissements: SIRENE",
//   },
//   { code: "0007", name: "Organisationsnummer" },
//   { code: "0009", name: "SIRET-CODE" },
//   ...
// ]

// Example: Get UN/ECE Recommendation N°20 (Units of Measure)
console.log('Unit Codes:', REC_20);
// [
//   { code: "05", name: "lift" },
//   { code: "06", name: "small spray" },
//   { code: "08", name: "heat lot" },
//   ...
// ]

// Example: Get UNTDID 5305 (Tax category codes)
console.log('Tax Category Codes:', UNTDID_5305);
// [
//   {
//   	code: "A",
//   	name: "Mixed tax rate",
//   	description: "Code specifying that the rate is based on mixed tax.",
//   },
//   {
//   	code: "AA",
//   	name: "Lower rate",
//   	description: "Tax rate is lower than standard rate.",
//   },
//   ...
// ]

Included Code Lists

This package re-exports the latest versions of the following code lists:

From electronic-address-scheme

  • EAS: The Electronic Address Scheme, used to identify the type of electronic address (e.g., GLN, Leitweg-ID).

From un-ece-recommendation

  • REC_20: UN/ECE Recommendation N°20 - Codes for Units of Measure.
  • REC_21: UN/ECE Recommendation N°21 - Codes for package types.

From untdid

  • UNTDID_1001: Document name code.
  • UNTDID_1153: Reference code qualifier.
  • UNTDID_2005: Date or time or period function code qualifier.
  • UNTDID_4451: Text subject code qualifier.
  • UNTDID_4461: Payment means code.
  • UNTDID_5189: Allowance or charge identification code.
  • UNTDID_5305: Duty or tax or fee category code.
  • UNTDID_7143: Item type identification code.
  • UNTDID_7161: Special service description code.

Advanced Usage & Direct Access

While this package provides the most recent and common code lists, you might need a specific historical version or a code list not included here. In such cases, or to further optimize your application's bundle size, you can install the underlying packages directly and import the exact version you need.

  • npm install electronic-address-scheme
  • npm install un-ece-recommendation
  • npm install untdid