curl --request POST \
--url https://ss12000.staging.meitner.se/api/v1/persons/lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"d544563a-747a-42d3-8d37-415a101537fa"
],
"civicNos": [
"201002037271"
]
}
'import requests
url = "https://ss12000.staging.meitner.se/api/v1/persons/lookup"
payload = {
"ids": ["d544563a-747a-42d3-8d37-415a101537fa"],
"civicNos": ["201002037271"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['d544563a-747a-42d3-8d37-415a101537fa'], civicNos: ['201002037271']})
};
fetch('https://ss12000.staging.meitner.se/api/v1/persons/lookup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ss12000.staging.meitner.se/api/v1/persons/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'd544563a-747a-42d3-8d37-415a101537fa'
],
'civicNos' => [
'201002037271'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ss12000.staging.meitner.se/api/v1/persons/lookup"
payload := strings.NewReader("{\n \"ids\": [\n \"d544563a-747a-42d3-8d37-415a101537fa\"\n ],\n \"civicNos\": [\n \"201002037271\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ss12000.staging.meitner.se/api/v1/persons/lookup")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"d544563a-747a-42d3-8d37-415a101537fa\"\n ],\n \"civicNos\": [\n \"201002037271\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ss12000.staging.meitner.se/api/v1/persons/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"d544563a-747a-42d3-8d37-415a101537fa\"\n ],\n \"civicNos\": [\n \"201002037271\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"personStatus": "Aktiv",
"addresses": [
{
"country": "country",
"countyCode": 0,
"streetAddress": "streetAddress",
"postalCode": "postalCode",
"locality": "locality",
"type": "Folkbokföring",
"municipalityCode": 6,
"realEstateDesignation": "realEstateDesignation"
},
{
"country": "country",
"countyCode": 0,
"streetAddress": "streetAddress",
"postalCode": "postalCode",
"locality": "locality",
"type": "Folkbokföring",
"municipalityCode": 6,
"realEstateDesignation": "realEstateDesignation"
}
],
"securityMarking": "Ingen",
"givenName": "givenName",
"sex": "Man",
"photo": "https://openapi-generator.tech",
"birthDate": "2000-01-23T00:00:00.000Z",
"civicNo": {
"nationality": "SE",
"value": "value"
},
"phoneNumbers": [
{
"mobile": true,
"type": "Hem",
"value": "value"
},
{
"mobile": true,
"type": "Hem",
"value": "value"
}
],
"externalIdentifiers": [
{
"globallyUnique": true,
"context": "http://linkoping.se/AD",
"value": "value"
},
{
"globallyUnique": true,
"context": "http://linkoping.se/AD",
"value": "value"
}
],
"emails": [
{
"type": "Privat",
"value": "value"
},
{
"type": "Privat",
"value": "value"
}
],
"eduPersonPrincipalNames": [
"eduPersonPrincipalNames",
"eduPersonPrincipalNames"
],
"meta": {
"created": "2000-01-23T04:56:07.000Z",
"modified": "2000-01-23T04:56:07.000Z"
},
"familyName": "familyName",
"middleName": "middleName",
"enrolments": [
{
"endDate": "2000-01-23T00:00:00.000Z",
"schoolType": null,
"schoolYear": 1,
"cancelled": true,
"specification": "specification",
"enroledAt": null,
"educationCode": "educationCode",
"programme": null,
"startDate": "2000-01-23T00:00:00.000Z"
},
{
"endDate": "2000-01-23T00:00:00.000Z",
"schoolType": null,
"schoolYear": 1,
"cancelled": true,
"specification": "specification",
"enroledAt": null,
"educationCode": "educationCode",
"programme": null,
"startDate": "2000-01-23T00:00:00.000Z"
}
],
"responsibles": [
{
"relationType": null,
"person": null
},
{
"relationType": null,
"person": null
}
],
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}
]{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Hämta många personer baserat på en lista av ID:n eller personnummer.
Istället för att hämta personer en i taget med en loop av GET-anrop så finns det även möjlighet att hämta många personer på en gång genom att skicka ett anrop med en lista med önskade personer.
curl --request POST \
--url https://ss12000.staging.meitner.se/api/v1/persons/lookup \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ids": [
"d544563a-747a-42d3-8d37-415a101537fa"
],
"civicNos": [
"201002037271"
]
}
'import requests
url = "https://ss12000.staging.meitner.se/api/v1/persons/lookup"
payload = {
"ids": ["d544563a-747a-42d3-8d37-415a101537fa"],
"civicNos": ["201002037271"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({ids: ['d544563a-747a-42d3-8d37-415a101537fa'], civicNos: ['201002037271']})
};
fetch('https://ss12000.staging.meitner.se/api/v1/persons/lookup', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ss12000.staging.meitner.se/api/v1/persons/lookup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ids' => [
'd544563a-747a-42d3-8d37-415a101537fa'
],
'civicNos' => [
'201002037271'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ss12000.staging.meitner.se/api/v1/persons/lookup"
payload := strings.NewReader("{\n \"ids\": [\n \"d544563a-747a-42d3-8d37-415a101537fa\"\n ],\n \"civicNos\": [\n \"201002037271\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://ss12000.staging.meitner.se/api/v1/persons/lookup")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ids\": [\n \"d544563a-747a-42d3-8d37-415a101537fa\"\n ],\n \"civicNos\": [\n \"201002037271\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ss12000.staging.meitner.se/api/v1/persons/lookup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ids\": [\n \"d544563a-747a-42d3-8d37-415a101537fa\"\n ],\n \"civicNos\": [\n \"201002037271\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"personStatus": "Aktiv",
"addresses": [
{
"country": "country",
"countyCode": 0,
"streetAddress": "streetAddress",
"postalCode": "postalCode",
"locality": "locality",
"type": "Folkbokföring",
"municipalityCode": 6,
"realEstateDesignation": "realEstateDesignation"
},
{
"country": "country",
"countyCode": 0,
"streetAddress": "streetAddress",
"postalCode": "postalCode",
"locality": "locality",
"type": "Folkbokföring",
"municipalityCode": 6,
"realEstateDesignation": "realEstateDesignation"
}
],
"securityMarking": "Ingen",
"givenName": "givenName",
"sex": "Man",
"photo": "https://openapi-generator.tech",
"birthDate": "2000-01-23T00:00:00.000Z",
"civicNo": {
"nationality": "SE",
"value": "value"
},
"phoneNumbers": [
{
"mobile": true,
"type": "Hem",
"value": "value"
},
{
"mobile": true,
"type": "Hem",
"value": "value"
}
],
"externalIdentifiers": [
{
"globallyUnique": true,
"context": "http://linkoping.se/AD",
"value": "value"
},
{
"globallyUnique": true,
"context": "http://linkoping.se/AD",
"value": "value"
}
],
"emails": [
{
"type": "Privat",
"value": "value"
},
{
"type": "Privat",
"value": "value"
}
],
"eduPersonPrincipalNames": [
"eduPersonPrincipalNames",
"eduPersonPrincipalNames"
],
"meta": {
"created": "2000-01-23T04:56:07.000Z",
"modified": "2000-01-23T04:56:07.000Z"
},
"familyName": "familyName",
"middleName": "middleName",
"enrolments": [
{
"endDate": "2000-01-23T00:00:00.000Z",
"schoolType": null,
"schoolYear": 1,
"cancelled": true,
"specification": "specification",
"enroledAt": null,
"educationCode": "educationCode",
"programme": null,
"startDate": "2000-01-23T00:00:00.000Z"
},
{
"endDate": "2000-01-23T00:00:00.000Z",
"schoolType": null,
"schoolYear": 1,
"cancelled": true,
"specification": "specification",
"enroledAt": null,
"educationCode": "educationCode",
"programme": null,
"startDate": "2000-01-23T00:00:00.000Z"
}
],
"responsibles": [
{
"relationType": null,
"person": null
},
{
"relationType": null,
"person": null
}
],
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91"
}
]{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Beskriver om expanderade data ska hämtas
duties, responsibleFor, placements, ownedPlacements, groupMemberships Returnera displayName för alla refererade objekt.
Body
En lista med personnummer och / eller uuid:n på personer.
Response
Anropet lyckades.
Ett objekt ska ha samma överförings-ID mellan samtliga ingående system och således är det ett enda namespace för de gemensamma ID:na. Objektidentifikatorn är den nyckel som skall vara persistent mellan olika processer (enl figur 1).
Show child attributes
Show child attributes
{
"created": "2000-01-23T04:56:07.000Z",
"modified": "2000-01-23T04:56:07.000Z"
}
Förnamn.
Efternamn.
Mellannamn.
De identifierare som ska användas för att identifiera användaren i skilda e-tjänster. Identifieraren ska vara en spårbar, persistent och globalt unik sträng. Den ska bestå av en lokalt unik användaridentifierare, ett '@' och en domän. En domän är ofta, men inte nödvändigtvis, samma som organisationens internet-domännamn. Exempel: kalko@edu.goteborg.se
Show child attributes
Show child attributes
Personnummer.
Show child attributes
Show child attributes
{ "nationality": "SE", "value": "value" }
Födelsedatum (RFC 3339-format, t.ex. "2016-10-15")
Biologiskt kön
Man, Kvinna, Okänt Återspeglar värdet från folkbokföringsregistret.
Ingen, Sekretessmarkering, Skyddad folkbokföring Anger ifall en person har en aktiv status eller en annan status, såsom utvandrad eller avliden.
Aktiv, Utvandrad, Avliden En lista med personens epostadresser
Show child attributes
Show child attributes
En lista med telefonnummer till personen.
Show child attributes
Show child attributes
En lista med personens postadresser
Show child attributes
Show child attributes
Pekar ut en resurs med en bild på personen, specificeras som en URI enligt RFC 3986.
En lista med inskrivningar för personen
Show child attributes
Show child attributes
Personens vårdnadshavare eller motsvarande relationer så som familjehemsförälder. Denna relation beskriver ett officiellt ansvarsförhållande.
Show child attributes
Show child attributes
Show child attributes
Show child attributes