Roaring logo
Log in

Population Register

Information about all persons registered in Sweden.

Population Register

[se]
Historical data available

Documentation

Fetch personal information about an individual using the personal identification number. Includes information about a person's current name and address information, relationships, gender and information about a person being deceased.

There are three endpoints "person" includes current information, "personhistory" includes historical information and "personfull" that includes both current and historical information

Common use-cases:

  • Customer registration
  • Customer check
  • Registry update

Apply for Production Data

In order to access population registry data through Roaring you need to apply for access via the admin pages of app.roaring.io.

This API requires permission. In order for you to get started you need to apply for this through your account. Access ADMIN, Account information, Permissions. In the message you send to request access please include information on which redirection mode you want to use for your access.

This api has different kinds of access options available. Information can either be fetched directly from the population registry or via cached data from one of our data partners. The reason for having multiple ways of fetching population registry data is the unstable nature of the government managed API's.

In order to get access to the government managed API's for population registry information you need to send in an access application to the tax authority (Skatteverket). If you want, Roaring can help you with the authorization application process towards Skatteverket.

The cached version of the population registry is updated from the population registry on a daily basis at our data partner and does not need an access application to any third party. The caveat with the cached version of the population registry is that it doesn't include people with coordination number (samordningsnummer) and people under the age of 16.

NOTE: Important to notice is that the cached version of the population registry does not include people with coordination number (samordningsnummer) and people under the age of 16.

Having access to a cached source for the population registry gives us the flexibility of some different setup options for usage and gives you the option of choosing how you want the API to handle your request. There are (at the moment) three different redirect modes to the API:

  • NEVER The API directly call the government population registry API for every request.

  • FALLBACK The API directly call the government population registry API for every request but if there is an error returned or if the call takes more then one second the call is redirected to our data partners API to retrieve from the cached population registry record.

  • ALWAYS The API always redirect the calls to our data partners API to retrieve a response from the cached population registry. This option does not need you to apply for population registry access but can be added to your account directly

Deregistration reason codes

Below is a list of available deregistration codes for a person.

Code
Explanation (Svenska)
Explanation (English)
APersonen är registrerad som avlidenThe person is registered as deceased
GPersonen har nytt personnummer. Hänvisning finns till det nya personnumretThe person has a new social security number. Reference is made to the new social security number
OAnnan orsak än A och G. Det kan t.ex. avse överförd till obefintlighetsregistret eller att personen har utvandratOther cause than A and G. It can e.g. refer to being transferred to the register of non-existence or that the person has emigrated

Counties and muncipalities

Below is a list of counties and municipalities. The first two digits = county. The last two digits = municipality(commune)

Code
Name
01Stockholms län
0114Upplands Väsby
0115Vallentuna
0117Österåker
0120Värmdö
0123Järfälla
0125Ekerö
0126Huddinge
0127Botkyrka
0128Salem

Rows per page

Page 1 of 32

Source: Statistiska centralbyrån

Schemaversion

The population register API is built against SPAR schemaversion "20160213" while the population register webhook is built against schemaversion "2019.1.".

Note that small discrepancies can occur between these two versions.

Endpoints

Get person

gethttps://api.roaring.io/person/1.0/person

Parameters query

personalNumber

required

string
Personal number to query for

Response schema: application/json

Get person

gethttps://api.roaring.io/person/1.0/personfull

Parameters query

personalNumber

required

string
Personal number to query for

Get person history

gethttps://api.roaring.io/person/1.0/personhistory

Parameters query

personalNumber

required

string
Personal number to query for