stdnum.se.orgnr

Orgnr (Organisationsnummer, Swedish company number).

The Orgnr (Organisationsnummer) is the national number to identify Swedish companies and consists of 10 digits. These are the first 10 digits in the Swedish VAT number, i.e. it’s the VAT number without the ‘SE’ in front and the ‘01’ at the end.

>>> validate('1234567897')
'1234567897'
>>> validate('1234567891')  # invalid check digits
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> format('123456-7897')
'123456-7897'
Traceback (most recent call last):
    ...
InvalidChecksum: ...
stdnum.se.orgnr.compact(number)

Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.se.orgnr.format(number)

Reformat the number to the standard format.

stdnum.se.orgnr.is_valid(number)

Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.

stdnum.se.orgnr.validate(number)

Checks to see if the number provided is a valid number. This checks the length, formatting and check digit.

Previous topic

stdnum.ro.cnp

Next topic

stdnum.se.vat