API‑dokumentation
Opslag i Robinsonlisten via REST‑API
Endpoint
POST https://robinsonlistenapi.dk/api/v1/identifications
Godkendelse
Inkludér jeres API‑nøgle i forespørgslen:
{
"api_key": "your_api_key_here",
"identifications": [...]
}
Request‑format
Send en liste med personer, I vil kontrollere. Hver person kan indeholde:
| Parameter | Type | Beskrivelse |
|---|---|---|
| first_name | string | Fornavn |
| last_name | string | Efternavn |
| address | string | Adresse (vej + husnummer) |
| phone | string | Telefonnummer (8 cifre) |
Eksempel
fetch(
'https://robinsonlistenapi.dk/api/v1/identifications',
{
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
search: [
{ query: 'Marcus Jensen' },
{ query: 'Flakholmen 14 st. th.', id: 1 },
{ first_name: 'Hans', last_name: 'Schøller', id: 203 },
{ phone_number: '+4512344321' }
],
api_key: 'your_api_key_here'
})
}
)
.then(response => response.json())
.then(data => { console.log(data); return data; });
fetch(
'https://robinsonlistenapi.dk/api/v1/identifications?' +
new URLSearchParams({
search: 'Marcus Jensen',
api_key: 'your_api_key_here'
})
)
.then(response => response.json())
.then(data => { console.log(data); return data; });
require 'net/http'
require 'uri'
uri = URI.parse('https://robinsonlistenapi.dk/api/v1/identifications')
params = { search: 'Marcus Jensen', api_key: 'your_api_key_here' }
uri.query = URI.encode_www_form(params)
response = Net::HTTP.get_response(uri)
data = JSON.parse(response.body)
puts data
require 'net/http'
require 'json'
uri = URI('https://robinsonlistenapi.dk/api/v1/identifications')
request = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
request.body = JSON.dump({
search: [
{ query: 'Marcus Jensen' },
{ query: 'Flakholmen 14 st. th.', "id": 1, },
{ first_name: 'Hans', last_name: 'Schøller', "id": 203, },
{ phone_number: '+4512344321' }
],
api_key: 'your_api_key_here'
})
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(request)
end
response_data = JSON.parse(response.body)
puts response_data
curl -X GET \
'https://robinsonlistenapi.dk/api/v1/identifications?search=Marcus%20Jensen&api_key=your_api_key_here'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://robinsonlistenapi.dk/api/v1/identifications?search=Marcus%20Jensen&api_key=your_api_key_here',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
$data = json_decode
import requests
params = {
"search": "Marcus Jensen",
"api_key": "your_api_key_here"
}
response = requests.get("https://robinsonlistenapi.dk/api/v1/identifications", params=params)
data = response.json()
print(data)
Responsformat
[
{
"query": "Marcus Jensen",
"result": {
"robinsonlisten": "1",
"robinson_matched_on": "first_name, last_name",
"robinson_match_attempts": "first_name, last_name, address"
}
},
{
"query": "Flakholmen 14 st. th.",
"id": 1,
"result": {
"robinsonlisten": "1",
"robinson_matched_on": "address",
"robinson_match_attempts": "first_name, last_name, address"
}
},
{
"first_name": "Ole",
"last_name": "Schøller",
"id": 203,
"result": {
"robinsonlisten": "0",
"robinson_match_attempts": "first_name, last_name, address, phone"
}
},
{
"phone_number": "+4512344321",
"result": {
"robinsonlisten": "1",
"robinson_matched_on": "first_name, last_name, address",
"robinson_match_attempts": "first_name, last_name, address",
"phone_lookup_data": {
"first_name": "Marcus",
"last_name": "Jensen",
"address": "Flakholmen 14 st. th."
}
}
}
]
[
{
"query": "Marcus Jensen",
"result": {
"robinsonlisten": "1",
"robinson_matched_on": "first_name, last_name",
"robinson_match_attempts": "first_name, last_name, address"
}
}
]
Svarfelter
| Felt | Beskrivelse |
|---|---|
| robinsonlisten | "1" = på listen, "0" = ikke på listen |
| robinson_matched_on | Hvilke felter der matchede (f.eks. "first_name, last_name") |
| robinson_match_attempts | Hvilke felter der blev brugt til søgning |
| phone_lookup_data | Kun ved telefon opslag - data om ejeren af nummeret |
Eksempel Fortolkning
Hvis response viser:
[
{
"query": "Marcus Jensen",
"result": {
"robinsonlisten": "1",
"robinson_matched_on": "first_name, last_name",
"robinson_match_attempts": "first_name, last_name, address"
}
}
]
Betyder det: Søgningen på "Marcus Jensen" returnerede et match. Personen er på Robinsonlisten og blev matchet på navn (first_name, last_name).
Batch Opslag
Du kan sende flere personer i samme request for at optimere hastigheden.
Tip: For store datamængder (>1000 personer) – kontakt os for adgang til vores dedikerede batch‑endpoint med højere grænser.