Skip to content

Requests and Responses

Authentication

To retrieve person information from the Swedish Population Register, you must first authenticate your user account.

Please refer to the Authenticate API documentation for details on how to authenticate and obtain a token.

Note that this step differs from earlier versions of the SPAR REST API. The generated token can be used across all Creditsafe Sweden REST APIs including DateCheck, GetData, SearchEngine, GetSignatory, GetUnitData, and SPAR.


Production URLs

SPAR Endpoint:

https://se-webservice.apps.creditsafe.com/spar

Health Check:

https://se-webservice.apps.creditsafe.com/spar/health

Request Methods

The SPAR REST API uses a single GET method to retrieve person information from the Swedish Population Register.

SPAR Request

Endpoint:

GET /spar

Example Request:

HEADER: Authorization: Bearer <token>
URL: https://se-webservice.apps.creditsafe.com/spar?searchnumber=yyyymmddnnnn&relation=true
Method: GET

Request Parameters

The table below describes each parameter included in the requests.

ParameterData typeMax lengthRequiredDescription
searchnumber (query)String12YesThe requested person number (12 digits)
relation (query)Boolean-NoInclusion of relation data. Default value is false. Please note! Passing a true value requires access rights to see relation data
usespartest (query)Boolean-NoWhen true, directs the request to SPAR's test environment instead of live data. Default value is false. On sandbox hosts, this parameter controls whether to query the SPAR test API (true) or use the local sandbox database (false). On production hosts, this parameter routes to either SPAR live (false) or SPAR test (true) environments
transactionid (query)String14NoCustomer's internal information (customer/invoice number). Recommended to use this field as it can be helpful in tracking your call in Creditsafe logs
language (query)String2NoSets the language of the response. For this service it is only affecting error responses. Available languages: sv or en. Default: en
Sandbox Parameter Behavior

In the sandbox version of this API, only the parameters searchnumber and transactionid are actively supported. All other parameters included in the request will be ignored without error or warning.

Developers are encouraged to structure their requests as they would in a production environment, including all expected parameters. This ensures consistency and simplifies the transition to production usage. However, it is important to understand that in sandbox mode, unsupported parameters will not influence the response and should not be relied upon for testing behavior or data validation.


Response (Successful)

All successful responses include a metaData object containing request information for tracing and troubleshooting, and a response array containing the SPAR person data.

SPAR Response Structure

Unlike other Swedish APIs that use report, SPAR uses response as the top-level property name for data results. This reflects the original SPAR API structure.

HTTP Response code: 200 OK

