POST | /sanctions/list | Get all sanctions searches |
---|
"use strict";
export class Authentication {
/** @param {{apiUserId?:string,apiUserKey?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The API User ID provided by us when you signed up to use our API */
apiUserId;
/**
* @type {string}
* @description The API User Key provided by us when you signed up to use our API */
apiUserKey;
}
export class BaseRequest {
/** @param {{authentication?:Authentication}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {Authentication}
* @description The authentication credentials */
authentication;
}
export class ResponseError {
/** @param {{errorCode?:string,fieldName?:string,message?:string,meta?:{ [index: string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
errorCode;
/** @type {string} */
fieldName;
/** @type {string} */
message;
/** @type {{ [index: string]: string; }} */
meta;
}
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,meta?:{ [index: string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
errorCode;
/** @type {string} */
message;
/** @type {string} */
stackTrace;
/** @type {ArrayOfResponseError} */
errors;
/** @type {{ [index: string]: string; }} */
meta;
}
export class BaseResponse {
/** @param {{responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {ResponseStatus}
* @description The status of the response */
responseStatus;
}
export class SearchCriteria {
/** @param {{name?:string,address?:string,country?:string,dateOfBirth?:string,nationality?:string,reference?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
name;
/** @type {string} */
address;
/** @type {string} */
country;
/** @type {string} */
dateOfBirth;
/** @type {string} */
nationality;
/** @type {string} */
reference;
}
export class SearchSource {
/** @param {{listId?:string,listName?:string,listShortName?:string,isAffectedByListUpdate?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
listId;
/** @type {string} */
listName;
/** @type {string} */
listShortName;
/** @type {?boolean} */
isAffectedByListUpdate;
}
export class SearchListItem {
/** @param {{id?:number,searchType?:string,dateSearched?:string,dateUpdated?:string,dateArchived?:string,isArchived?:boolean,numOfResults?:number,clientInResults?:boolean,clientNotInResults?:boolean,affectedByUpdate?:boolean,searchCriteria?:SearchCriteria,searchSources?:SearchSource[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
searchType;
/** @type {string} */
dateSearched;
/** @type {string} */
dateUpdated;
/** @type {?string} */
dateArchived;
/** @type {boolean} */
isArchived;
/** @type {number} */
numOfResults;
/** @type {boolean} */
clientInResults;
/** @type {boolean} */
clientNotInResults;
/** @type {boolean} */
affectedByUpdate;
/** @type {SearchCriteria} */
searchCriteria;
/** @type {SearchSource[]} */
searchSources;
}
export class ArrayOfSearchListItem extends Array {
constructor(init) { super(init); Object.assign(this, init) }
}
export class GetSearchesData extends BaseResponse {
/** @param {{totalSearchRecords?:number,currentPageNum?:number,maxPageNum?:number,searchRecords?:ArrayOfSearchListItem,responseStatus?:ResponseStatus}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {number} */
totalSearchRecords;
/** @type {number} */
currentPageNum;
/** @type {number} */
maxPageNum;
/** @type {ArrayOfSearchListItem} */
searchRecords;
}
export class GetSearchesResponse {
/** @param {{data?:GetSearchesData}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {GetSearchesData} */
data;
}
export class GetSearchesRequest {
/** @param {{subUserName?:string,listUnresolvedSearches?:boolean,listUpdatedSearches?:boolean,listArchivedSearches?:boolean,page?:number,sortOrder?:string,nameSearch?:string,nameSearchExact?:boolean,filterReference?:string,filterType?:string,filterDateFrom?:string,filterDateTo?:string,filterUserName?:string,includeSearchSourcesFull?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description If the searches are being accessed by a sub user, specify their username here to only return searches they have permissions to view */
subUserName;
/** @type {?boolean} */
listUnresolvedSearches;
/** @type {?boolean} */
listUpdatedSearches;
/** @type {boolean} */
listArchivedSearches;
/** @type {number} */
page;
/** @type {string} */
sortOrder;
/** @type {string} */
nameSearch;
/** @type {boolean} */
nameSearchExact;
/** @type {string} */
filterReference;
/** @type {string} */
filterType;
/** @type {?string} */
filterDateFrom;
/** @type {?string} */
filterDateTo;
/**
* @type {string}
* @description If set, will only return searches created by the user */
filterUserName;
/** @type {boolean} */
includeSearchSourcesFull;
}
export class GetSearches extends BaseRequest {
/** @param {{request?:GetSearchesRequest,authentication?:Authentication}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {GetSearchesRequest} */
request;
}
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/list HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"request":{"subUserName":"String","listUnresolvedSearches":false,"listUpdatedSearches":false,"listArchivedSearches":false,"page":0,"sortOrder":"String","nameSearch":"String","nameSearchExact":false,"filterReference":"String","filterType":"String","filterDateFrom":"\/Date(-62135596800000-0000)\/","filterDateTo":"\/Date(-62135596800000-0000)\/","filterUserName":"String","includeSearchSourcesFull":false},"authentication":{"apiUserId":"String","apiUserKey":"String"}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"data":{"totalSearchRecords":0,"currentPageNum":0,"maxPageNum":0,"searchRecords":[{"id":0,"searchType":"String","dateSearched":"\/Date(-62135596800000-0000)\/","dateUpdated":"\/Date(-62135596800000-0000)\/","dateArchived":"\/Date(-62135596800000-0000)\/","isArchived":false,"numOfResults":0,"clientInResults":false,"clientNotInResults":false,"affectedByUpdate":false,"searchCriteria":{"name":"String","address":"String","country":"String","dateOfBirth":"String","nationality":"String","reference":"String"},"searchSources":[{"listId":"String","listName":"String","listShortName":"String","isAffectedByListUpdate":false}]}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}