Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Yepstr/node-statenspersonadressregister
https://github.com/Yepstr/node-statenspersonadressregister
Last synced: 28 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/Yepstr/node-statenspersonadressregister
- Owner: Yepstr
- Created: 2017-05-09T09:14:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-05T23:17:41.000Z (over 7 years ago)
- Last Synced: 2024-11-06T08:47:44.138Z (about 1 month ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-sweden - JavaScript
README
# node-statenspersonadressregister
A library that can be used to query to SPAR (https://www.statenspersonadressregister.se/).
SPAR is a service that is provided by the Swedish government for access to data about Swedish citizens.
Information on how to gain access to this service can be read on the SPAR website.## Requirements
Make sure you have your certificate from Steria and the account information you need to access the test servers## Usage
Make sure your project depend on `node-statenspersonadressregister` and then:```
import SPAR from 'spar';
const SPAR_OPTIONS = {
certPath: '', // file path to the certificate from Steria [cert.p12]
passphrase: '', // The passphrase for the certificate
kundNr: '', // From SPAR
orgNr: '', // From SPAR,
slutAnvandarId: '', // From SPAR,
baseUrl: '', // url to SPAR
};const spar = new SPAR(SPAR_OPTIONS);
```### Personsök
```
spar.personSok(PERSONNUMMER).then((result) => {
// result is an array of results, should only be 1 entry
}, (error) => {
// something went wrong, error has more info
});
```## More information
https://www.statenspersonadressregister.se/download/18.41febba7149eb27c07a50fb/1447748382337/SPAR_Systemgränssnitt_ver_1-74.pdf