{
  "metaData": {
    "apiLogId": 542900,
    "timeStamp": "2026-07-15T14:26:33",
    "resource": "SPAR Consumer (1231)",
    "method": "GET",
    "requestUrl": "https://se-webservice.apps.creditsafe.com/spar?searchnumber=194411155858"
  },
  "response": [
    {
      "personId": {
        "idNummer": "194411155858",
        "typ": "PERSONNUMMER"
      },
      "sekretessmarkering": {
        "sattAvSPAR": null,
        "value": "NEJ"
      },
      "sekretessDatum": null,
      "skyddadFolkbokforing": "NEJ",
      "skyddadFolkbokforingDatum": null,
      "senasteAndringSPAR": "2021-09-25T00:00:00",
      "summeradInkomst": null,
      "inkomstAr": null,
      "namn": [
        {
          "datumFrom": "2021-09-25T00:00:00",
          "datumTill": "9999-12-31T00:00:00",
          "aviseringsnamn": null,
          "fornamn": "Adam",
          "tilltalsnamn": null,
          "mellannamn": null,
          "efternamn": "Efternamn1130"
        }
      ],
      "persondetaljer": [
        {
          "datumFrom": "2021-09-25T00:00:00",
          "datumTill": "9999-12-31T00:00:00",
          "sekretessmarkering": {
            "sattAvSPAR": null,
            "value": "NEJ"
          },
          "skyddadFolkbokforing": "NEJ",
          "avregistreringsorsakKod": null,
          "avregistreringsdatum": null,
          "avlidendatum": null,
          "antraffadDodDatum": null,
          "fodelsedatum": "1944-11-15T00:00:00",
          "fodelselanKod": null,
          "fodelseforsamling": null,
          "kon": "MAN",
          "svenskMedborgare": null,
          "hanvisning": [],
          "snStatus": null,
          "snTilldelningsdatum": null,
          "snPreliminartVilandeforklaringsdatum": null,
          "snFornyelsedatum": null,
          "snVilandeorsak": null,
          "snVilandeforklaringsdatum": null,
          "snAvlidendatum": null
        }
      ],
      "folkbokforing": [
        {
          "datumFrom": "2021-09-25T00:00:00",
          "datumTill": "9999-12-31T00:00:00",
          "folkbokfordLanKod": "01",
          "folkbokfordKommunKod": "25",
          "hemvist": "Skrivenpåadressen",
          "folkbokforingsdatum": "1997-05-01T00:00:00",
          "distriktKod": "215006"
        }
      ],
      "folkbokforingsadress": [
        {
          "svenskAdress": {
            "datumFrom": "2021-09-25T00:00:00",
            "datumTill": "9999-12-31T00:00:00",
            "careOf": null,
            "utdelningsadress1": null,
            "utdelningsadress2": "Gatan229 2",
            "postNr": "17962",
            "postort": "STENHAMRA"
          }
        }
      ],
      "sarskildPostadress": [
        {
          "internationellAdress": {
            "datumFrom": "2021-09-25T00:00:00",
            "datumTill": "9999-12-31T00:00:00",
            "utdelningsadress1": null,
            "utdelningsadress2": "UTLANDOMRÅDE",
            "utdelningsadress3": null,
            "land": "MONACO"
          },
          "svenskAdress": null
        }
      ],
      "utlandsadress": null,
      "kontaktadress": null,
      "relation": [
        {
          "datumFrom": "2010-02-02T00:00:00",
          "datumTill": "9999-12-31T00:00:00",
          "relationstyp": "MAKEMAKAREGISTRERADPARTNER",
          "idNummer": "195401038145",
          "fornamn": null,
          "mellannamn": null,
          "efternamn": null,
          "fodelsetid": "1954-01-03T00:00:00",
          "avregistreringsorsakKod": null,
          "avregistreringsdatum": null,
          "avlidendatum": null
        }
      ],
      "fastighet": null
    }
  ],
  "error": null
}
Null Values and Historical Data

Note that some objects and parameters are returned as null or not returned at all if there are no values or the person has protected identity. In addition to this, several objects can be returned repeatedly if there is historical information, e.g., if the person has changed their name or moved. The objects relation and fastighet are always returned as null unless authorization has been provided.


Response Parameters

The SPAR API returns detailed person information from the Swedish Population Register.

Person Identification

ParameterData typeDescription
personIdObjectObject with person identification
idNummerStringThe requested person number (12 digits)
typStringType of identification number. Possible values: PERSONNUMMER (Person number), SAMORDNINGSNUMMER (Coordination number), IMMUNITETSNUMMER (Immunity number)

Confidentiality Information

ParameterData typeDescription
sekretessmarkeringObjectConfidentiality information
sattAvSPARStringAn attribute in the confidentiality marking indicates whether SPAR has applied confidentiality when the Swedish Population Register has submitted protected registration data without a confidentiality flag
valueStringSpecifies if the person has a secrecy marking (NEJ = No, JA = Yes)

Stand-alone Parameters

Parameters on root level, not within a separate object:

ParameterData typeDescription
sekretessDatumStringDate when the identity was protected
skyddadFolkbokforingStringSpecifies whether the person has protected population registration (NEJ = No, JA = Yes)
skyddadFolkbokforingDatumStringDate when the population registration was protected
senasteAndringSPARStringDate of last change at SPAR
summeradInkomstStringNot used. Always returned as null
inkomstArStringNot used. Always returned as null

Name Information (namn)

This object can return an array of name information if the person has changed their name.

ParameterData typeDescription
datumFromStringDate from in format yyyy-mm-ddThh:mm:ss
datumTillStringDate until in format yyyy-mm-ddThh:mm:ss. Active information has the date 9999-12-31T00:00:00
aviseringsnamnStringSummation of middle name, last name and first name (in that order). Only returned if the total number of characters exceed the allowed limit on the ordinary parameters
fornamnStringFirst name(s)
tilltalsnamnStringCode indicating which of the first names are given names. Note that not all people have a specified given name. Example: Eva Ulla-Karin - Code 10 = "Eva" (First first name), Code 20 = "Ulla" (Second first name), Code 30 = "Karin" (Third first name), Code 23 = "Ulla-Karin" (Combination of second and third first name). Names with hyphens are considered as two
mellannamnStringMiddle name, e.g., if the person has two last names
efternamnStringLast name

