---
id: "coicop"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["finances"]
langs: ["common"]
quality: 75
url: "http://registry.apicrafter.io/datatype/coicop"
---

# COICOP code (Classification of Individual Consumption According to Purpose) (`coicop`)

> **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.

Code of the UN Classification of Individual Consumption According to Purpose (COICOP), which classifies consumption expenditure by its purpose. Codes are written with dots: a two-digit division (01 to 15 in COICOP 2018) followed by one digit each for the group, class and subclass, as in 01.1.1.1. The COICOP 2018 structure published by the UN Statistics Division adds a fifth level under some subclasses (01.1.1.1.1). COICOP 1999 uses the same notation with fewer divisions, so the version cannot be told from the code alone.

- Personal data (PII): no
- Categories: Finances and banking (finances)
- Countries: global
- Languages: Common to most languages (common)
- Classification: categorical

## Detection

Regular expression (Python `re`):

```
^(?:0[1-9]|1[0-5])(?:\.\d){0,4}$
```

## Examples

- `01.1.1.1` — Subclass: cereals
- `01.1.1` — Class: cereals and cereal products
- `01.1` — Group: food
- `01` — Division: food and non-alcoholic beverages
- `07.2.2.1` — Subclass: diesel
- `01.1.1.1.1` — Fifth level of COICOP 2018: wheat
- `16.1` (invalid example) — There is no division 16
- `0111` (invalid example) — Digits without dots

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Classification_of_Individual_Consumption_by_Purpose>
- doc: <https://unstats.un.org/unsd/classifications/Econ>
- other: <https://unstats.un.org/unsd/classifications/Econ/Download/COICOP_2018_English_structure.xlsx>

## Quality

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

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