---
id: "unece_rec21_package_code"
kind: "pattern"
status: "draft"
is_pii: false
categories: ["shipping"]
langs: ["common"]
quality: 75
url: "https://registry.apicrafter.io/datatype/unece_rec21_package_code"
---

# UN/ECE Recommendation 21 package type code (`unece_rec21_package_code`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Two-character code of a type of package from UN/ECE Recommendation 21, used in customs declarations, UN/EDIFACT and UBL documents, for example BX for box or CT for carton. Codes use uppercase letters and digits in any combination (BX, 1A, 43). Many other two-character codes have the same shape, such as country codes, so the field name is the evidence.

- Pattern of: `package_type`
- Personal data (PII): no
- Categories: Shipping and delivery (shipping)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^[A-Z0-9]{2}$
```

## Examples

- `BX` — Box
- `CT` — Carton
- `BG` — Bag
- `1A` — Drum, steel
- `43` — Bag, super bulk
- `BOX` (invalid example) — Three characters

## Sources

- doc: <https://docs.oasis-open.org/ubl/os-UBL-2.1/cl/gc/default/PackagingTypeCode-2.1.gc>

## Quality

Score 75/100. Missing: mapping (Wikidata, Schema.org, ...), translation, detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/unece_rec21_package_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/shipping/unece_rec21_package_code.yaml>
