Sanctions Search API: v2

<back to all web services

GetPepSearches

PEP
The following routes are available for this service:
POST/peps/listGet all PEP 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 PepSearchListItem {
    /** @param {{id?:number,searchType?:string,dateSearched?:string,dateUpdated?:string,dateRenewal?:string,dateArchived?:string,isArchived?:boolean,numOfResults?:number,clientInResults?:boolean,clientNotInResults?:boolean,affectedByUpdate?:boolean,isDayOneSearch?:boolean,searchCriteria?:SearchCriteria}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    id;
    /** @type {string} */
    searchType;
    /** @type {string} */
    dateSearched;
    /** @type {string} */
    dateUpdated;
    /** @type {?string} */
    dateRenewal;
    /** @type {?string} */
    dateArchived;
    /** @type {boolean} */
    isArchived;
    /** @type {number} */
    numOfResults;
    /** @type {boolean} */
    clientInResults;
    /** @type {boolean} */
    clientNotInResults;
    /** @type {boolean} */
    affectedByUpdate;
    /** @type {boolean} */
    isDayOneSearch;
    /** @type {SearchCriteria} */
    searchCriteria;
}
export class ArrayOfPepSearchListItem extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class GetPepSearchesData extends BaseResponse {
    /** @param {{totalSearchRecords?:number,currentPageNum?:number,maxPageNum?:number,searchRecords?:ArrayOfPepSearchListItem,responseStatus?:ResponseStatus}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {number} */
    totalSearchRecords;
    /** @type {number} */
    currentPageNum;
    /** @type {number} */
    maxPageNum;
    /** @type {ArrayOfPepSearchListItem} */
    searchRecords;
}
export class GetPepSearchesResponse {
    /** @param {{data?:GetPepSearchesData}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {GetPepSearchesData} */
    data;
}
export class GetPepSearchesRequest {
    /** @param {{subUserName?:string,listUnresolvedSearches?:boolean,listUpdatedSearches?:boolean,listArchivedSearches?:boolean,page?:number,sortOrder?:string,nameSearch?:string,nameSearchExact?:boolean,filterReference?:string,filterPepType?:string,filterType?:string,filterDateFrom?:string,filterDateTo?:string,filterUserName?:string}} [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} */
    filterPepType;
    /** @type {string} */
    filterType;
    /** @type {?string} */
    filterDateFrom;
    /** @type {?string} */
    filterDateTo;
    /**
     * @type {string}
     * @description If set, will only return searches created by the user */
    filterUserName;
}
export class GetPepSearches extends BaseRequest {
    /** @param {{request?:GetPepSearchesRequest,authentication?:Authentication}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {GetPepSearchesRequest} */
    request;
}

JavaScript GetPepSearches 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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /peps/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","filterPepType":"String","filterType":"String","filterDateFrom":"\/Date(-62135596800000-0000)\/","filterDateTo":"\/Date(-62135596800000-0000)\/","filterUserName":"String"},"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)\/","dateRenewal":"\/Date(-62135596800000-0000)\/","dateArchived":"\/Date(-62135596800000-0000)\/","isArchived":false,"numOfResults":0,"clientInResults":false,"clientNotInResults":false,"affectedByUpdate":false,"isDayOneSearch":false,"searchCriteria":{"name":"String","address":"String","country":"String","dateOfBirth":"String","nationality":"String","reference":"String"}}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}