API Responses
The search response interface represents the status and and results of a given search. It returns status in the form of HTTP response codes as well as additional status information embedded within the response body. Information about the search performed, such as sources included, are also returned. Finally, the search results themselves whose data structure is defined below.
Note Care should be taken to handle all possible error scenarios in your application code, including HTTP response code and error and errorMessage fields. Failed requests should not be reattempted in a looping fashion. Queries resulting in a 4xx error should not be reattempted.
Additional API technical docs can be found here OFAC API v2 Swagger UI
Single and Batch Response Structures
Single Search Response
HTTP 200
{
"error": boolean,
"errorMessage": "string"
"searchTerm": "string",
"sourcesUsed": [{
"source": "string"
}
],
"matches": [{
"source": "string",
"name": "string",
"dob": "string",
"gender": "string",
"score": integer,
"sdnType": "string",
"remarks": "string",
"uid": integer,
"addresses": [{
"uid": integer,
"address1": "string",
"city": "string",
"postalCode": "string"
"country": "string"
}],
"citizenship": [{
string
}],
"programs": [
"string"
],
"akas": [{
"uid": integer,
"category": "string",
"lastName": "string"
}],
"passports": [{
"passport": "string",
"passportCountry": "string",
}],
"additionalSanctions": [
"string"
],
}]
}
Batch Search Response
HTTP 200
{
"error": boolean,
"errorMessage": "string",
"searchTerm": "string",
"sourcesUsed": [
{
"source": "string"
}
],
"matches": {
"searchPhrase1": [
{
"source": "string",
"firstName": "string",
"lastName": "string",
"fullName": "string",
"dob": "string",
"addresses": [
{
"uid": 0,
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"stateOrProvince": "string",
"postalCode": "string",
"country": "string"
}
],
"citizenship": [
"string"
],
"title": "string",
"uid": 0,
"sdnType": "string",
"remarks": "string",
"gender": "string",
"programs": [
"string"
],
"additionalSanctions": [
"string"
],
"passports": [
{
"passport": "string",
"passportCountry": "string"
}
],
"callSign": "string",
"vesselType": "string",
"vesselFlag": "string",
"tonnage": "string",
"grossRegisteredTonnage": "string",
"vesselOwner": "string",
"effectiveDate": "string",
"expirationDate": "string",
"standardOrder": "string",
"lastUpdate": "string",
"action": "string",
"frCitation": "string",
"score": 0,
"ids": [
{
"type": "string",
"id": "string"
}
],
"akas": [
{
"score": 0,
"uid": 0,
"category": "string",
"lastName": "string",
"firstName": "string",
"city": "string",
"country": "string",
"dob": "string"
}
]
}
],
"searchPhrase2": [
{
"source": "string",
"firstName": "string",
"lastName": "string",
"fullName": "string",
"dob": "string",
"addresses": [
{
"uid": 0,
"address1": "string",
"address2": "string",
"address3": "string",
"city": "string",
"stateOrProvince": "string",
"postalCode": "string",
"country": "string"
}
],
"citizenship": [
"string"
],
"title": "string",
"uid": 0,
"sdnType": "string",
"remarks": "string",
"gender": "string",
"programs": [
"string"
],
"additionalSanctions": [
"string"
],
"passports": [
{
"passport": "string",
"passportCountry": "string"
}
],
"callSign": "string",
"vesselType": "string",
"vesselFlag": "string",
"tonnage": "string",
"grossRegisteredTonnage": "string",
"vesselOwner": "string",
"effectiveDate": "string",
"expirationDate": "string",
"standardOrder": "string",
"lastUpdate": "string",
"action": "string",
"frCitation": "string",
"score": 0,
"ids": [
{
"type": "string",
"id": "string"
}
],
"akas": [
{
"score": 0,
"uid": 0,
"category": "string",
"lastName": "string",
"firstName": "string",
"city": "string",
"country": "string",
"dob": "string"
}
]
}
]
}
}
Bad Request API Response
HTTP 400
{
"timestamp": "2020-03-06T20:17:30.735+0000",
"status": 400,
"error": "Bad Request",
"message": "string",
"path": "string"
}
Invalid API Key
HTTP 401
{
"error": true,
"errorMessage": "Invalid API Key"
}
Status Codes
Possible HTTP status codes that should be accounted for.
Code | Status | Description |
---|---|---|
200 | Success | Search was performed successfully and results may be examined. |
400 | Bad Request | There is a problem with the search request, for example a required field is missing.
errorMessage will contain additional information. Should not be reattempted
|
401 | Unauthorized | The API account has expired or the accounts rate limit has been exceeded. |
500 | Internal Error | The API has encountered an unexpected error. errorMessage will contain additional
information that may be used to alert the support team. |