Personal Details (persondetaljer)

This object can return an array of information if the information on the person has changed.

ParameterData typeDescription
datumFromStringDate from in format yyyy-mm-ddThh:mm:ss
datumTillStringDate until in format yyyy-mm-ddThh:mm:ss. Active information has the date 9999-12-31T00:00:00
sekretessmarkering.sattAvSPARStringSee above description of sekretessMarkering
sekretessmarkering.valueStringSee above description of sekretessMarkering
skyddadFolkbokforingStringSpecifies whether the person has protected population registration (NEJ = No, JA = Yes)
avregistreringsorsakKodStringDeregistration code. Possible values: AV (Deceased), UV (Emigrated), GN (Old person number), GS (Old coordination number), AS (Annulment of coordination number), OB (Missing person), TA (Technically deregistered), FI (False identity)
avregistreringsdatumStringDate when the person was deregistered from the population register (not returned if deceased)
avlidendatumStringDate of death
antraffadDodDatumStringUsed when the person was found dead. Used when actual date of death is missing
fodelsedatumStringDate of birth. Format: YYYY-MM-DDTHH:MM:SS
fodelselanKodStringCounty of birth. Only populated if taxation authorization has been granted
konStringGender (KVINNA = Woman, MAN = Male)
svenskMedborgareStringAlways returned as null unless authorization has been provided. Indicates with JA or NEJ whether the person is a Swedish citizen
hanvisningObjectObject populated if reference to new or previous person number or coordination number exists. Contains: idNummer (Person or coordination number, 12 digits), typ (Till indicates reference to new number, Fran indicates reference from old number), typSpecified (true if reference type is specified, otherwise false)
snStatusStringReturns value Stangd if the coordination number is suspended. This gives an indication that reference to a new number may exist. Parameters starting with "sn" can only occur for people with a coordination number, and in some cases also for immunity numbers
snTilldelningsdatumStringDate the coordination number was assigned to a person. May be incomplete date with formats: 2019-01-01, 2019-00-00, 0000-00-00, 200101, 2001, 0
snPreliminartVilandeforklaringsdatumStringDate the coordination number is expected to be suspended. However, this date may change. May be incomplete
snFornyelsedatumStringDate the coordination number was renewed. May be incomplete
snVilandeorsakStringReason why the coordination number has been suspended. Possible values: TIDSFRIST (No notification or application for renewal received within five years), AVLIDEN (Person is deceased), ANNAN_ORSAK (Other reason)
snVilandeforklaringsdatumStringDate that the coordination number was declared dormant. May be incomplete
snAvlidendatumStringDate of death. Only populated when snVilandeorsak is AVLIDEN. May be incomplete

Population Registration (folkbokforing)

This object can return an array of information if the person has moved.

ParameterData typeDescription
datumFromStringDate from in format yyyy-mm-ddThh:mm:ss
datumTillStringDate until in format yyyy-mm-ddThh:mm:ss. Active information has the date 9999-12-31T00:00:00
folkbokfordLanKodStringCounty code where the person is registered
folkbokfordKommunKodStringMunicipality code where the person is registered
hemvistStringStates where the person is registered. Possible values: Skrivenpåadressen (Lives at the registered address), Påkommunnenskriven (Has no residence but can be reached at the address), Utankänthemvist (Not known where the person lives)
folkbokforingsdatumStringDate of population registration
distriktKodStringDistrict code where the person is registered

Registered Address (folkbokforingsadress)

This object can return an array of information if the person has moved.

ParameterData typeDescription
svenskAdress.datumFromStringDate from in format yyyy-mm-ddThh:mm:ss
svenskAdress.datumTillStringDate until in format yyyy-mm-ddThh:mm:ss. Active information has the date 9999-12-31T00:00:00
svenskAdress.careOfStringCare of address, usually a name of a person
svenskAdress.utdelningsadress1StringStreet and number, empty if the address information fits within utdelningsadress2
svenskAdress.utdelningsadress2StringStreet and number (includes apartment number when applicable)
svenskAdress.postNrStringZip Code
svenskAdress.postortStringTown

