NameScan API Reference v2
Welcome to the NameScan RESTful API. You can use our API to access NameScan functionalities.
The NameScan API is organised around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, such as HTTP authentication and HTTP verbs, which are understood by off-the-shelf HTTP clients. We support cross-origin resource sharing, allowing you to interact securely with our API from a client-side web application (though you should never expose your secret API key in any public website’s client-side code). JSON is returned by all API responses, including errors.
We have language bindings in cUrl, Ruby, and Python. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Old API References
This document is related to API 2.0. You can find old version documents if you use prevoius versions.
NameScan API Reference v1 |
Authentication
Authenticate your account when using the API by including your secret or test API key in the request. You can manage your API keys in your profile. Your API keys carry many privileges, so be sure to keep them secret! Do not share your secret API keys in publicly accessible areas.
NameScan API expects for the API key to be included in all API requests to the server in a header that looks like the following:
api-key: your-api-key
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Errors
NameScan uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx
range indicate success, codes in the 4xx
range indicate an error that failed given the information provided (e.g. a required parameter was omitted, etc) and codes in the 5xx range indicate an error with NameScans servers..
Error Codes
Status | Description |
---|---|
200 - OK | The request succeeded and the requested information is in the response. This is the most common status code to receive. |
201 - Created | The request resulted in a new resource being created before the response was sent. |
204 - No Content | The request has been successfully processed and the response is intentionally blank. |
400 - Bad Request | The request could not be understood by the server. Bad Request is sent when no other error is applicable, if the exact error is unknown or does not have its own error code. |
401 - Unauthorized | The requested resource requires authentication. |
403 - Forbidden | The server refuses to fulfill the request. |
500 - Internal Server Error | A generic error has occurred on the server. |
In addition to the error code, the response always contains a message that describes the details of the error that occurred.
The “400 - Bad Request” response also always contains a ModelState that describes detail of incorrect or invalid sent parameter.
Pagination
GET Requests that return multiple items will be paginated to 10 items by default. You can specify further pages with the ?page_index
parameter. You can also set a custom page size up to 100 with the ?page_size
parameter.
ARGUMENTS
Name | Description |
---|---|
page_index | The page index of results. |
page_size | The item per page of results. |
Person Standard Scans
The person-scans/standard API’s allow you to manage person standard scans (get history, get a specific scan, perform new scan).
Get Person Standard Scan
Code samples
# You can also use wget
curl -X get https://namescan.io/api/v2/person-scans/standard/{scan_id} \
-H "api-key: your-api-key"
GET https://namescan.io/api/v2/person-scans/standard/{scan_id} HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
api-key: your-api-key
<script>
$.ajax({
url: 'https://namescan.io/api/v2/person-scans/standard/{scan_id}',
method: 'get',
headers: {'api-key': 'your-api-key'},
success: function(data) {
console.log(JSON.stringify(data));
}
})
</script>
const request = require('node-fetch');
fetch('https://namescan.io/api/v2/person-scans/standard/{scan_id}', {
method: 'GET',
headers: {'api-key': 'your-api-key'}
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'https://namescan.io/api/v2/person-scans/standard/{scan_id}', ...
# TODO
p = JSON.parse(result)
import requests
header = {'api-key': 'your-api-key'}
param = {'scan_id': 'your-scan-id'}
r = requests.get('https://namescan.io/api/v2/person-scans/standard/{scan_id}',
headers = header, params = param)
print r.json()
URL obj = new URL("https://namescan.io/api/v2/person-scans/standard/{scan_id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("api-key", "your api key");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /api/v2/person-scans/standard/{scan_id}
Retrieve person standard scan
Allows you to retrieve person scan on standard list by entering its scan_id.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
scan_id | path | string | true | Scan Id, which includes scan id to retrieve. It is required. |
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | person_scan_standard_history_result: contains information of person standard scan. |
400 | Bad Request | Bad request |
401 | Unauthorized | Unauthorized |
403 | Forbidden | Forbidden |
500 | Internal Server Error | Internal Server Error |
Response structure
{
"scan_param": {
"name": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"gender": "string",
"dob": "string",
"country": "string",
"list_type": "string"
},
"scan_result": {
"date": "2017-07-29T12:06:08Z",
"scan_id": "string",
"number_of_matches": 0,
"persons": [
{
"uid": "string",
"update_at": "string",
"update_info": "string",
"category": "string",
"deceased": true,
"deceased_date": "string",
"name": "string",
"title": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"gender": "string",
"original_script_name": "string",
"sort_key_name": "string",
"dates_of_birth": [
{
"date": "string",
"note": "string"
}
],
"places_of_birth": [
{
"city": "string",
"region": "string",
"country": "string",
"text": "string",
"note": "string",
"type": "string"
}
],
"reference_type": "string",
"references": [
{
"name": "string",
"since": "string",
"to": "string",
"id_in_list": "string"
}
],
"program": "string",
"nationality": "string",
"address": "string",
"addresses": [
{
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"region": "string",
"postal_code": "string",
"country": "string",
"text": "string",
"note": "string"
}
],
"places": [
{
"country": "string",
"type": "string"
}
],
"other_names": [
{
"title": "string",
"name": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"type": "string"
}
],
"dates": [
{
"value": "string",
"type": "string"
}
],
"roles": [
{
"title": "string",
"category": "string",
"since": "string",
"to": "string",
"type": "string"
}
],
"identities": [
{
"number": "string",
"country": "string",
"note": "string",
"type": "string"
}
],
"contacts": [
{
"value": "string",
"type": "string"
}
],
"images": [
"string"
],
"links": [
{
"url": "string",
"type": "string"
}
],
"sources": [
"string"
],
"basis": "string",
"summary": "string",
"match_rate": 0
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<scan_param>
<name>string</name>
<first_name>string</first_name>
<middle_name>string</middle_name>
<last_name>string</last_name>
<gender>string</gender>
<dob>string</dob>
<country>string</country>
<list_type>string</list_type>
</scan_param>
<scan_result>
<date>2017-07-29T12:06:08Z</date>
<scan_id>string</scan_id>
<number_of_matches>0</number_of_matches>
<persons>
<uid>string</uid>
<update_at>string</update_at>
<update_info>string</update_info>
<category>string</category>
<deceased>true</deceased>
<deceased_date>string</deceased_date>
<name>string</name>
<title>string</title>
<first_name>string</first_name>
<middle_name>string</middle_name>
<last_name>string</last_name>
<gender>string</gender>
<original_script_name>string</original_script_name>
<sort_key_name>string</sort_key_name>
<dates_of_birth>
<date>string</date>
<note>string</note>
</dates_of_birth>
<places_of_birth>
<city>string</city>
<region>string</region>
<country>string</country>
<text>string</text>
<note>string</note>
<type>string</type>
</places_of_birth>
<reference_type>string</reference_type>
<references>
<name>string</name>
<since>string</since>
<to>string</to>
<id_in_list>string</id_in_list>
</references>
<program>string</program>
<nationality>string</nationality>
<address>string</address>
<addresses>
<address1>string</address1>
<address2>string</address2>
<address3>string</address3>
<city>string</city>
<region>string</region>
<postal_code>string</postal_code>
<country>string</country>
<text>string</text>
<note>string</note>
</addresses>
<places>
<country>string</country>
<type>string</type>
</places>
<other_names>
<title>string</title>
<name>string</name>
<first_name>string</first_name>
<middle_name>string</middle_name>
<last_name>string</last_name>
<type>string</type>
</other_names>
<dates>
<value>string</value>
<type>string</type>
</dates>
<roles>
<title>string</title>
<category>string</category>
<since>string</since>
<to>string</to>
<type>string</type>
</roles>
<identities>
<number>string</number>
<country>string</country>
<note>string</note>
<type>string</type>
</identities>
<contacts>
<value>string</value>
<type>string</type>
</contacts>
<images>string</images>
<links>
<url>string</url>
<type>string</type>
</links>
<sources>string</sources>
<basis>string</basis>
<summary>string</summary>
<match_rate>0</match_rate>
</persons>
</scan_result>
Person Standard Scans History
Code samples
# You can also use wget
curl -X get https://namescan.io/api/v2/person-scans/standard \
-H "api-key: your-api-key"
GET https://namescan.io/api/v2/person-scans/standard HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
api-key: your-api-key
<script>
$.ajax({
url: 'https://namescan.io/api/v2/person-scans/standard',
method: 'get',
headers: {'api-key': 'your-api-key'},
success: function(data) {
console.log(JSON.stringify(data));
}
})
</script>
const request = require('node-fetch');
fetch('https://namescan.io/api/v2/person-scans/standard', {
method: 'GET',
headers: {'api-key': 'your-api-key'}
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'https://namescan.io/api/v2/person-scans/standard', ...
# TODO
p = JSON.parse(result)
import requests
header = {'api-key': 'your-api-key'}
r = requests.get('https://namescan.io/api/v2/person-scans/standard', headers = header)
print r.json()
URL obj = new URL("https://namescan.io/api/v2/person-scans/standard");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("api-key", "your api key");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /api/v2/person-scans/standard
Retrieve person standard scans list
Allows you to retrieve person scans history on standard lists.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
from | query | string | false | Scan date from. |
to | query | string | false | Scan date to. |
page_index | query | integer | false | Indicates the page index of result. |
page_size | query | integer | false | Indicates the page size of result. |
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | person_scan_standard_history_list: contains list of person standard scans. |
400 | Bad Request | Bad request |
401 | Unauthorized | Unauthorized |
403 | Forbidden | Forbidden |
500 | Internal Server Error | Internal Server Error |
Response structure
{
"scans": [
{
"scan_id": "string",
"scan_date": "2017-07-29T12:06:08Z",
"name": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"gender": "string",
"dob": "string",
"country": "string",
"list_type": "string",
"status": "string",
"status_description": "string",
"number_of_matches": 0
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<scans>
<scan_id>string</scan_id>
<scan_date>2017-07-29T12:06:08Z</scan_date>
<name>string</name>
<first_name>string</first_name>
<middle_name>string</middle_name>
<last_name>string</last_name>
<gender>string</gender>
<dob>string</dob>
<country>string</country>
<list_type>string</list_type>
<status>string</status>
<status_description>string</status_description>
<number_of_matches>0</number_of_matches>
</scans>
New Person Standard Scan
Code samples
# You can also use wget
curl -X post https://namescan.io/api/v2/person-scans/standard \
-H "api-key: your-api-key" \
-H "content-type: application/json" \
-d "{'first_name':'john', 'last_name':'smith', 'dob':'1970', 'list_type':'sanction' }"
POST https://namescan.io/api/v2/person-scans/standard HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
api-key: your-api-key
<script>
$.ajax({
url: 'https://namescan.io/api/v2/person-scans/standard',
method: 'post',
headers: {'api-key': 'your-api-key'},
data: {'name': 'john smith'},
success: function(result) {
console.log(JSON.stringify(result));
}
})
</script>
const request = require('node-fetch');
var data = {name: 'john smith'};
fetch('https://namescan.io/api/v2/person-scans/standard', {
method: 'POST',
headers: {'api-key': 'your-api-key', 'Content-Type': 'application/json'},
body: JSON.stringify(data)
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'https://namescan.io/api/v2/person-scans/standard', ...
# TODO
p = JSON.parse(result)
import requests
header = {'api-key': 'your-api-key', 'Content-Type': 'application/json'}
data = {'name': 'john smith'}
r = requests.post('https://namescan.io/api/v2/person-scans/standard',
headers = header, json = data)
print r.json()
URL obj = new URL("https://namescan.io/api/v2/person-scans/standard");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("api-key", "your api key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoInput("true");
con.setDoOutput("true");
DataOutputStream output = new DataOutputStream(con.getOutputStream());
String data = "{\"name\":\"John Smith\"}";
output.writeBytes(data);
output.flush();
output.close();
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /api/v2/person-scans/standard
Performs new person standard scan
Allows you to scan persons on standard lists by entering their information into the fields provided.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
param | body | person_scan_standard_param | true | Person scan parameter, which includes person information to find. name or first_name/last_name is required. gender can be male, female or empty. dob can be in dd/mm/yyyy or yyyy formats. list_type can be pep or sanction. leave list_type as empty to scan on all lists. |
Body parameter
{
"name": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"gender": "string",
"dob": "string",
"country": "string",
"list_type": "string"
}
<?xml version="1.0" encoding="UTF-8" ?>
<name>string</name>
<first_name>string</first_name>
<middle_name>string</middle_name>
<last_name>string</last_name>
<gender>string</gender>
<dob>string</dob>
<country>string</country>
<list_type>string</list_type>
Responses
Status | Meaning | Description |
---|---|---|
201 | Created | person_scan_standard_result: contains information of matched persons. |
400 | Bad Request | Bad request |
401 | Unauthorized | Unauthorized |
403 | Forbidden | Forbidden |
500 | Internal Server Error | Internal Server Error |
Response structure
{
"date": "2017-07-29T12:06:08Z",
"scan_id": "string",
"number_of_matches": 0,
"persons": [
{
"uid": "string",
"update_at": "string",
"update_info": "string",
"category": "string",
"deceased": true,
"deceased_date": "string",
"name": "string",
"title": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"gender": "string",
"original_script_name": "string",
"sort_key_name": "string",
"dates_of_birth": [
{
"date": "string",
"note": "string"
}
],
"places_of_birth": [
{
"city": "string",
"region": "string",
"country": "string",
"text": "string",
"note": "string",
"type": "string"
}
],
"reference_type": "string",
"references": [
{
"name": "string",
"since": "string",
"to": "string",
"id_in_list": "string"
}
],
"program": "string",
"nationality": "string",
"address": "string",
"addresses": [
{
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"region": "string",
"postal_code": "string",
"country": "string",
"text": "string",
"note": "string"
}
],
"places": [
{
"country": "string",
"type": "string"
}
],
"other_names": [
{
"title": "string",
"name": "string",
"first_name": "string",
"middle_name": "string",
"last_name": "string",
"type": "string"
}
],
"dates": [
{
"value": "string",
"type": "string"
}
],
"roles": [
{
"title": "string",
"category": "string",
"since": "string",
"to": "string",
"type": "string"
}
],
"identities": [
{
"number": "string",
"country": "string",
"note": "string",
"type": "string"
}
],
"contacts": [
{
"value": "string",
"type": "string"
}
],
"images": [
"string"
],
"links": [
{
"url": "string",
"type": "string"
}
],
"sources": [
"string"
],
"basis": "string",
"summary": "string",
"match_rate": 0
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<date>2017-07-29T12:06:08Z</date>
<scan_id>string</scan_id>
<number_of_matches>0</number_of_matches>
<persons>
<uid>string</uid>
<update_at>string</update_at>
<update_info>string</update_info>
<category>string</category>
<deceased>true</deceased>
<deceased_date>string</deceased_date>
<name>string</name>
<title>string</title>
<first_name>string</first_name>
<middle_name>string</middle_name>
<last_name>string</last_name>
<gender>string</gender>
<original_script_name>string</original_script_name>
<sort_key_name>string</sort_key_name>
<dates_of_birth>
<date>string</date>
<note>string</note>
</dates_of_birth>
<places_of_birth>
<city>string</city>
<region>string</region>
<country>string</country>
<text>string</text>
<note>string</note>
<type>string</type>
</places_of_birth>
<reference_type>string</reference_type>
<references>
<name>string</name>
<since>string</since>
<to>string</to>
<id_in_list>string</id_in_list>
</references>
<program>string</program>
<nationality>string</nationality>
<address>string</address>
<addresses>
<address1>string</address1>
<address2>string</address2>
<address3>string</address3>
<city>string</city>
<region>string</region>
<postal_code>string</postal_code>
<country>string</country>
<text>string</text>
<note>string</note>
</addresses>
<places>
<country>string</country>
<type>string</type>
</places>
<other_names>
<title>string</title>
<name>string</name>
<first_name>string</first_name>
<middle_name>string</middle_name>
<last_name>string</last_name>
<type>string</type>
</other_names>
<dates>
<value>string</value>
<type>string</type>
</dates>
<roles>
<title>string</title>
<category>string</category>
<since>string</since>
<to>string</to>
<type>string</type>
</roles>
<identities>
<number>string</number>
<country>string</country>
<note>string</note>
<type>string</type>
</identities>
<contacts>
<value>string</value>
<type>string</type>
</contacts>
<images>string</images>
<links>
<url>string</url>
<type>string</type>
</links>
<sources>string</sources>
<basis>string</basis>
<summary>string</summary>
<match_rate>0</match_rate>
</persons>
Organisation Standard Scans
The organisation-scans/standard API’s allow you to manage organisation standard scans (get history, get a specific scan, perform new scan).
Get Organisation Standard Scan
Code samples
# You can also use wget
curl -X get https://namescan.io/api/v2/organisation-scans/standard/{scan_id} \
-H "api-key: your-api-key"
GET https://namescan.io/api/v2/organisation-scans/standard/{scan_id} HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
api-key: your-api-key
<script>
$.ajax({
url: 'https://namescan.io/api/v2/organisation-scans/standard/{scan_id}',
method: 'get',
headers: {'api-key': 'your-api-key'},
success: function(data) {
console.log(JSON.stringify(data));
}
})
</script>
const request = require('node-fetch');
fetch('https://namescan.io/api/v2/organisation-scans/standard/{scan_id}', {
method: 'GET',
headers: {'api-key': 'your-api-key'}
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'https://namescan.io/api/v2/organisation-scans/standard/{scan_id}', ...
# TODO
p = JSON.parse(result)
import requests
header = {'api-key': 'your-api-key'}
param = {'scan_id': 'your-scan-id'}
r = requests.get('https://namescan.io/api/v2/organisation-scans/standard/{scan_id}',
headers = header, params = param)
print r.json()
URL obj = new URL("https://namescan.io/api/v2/organisation-scans/standard/{scan_id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("api-key", "your api key");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /api/v2/organisation-scans/standard/{scan_id}
Retrieve organisation standard scan
Allows you to retrieve organisation scan on standard list by entering its scan_id.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
scan_id | path | string | true | Scan Id, which includes scan id to retrieve. It is required. |
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | organisation_scan_standard_history_result: contains information of organisation standard scan. |
400 | Bad Request | Bad request |
401 | Unauthorized | Unauthorized |
403 | Forbidden | Forbidden |
500 | Internal Server Error | Internal Server Error |
Response structure
{
"scan_param": {
"name": "string",
"country": "string",
"list_type": "string"
},
"scan_result": {
"date": "2017-07-29T12:06:08Z",
"scan_id": "string",
"number_of_matches": 0,
"organisations": [
{
"uid": "string",
"update_at": "string",
"update_info": "string",
"category": "string",
"ceased": true,
"ceased_date": "string",
"name": "string",
"original_script_name": "string",
"sort_key_name": "string",
"reference_type": "string",
"references": [
{
"name": "string",
"since": "string",
"to": "string",
"id_in_list": "string"
}
],
"program": "string",
"nationality": "string",
"address": "string",
"addresses": [
{
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"region": "string",
"postal_code": "string",
"country": "string",
"text": "string",
"note": "string"
}
],
"other_names": [
{
"name": "string",
"type": "string"
}
],
"dates": [
{
"value": "string",
"type": "string"
}
],
"identities": [
{
"number": "string",
"country": "string",
"note": "string",
"type": "string"
}
],
"contacts": [
{
"value": "string",
"type": "string"
}
],
"images": [
"string"
],
"links": [
{
"url": "string",
"type": "string"
}
],
"sources": [
"string"
],
"basis": "string",
"summary": "string",
"match_rate": 0
}
]
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<scan_param>
<name>string</name>
<country>string</country>
<list_type>string</list_type>
</scan_param>
<scan_result>
<date>2017-07-29T12:06:08Z</date>
<scan_id>string</scan_id>
<number_of_matches>0</number_of_matches>
<organisations>
<uid>string</uid>
<update_at>string</update_at>
<update_info>string</update_info>
<category>string</category>
<ceased>true</ceased>
<ceased_date>string</ceased_date>
<name>string</name>
<original_script_name>string</original_script_name>
<sort_key_name>string</sort_key_name>
<reference_type>string</reference_type>
<references>
<name>string</name>
<since>string</since>
<to>string</to>
<id_in_list>string</id_in_list>
</references>
<program>string</program>
<nationality>string</nationality>
<address>string</address>
<addresses>
<address1>string</address1>
<address2>string</address2>
<address3>string</address3>
<city>string</city>
<region>string</region>
<postal_code>string</postal_code>
<country>string</country>
<text>string</text>
<note>string</note>
</addresses>
<other_names>
<name>string</name>
<type>string</type>
</other_names>
<dates>
<value>string</value>
<type>string</type>
</dates>
<identities>
<number>string</number>
<country>string</country>
<note>string</note>
<type>string</type>
</identities>
<contacts>
<value>string</value>
<type>string</type>
</contacts>
<images>string</images>
<links>
<url>string</url>
<type>string</type>
</links>
<sources>string</sources>
<basis>string</basis>
<summary>string</summary>
<match_rate>0</match_rate>
</organisations>
</scan_result>
Organisation Standard Scans History
Code samples
# You can also use wget
curl -X get https://namescan.io/api/v2/organisation-scans/standard \
-H "api-key: your-api-key"
GET https://namescan.io/api/v2/organisation-scans/standard HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
api-key: your-api-key
<script>
$.ajax({
url: 'https://namescan.io/api/v2/organisation-scans/standard',
method: 'get',
headers: {'api-key': 'your-api-key'},
success: function(data) {
console.log(JSON.stringify(data));
}
})
</script>
const request = require('node-fetch');
fetch('https://namescan.io/api/v2/organisation-scans/standard', {
method: 'GET',
headers: {'api-key': 'your-api-key'}
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'https://namescan.io/api/v2/organisation-scans/standard', ...
# TODO
p = JSON.parse(result)
import requests
header = {'api-key': 'your-api-key'}
r = requests.get('https://namescan.io/api/v2/organisation-scans/standard', headers=header)
print r.json()
URL obj = new URL("https://namescan.io/api/v2/organisation-scans/standard");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("api-key", "your api key");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /api/v2/organisation-scans/standard
Retrieve organisation standard scans list
Allows you to retrieve organisation scans history on standard lists.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
from | query | string | false | Scan date from. |
to | query | string | false | Scan date to. |
page_index | query | integer | false | Indicates the page index of result. |
page_size | query | integer | false | Indicates the page size of result. |
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | organisation_scan_standard_history_list: contains list of organisation standard scans. |
400 | Bad Request | Bad request |
401 | Unauthorized | Unauthorized |
403 | Forbidden | Forbidden |
500 | Internal Server Error | Internal Server Error |
Response structure
{
"scans": [
{
"scan_id": "string",
"scan_date": "2017-07-29T12:06:08Z",
"name": "string",
"country": "string",
"list_type": "string",
"status": "string",
"status_description": "string",
"number_of_matches": 0
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<scans>
<scan_id>string</scan_id>
<scan_date>2017-07-29T12:06:08Z</scan_date>
<name>string</name>
<country>string</country>
<list_type>string</list_type>
<status>string</status>
<status_description>string</status_description>
<number_of_matches>0</number_of_matches>
</scans>
New Organisation Standard Scans
Code samples
# You can also use wget
curl -X post https://namescan.io/api/v2/organisation-scans/standard \
-H "api-key: your-api-key" \
-H "content-type: application/json" \
-d "{'name':'al-shabab' }"
POST https://namescan.io/api/v2/organisation-scans/standard HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
api-key: your-api-key
<script>
$.ajax({
url: 'https://namescan.io/api/v2/organisation-scans/standard',
method: 'post',
headers: {'api-key': 'your-api-key'},
data: {'name': 'al-shabab'},
success: function(result) {
console.log(JSON.stringify(result));
}
})
</script>
const request = require('node-fetch');
var data = {name: 'al-shabab'};
fetch('https://namescan.io/api/v2/organisation-scans/standard', {
method: 'POST',
headers: {'api-key': 'your-api-key', 'Content-Type': 'application/json'},
body: JSON.stringify(data)
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.post 'https://namescan.io/api/v2/organisation-scans/standard', ...
# TODO
p = JSON.parse(result)
import requests
header = {'api-key': 'your-api-key', 'Content-Type': 'application/json'}
data = {'name': 'al-shabab'}
r = requests.post('https://namescan.io/api/v2/organisation-scans/standard',
headers = header, json = data)
print r.json()
URL obj = new URL("https://namescan.io/api/v2/organisation-scans/standard");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("api-key", "your api key");
con.setRequestProperty("Content-Type", "application/json");
con.setDoInput("true");
con.setDoOutput("true");
DataOutputStream output = new DataOutputStream(con.getOutputStream());
String data = "{\"name\":\"al-shabab\"}";
output.writeBytes(data);
output.flush();
output.close();
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
POST /api/v2/organisation-scans/standard
Performs new organisation standard scan
Allows you to scan organisations on standard lists by entering their information into the fields provided.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
param | body | organisation_scan_standard_param | true | Organisation scan parameter, which includes organisation information to find. name is required and can be original script. list_type can be pep, sanction or empty. leave list_type as empty to scan on all lists. |
Body parameter
{
"name": "string",
"country": "string",
"list_type": "string"
}
<?xml version="1.0" encoding="UTF-8" ?>
<name>string</name>
<country>string</country>
<list_type>string</list_type>
Responses
Status | Meaning | Description |
---|---|---|
201 | Created | organisation_scan_standard_result: contains information of matched organisations. |
400 | Bad Request | Bad request |
401 | Unauthorized | Unauthorized |
403 | Forbidden | Forbidden |
500 | Internal Server Error | Internal Server Error |
Response structure
{
"date": "2017-07-29T12:06:08Z",
"scan_id": "string",
"number_of_matches": 0,
"organisations": [
{
"uid": "string",
"update_at": "string",
"update_info": "string",
"category": "string",
"ceased": true,
"ceased_date": "string",
"name": "string",
"original_script_name": "string",
"sort_key_name": "string",
"reference_type": "string",
"references": [
{
"name": "string",
"since": "string",
"to": "string",
"id_in_list": "string"
}
],
"program": "string",
"nationality": "string",
"address": "string",
"addresses": [
{
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"region": "string",
"postal_code": "string",
"country": "string",
"text": "string",
"note": "string"
}
],
"other_names": [
{
"name": "string",
"type": "string"
}
],
"dates": [
{
"value": "string",
"type": "string"
}
],
"identities": [
{
"number": "string",
"country": "string",
"note": "string",
"type": "string"
}
],
"contacts": [
{
"value": "string",
"type": "string"
}
],
"images": [
"string"
],
"links": [
{
"url": "string",
"type": "string"
}
],
"sources": [
"string"
],
"basis": "string",
"summary": "string",
"match_rate": 0
}
]
}
<?xml version="1.0" encoding="UTF-8" ?>
<date>2017-07-29T12:06:08Z</date>
<scan_id>string</scan_id>
<number_of_matches>0</number_of_matches>
<organisations>
<uid>string</uid>
<update_at>string</update_at>
<update_info>string</update_info>
<category>string</category>
<ceased>true</ceased>
<ceased_date>string</ceased_date>
<name>string</name>
<original_script_name>string</original_script_name>
<sort_key_name>string</sort_key_name>
<reference_type>string</reference_type>
<references>
<name>string</name>
<since>string</since>
<to>string</to>
<id_in_list>string</id_in_list>
</references>
<program>string</program>
<nationality>string</nationality>
<address>string</address>
<addresses>
<address1>string</address1>
<address2>string</address2>
<address3>string</address3>
<city>string</city>
<region>string</region>
<postal_code>string</postal_code>
<country>string</country>
<text>string</text>
<note>string</note>
</addresses>
<other_names>
<name>string</name>
<type>string</type>
</other_names>
<dates>
<value>string</value>
<type>string</type>
</dates>
<identities>
<number>string</number>
<country>string</country>
<note>string</note>
<type>string</type>
</identities>
<contacts>
<value>string</value>
<type>string</type>
</contacts>
<images>string</images>
<links>
<url>string</url>
<type>string</type>
</links>
<sources>string</sources>
<basis>string</basis>
<summary>string</summary>
<match_rate>0</match_rate>
</organisations>
Lists Information
Get Sanction Lists Information
Code samples
# You can also use wget
curl -X get https://namescan.io/api/v2/lists/sanctions \
-H "api-key: your-api-key"
GET https://namescan.io/api/v2/lists/sanctions HTTP/1.1
Host: localhost
Content-Type: application/json
Accept: application/json
api-key: your-api-key
<script>
$.ajax({
url: 'https://namescan.io/api/v2/lists/sanctions',
method: 'get',
headers: {'api-key': 'your-api-key'},
success: function(data) {
console.log(JSON.stringify(data));
}
})
</script>
const request = require('node-fetch');
fetch('https://namescan.io/api/v2/lists/sanctions', {
method: 'GET',
headers: {'api-key': 'your-api-key'}
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
result = RestClient.get 'https://namescan.io/api/v2/lists/sanctions', ...
# TODO
p = JSON.parse(result)
import requests
header = {'api-key': 'your-api-key'}
param = {'scan_id': 'your-scan-id'}
r = requests.get('https://namescan.io/api/v2/lists/sanctions',
headers = header, params = param)
print r.json()
URL obj = new URL("https://namescan.io/api/v2/lists/sanctions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("api-key", "your api key");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
GET /api/v2/lists/sanctions
Retrieve sanction lists information
Allows you to retrieve information of sanction lists. The list ID can be used on the included or the excluded list parameter of a person or organisation scan
Responses
Status | Meaning | Description |
---|---|---|
200 | OK | list_info: contains id and name of sanction list. |
400 | Bad Request | Bad request |
401 | Unauthorized | Unauthorized |
403 | Forbidden | Forbidden |
500 | Internal Server Error | Internal Server Error |
Response structure
[
{
"id": "string",
"name": "string"
}
]
<?xml version="1.0" encoding="UTF-8" ?>
<id>string</id>
<name>string</name>