Person Register Monitoring
Person Register Monitoring
Documentation
In order to receive webhook events for the event type Person Registry Sweden, you need a webhook monitoring list (bundle) created by Roaring. As soon as you have a bundle in place you may update it by its id, i.e. upload a list of personal numbers to monitor. Please read more about webhook monitoring lists in our guide
There is one sandbox endpoint for updating a bundle. Id and entities don't matter, you may choose freely, the endpoint is there only to provide means to verify the file upload and the format.
Common use-cases:
- Manage monitoring lists for person registry Sweden
Apply for Production Data
This API requires permission. You apply for this through your account. Access Developer, Webhooks, Event types.
The accepted media types are:
- text/csv
- application/json
Webhook events
Every time the Swedish population register (SPAR) reports a change for a person on one of your monitoring
lists, you receive a webhook event of type Person Registry Sweden (personRegistrySe, version 1.0).
Changes are delivered in batches as SPAR reports them, so several events usually arrive together.
How these events differ from other Roaring webhooks
- Full snapshot, no diff. The event contains the person's complete current record in
object. Unlike most other event types, there are nonewAttributesorpreviousAttributes. To find out what changed, compare with the previous event you stored for the samekeyMap.personalNumber. changeTypeis alwaysUPDATE, including when a person dies, emigrates or is otherwise deregistered. Deregistration is signalled insideobject, see Deregistration below.- Current data only. No validity periods (
dateFrom/dateTo) and no history. - The event has its own model, described below. It is not the response model of the Population Register
2.0 API, and field names differ. For example, the API's
deRegistrationReasonCodeisdeRegistrationReasonin the event.
Event structure
{
"changeType": "UPDATE",
"requestType": "payload",
"countryCodes": ["se"],
"keyMap": { "personalNumber": "194812161596" },
"messageId": "6b1f3c2e-8d4a-4f7e-9c21-3a5e7d0b9f14",
"type": "personRegistrySe",
"version": "1.0",
"timestamp": 1790726400,
"object": { "...": "see Person below" }
}
Field | Description |
|---|---|
type | Always personRegistrySe |
version | Event model version, 1.0 |
changeType | Always UPDATE |
requestType | Always payload (monitoring lists get no continue requests) |
keyMap.personalNumber | Personal number or coordination number (12 digits) of the monitored person |
messageId | Identifier of the message, see the webhooks guide |
countryCodes | Always ["se"] |
timestamp | Unix time (seconds) of the SPAR delivery the change came from |
object | The person's current record, see below |
Person (object)
Fields without a value are left out. Dates are yyyy-MM-dd unless noted.
Field | Type | Description |
|---|---|---|
personalNumber | string | Personal number or coordination number |
secrecyMarked | boolean | The person is secrecy marked, see Secrecy-marked persons below |
secrecyChangeDate | date | Date the secrecy marking changed |
nationalRegistryChangeDate | date | Date of the latest change for the person in SPAR |
details | array of Details | Name and personal details (one element) |
address | Address | Registered, special postal and foreign addresses |
relation | array of Relation | Spouse/registered partner and guardians |
Details
Field | Type | Description |
|---|---|---|
firstName, middleName, surName | string | Name |
givenName | integer | Position of the given name(s) within firstName: 10 = first name, 20 = second name, 12 = first and second name |
notificationName | string | Shortened name used on mail |
birthDate | date | Date of birth |
gender | string | M or F |
secrecyMarked | boolean | Secrecy marking |
protectedPublicRecords | boolean | Protected population registration (skyddad folkbokföring) |
deRegistrationReason | string | Set when the person is deregistered, see Deregistration reason codes below |
deceasedDate | string | Date of death. Can be incomplete: day and/or month is 00 when unknown, e.g. 2026-08-00 |
encounteredDeadDate | date | Date the person was found dead, when the exact date of death is unknown |
Rows per page
Address
Field | Type | Description |
|---|---|---|
nationalRegistrationAddress | array | Registered address: careOf, deliveryAddress1, deliveryAddress2, postalNumber, city, countyCode, communeCode, districtCode, registrationDate |
specialPostAddress | array | Special postal address: careOf, deliveryAddress1, deliveryAddress2, postalNumber, city |
foreignAddress | array | Address abroad: deliveryAddress1, deliveryAddress2, deliveryAddress3, country (Swedish country name, e.g. NORGE) |
Relation
Field | Type | Description |
|---|---|---|
relationType | string | M = spouse / registered partner, V = guardian |
personalNumber | string | The related person's personal number |
firstName, middleName, surName, birthDate | — | Name and birth date of the related person, when available |
deRegistrationReason, deceasedDate | — | Deregistration of the related person |
Deregistration
A person is deregistered when object.details[].deRegistrationReason is present. changeType is still UPDATE.
"object": {
"details": [ { "deRegistrationReason": "UV", "...": "..." } ]
}
- No deregistration date is delivered. SPAR doesn't include it in monitoring deliveries. Use
nationalRegistryChangeDateas the date of the change, ordeceasedDatefor deaths. - Deceased (
AV):deceasedDateis set. If the person was found dead,encounteredDeadDateis also set anddeceasedDatemay be incomplete (e.g.2026-08-00). Don't parsedeceasedDateas a strict ISO date. - Emigrated (
UV): usuallyaddress.foreignAddressholds the address abroad, andnationalRegistrationAddresstypically only keeps the last county and municipality codes. - Changed personal number (
GN,GS):personalNumberChangedToholds the new number. Add it to your monitoring list to keep following the person.
Deregistration reason codes
These are the codes used by SPAR, the same as in the Population Register 2.0 API.
Code | Swedish | English |
|---|---|---|
| AV | Avliden | Deceased |
| UV | Utvandrad | Emigrated |
| GN | Bytt personnummer | Changed personal number |
| GS | Bytt samordningsnummer | Changed coordination number |
| AS | Annullerat samordningsnummer | Annulled coordination number |
| FI | Falsk identitet | False identity |
| OB | Försvunnen | Disappeared |
| TA | Teknisk avregistrering | Technical deregistration |
Secrecy-marked persons
When a person becomes secrecy marked (sekretessmarkering), the event only contains:
"object": { "personalNumber": "199105012380", "secrecyMarked": true, "secrecyChangeDate": "2026-09-29" }
Any previously stored information about the person should be removed in compliance with local laws.
Sample events
Complete example events are available under Event types: open Person Register Monitoring and choose Sample objects.
Sample | Scenario |
|---|---|
| UPDATE 1 | Change of registered address |
| UPDATE 2 | Deregistered, emigrated (UV) |
| UPDATE 3 | Deregistered, deceased (AV) |
| UPDATE 4 | Deregistered, found dead, with incomplete date of death |
| UPDATE 5 | Secrecy-marked person |
Status
Status Values:
APPROVED- Bundle has been processed by SPAR.INCORRECT- Validation of bundle has failed on our end. Please contact us if you come across this status.MISSING- Something has gone wrong on our end. Please contact us if you come across this status.PENDING- Bundle is being processed by SPAR.SENT_IN- Bundle sent in to SPAR.
Status values when updating monitoring list
- On update expect status
PENDINGorSENT_INif the file is great in size. - Run list monitoring list every other minute until other status than
PENDINGorSENT_IN. - If status is
APPROVEDthe job is completed. - Else if status is
INCORRECTorMISSING, take appropriate measures according to status values.
Endpoints
Update monitoring list
Update monitoring list
https://api.roaring.io/se/person/monitoring/1.0/bundle/{id}Parameters path
idrequired | string |
file | stringCSV or a JSON file containing rows of personal numbers |
Response schema: application/json
createdAtinteger <int64>
Unix timestamp for when the event was created
descriptionstring
Description of monitoring list
idstring
ID of monitoring list
numberOfEntitiesinteger <int32>
Number of entities the list contains
statusstring
Status of monitoring list
Enum:
"MISSING","SENT_IN","APPROVED","INCORRECT","PENDING"updatedAtinteger <int64>
Unix timestamp for when the event was updated
List monitoring lists
List monitoring lists
https://api.roaring.io/se/person/monitoring/1.0/bundles