Special Postal Address (sarskildPostadress)

This object can return an array of information if the person has moved. Contains sub-objects internationellAdress or svenskAdress.

ParameterData typeDescription
datumFromStringDate from in format yyyy-mm-ddThh:mm:ss
datumTillStringDate until in format yyyy-mm-ddThh:mm:ss. Active information has the date 9999-12-31T00:00:00
careOfStringCare of address, usually a name of a person
utdelningsadress1StringIf Swedish special address: Street and number, empty if the address information fits within utdelningsadress2. If foreign special address: Address structure can differ between countries
utdelningsadress2StringIf Swedish special address: Street and number (includes apartment number when applicable). If foreign special address: Address structure can differ between countries
utdelningsadress3StringOnly used for foreign special address when needed
postNrStringZip Code
postOrtStringTown
landStringCountry. Only used for foreign special address

Other Address Objects

utlandsadress and kontaktadress objects have similar parameters as sarskildPostadress.

Relation Information (relation)

This object can return an array of information if the person has more than one relation registered. Note: This information is only returned if you are granted the relation authorization.

ParameterData typeDescription
datumFromStringDate from in format yyyy-mm-ddThh:mm:ss
datumTillStringDate until in format yyyy-mm-ddThh:mm:ss. Active information has the date 9999-12-31T00:00:00
relationstypStringType of relation. Possible values: VÅRDNADSHAVARE (Guardian), MAKEMAKAREGISTRERADPARTNER (Husband/Wife/Registered partner)
idNummerStringThe person number (12 digits)
fornamnStringFirst name. Only populated if the person number is missing
mellannamnStringMiddle name. Only populated if the person number is missing
efternamnStringLast name. Only populated if the person number is missing
fodelsetidStringDate of birth. Only populated if the person number is missing (can be incomplete or completely empty)
avregistreringsorsakKodStringDeregistration code. Only AV (Deceased) can be returned
avregistreringsdatumStringDate of deregistration. May be incomplete date with formats: 2019-01-01, 2019-00-00, 0000-00-00, 200101, 2001, 0
avlidendatumStringDate of death. May be incomplete

Property Information (fastighet)

This object can return an array of information if the person is registered as owner of several properties. Note: This information is only returned if you are granted the fastighet authorization.

ParameterData typeDescription
taxeringsenhetsnummerStringProperty unit number for the real estate or, where applicable, the consolidation of property parts
lanKodStringCounty code where the property is located
kommunKodStringMunicipality code where the property is located
fastighetsKodStringProperty codes in SPAR (see PDF for full list of codes: 113, 120, 210, 213, 220, 223, 225, 230, 240)
taxeringsarStringTax year
taxeringsvardeStringTax assessment value
fastighetDelObjectContains nested elements: taxeringsidentitet, fastighetsBeteckning, andelstalsTaljare, and andelstalsNamnare
taxeringsidentitetStringTax assessment identifier
fastighetsBeteckningStringProperty designation
andelstalsTaljareStringOwnership share numerator
andelstalNamnareStringOwnership share denominator

Understanding the Response

The SPAR API provides comprehensive person information from the Swedish Population Register:

  • Historical data - Many objects (namn, persondetaljer, folkbokforing, etc.) can contain arrays with historical information when a person has changed their name, moved, or updated details. Active records have datumTill set to 9999-12-31T00:00:00
  • Null values - Parameters with null values or missing entirely indicate no data or protected identity
  • Authorization-restricted data - The relation and fastighet objects are always null unless specific authorization has been granted
  • Coordination numbers - Parameters starting with "sn" (e.g., snStatus, snTilldelningsdatum) only apply to coordination numbers and immunity numbers
  • Incomplete dates - Some date fields may be incomplete with formats like 2019-00-00, 200101, 2001, or 0
  • Protected identities - Persons with sekretessmarkering.value = "JA" or skyddadFolkbokforing = "JA" have restricted information
  • Address types - Multiple address objects (folkbokforingsadress, sarskildPostadress, utlandsadress, kontaktadress) can contain Swedish or international address formats

Use this comprehensive data to verify identity, validate addresses, and understand a person's registration status in Sweden.