Example:
curl --location 'https://sanctria.fi/api/v1/auth' \
--header 'Content-Type: application/json' \
--data '{"username":"my_username","password":"my_password"}'
import requests
import json
url = "https://sanctria.fi/api/v1/auth"
payload = json.dumps({
"username": "my_username",
"password": "my_password"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"username": "my_username",
"password": "my_password"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://sanctria.fi/api/v1/auth", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sanctria.fi/api/v1/auth',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{"username":"my_username","password":"my_password"}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\"username\":\"my_username\",\"password\":\"my_password\"}".toRequestBody(mediaType)
val request = Request.Builder()
.url("https://sanctria.fi/api/v1/auth")
.post(body)
.addHeader("Content-Type", "application/json")
.build()
val response = client.newCall(request).execute()
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sanctria.fi/api/v1/auth"
method := "POST"
payload := strings.NewReader(`{"username":"my_username","password":"my_password"}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"username\":\"my_username\",\"password\":\"my_password\"}");
Request request = new Request.Builder()
.url("https://sanctria.fi/api/v1/auth")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
All of the following endpoints require the 'Authorization'-header, in which the token (retrieved in the previous step) is added as follows:
Authorization: Bearer {token}
- The maximum number of names in the body (for the requests to the endpoints which allow multiple names) is set to 2000.
- The maximum number of requested names for which a positive match is found is set to 200. To decrease the number of names for which a match is found, either decrease the number of names in the request, or increase the 'minimum_similarity' parameter.
- The maximum number of requests to single name endpoints per minute is 30.
- The maximum number of requests to multi name endpoints per minute is 5.
(Send an email to info@sanctria.fi if you require higher limits.)
Example:
curl --location 'https://sanctria.fi/api/v1/nameMatch/singleName' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhb...' \
--data '{
"minimum_similarity": "0.94",
"input_name": {
"whole_name": "John Smith",
"entity_type": "individual_sanction_names"
}
}'
import requests
import json
url = "https://sanctria.fi/api/v1/nameMatch/singleName"
payload = json.dumps({
"minimum_similarity": "0.94",
"input_name": {
"whole_name": "John Smith",
"entity_type": "individual_sanction_names"
}
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJhb...'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer eyJhb...");
var raw = JSON.stringify({
"minimum_similarity": "0.94",
"input_name": {
"whole_name": "John Smith",
"entity_type": "individual_sanction_names"
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://sanctria.fi/api/v1/nameMatch/singleName", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sanctria.fi/api/v1/nameMatch/singleName',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"minimum_similarity": "0.94",
"input_name": {
"whole_name": "John Smith",
"entity_type": "individual_sanction_names"
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer eyJhb...'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\n \"minimum_similarity\": \"0.94\",\n \"input_name\": {\n \"whole_name\": \"John Smith\",\n \"entity_type\": \"individual_sanction_names\"\n }\n}".toRequestBody(mediaType)
val request = Request.Builder()
.url("https://sanctria.fi/api/v1/nameMatch/singleName")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer eyJhb...")
.build()
val response = client.newCall(request).execute()
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sanctria.fi/api/v1/nameMatch/singleName"
method := "POST"
payload := strings.NewReader(`{
"minimum_similarity": "0.94",
"input_name": {
"whole_name": "John Smith",
"entity_type": "individual_sanction_names"
}
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer eyJhb...")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"minimum_similarity\": \"0.94\",\n \"input_name\": {\n \"whole_name\": \"John Smith\",\n \"entity_type\": \"individual_sanction_names\"\n }\n}");
Request request = new Request.Builder()
.url("https://sanctria.fi/api/v1/nameMatch/singleName")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer eyJhb...")
.build();
Response response = client.newCall(request).execute();
Example:
curl --location 'https://sanctria.fi/api/v1/nameMatch/listOfNames' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhb...' \
--data '{
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
}'
import requests
import json
url = "https://sanctria.fi/api/v1/nameMatch/listOfNames"
payload = json.dumps({
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJhb...'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer eyJhb...");
var raw = JSON.stringify({
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://sanctria.fi/api/v1/nameMatch/listOfNames", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sanctria.fi/api/v1/nameMatch/listOfNames',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer eyJhb...'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\n \"minimum_similarity\": \"0.94\",\n \"input_names\": [\n {\n \"whole_name\": \"John Smith\",\n \"entity_type\": \"all_sanction_names\"\n },\n {\n \"whole_name\": \"John Smiths Secret Organization\",\n \"entity_type\": \"organization_sanction_names\"\n }\n ]\n}".toRequestBody(mediaType)
val request = Request.Builder()
.url("https://sanctria.fi/api/v1/nameMatch/listOfNames")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer eyJhb...")
.build()
val response = client.newCall(request).execute()
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sanctria.fi/api/v1/nameMatch/listOfNames"
method := "POST"
payload := strings.NewReader(`{
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer eyJhb...")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"minimum_similarity\": \"0.94\",\n \"input_names\": [\n {\n \"whole_name\": \"John Smith\",\n \"entity_type\": \"all_sanction_names\"\n },\n {\n \"whole_name\": \"John Smiths Secret Organization\",\n \"entity_type\": \"organization_sanction_names\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("https://sanctria.fi/api/v1/nameMatch/listOfNames")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer eyJhb...")
.build();
Response response = client.newCall(request).execute();
Example:
curl --location 'https://sanctria.fi/api/v1/pep/singleName' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhb...' \
--data '{
"input_name": {
"whole_name": "Vanhanen Matti"
},
"minimum_similarity": "0.94"
}'
import requests
import json
url = "https://sanctria.fi/api/v1/pep/singleName"
payload = json.dumps({
"input_name": {
"whole_name": "Vanhanen Matti"
},
"minimum_similarity": "0.94"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJhb...'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer eyJhb...");
var raw = JSON.stringify({
"input_name": {
"whole_name": "Vanhanen Matti"
},
"minimum_similarity": "0.94"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://sanctria.fi/api/v1/pep/singleName", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://sanctria.fi/api/v1/pep/singleName',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"input_name": {
"whole_name": "Vanhanen Matti"
},
"minimum_similarity": "0.94"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer eyJhb...'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\n \"input_name\": {\n \"whole_name\": \"Vanhanen Matti\"\n },\n \"minimum_similarity\": \"0.94\"\n}".toRequestBody(mediaType)
val request = Request.Builder()
.url("https://sanctria.fi/api/v1/pep/singleName")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer eyJhb...")
.build()
val response = client.newCall(request).execute()
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sanctria.fi/api/v1/pep/singleName"
method := "POST"
payload := strings.NewReader(`{
"input_name": {
"whole_name": "Vanhanen Matti"
},
"minimum_similarity": "0.94"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer eyJhb...")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"input_name\": {\n \"whole_name\": \"Vanhanen Matti\"\n },\n \"minimum_similarity\": \"0.94\"\n}");
Request request = new Request.Builder()
.url("https://sanctria.fi/api/v1/pep/singleName")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer eyJhb...")
.build();
Response response = client.newCall(request).execute();
Example:
curl --location 'https://sanctria.fi/api/v1/pep/listOfNames' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJhb...' \
--data '{
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
}'
import requests
import json
url = "https://sanctria.fi/api/v1/pep/listOfNames"
payload = json.dumps({
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJhb...'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer eyJhb...");
var raw = JSON.stringify({
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://sanctria.fi/api/v1/pep/listOfNames", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
'https://sanctria.fi/api/v1/pep/listOfNames',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer eyJhb...'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\n \"minimum_similarity\": \"0.94\",\n \"input_names\": [\n {\n \"whole_name\": \"John Smith\",\n \"entity_type\": \"all_sanction_names\"\n },\n {\n \"whole_name\": \"John Smiths Secret Organization\",\n \"entity_type\": \"organization_sanction_names\"\n }\n ]\n}".toRequestBody(mediaType)
val request = Request.Builder()
.url("https://sanctria.fi/api/v1/pep/listOfNames")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer eyJhb...")
.build()
val response = client.newCall(request).execute()
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://sanctria.fi/api/v1/pep/listOfNames"
method := "POST"
payload := strings.NewReader(`{
"minimum_similarity": "0.94",
"input_names": [
{
"whole_name": "John Smith",
"entity_type": "all_sanction_names"
},
{
"whole_name": "John Smiths Secret Organization",
"entity_type": "organization_sanction_names"
}
]
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "Bearer eyJhb...")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"minimum_similarity\": \"0.94\",\n \"input_names\": [\n {\n \"whole_name\": \"John Smith\",\n \"entity_type\": \"all_sanction_names\"\n },\n {\n \"whole_name\": \"John Smiths Secret Organization\",\n \"entity_type\": \"organization_sanction_names\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("https://sanctria.fi/api/v1/pep/listOfNames")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer eyJhb...")
.build();
Response response = client.newCall(request).execute();