POST | /sanctions/entity/get | Create a get a sanctions search for an entity | This will get a new sanctions search for an entity, such as a company, vessel, organisation, or group. |
---|
import 'package:servicestack/servicestack.dart';
// @DataContract
class ResponseError implements IConvertible
{
// @DataMember(Order=1)
String? ErrorCode;
// @DataMember(Order=2)
String? FieldName;
// @DataMember(Order=3)
String? Message;
ResponseError({this.ErrorCode,this.FieldName,this.Message});
ResponseError.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ErrorCode = json['ErrorCode'];
FieldName = json['FieldName'];
Message = json['Message'];
return this;
}
Map<String, dynamic> toJson() => {
'ErrorCode': ErrorCode,
'FieldName': FieldName,
'Message': Message
};
getTypeName() => "ResponseError";
TypeContext? context = _ctx;
}
class ArrayOfResponseError extends ListBase<ResponseError> implements IConvertible
{
final List<ResponseError> l = [];
set length(int newLength) { l.length = newLength; }
int get length => l.length;
ResponseError operator [](int index) => l[index];
void operator []=(int index, ResponseError value) { l[index] = value; }
ArrayOfResponseError();
ArrayOfResponseError.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "ArrayOfResponseError";
TypeContext? context = _ctx;
}
// @DataContract
class ResponseStatus implements IConvertible
{
// @DataMember(Order=1)
String? ErrorCode;
// @DataMember(Order=2)
String? Message;
// @DataMember(Order=3)
String? StackTrace;
// @DataMember(Order=4)
ArrayOfResponseError? Errors;
ResponseStatus({this.ErrorCode,this.Message,this.StackTrace,this.Errors});
ResponseStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ErrorCode = json['ErrorCode'];
Message = json['Message'];
StackTrace = json['StackTrace'];
Errors = JsonConverters.fromJson(json['Errors'],'ArrayOfResponseError',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ErrorCode': ErrorCode,
'Message': Message,
'StackTrace': StackTrace,
'Errors': JsonConverters.toJson(Errors,'ArrayOfResponseError',context!)
};
getTypeName() => "ResponseStatus";
TypeContext? context = _ctx;
}
class SearchCriteria implements IConvertible
{
String? Name;
String? DateOfBirth;
String? CountryOfBirth;
String? Nationality;
String? Address;
SearchCriteria({this.Name,this.DateOfBirth,this.CountryOfBirth,this.Nationality,this.Address});
SearchCriteria.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
DateOfBirth = json['DateOfBirth'];
CountryOfBirth = json['CountryOfBirth'];
Nationality = json['Nationality'];
Address = json['Address'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'DateOfBirth': DateOfBirth,
'CountryOfBirth': CountryOfBirth,
'Nationality': Nationality,
'Address': Address
};
getTypeName() => "SearchCriteria";
TypeContext? context = _ctx;
}
class SearchResultHmTreasury implements IConvertible
{
int? ResultStrength;
double? ResultSimilarity;
bool? ResultResolved;
String? ResultType;
DateTime? DateListed;
DateTime? DateUpdated;
String? Name1;
String? Name2;
String? Name3;
String? Name4;
String? Name5;
String? Name6;
String? DateOfBirth;
String? CountryOfBirth;
String? Nationality;
String? Address1;
String? Address2;
String? Address3;
String? Address4;
String? Address5;
String? Address6;
String? PostCode;
String? Country;
SearchResultHmTreasury({this.ResultStrength,this.ResultSimilarity,this.ResultResolved,this.ResultType,this.DateListed,this.DateUpdated,this.Name1,this.Name2,this.Name3,this.Name4,this.Name5,this.Name6,this.DateOfBirth,this.CountryOfBirth,this.Nationality,this.Address1,this.Address2,this.Address3,this.Address4,this.Address5,this.Address6,this.PostCode,this.Country});
SearchResultHmTreasury.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResultStrength = json['ResultStrength'];
ResultSimilarity = JsonConverters.toDouble(json['ResultSimilarity']);
ResultResolved = json['ResultResolved'];
ResultType = json['ResultType'];
DateListed = JsonConverters.fromJson(json['DateListed'],'DateTime',context!);
DateUpdated = JsonConverters.fromJson(json['DateUpdated'],'DateTime',context!);
Name1 = json['Name1'];
Name2 = json['Name2'];
Name3 = json['Name3'];
Name4 = json['Name4'];
Name5 = json['Name5'];
Name6 = json['Name6'];
DateOfBirth = json['DateOfBirth'];
CountryOfBirth = json['CountryOfBirth'];
Nationality = json['Nationality'];
Address1 = json['Address1'];
Address2 = json['Address2'];
Address3 = json['Address3'];
Address4 = json['Address4'];
Address5 = json['Address5'];
Address6 = json['Address6'];
PostCode = json['PostCode'];
Country = json['Country'];
return this;
}
Map<String, dynamic> toJson() => {
'ResultStrength': ResultStrength,
'ResultSimilarity': ResultSimilarity,
'ResultResolved': ResultResolved,
'ResultType': ResultType,
'DateListed': JsonConverters.toJson(DateListed,'DateTime',context!),
'DateUpdated': JsonConverters.toJson(DateUpdated,'DateTime',context!),
'Name1': Name1,
'Name2': Name2,
'Name3': Name3,
'Name4': Name4,
'Name5': Name5,
'Name6': Name6,
'DateOfBirth': DateOfBirth,
'CountryOfBirth': CountryOfBirth,
'Nationality': Nationality,
'Address1': Address1,
'Address2': Address2,
'Address3': Address3,
'Address4': Address4,
'Address5': Address5,
'Address6': Address6,
'PostCode': PostCode,
'Country': Country
};
getTypeName() => "SearchResultHmTreasury";
TypeContext? context = _ctx;
}
class SearchResultOfacAddress implements IConvertible
{
String? Address1;
String? Address2;
String? Address3;
String? City;
String? State;
String? PostCode;
String? Country;
SearchResultOfacAddress({this.Address1,this.Address2,this.Address3,this.City,this.State,this.PostCode,this.Country});
SearchResultOfacAddress.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Address1 = json['Address1'];
Address2 = json['Address2'];
Address3 = json['Address3'];
City = json['City'];
State = json['State'];
PostCode = json['PostCode'];
Country = json['Country'];
return this;
}
Map<String, dynamic> toJson() => {
'Address1': Address1,
'Address2': Address2,
'Address3': Address3,
'City': City,
'State': State,
'PostCode': PostCode,
'Country': Country
};
getTypeName() => "SearchResultOfacAddress";
TypeContext? context = _ctx;
}
class SearchResultOfacAka implements IConvertible
{
String? FirstName;
String? LastName;
String? Type;
String? Strength;
SearchResultOfacAka({this.FirstName,this.LastName,this.Type,this.Strength});
SearchResultOfacAka.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FirstName = json['FirstName'];
LastName = json['LastName'];
Type = json['Type'];
Strength = json['Strength'];
return this;
}
Map<String, dynamic> toJson() => {
'FirstName': FirstName,
'LastName': LastName,
'Type': Type,
'Strength': Strength
};
getTypeName() => "SearchResultOfacAka";
TypeContext? context = _ctx;
}
class SearchResultOfacDateOfBirth implements IConvertible
{
String? DateOfBirth;
SearchResultOfacDateOfBirth({this.DateOfBirth});
SearchResultOfacDateOfBirth.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DateOfBirth = json['DateOfBirth'];
return this;
}
Map<String, dynamic> toJson() => {
'DateOfBirth': DateOfBirth
};
getTypeName() => "SearchResultOfacDateOfBirth";
TypeContext? context = _ctx;
}
class SearchResultOfacNationality implements IConvertible
{
String? Country;
SearchResultOfacNationality({this.Country});
SearchResultOfacNationality.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Country = json['Country'];
return this;
}
Map<String, dynamic> toJson() => {
'Country': Country
};
getTypeName() => "SearchResultOfacNationality";
TypeContext? context = _ctx;
}
class SearchResultOfacPlaceOfBirth implements IConvertible
{
String? PlaceOfBirth;
SearchResultOfacPlaceOfBirth({this.PlaceOfBirth});
SearchResultOfacPlaceOfBirth.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
PlaceOfBirth = json['PlaceOfBirth'];
return this;
}
Map<String, dynamic> toJson() => {
'PlaceOfBirth': PlaceOfBirth
};
getTypeName() => "SearchResultOfacPlaceOfBirth";
TypeContext? context = _ctx;
}
class SearchResultOfac implements IConvertible
{
int? ResultStrength;
double? ResultSimilarity;
bool? ResultResolved;
String? ResultType;
DateTime? DateUpdated;
String? FirstName;
String? LastName;
List<SearchResultOfacAddress>? Addresses;
List<SearchResultOfacAka>? Akas;
List<SearchResultOfacDateOfBirth>? DateOfBirths;
List<SearchResultOfacNationality>? Nationalities;
List<SearchResultOfacPlaceOfBirth>? PlaceOfBirths;
SearchResultOfac({this.ResultStrength,this.ResultSimilarity,this.ResultResolved,this.ResultType,this.DateUpdated,this.FirstName,this.LastName,this.Addresses,this.Akas,this.DateOfBirths,this.Nationalities,this.PlaceOfBirths});
SearchResultOfac.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResultStrength = json['ResultStrength'];
ResultSimilarity = JsonConverters.toDouble(json['ResultSimilarity']);
ResultResolved = json['ResultResolved'];
ResultType = json['ResultType'];
DateUpdated = JsonConverters.fromJson(json['DateUpdated'],'DateTime',context!);
FirstName = json['FirstName'];
LastName = json['LastName'];
Addresses = JsonConverters.fromJson(json['Addresses'],'List<SearchResultOfacAddress>',context!);
Akas = JsonConverters.fromJson(json['Akas'],'List<SearchResultOfacAka>',context!);
DateOfBirths = JsonConverters.fromJson(json['DateOfBirths'],'List<SearchResultOfacDateOfBirth>',context!);
Nationalities = JsonConverters.fromJson(json['Nationalities'],'List<SearchResultOfacNationality>',context!);
PlaceOfBirths = JsonConverters.fromJson(json['PlaceOfBirths'],'List<SearchResultOfacPlaceOfBirth>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResultStrength': ResultStrength,
'ResultSimilarity': ResultSimilarity,
'ResultResolved': ResultResolved,
'ResultType': ResultType,
'DateUpdated': JsonConverters.toJson(DateUpdated,'DateTime',context!),
'FirstName': FirstName,
'LastName': LastName,
'Addresses': JsonConverters.toJson(Addresses,'List<SearchResultOfacAddress>',context!),
'Akas': JsonConverters.toJson(Akas,'List<SearchResultOfacAka>',context!),
'DateOfBirths': JsonConverters.toJson(DateOfBirths,'List<SearchResultOfacDateOfBirth>',context!),
'Nationalities': JsonConverters.toJson(Nationalities,'List<SearchResultOfacNationality>',context!),
'PlaceOfBirths': JsonConverters.toJson(PlaceOfBirths,'List<SearchResultOfacPlaceOfBirth>',context!)
};
getTypeName() => "SearchResultOfac";
TypeContext? context = _ctx;
}
class SearchResults implements IConvertible
{
List<SearchResultHmTreasury>? HMTResults;
List<SearchResultOfac>? OfacResults;
SearchResults({this.HMTResults,this.OfacResults});
SearchResults.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
HMTResults = JsonConverters.fromJson(json['HMTResults'],'List<SearchResultHmTreasury>',context!);
OfacResults = JsonConverters.fromJson(json['OfacResults'],'List<SearchResultOfac>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'HMTResults': JsonConverters.toJson(HMTResults,'List<SearchResultHmTreasury>',context!),
'OfacResults': JsonConverters.toJson(OfacResults,'List<SearchResultOfac>',context!)
};
getTypeName() => "SearchResults";
TypeContext? context = _ctx;
}
class SearchRecord implements IConvertible
{
int? Id;
String? SearchType;
DateTime? DateSearched;
DateTime? DateUpdated;
int? NumOfResults;
bool? ClientInResults;
bool? ClientNotInResults;
bool? AffectedByUpdate;
SearchCriteria? SearchCriteria;
SearchResults? SearchResults;
SearchRecord({this.Id,this.SearchType,this.DateSearched,this.DateUpdated,this.NumOfResults,this.ClientInResults,this.ClientNotInResults,this.AffectedByUpdate,this.SearchCriteria,this.SearchResults});
SearchRecord.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
SearchType = json['SearchType'];
DateSearched = JsonConverters.fromJson(json['DateSearched'],'DateTime',context!);
DateUpdated = JsonConverters.fromJson(json['DateUpdated'],'DateTime',context!);
NumOfResults = json['NumOfResults'];
ClientInResults = json['ClientInResults'];
ClientNotInResults = json['ClientNotInResults'];
AffectedByUpdate = json['AffectedByUpdate'];
SearchCriteria = JsonConverters.fromJson(json['SearchCriteria'],'SearchCriteria',context!);
SearchResults = JsonConverters.fromJson(json['SearchResults'],'SearchResults',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'SearchType': SearchType,
'DateSearched': JsonConverters.toJson(DateSearched,'DateTime',context!),
'DateUpdated': JsonConverters.toJson(DateUpdated,'DateTime',context!),
'NumOfResults': NumOfResults,
'ClientInResults': ClientInResults,
'ClientNotInResults': ClientNotInResults,
'AffectedByUpdate': AffectedByUpdate,
'SearchCriteria': JsonConverters.toJson(SearchCriteria,'SearchCriteria',context!),
'SearchResults': JsonConverters.toJson(SearchResults,'SearchResults',context!)
};
getTypeName() => "SearchRecord";
TypeContext? context = _ctx;
}
// @DataContract
class GetCompanySearchData implements IBaseDataResponse, IHasResponseStatus, IConvertible
{
// @DataMember
ResponseStatus? ResponseStatus;
// @DataMember
SearchRecord? SearchRecord;
GetCompanySearchData({this.ResponseStatus,this.SearchRecord});
GetCompanySearchData.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
SearchRecord = JsonConverters.fromJson(json['SearchRecord'],'SearchRecord',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'SearchRecord': JsonConverters.toJson(SearchRecord,'SearchRecord',context!)
};
getTypeName() => "GetCompanySearchData";
TypeContext? context = _ctx;
}
// @DataContract
class GetCompanySearchResponse implements IConvertible
{
// @DataMember
GetCompanySearchData? Data;
GetCompanySearchResponse({this.Data});
GetCompanySearchResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Data = JsonConverters.fromJson(json['Data'],'GetCompanySearchData',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Data': JsonConverters.toJson(Data,'GetCompanySearchData',context!)
};
getTypeName() => "GetCompanySearchResponse";
TypeContext? context = _ctx;
}
// @DataContract
class Authentication implements IAuthentication, IConvertible
{
/**
* The API User ID that will authenticate your request
*/
// @DataMember
// @ApiMember(DataType="string", Description="The API User ID that will authenticate your request", IsRequired=true)
String? ApiUserId;
/**
* The API User Key that will authenticate your request
*/
// @DataMember
// @ApiMember(DataType="string", Description="The API User Key that will authenticate your request", IsRequired=true)
String? ApiUserKey;
Authentication({this.ApiUserId,this.ApiUserKey});
Authentication.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ApiUserId = json['ApiUserId'];
ApiUserKey = json['ApiUserKey'];
return this;
}
Map<String, dynamic> toJson() => {
'ApiUserId': ApiUserId,
'ApiUserKey': ApiUserKey
};
getTypeName() => "Authentication";
TypeContext? context = _ctx;
}
// @ApiResponse(Description="Your request is successful if the \"<em>Data.ResponseStatus.Message</em>\" field is \"<b>Success</b>\".", StatusCode=200)
// @DataContract
class GetCompanySearch implements IBaseRequest, IConvertible
{
// @DataMember
Authentication? Authentication;
// @DataMember
int? Id;
GetCompanySearch({this.Authentication,this.Id});
GetCompanySearch.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Authentication = JsonConverters.fromJson(json['Authentication'],'Authentication',context!);
Id = json['Id'];
return this;
}
Map<String, dynamic> toJson() => {
'Authentication': JsonConverters.toJson(Authentication,'Authentication',context!),
'Id': Id
};
getTypeName() => "GetCompanySearch";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.sanctionssearch.com', types: <String, TypeInfo> {
'ArrayOfResponseError': TypeInfo(TypeOf.Class, create:() => ArrayOfResponseError()),
'SearchCriteria': TypeInfo(TypeOf.Class, create:() => SearchCriteria()),
'SearchResultHmTreasury': TypeInfo(TypeOf.Class, create:() => SearchResultHmTreasury()),
'SearchResultOfacAddress': TypeInfo(TypeOf.Class, create:() => SearchResultOfacAddress()),
'SearchResultOfacAka': TypeInfo(TypeOf.Class, create:() => SearchResultOfacAka()),
'SearchResultOfacDateOfBirth': TypeInfo(TypeOf.Class, create:() => SearchResultOfacDateOfBirth()),
'SearchResultOfacNationality': TypeInfo(TypeOf.Class, create:() => SearchResultOfacNationality()),
'SearchResultOfacPlaceOfBirth': TypeInfo(TypeOf.Class, create:() => SearchResultOfacPlaceOfBirth()),
'SearchResultOfac': TypeInfo(TypeOf.Class, create:() => SearchResultOfac()),
'List<SearchResultOfacAddress>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacAddress>[]),
'List<SearchResultOfacAka>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacAka>[]),
'List<SearchResultOfacDateOfBirth>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacDateOfBirth>[]),
'List<SearchResultOfacNationality>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacNationality>[]),
'List<SearchResultOfacPlaceOfBirth>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfacPlaceOfBirth>[]),
'SearchResults': TypeInfo(TypeOf.Class, create:() => SearchResults()),
'List<SearchResultHmTreasury>': TypeInfo(TypeOf.Class, create:() => <SearchResultHmTreasury>[]),
'List<SearchResultOfac>': TypeInfo(TypeOf.Class, create:() => <SearchResultOfac>[]),
'SearchRecord': TypeInfo(TypeOf.Class, create:() => SearchRecord()),
'GetCompanySearchData': TypeInfo(TypeOf.Class, create:() => GetCompanySearchData()),
'GetCompanySearchResponse': TypeInfo(TypeOf.Class, create:() => GetCompanySearchResponse()),
'Authentication': TypeInfo(TypeOf.Class, create:() => Authentication()),
'GetCompanySearch': TypeInfo(TypeOf.Class, create:() => GetCompanySearch()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sanctions/entity/get HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Authentication":{"ApiUserId":"String","ApiUserKey":"String"},"Id":0}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Data":{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String"}]},"SearchRecord":{"Id":0,"SearchType":"String","DateSearched":"\/Date(-62135596800000-0000)\/","DateUpdated":"\/Date(-62135596800000-0000)\/","NumOfResults":0,"ClientInResults":false,"ClientNotInResults":false,"AffectedByUpdate":false,"SearchCriteria":{"Name":"String","DateOfBirth":"String","CountryOfBirth":"String","Nationality":"String","Address":"String"},"SearchResults":{"HMTResults":[{"ResultStrength":0,"ResultSimilarity":0,"ResultResolved":false,"ResultType":"String","DateListed":"\/Date(-62135596800000-0000)\/","DateUpdated":"\/Date(-62135596800000-0000)\/","Name1":"String","Name2":"String","Name3":"String","Name4":"String","Name5":"String","Name6":"String","DateOfBirth":"String","CountryOfBirth":"String","Nationality":"String","Address1":"String","Address2":"String","Address3":"String","Address4":"String","Address5":"String","Address6":"String","PostCode":"String","Country":"String"}],"OfacResults":[{"ResultStrength":0,"ResultSimilarity":0,"ResultResolved":false,"ResultType":"String","DateUpdated":"\/Date(-62135596800000-0000)\/","FirstName":"String","LastName":"String","Addresses":[{"Address1":"String","Address2":"String","Address3":"String","City":"String","State":"String","PostCode":"String","Country":"String"}],"Akas":[{"FirstName":"String","LastName":"String","Type":"String","Strength":"String"}],"DateOfBirths":[{"DateOfBirth":"String"}],"Nationalities":[{"Country":"String"}],"PlaceOfBirths":[{"PlaceOfBirth":"String"}]}]}}}}