Skip to content

Node.js module for looking up data from DSF (Det sentrale folkeregister)

License

Notifications You must be signed in to change notification settings

telemark/node-dsf

Repository files navigation

Build Status js-standard-style

node-dsf

Node.js module for looking up data from DSF (Det sentrale folkeregister). DSF is register of residents in Norway.

To obtain login credentials and other permissions go to infotorg.no

Installation

From npm

$ npm i node-dsf

Usage

Promises

const dsfLookup = require('node-dsf')

const config = {
  url: 'http://ws-test.infotorg.no/xml/ErgoGroup/DetSentraleFolkeregister1_4/2015-08-10/DetSentraleFolkeregister1_4.wsdl',
// PROD  url: 'http://ws.infotorg.no/xml/ErgoGroup/DetSentraleFolkeregister1_4/2015-08-10/DetSentraleFolkeregister1_4.wsdl',
  namespaceBrukersesjon: 'http://ws.infotorg.no/xml/Admin/Brukersesjon/2006-07-07/Brukersesjon.xsd',
  distribusjonskanal: 'PTP',
  systemnavn: 'systemnavn',
  brukernavn: 'brukernavn',
  passord: 'passord'
}
const method = 'hentDetaljer' // See supported methods
const query = {
  saksref: 'your-reference',
  foedselsnr: '26118633333', // requires this or foedselsdato
  foedselsdato: '261186', // requires this or foedselsnr
  etternavn: 'Enge',
  fornavn: 'Jonas'
}
const options = {
  method,
  config,
  query
}

dsfLookup(options)
  .then(data => console.log(JSON.stringify(data)))
  .catch(error => console.error(error))

Callback

const dsfLookup = require('node-dsf')

const config = {
  url: 'http://ws-test.infotorg.no/xml/ErgoGroup/DetSentraleFolkeregister1_4/2015-08-10/DetSentraleFolkeregister1_4.wsdl',
// PROD  url: 'http://ws.infotorg.no/xml/ErgoGroup/DetSentraleFolkeregister1_4/2015-08-10/DetSentraleFolkeregister1_4.wsdl',
  namespaceBrukersesjon: 'http://ws.infotorg.no/xml/Admin/Brukersesjon/2006-07-07/Brukersesjon.xsd',
  distribusjonskanal: 'PTP',
  systemnavn: 'systemnavn',
  brukernavn: 'brukernavn',
  passord: 'passord'
}
const method = 'hentDetaljer' // See supported methods
const query = {
  saksref: 'your-reference',
  foedselsnr: '26118633333', // requires this or foedselsdato
  foedselsdato: '261186', // requires this or foedselsnr
  etternavn: 'Enge',
  fornavn: 'Jonas'
}
const options = {
  method,
  config,
  query
}

dsfLookup(options, function (error, data) {
  if (error) {
    console.error(error)
  }
  console.log(JSON.stringify(data))
})

Supported methods

You must get access to these methods from both skattedirektoratet and evry (see https://www.infotorg.no/)

(Don't be in a hurry)

  • hentDetaljer
  • hentDetaljer_v2
  • hentForeldre
  • hentForeldre_v2
  • hentRelatertePersoner
  • hentRelatertePersoner_v2
  • hentBarn
  • hentBarn_v2
  • hentEktefelle
  • hentEktefelle_v2
  • hentKjernefamilie
  • hentKjernefamilie_v2

License

MIT

About

Node.js module for looking up data from DSF (Det sentrale folkeregister)

Resources

License

Stars

Watchers

Forks

Packages

No packages published