What is a P-number?

A P-number (production unit number) identifies a physical address where a Danish company operates – a shop, an office or a factory. One company has one CVR number but can have many P-numbers.

CVR number vs. P-number

CVR numberP-number
IdentifiesThe legal entityA physical location (production unit)
Length8 digits10 digits
Per companyOneOne per address the company operates from
When relocatingKeptTypically the unit closes and a new one is created at the new address
In CVR-APIvatp_units[].p_number

What are P-numbers used for?

Production units in CVR-API

A lookup on /api/v1/{cvr} returns the company's production units in the p_units list. Each unit has its own name, address, industry, headcount, contact details and its own protected flag for marketing protection.

json
{
  "vat": 10403782,
  "name": "VESTAS WIND SYSTEMS A/S",
  "p_units": [
    {
      "p_number": 1017864846,
      "name": "Vestas Wind Systems A/S",
      "address": "Sahara 7",
      "zipcode": 6700,
      "city": "Esbjerg",
      "startdate": "2012-08-17",
      "enddate": "2013-02-13",
      "industrycode": 721900,
      "protected": false
    },
    ...
  ]
}

The list also includes closed units. enddate is set for units that have closed and null for active ones. To keep only the active units:

python
import requests

company = requests.get("https://apicvr.dk/api/v1/10403782").json()
active = [p for p in company["p_units"] if not p["enddate"]]

for unit in active:
    print(unit["p_number"], unit["address"], unit["zipcode"], unit["city"])

Frequently asked questions

How many digits does a P-number have?

A P-number has 10 digits; a CVR number has 8.

Can a company have several P-numbers?

Yes. A production unit is created for each address the company operates from. Large chains can have hundreds.

Does marketing protection apply to P-units?

Yes. Each P-unit has its own protected field in the API, which you must respect when marketing to that location.