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 🙏

© 2026 – Pkg Stats / Ryan Hefner

untdid

v0.1.3

Published

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

Readme

untdid

npm version License: MIT

JavaScript package for the United Nations Trade Data Interchange Directory (UNTDID) code lists.

About UNTDID

The United Nations Trade Data Interchange Directory (UNTDID) is a set of internationally agreed-upon standards for the electronic interchange of structured data. These directories are maintained by the UNECE and are a part of the UN/EDIFACT standard.

In the context of e-invoicing standards like EN16931, ZUGFeRD, and XRechnung, UNTDID provides standardized code lists for various data elements to ensure interoperability. For example, specific codes are used to identify document types, payment means, tax categories, and more. This package provides these official code lists in a simple, accessible JSON format for use in JavaScript and TypeScript applications.

The source for these code lists is XRepository.

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 untdid

or

yarn add untdid

Usage

You can import the entire collection of code lists or import a specific code list individually to reduce your bundle size.

Importing All Code Lists

All available code lists are exported as named objects from the main package entry point.

import { UNTDID_1001_1, UNTDID_5305_2 } from 'untdid';

console.log('Document name codes:', UNTDID_1001_1);
// [
//   {
//   	code: "1",
//   	name: "Certificate of analysis",
//   	description: "Certificate providing the values of an analysis.",
//   },
//   {
//   	code: "2",
//   	name: "Certificate of conformity",
//   	description:
//   		"Certificate certifying the conformity to predefined definitions.",
//   },
//   ...
// ]

console.log('Tax category codes:', UNTDID_5305_3);
// [
//   {
//   	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.",
//   },
//   ...
// ]

Importing a Specific Code List

For a more optimized approach, you can deep-import a single code list. The package exports are configured to allow this.

import { UNTDID_7143_1 } from 'untdid/7143/1';

console.log(UNTDID_7143_1);
// [
//   {
//   	code: "AA",
//   	name: "Product version number",
//   	description:
//   		"Number assigned by manufacturer or seller to identify the release of a product.",
//   },
//   {
//   	code: "AB",
//   	name: "Assembly",
//   	description: "The item number is that of an assembly.",
//   },
//   ...
// ]

Data Structure

Each code list is an array of objects, where each object conforms to the CodeListEntry type.

export interface CodeListEntry {
	code: string;
	name?: string;
	description?: string;
}

export type CodeList = CodeListEntry[];

Available Code Lists

This package includes the following UNTDID code lists, which are commonly used in e-invoicing:

  • 1001: Document name code
  • 1153: Reference code qualifier
  • 2005: Date or time or period function code qualifier
  • 4451: Text subject code qualifier
  • 4461: Payment means code
  • 5189: Allowance or charge identification code
  • 5305: Duty or tax or fee category code
  • 7143: Item type identification code
  • 7161: Special service description code