Authorization
The service registry API uses OAuth2 for authorization and expects self-contained JWTs from Maskinporten. The JWT token requests to Maskinporten are expected to contain x5c for the Norwegian business certificate (SEIDv1 or SEIDv2) the token request was signed with.
-
Maskinporten (external link)
eFormidling creates OAuth clients in Maskinporten as part of the onboarding process:
-
The Client ID is
MOVE_IP_<orgnumber>
-
One or more of the following scopes are granted to the client:
-
move/dpo.read
(eFormidlings meldingstjeneste) -
move/dpe.read
(eInnsyns meldingstjeneste) -
move/dpi.read
(Digital Post til Innbyggere) -
move/dpf.read
(KS SvarUt og SvarInn) -
move/dpv.read
(Altinn Digital Post)
-
The services
HTTP Method | URL | Description | Media type(s) |
---|---|---|---|
GET |
application/json, application/jose |
||
GET |
application/json, application/jose |
||
GET |
application/json, application/jose |
Service Records
Lookup all service records
The service is used to get the info record, and all possible service records for the specified identifier
Organization
Parameter | Description |
---|---|
|
Organization number, or personal identification number |
Parameter | Description |
---|---|
|
Security level. Only applies to receivers on the KS Fiks platform. Default is highest available for receiver. |
|
Conversation ID for the request. Used for logging purposes. |
Name | Description |
---|---|
|
Bearer <JWT> |
$ curl 'http://localhost:8080/identifier/123123123' -i -X GET \
-H 'Accept: application/json'
GET /identifier/123123123 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1724
{
"infoRecord" : {
"identifier" : "123123123",
"organizationName" : "foo",
"postadresse" : {
"adresse" : "Skrivarvegen 42",
"postnummer" : "1337",
"poststed" : "teststed",
"land" : "testland"
},
"entityType" : {
"name" : "ORGL"
}
},
"serviceRecords" : [ {
"organisationNumber" : "123123123",
"pemCertificate" : "-----BEGIN CERTIFICATE-----\npem123\n-----END CERTIFICATE-----\n",
"process" : "urn:no:difi:profile:arkivmelding:administrasjon:ver1.0",
"documentTypes" : [ "urn:no:difi:arkivmelding:xsd::arkivmelding" ],
"service" : {
"identifier" : "DPO",
"endpointUrl" : "http://endpoint.here",
"serviceCode" : "4192",
"serviceEditionCode" : "270815",
"securityLevel" : null
}
}, {
"organisationNumber" : "123123123",
"pemCertificate" : null,
"process" : "urn:no:difi:profile:arkivmelding:tekniskeTjenester:ver1.0",
"documentTypes" : [ "urn:no:difi:profile:arkivmelding:tekniskeTjenester:ver1.0" ],
"service" : {
"identifier" : "DPV",
"endpointUrl" : "http://endpoint.here",
"serviceCode" : "4255",
"serviceEditionCode" : "9",
"securityLevel" : null
}
}, {
"organisationNumber" : "123123123",
"pemCertificate" : "-----BEGIN CERTIFICATE-----\npem567\n-----END CERTIFICATE-----\n",
"process" : "urn:no:difi:profile:einnsyn:innsynskrav:ver1.0",
"documentTypes" : [ "urn:no:difi:einnsyn:xsd::innsynskrav" ],
"service" : {
"identifier" : "DPE",
"endpointUrl" : "innsyn",
"serviceCode" : null,
"serviceEditionCode" : null,
"securityLevel" : null
}
} ]
}
Person
Parameter | Description |
---|---|
|
Organization number, or personal identification number |
Parameter | Description |
---|---|
|
Security level. Only applies to receivers on the KS Fiks platform. Default is highest available for receiver. |
|
Conversation ID for the request. Used for logging purposes. |
Name | Description |
---|---|
|
Bearer <JWT> |
$ curl 'http://localhost:8080/identifier/12345678901' -i -X GET \
-H 'Accept: application/json'
GET /identifier/12345678901 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1245
{
"infoRecord" : {
"identifier" : "12345678901",
"entityType" : {
"name" : "citizen"
}
},
"serviceRecords" : [ {
"organisationNumber" : "12345678901",
"pemCertificate" : "-----BEGIN CERTIFICATE-----\ncert123\n-----END CERTIFICATE-----\n",
"process" : "urn:no:difi:profile:digitalpost:info:ver1.0",
"documentTypes" : [ "urn:no:difi:digitalpost:xsd:digital::digital", "urn:no:difi:digitalpost:xsd:fysisk::print" ],
"service" : {
"identifier" : "DPI",
"endpointUrl" : "http://dpi.endpoint.here",
"serviceCode" : null,
"serviceEditionCode" : null,
"securityLevel" : null
},
"orgnrPostkasse" : "post123",
"postkasseAdresse" : "adr123",
"mobilnummer" : "123",
"kanVarsles" : true,
"epostAdresse" : "post@post.foo",
"fysiskPost" : false,
"postAddress" : {
"name" : "Address name",
"street" : "Street x",
"postalCode" : "Postal code",
"postalArea" : "Area",
"country" : "Country"
},
"returnAddress" : {
"name" : "Address name",
"street" : "Street x",
"postalCode" : "Postal code",
"postalArea" : "Area",
"country" : "Country"
}
} ]
}
Errors
Identifier not found
$ curl 'http://localhost:8080/identifier/404040404' -i -X GET \
-H 'Accept: application/json'
GET /identifier/404040404 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 99
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
{
"error_code" : "",
"error_description" : "Entity with identifier '404040404' not found."
}
Receiver does not have given security level
This only applies to receivers on the KS Fiks platform. https://ks-no.github.io/fiks-platform/
$ curl 'http://localhost:8080/identifier/321321321?securityLevel=4' -i -X GET \
-H 'Accept: application/json'
GET /identifier/321321321?securityLevel=4 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 78
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
{
"error_code" : "",
"error_description" : "security level not found"
}
Lookup by process
One may lookup a single service record by its given process. A list of valid processes can be found here: https://difi.github.io/felleslosninger/eformidling_nm_message.html
Arkivmelding
Parameter | Description |
---|---|
|
Organization number, or personal identification number |
|
Process identifier |
Parameter | Description |
---|---|
|
Security level. Only applies to receivers on the KS Fiks platform. Default is highest available for receiver. |
|
Conversation ID for the request. Used for logging purposes. |
Name | Description |
---|---|
|
Bearer <JWT> |
$ curl 'http://localhost:8080/identifier/123123123/process/urn:no:difi:profile:arkivmelding:administrasjon:ver1.0' -i -X GET \
-H 'Accept: application/json'
GET /identifier/123123123/process/urn:no:difi:profile:arkivmelding:administrasjon:ver1.0 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 823
{
"infoRecord" : {
"identifier" : "123123123",
"organizationName" : "foo",
"postadresse" : {
"adresse" : "Skrivarvegen 42",
"postnummer" : "1337",
"poststed" : "teststed",
"land" : "testland"
},
"entityType" : {
"name" : "ORGL"
}
},
"serviceRecords" : [ {
"organisationNumber" : "123123123",
"pemCertificate" : "-----BEGIN CERTIFICATE-----\npem123\n-----END CERTIFICATE-----\n",
"process" : "urn:no:difi:profile:arkivmelding:administrasjon:ver1.0",
"documentTypes" : [ "urn:no:difi:arkivmelding:xsd::arkivmelding" ],
"service" : {
"identifier" : "DPO",
"endpointUrl" : "http://endpoint.here",
"serviceCode" : "4192",
"serviceEditionCode" : "270815",
"securityLevel" : null
}
} ]
}
eInnsyn
Parameter | Description |
---|---|
|
Organization number, or personal identification number |
|
Process identifier |
Parameter | Description |
---|---|
|
Security level. Only applies to receivers on the KS Fiks platform. Default is highest available for receiver. |
|
Conversation ID for the request. Used for logging purposes. |
Name | Description |
---|---|
|
Bearer <JWT> |
$ curl 'http://localhost:8080/identifier/123123123/process/urn:no:difi:profile:einnsyn:innsynskrav:ver1.0' -i -X GET \
-H 'Accept: application/json'
GET /identifier/123123123/process/urn:no:difi:profile:einnsyn:innsynskrav:ver1.0 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 789
{
"infoRecord" : {
"identifier" : "123123123",
"organizationName" : "foo",
"postadresse" : {
"adresse" : "Skrivarvegen 42",
"postnummer" : "1337",
"poststed" : "teststed",
"land" : "testland"
},
"entityType" : {
"name" : "ORGL"
}
},
"serviceRecords" : [ {
"organisationNumber" : "123123123",
"pemCertificate" : "-----BEGIN CERTIFICATE-----\npem567\n-----END CERTIFICATE-----\n",
"process" : "urn:no:difi:profile:einnsyn:innsynskrav:ver1.0",
"documentTypes" : [ "urn:no:difi:einnsyn:xsd::innsynskrav" ],
"service" : {
"identifier" : "DPE",
"endpointUrl" : "innsyn",
"serviceCode" : null,
"serviceEditionCode" : null,
"securityLevel" : null
}
} ]
}
Digital post
Parameter | Description |
---|---|
|
Organization number, or personal identification number |
|
Process identifier |
Parameter | Description |
---|---|
|
Security level. Only applies to receivers on the KS Fiks platform. Default is highest available for receiver. |
|
Conversation ID for the request. Used for logging purposes. |
Name | Description |
---|---|
|
Bearer <JWT> |
$ curl 'http://localhost:8080/identifier/12345678901/process/urn:no:difi:profile:digitalpost:info:ver1.0' -i -X GET \
-H 'Accept: application/json'
GET /identifier/12345678901/process/urn:no:difi:profile:digitalpost:info:ver1.0 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Disposition: inline;filename=f.txt
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 1245
{
"infoRecord" : {
"identifier" : "12345678901",
"entityType" : {
"name" : "citizen"
}
},
"serviceRecords" : [ {
"organisationNumber" : "12345678901",
"pemCertificate" : "-----BEGIN CERTIFICATE-----\ncert123\n-----END CERTIFICATE-----\n",
"process" : "urn:no:difi:profile:digitalpost:info:ver1.0",
"documentTypes" : [ "urn:no:difi:digitalpost:xsd:digital::digital", "urn:no:difi:digitalpost:xsd:fysisk::print" ],
"service" : {
"identifier" : "DPI",
"endpointUrl" : "http://dpi.endpoint.here",
"serviceCode" : null,
"serviceEditionCode" : null,
"securityLevel" : null
},
"orgnrPostkasse" : "post123",
"postkasseAdresse" : "adr123",
"mobilnummer" : "123",
"kanVarsles" : true,
"epostAdresse" : "post@post.foo",
"fysiskPost" : false,
"postAddress" : {
"name" : "Address name",
"street" : "Street x",
"postalCode" : "Postal code",
"postalArea" : "Area",
"country" : "Country"
},
"returnAddress" : {
"name" : "Address name",
"street" : "Street x",
"postalCode" : "Postal code",
"postalArea" : "Area",
"country" : "Country"
}
} ]
}
Lookup info records
Organization
Parameter | Description |
---|---|
|
Organization number, or personal identification number |
Name | Description |
---|---|
|
Bearer <JWT> |
$ curl 'http://localhost:8080/info/123123123' -i -X GET \
-H 'Accept: application/json'
GET /info/123123123 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 332
{
"infoRecord" : {
"identifier" : "123123123",
"organizationName" : "foo",
"postadresse" : {
"adresse" : "Skrivarvegen 42",
"postnummer" : "1337",
"poststed" : "teststed",
"land" : "testland"
},
"entityType" : {
"name" : "ORGL"
}
},
"serviceRecords" : [ ]
}
Person
Parameter | Description |
---|---|
|
Organization number, or personal identification number |
Name | Description |
---|---|
|
Bearer <JWT> |
$ curl 'http://localhost:8080/info/12345678901' -i -X GET \
-H 'Accept: application/json'
GET /info/12345678901 HTTP/1.1
Accept: application/json
Host: localhost:8080
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 146
{
"infoRecord" : {
"identifier" : "12345678901",
"entityType" : {
"name" : "citizen"
}
},
"serviceRecords" : [ ]
}