POST | /searches/list | Get all sanctions searches |
---|
"use strict";
export class ResponseError {
/** @param {{ErrorCode?:string,FieldName?:string,Message?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ErrorCode;
/** @type {string} */
FieldName;
/** @type {string} */
Message;
}
export class ArrayOfResponseError extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class ResponseStatus {
/** @param {{ErrorCode?:string,Message?:string,StackTrace?:string,Errors?:ArrayOfResponseError}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
ErrorCode;
/** @type {string} */
Message;
/** @type {string} */
StackTrace;
/** @type {ArrayOfResponseError} */
Errors;
}
export class SearchCriteria {
/** @param {{Name?:string,DateOfBirth?:string,CountryOfBirth?:string,Nationality?:string,Address?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Name;
/** @type {string} */
DateOfBirth;
/** @type {string} */
CountryOfBirth;
/** @type {string} */
Nationality;
/** @type {string} */
Address;
}
export class SearchListItem {
/** @param {{Id?:number,SearchType?:string,DateSearched?:string,DateUpdated?:string,NumOfResults?:number,ClientInResults?:boolean,ClientNotInResults?:boolean,AffectedByUpdate?:boolean,SearchCriteria?:SearchCriteria}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
SearchType;
/** @type {string} */
DateSearched;
/** @type {string} */
DateUpdated;
/** @type {number} */
NumOfResults;
/** @type {boolean} */
ClientInResults;
/** @type {boolean} */
ClientNotInResults;
/** @type {boolean} */
AffectedByUpdate;
/** @type {SearchCriteria} */
SearchCriteria;
}
export class ArrayOfSearchListItem extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class GetListSearchesData {
/** @param {{ResponseStatus?:ResponseStatus,TotalSearchRecords?:number,CurrentPageNum?:number,MaxPageNum?:number,SearchRecords?:ArrayOfSearchListItem}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {ResponseStatus} */
ResponseStatus;
/** @type {number} */
TotalSearchRecords;
/** @type {number} */
CurrentPageNum;
/** @type {number} */
MaxPageNum;
/** @type {ArrayOfSearchListItem} */
SearchRecords;
}
export class GetListSearchesResponse {
/** @param {{Data?:GetListSearchesData}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {GetListSearchesData} */
Data;
}
export class Authentication {
/** @param {{ApiUserId?:string,ApiUserKey?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The API User ID that will authenticate your request */
ApiUserId;
/**
* @type {string}
* @description The API User Key that will authenticate your request */
ApiUserKey;
}
export class GetListSearches {
/** @param {{Authentication?:Authentication,Page?:number,SortOrder?:string,NameSearch?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Authentication} */
Authentication;
/** @type {number} */
Page;
/** @type {string} */
SortOrder;
/** @type {string} */
NameSearch;
}
JavaScript GetListSearches DTOs
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 /searches/list HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Authentication":{"ApiUserId":"String","ApiUserKey":"String"},"Page":0,"SortOrder":"String","NameSearch":"String"}
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"}]},"TotalSearchRecords":0,"CurrentPageNum":0,"MaxPageNum":0,"SearchRecords":[{"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"}}]}}